Skip to content

Commit

Permalink
[SCSI] qla2xxx: Reject loopback request if one is already in progress.
Browse files Browse the repository at this point in the history
If another function on the port has initiated a loopback operation do not
process the current request.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Chad Dupuis authored and James Bottomley committed Feb 22, 2013
1 parent 37f489b commit 1bcc46c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions drivers/scsi/qla2xxx/qla_bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/scsi/qla2xxx/qla_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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, |
Expand Down

0 comments on commit 1bcc46c

Please sign in to comment.