Skip to content

Commit aaf4d3e

Browse files
Saurav KashyapJames Bottomley
authored andcommitted
[SCSI] qla2xxx: Properly check for current state after the fabric-login request.
[jejb: checkpatch fixes] Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Chad Dupuis <[email protected]> Signed-off-by: James Bottomley <[email protected]>
1 parent 4aee576 commit aaf4d3e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

drivers/scsi/qla2xxx/qla_os.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3577,9 +3577,25 @@ void qla2x00_relogin(struct scsi_qla_host *vha)
35773577
continue;
35783578
/* Attempt a retry. */
35793579
status = 1;
3580-
} else
3580+
} else {
35813581
status = qla2x00_fabric_login(vha,
35823582
fcport, &next_loopid);
3583+
if (status == QLA_SUCCESS) {
3584+
int status2;
3585+
uint8_t opts;
3586+
3587+
opts = 0;
3588+
if (fcport->flags &
3589+
FCF_FCP2_DEVICE)
3590+
opts |= BIT_1;
3591+
status2 =
3592+
qla2x00_get_port_database(
3593+
vha, fcport,
3594+
opts);
3595+
if (status2 != QLA_SUCCESS)
3596+
status = 1;
3597+
}
3598+
}
35833599
} else
35843600
status = qla2x00_local_device_login(vha,
35853601
fcport);

0 commit comments

Comments
 (0)