diff options
author | Seokmann Ju <seokmann.ju@qlogic.com> | 2008-04-03 16:13:31 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 13:19:16 -0400 |
commit | 221726d41a6c351fd8ea7d4b11ab13085f7a8647 (patch) | |
tree | a785dccb460f210bf4bf41d40370a39c9f86734d /drivers/scsi/qla2xxx/qla_mid.c | |
parent | bd2a1846b2313e32d0270151a31a6b8335384a20 (diff) |
[SCSI] qla2xxx: Correct vport configuration-change handling.
Upon having configuration changes on vports only, the driver
handles SCR regardless physical port state and, in turn, it
results mailbox error as below:
Mar 20 11:24:20 dl585 kernel: qla2x00_mailbox_command(9): **** FAILED. mbx0=4005, mbx1=1, mbx2=8100, cmd=70 ****
With the changes, driver checks physical port loop_state and make
sure the port is ready to take commands.
Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mid.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mid.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index 9f48cd46f618..f2b04979e5f0 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
@@ -254,9 +254,17 @@ qla2x00_vp_abort_isp(scsi_qla_host_t *vha) | |||
254 | static int | 254 | static int |
255 | qla2x00_do_dpc_vp(scsi_qla_host_t *vha) | 255 | qla2x00_do_dpc_vp(scsi_qla_host_t *vha) |
256 | { | 256 | { |
257 | scsi_qla_host_t *ha = vha->parent; | ||
258 | |||
257 | if (test_and_clear_bit(VP_IDX_ACQUIRED, &vha->vp_flags)) { | 259 | if (test_and_clear_bit(VP_IDX_ACQUIRED, &vha->vp_flags)) { |
258 | /* VP acquired. complete port configuration */ | 260 | /* VP acquired. complete port configuration */ |
259 | qla24xx_configure_vp(vha); | 261 | if (atomic_read(&ha->loop_state) == LOOP_READY) { |
262 | qla24xx_configure_vp(vha); | ||
263 | } else { | ||
264 | set_bit(VP_IDX_ACQUIRED, &vha->vp_flags); | ||
265 | set_bit(VP_DPC_NEEDED, &ha->dpc_flags); | ||
266 | } | ||
267 | |||
260 | return 0; | 268 | return 0; |
261 | } | 269 | } |
262 | 270 | ||