]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qla2xxx: Reject loopback request if one is already in progress.
authorChad Dupuis <chad.dupuis@qlogic.com>
Thu, 22 Nov 2012 06:56:03 +0000 (12:26 +0530)
committerJerry Snitselaar <jerry.snitselaar@oracle.com>
Mon, 17 Dec 2012 17:40:15 +0000 (10:40 -0700)
If another function on the port has initiated a loopback operation do not
process the current request.

JIRA Key: V2632FC-309
ER: 99818

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
drivers/scsi/qla2xxx/qla_bsg.c
drivers/scsi/qla2xxx/qla_dbg.c

index 05d5b6c7a12afc58008db83a590304b9a6dbd80b..957491e50e6eb062bd001a319c8b1042d60efb4f 100644 (file)
@@ -746,6 +746,14 @@ qla2x00_process_loopback(struct fc_bsg_job *bsg_job)
                                goto done_free_dma_rsp;
                        }
 
+                       if ((config[0] & INTERNAL_LOOPBACK_MASK) != 0) {
+                               ql_dbg(ql_dbg_user, vha, 0x70c4,
+                                   "Loopback operation already in "
+                                   "progress.\n");
+                               rval = -EAGAIN;
+                               goto done_free_dma_rsp;
+                       }
+
                        ql_dbg(ql_dbg_user, vha, 0x70c0,
                            "elreq.options=%04x\n", elreq.options);
 
index beeed951aca885601ba1c2bd1f1a9d4930d8de2b..ed4d094425033eff949dc306edc682fb2a695610 100644 (file)
@@ -22,7 +22,7 @@
  * | Async Events                 |       0x5071       | 0x502b-0x502f  |
  * |                            |                    | 0x5047,0x5052  |
  * | Timer Routines               |       0x6011       |               |
- * | User Space Interactions      |       0x70c3       | 0x7018,0x702e  |
+ * | User Space Interactions      |       0x70c4       | 0x7018,0x702e  |
  * |                              |                    | 0x7020,0x7024  |
  * |                              |                    | 0x7039,0x7045  |
  * |                              |                    | 0x7073-0x7075  |