Skip to content

Commit

Permalink
[SCSI] qla2xxx: Correct vport configuration-change handling.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Seokmann Ju authored and James Bottomley committed Apr 7, 2008
1 parent bd2a184 commit 221726d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/scsi/qla2xxx/qla_mid.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,17 @@ qla2x00_vp_abort_isp(scsi_qla_host_t *vha)
static int
qla2x00_do_dpc_vp(scsi_qla_host_t *vha)
{
scsi_qla_host_t *ha = vha->parent;

if (test_and_clear_bit(VP_IDX_ACQUIRED, &vha->vp_flags)) {
/* VP acquired. complete port configuration */
qla24xx_configure_vp(vha);
if (atomic_read(&ha->loop_state) == LOOP_READY) {
qla24xx_configure_vp(vha);
} else {
set_bit(VP_IDX_ACQUIRED, &vha->vp_flags);
set_bit(VP_DPC_NEEDED, &ha->dpc_flags);
}

return 0;
}

Expand Down

0 comments on commit 221726d

Please sign in to comment.