Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpi3mr/mpi3mr_cam.c
Show First 20 Lines • Show All 1,554 Lines • ▼ Show 20 Lines | "%s :\texpander_handle(0x%04x), enclosure_handle(0x%04x) " | ||||
(event_data->ExpanderDevHandle), | (event_data->ExpanderDevHandle), | ||||
(event_data->EnclosureHandle), | (event_data->EnclosureHandle), | ||||
event_data->StartPhyNum, event_data->NumEntries); | event_data->StartPhyNum, event_data->NumEntries); | ||||
for (i = 0; i < event_data->NumEntries; i++) { | for (i = 0; i < event_data->NumEntries; i++) { | ||||
handle = (event_data->PhyEntry[i].AttachedDevHandle); | handle = (event_data->PhyEntry[i].AttachedDevHandle); | ||||
if (!handle) | if (!handle) | ||||
continue; | continue; | ||||
phy_number = event_data->StartPhyNum + i; | phy_number = event_data->StartPhyNum + i; | ||||
reason_code = event_data->PhyEntry[i].Status & | reason_code = event_data->PhyEntry[i].PhyStatus & | ||||
MPI3_EVENT_SAS_TOPO_PHY_RC_MASK; | MPI3_EVENT_SAS_TOPO_PHY_RC_MASK; | ||||
switch (reason_code) { | switch (reason_code) { | ||||
case MPI3_EVENT_SAS_TOPO_PHY_RC_TARG_NOT_RESPONDING: | case MPI3_EVENT_SAS_TOPO_PHY_RC_TARG_NOT_RESPONDING: | ||||
status_str = "target remove"; | status_str = "target remove"; | ||||
break; | break; | ||||
case MPI3_EVENT_SAS_TOPO_PHY_RC_DELAY_NOT_RESPONDING: | case MPI3_EVENT_SAS_TOPO_PHY_RC_DELAY_NOT_RESPONDING: | ||||
status_str = "delay target remove"; | status_str = "delay target remove"; | ||||
break; | break; | ||||
Show All 36 Lines | for (i = 0; i < event_data->NumEntries; i++) { | ||||
if (!handle) | if (!handle) | ||||
continue; | continue; | ||||
target = mpi3mr_find_target_by_dev_handle(sc->cam_sc, handle); | target = mpi3mr_find_target_by_dev_handle(sc->cam_sc, handle); | ||||
if (!target) | if (!target) | ||||
continue; | continue; | ||||
target->link_rate = link_rate; | target->link_rate = link_rate; | ||||
reason_code = event_data->PhyEntry[i].Status & | reason_code = event_data->PhyEntry[i].PhyStatus & | ||||
MPI3_EVENT_SAS_TOPO_PHY_RC_MASK; | MPI3_EVENT_SAS_TOPO_PHY_RC_MASK; | ||||
switch (reason_code) { | switch (reason_code) { | ||||
case MPI3_EVENT_SAS_TOPO_PHY_RC_TARG_NOT_RESPONDING: | case MPI3_EVENT_SAS_TOPO_PHY_RC_TARG_NOT_RESPONDING: | ||||
if (target->exposed_to_os) | if (target->exposed_to_os) | ||||
mpi3mr_remove_device_from_os(sc, target->dev_handle); | mpi3mr_remove_device_from_os(sc, target->dev_handle); | ||||
mpi3mr_remove_device_from_list(sc, target, false); | mpi3mr_remove_device_from_list(sc, target, false); | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 600 Lines • Show Last 20 Lines |