aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSeokmann Ju <seokmann.ju@qlogic.com>2008-07-10 19:55:56 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-26 15:14:41 -0400
commit8f0d6436d215a2e0033ab2af192ac7e4b300bd3e (patch)
tree9563f354af93d1f379f827fb1cea0d45b62a59be /drivers
parent246de42cfc0abc4e25585f2dca53f8226f62391c (diff)
[SCSI] qla2xxx: Correct fcport state-management during loss.
All fcport->state management should be done within qla2x00_mark_device_lost(), the assignment of state within qla2x00_mark_vp_devices_dead() caused associated rports to not be removed. 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_mid.c1
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c13
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c
index fa35339b7b69..e7565765fa14 100644
--- a/drivers/scsi/qla2xxx/qla_mid.c
+++ b/drivers/scsi/qla2xxx/qla_mid.c
@@ -105,7 +105,6 @@ qla2x00_mark_vp_devices_dead(scsi_qla_host_t *vha)
105 "loop_id=0x%04x :%x\n", 105 "loop_id=0x%04x :%x\n",
106 vha->host_no, fcport->loop_id, fcport->vp_idx)); 106 vha->host_no, fcport->loop_id, fcport->vp_idx));
107 107
108 atomic_set(&fcport->state, FCS_DEVICE_DEAD);
109 qla2x00_mark_device_lost(vha, fcport, 0, 0); 108 qla2x00_mark_device_lost(vha, fcport, 0, 0);
110 } 109 }
111} 110}
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 9c3a57fa5060..3f391698e1ce 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1931,7 +1931,7 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *ha, int defer)
1931 scsi_qla_host_t *pha = to_qla_parent(ha); 1931 scsi_qla_host_t *pha = to_qla_parent(ha);
1932 1932
1933 list_for_each_entry(fcport, &pha->fcports, list) { 1933 list_for_each_entry(fcport, &pha->fcports, list) {
1934 if (ha->vp_idx != 0 && ha->vp_idx != fcport->vp_idx) 1934 if (ha->vp_idx != fcport->vp_idx)
1935 continue; 1935 continue;
1936 /* 1936 /*
1937 * No point in marking the device as lost, if the device is 1937 * No point in marking the device as lost, if the device is
@@ -1939,17 +1939,10 @@ qla2x00_mark_all_devices_lost(scsi_qla_host_t *ha, int defer)
1939 */ 1939 */
1940 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD) 1940 if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD)
1941 continue; 1941 continue;
1942 if (atomic_read(&fcport->state) == FCS_ONLINE) { 1942 if (atomic_read(&fcport->state) == FCS_ONLINE)
1943 if (defer) 1943 qla2x00_schedule_rport_del(ha, fcport, defer);
1944 qla2x00_schedule_rport_del(ha, fcport, defer);
1945 else if (ha->vp_idx == fcport->vp_idx)
1946 qla2x00_schedule_rport_del(ha, fcport, defer);
1947 }
1948 atomic_set(&fcport->state, FCS_DEVICE_LOST); 1944 atomic_set(&fcport->state, FCS_DEVICE_LOST);
1949 } 1945 }
1950
1951 if (defer)
1952 qla2xxx_wake_dpc(ha);
1953} 1946}
1954 1947
1955/* 1948/*