aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_isr.c
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2014-09-25 05:17:01 -0400
committerChristoph Hellwig <hch@lst.de>2014-09-25 08:25:05 -0400
commitef86cb2059a14b4024c7320999ee58e938873032 (patch)
tree396e4b1f5320f1e192c38566a8938653e344f2c0 /drivers/scsi/qla2xxx/qla_isr.c
parent2486c62765d73ad8f206ba43b8ede09e689bd803 (diff)
qla2xxx: Mark port lost when we receive an RSCN for it.
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 696e4a2d3fa7..a04a1b1f7f32 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -575,8 +575,9 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
575 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; 575 struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
576 struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24; 576 struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24;
577 struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82; 577 struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82;
578 uint32_t rscn_entry, host_pid; 578 uint32_t rscn_entry, host_pid, tmp_pid;
579 unsigned long flags; 579 unsigned long flags;
580 fc_port_t *fcport = NULL;
580 581
581 /* Setup to process RIO completion. */ 582 /* Setup to process RIO completion. */
582 handle_cnt = 0; 583 handle_cnt = 0;
@@ -979,6 +980,20 @@ skip_rio:
979 if (qla2x00_is_a_vp_did(vha, rscn_entry)) 980 if (qla2x00_is_a_vp_did(vha, rscn_entry))
980 break; 981 break;
981 982
983 /*
984 * Search for the rport related to this RSCN entry and mark it
985 * as lost.
986 */
987 list_for_each_entry(fcport, &vha->vp_fcports, list) {
988 if (atomic_read(&fcport->state) != FCS_ONLINE)
989 continue;
990 tmp_pid = fcport->d_id.b24;
991 if (fcport->d_id.b24 == rscn_entry) {
992 qla2x00_mark_device_lost(vha, fcport, 0, 0);
993 break;
994 }
995 }
996
982 atomic_set(&vha->loop_down_timer, 0); 997 atomic_set(&vha->loop_down_timer, 0);
983 vha->flags.management_server_logged_in = 0; 998 vha->flags.management_server_logged_in = 0;
984 999