提交 308609c6 编写于 作者: K Kashyap, Desai 提交者: James Bottomley

[SCSI] mpt2sas: Support dev remove when phy status is MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT

Add support to process device removal events when the phy status is set to
MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT.
Signed-off-by: NKashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 29786e19
...@@ -4067,15 +4067,16 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, ...@@ -4067,15 +4067,16 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc,
} }
if (ioc->shost_recovery) if (ioc->shost_recovery)
return; return;
if (event_data->PHY[i].PhyStatus & phy_number = event_data->StartPhyNum + i;
MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT) reason_code = event_data->PHY[i].PhyStatus &
MPI2_EVENT_SAS_TOPO_RC_MASK;
if ((event_data->PHY[i].PhyStatus &
MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT) && (reason_code !=
MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING))
continue; continue;
handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle); handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle);
if (!handle) if (!handle)
continue; continue;
phy_number = event_data->StartPhyNum + i;
reason_code = event_data->PHY[i].PhyStatus &
MPI2_EVENT_SAS_TOPO_RC_MASK;
link_rate_ = event_data->PHY[i].LinkRate >> 4; link_rate_ = event_data->PHY[i].LinkRate >> 4;
switch (reason_code) { switch (reason_code) {
case MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED: case MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册