summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorAnirban Chakraborty <anirban.chakraborty@qlogic.com>2008-11-14 13:48:12 -0800
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 11:24:19 -0600
commit749af3d54a6d5619088ecadb1010c6ab7766f519 (patch)
tree98b0e9f51959c8b551875538ae642f0e6b2e0933 /drivers/scsi/qla2xxx/qla_os.c
parentb60af5b0adf0da24c673598c8d3fb4d4189a15ce (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/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c17
1 files changed, 10 insertions, 7 deletions
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)
return ret;
qla_printk(KERN_INFO, vha->hw,
- "scsi(%ld:%d:%d): LOOP RESET ISSUED.\n", vha->host_no, id, lun);
+ "scsi(%ld:%d:%d): BUS RESET ISSUED.\n", vha->host_no, id, lun);
if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) {
DEBUG2(printk("%s failed:board disabled\n",__func__));
@@ -1039,20 +1039,23 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)
struct fc_port *fcport;
struct qla_hw_data *ha = vha->hw;
- if (ha->flags.enable_lip_full_login) {
+ if (ha->flags.enable_lip_full_login && !vha->vp_idx) {
ret = qla2x00_full_login_lip(vha);
if (ret != QLA_SUCCESS) {
- DEBUG2_3(printk("%s(%ld): bus_reset failed: "
+ DEBUG2_3(printk("%s(%ld): failed: "
"full_login_lip=%d.\n", __func__, vha->host_no,
ret));
- } else
- qla2x00_wait_for_loop_ready(vha);
+ }
+ atomic_set(&vha->loop_state, LOOP_DOWN);
+ atomic_set(&vha->loop_down_timer, LOOP_DOWN_TIME);
+ qla2x00_mark_all_devices_lost(vha, 0);
+ qla2x00_wait_for_loop_ready(vha);
}
- if (ha->flags.enable_lip_reset) {
+ if (ha->flags.enable_lip_reset && !vha->vp_idx) {
ret = qla2x00_lip_reset(vha);
if (ret != QLA_SUCCESS) {
- DEBUG2_3(printk("%s(%ld): bus_reset failed: "
+ DEBUG2_3(printk("%s(%ld): failed: "
"lip_reset=%d.\n", __func__, vha->host_no, ret));
} else
qla2x00_wait_for_loop_ready(vha);