Commit 8c255274 authored by Chad Dupuis's avatar Chad Dupuis Committed by Jiri Slaby

qla2xxx: Mark port lost when we receive an RSCN for it.

commit ef86cb20 upstream.
Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent c81091b3
...@@ -536,8 +536,9 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) ...@@ -536,8 +536,9 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;
struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24; struct device_reg_24xx __iomem *reg24 = &ha->iobase->isp24;
struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82; struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82;
uint32_t rscn_entry, host_pid; uint32_t rscn_entry, host_pid, tmp_pid;
unsigned long flags; unsigned long flags;
fc_port_t *fcport = NULL;
/* Setup to process RIO completion. */ /* Setup to process RIO completion. */
handle_cnt = 0; handle_cnt = 0;
...@@ -932,6 +933,20 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb) ...@@ -932,6 +933,20 @@ qla2x00_async_event(scsi_qla_host_t *vha, struct rsp_que *rsp, uint16_t *mb)
if (qla2x00_is_a_vp_did(vha, rscn_entry)) if (qla2x00_is_a_vp_did(vha, rscn_entry))
break; break;
/*
* Search for the rport related to this RSCN entry and mark it
* as lost.
*/
list_for_each_entry(fcport, &vha->vp_fcports, list) {
if (atomic_read(&fcport->state) != FCS_ONLINE)
continue;
tmp_pid = fcport->d_id.b24;
if (fcport->d_id.b24 == rscn_entry) {
qla2x00_mark_device_lost(vha, fcport, 0, 0);
break;
}
}
atomic_set(&vha->loop_down_timer, 0); atomic_set(&vha->loop_down_timer, 0);
vha->flags.management_server_logged_in = 0; vha->flags.management_server_logged_in = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment