diff options
author | andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> | 2006-03-09 17:27:44 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-12 10:40:37 -0500 |
commit | 9a52a57cb9d247fc1cea018fd3f4421f8fd6642a (patch) | |
tree | 1ceafa260a18a02485973cd0bed9b971f558910d /drivers | |
parent | 4a59f71d7f0d6dd433fd509584352cdd7c62e877 (diff) |
[SCSI] qla2xxx: Correct FCAL login retry logic for ISP24xx.
ISP24XX FW does not support Mbx 0x74 ie Login Local Port.
Added the equivalent code for ISP24XX ie to relogin in non
fabric case for ISP24XX use login iocb.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 5 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 11 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 2 |
4 files changed, 14 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index e897eadf0362..91e83e2c1eb8 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -42,7 +42,7 @@ extern int qla2x00_loop_resync(scsi_qla_host_t *); | |||
42 | 42 | ||
43 | extern int qla2x00_find_new_loop_id(scsi_qla_host_t *, fc_port_t *); | 43 | extern int qla2x00_find_new_loop_id(scsi_qla_host_t *, fc_port_t *); |
44 | extern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *); | 44 | extern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *); |
45 | extern int qla2x00_local_device_login(scsi_qla_host_t *, uint16_t); | 45 | extern int qla2x00_local_device_login(scsi_qla_host_t *, fc_port_t *); |
46 | 46 | ||
47 | extern void qla2x00_restart_queues(scsi_qla_host_t *, uint8_t); | 47 | extern void qla2x00_restart_queues(scsi_qla_host_t *, uint8_t); |
48 | 48 | ||
@@ -166,7 +166,8 @@ qla24xx_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t, | |||
166 | uint16_t *, uint8_t); | 166 | uint16_t *, uint8_t); |
167 | 167 | ||
168 | extern int | 168 | extern int |
169 | qla2x00_login_local_device(scsi_qla_host_t *, uint16_t, uint16_t *, uint8_t); | 169 | qla2x00_login_local_device(scsi_qla_host_t *, fc_port_t *, uint16_t *, |
170 | uint8_t); | ||
170 | 171 | ||
171 | extern int | 172 | extern int |
172 | qla2x00_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t); | 173 | qla2x00_fabric_logout(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t); |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index ebc7c2498067..89a3fc0595bb 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -2888,13 +2888,13 @@ qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport, | |||
2888 | * 3 - Fatal error | 2888 | * 3 - Fatal error |
2889 | */ | 2889 | */ |
2890 | int | 2890 | int |
2891 | qla2x00_local_device_login(scsi_qla_host_t *ha, uint16_t loop_id) | 2891 | qla2x00_local_device_login(scsi_qla_host_t *ha, fc_port_t *fcport) |
2892 | { | 2892 | { |
2893 | int rval; | 2893 | int rval; |
2894 | uint16_t mb[MAILBOX_REGISTER_COUNT]; | 2894 | uint16_t mb[MAILBOX_REGISTER_COUNT]; |
2895 | 2895 | ||
2896 | memset(mb, 0, sizeof(mb)); | 2896 | memset(mb, 0, sizeof(mb)); |
2897 | rval = qla2x00_login_local_device(ha, loop_id, mb, BIT_0); | 2897 | rval = qla2x00_login_local_device(ha, fcport, mb, BIT_0); |
2898 | if (rval == QLA_SUCCESS) { | 2898 | if (rval == QLA_SUCCESS) { |
2899 | /* Interrogate mailbox registers for any errors */ | 2899 | /* Interrogate mailbox registers for any errors */ |
2900 | if (mb[0] == MBS_COMMAND_ERROR) | 2900 | if (mb[0] == MBS_COMMAND_ERROR) |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 85c83e0027ff..d6cb3bd1a29a 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -1631,20 +1631,25 @@ qla2x00_login_fabric(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, | |||
1631 | * | 1631 | * |
1632 | */ | 1632 | */ |
1633 | int | 1633 | int |
1634 | qla2x00_login_local_device(scsi_qla_host_t *ha, uint16_t loop_id, | 1634 | qla2x00_login_local_device(scsi_qla_host_t *ha, fc_port_t *fcport, |
1635 | uint16_t *mb_ret, uint8_t opt) | 1635 | uint16_t *mb_ret, uint8_t opt) |
1636 | { | 1636 | { |
1637 | int rval; | 1637 | int rval; |
1638 | mbx_cmd_t mc; | 1638 | mbx_cmd_t mc; |
1639 | mbx_cmd_t *mcp = &mc; | 1639 | mbx_cmd_t *mcp = &mc; |
1640 | 1640 | ||
1641 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) | ||
1642 | return qla24xx_login_fabric(ha, fcport->loop_id, | ||
1643 | fcport->d_id.b.domain, fcport->d_id.b.area, | ||
1644 | fcport->d_id.b.al_pa, mb_ret, opt); | ||
1645 | |||
1641 | DEBUG3(printk("%s(%ld): entered.\n", __func__, ha->host_no);) | 1646 | DEBUG3(printk("%s(%ld): entered.\n", __func__, ha->host_no);) |
1642 | 1647 | ||
1643 | mcp->mb[0] = MBC_LOGIN_LOOP_PORT; | 1648 | mcp->mb[0] = MBC_LOGIN_LOOP_PORT; |
1644 | if (HAS_EXTENDED_IDS(ha)) | 1649 | if (HAS_EXTENDED_IDS(ha)) |
1645 | mcp->mb[1] = loop_id; | 1650 | mcp->mb[1] = fcport->loop_id; |
1646 | else | 1651 | else |
1647 | mcp->mb[1] = loop_id << 8; | 1652 | mcp->mb[1] = fcport->loop_id << 8; |
1648 | mcp->mb[2] = opt; | 1653 | mcp->mb[2] = opt; |
1649 | mcp->out_mb = MBX_2|MBX_1|MBX_0; | 1654 | mcp->out_mb = MBX_2|MBX_1|MBX_0; |
1650 | mcp->in_mb = MBX_7|MBX_6|MBX_1|MBX_0; | 1655 | mcp->in_mb = MBX_7|MBX_6|MBX_1|MBX_0; |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 0fc89ac6a51b..029bbf461bb2 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -2295,7 +2295,7 @@ qla2x00_do_dpc(void *data) | |||
2295 | } else | 2295 | } else |
2296 | status = | 2296 | status = |
2297 | qla2x00_local_device_login( | 2297 | qla2x00_local_device_login( |
2298 | ha, fcport->loop_id); | 2298 | ha, fcport); |
2299 | 2299 | ||
2300 | if (status == QLA_SUCCESS) { | 2300 | if (status == QLA_SUCCESS) { |
2301 | fcport->old_loop_id = fcport->loop_id; | 2301 | fcport->old_loop_id = fcport->loop_id; |