diff options
author | Anirban Chakraborty <anirban.chakraborty@qlogic.com> | 2008-11-14 16:48:12 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:24:19 -0500 |
commit | 749af3d54a6d5619088ecadb1010c6ab7766f519 (patch) | |
tree | 98b0e9f51959c8b551875538ae642f0e6b2e0933 /drivers/scsi | |
parent | b60af5b0adf0da24c673598c8d3fb4d4189a15ce (diff) |
[SCSI] qla2xxx: Code changes for vport bus reset
The following patch changes the handling of bus reset when issued from a
vport. In the bus reset code, an extra check is made to make sure that the lip
reset is not done before resetting the targets if the bus reset came from a
vport.
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index bc52aa01a49e..bbe7181fb3d5 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -2256,7 +2256,7 @@ __qla24xx_issue_tmf(char *name, uint32_t type, struct fc_port *fcport, | |||
2256 | scsi_qla_host_t *vha; | 2256 | scsi_qla_host_t *vha; |
2257 | struct qla_hw_data *ha; | 2257 | struct qla_hw_data *ha; |
2258 | 2258 | ||
2259 | DEBUG11(printk("%s(%ld): entered.\n", __func__, fcport->ha->host_no)); | 2259 | DEBUG11(printk("%s(%ld): entered.\n", __func__, fcport->vha->host_no)); |
2260 | 2260 | ||
2261 | vha = fcport->vha; | 2261 | vha = fcport->vha; |
2262 | ha = vha->hw; | 2262 | ha = vha->hw; |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 9830fcb6130a..f6365884c97b 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -918,7 +918,7 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) | |||
918 | return ret; | 918 | return ret; |
919 | 919 | ||
920 | qla_printk(KERN_INFO, vha->hw, | 920 | qla_printk(KERN_INFO, vha->hw, |
921 | "scsi(%ld:%d:%d): LOOP RESET ISSUED.\n", vha->host_no, id, lun); | 921 | "scsi(%ld:%d:%d): BUS RESET ISSUED.\n", vha->host_no, id, lun); |
922 | 922 | ||
923 | if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) { | 923 | if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) { |
924 | DEBUG2(printk("%s failed:board disabled\n",__func__)); | 924 | DEBUG2(printk("%s failed:board disabled\n",__func__)); |
@@ -1039,20 +1039,23 @@ qla2x00_loop_reset(scsi_qla_host_t *vha) | |||
1039 | struct fc_port *fcport; | 1039 | struct fc_port *fcport; |
1040 | struct qla_hw_data *ha = vha->hw; | 1040 | struct qla_hw_data *ha = vha->hw; |
1041 | 1041 | ||
1042 | if (ha->flags.enable_lip_full_login) { | 1042 | if (ha->flags.enable_lip_full_login && !vha->vp_idx) { |
1043 | ret = qla2x00_full_login_lip(vha); | 1043 | ret = qla2x00_full_login_lip(vha); |
1044 | if (ret != QLA_SUCCESS) { | 1044 | if (ret != QLA_SUCCESS) { |
1045 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " | 1045 | DEBUG2_3(printk("%s(%ld): failed: " |
1046 | "full_login_lip=%d.\n", __func__, vha->host_no, | 1046 | "full_login_lip=%d.\n", __func__, vha->host_no, |
1047 | ret)); | 1047 | ret)); |
1048 | } else | 1048 | } |
1049 | qla2x00_wait_for_loop_ready(vha); | 1049 | atomic_set(&vha->loop_state, LOOP_DOWN); |
1050 | atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME); | ||
1051 | qla2x00_mark_all_devices_lost(vha, 0); | ||
1052 | qla2x00_wait_for_loop_ready(vha); | ||
1050 | } | 1053 | } |
1051 | 1054 | ||
1052 | if (ha->flags.enable_lip_reset) { | 1055 | if (ha->flags.enable_lip_reset && !vha->vp_idx) { |
1053 | ret = qla2x00_lip_reset(vha); | 1056 | ret = qla2x00_lip_reset(vha); |
1054 | if (ret != QLA_SUCCESS) { | 1057 | if (ret != QLA_SUCCESS) { |
1055 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " | 1058 | DEBUG2_3(printk("%s(%ld): failed: " |
1056 | "lip_reset=%d.\n", __func__, vha->host_no, ret)); | 1059 | "lip_reset=%d.\n", __func__, vha->host_no, ret)); |
1057 | } else | 1060 | } else |
1058 | qla2x00_wait_for_loop_ready(vha); | 1061 | qla2x00_wait_for_loop_ready(vha); |