aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.h2
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_scsih.c17
2 files changed, 13 insertions, 6 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.h b/drivers/scsi/mpt2sas/mpt2sas_base.h
index 39dc69627bc7..1f3efd6569d3 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.h
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.h
@@ -802,5 +802,7 @@ void mpt2sas_transport_update_links(struct MPT2SAS_ADAPTER *ioc, u16 handle,
802 u16 attached_handle, u8 phy_number, u8 link_rate); 802 u16 attached_handle, u8 phy_number, u8 link_rate);
803extern struct sas_function_template mpt2sas_transport_functions; 803extern struct sas_function_template mpt2sas_transport_functions;
804extern struct scsi_transport_template *mpt2sas_transport_template; 804extern struct scsi_transport_template *mpt2sas_transport_template;
805extern int scsi_internal_device_block(struct scsi_device *sdev);
806extern int scsi_internal_device_unblock(struct scsi_device *sdev);
805 807
806#endif /* MPT2SAS_BASE_H_INCLUDED */ 808#endif /* MPT2SAS_BASE_H_INCLUDED */
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
index c0d5d5e1f9c8..6e6d5af6b365 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -2222,7 +2222,7 @@ _scsih_ublock_io_device(struct MPT2SAS_ADAPTER *ioc, u16 handle)
2222 MPT2SAS_INFO_FMT "SDEV_RUNNING: " 2222 MPT2SAS_INFO_FMT "SDEV_RUNNING: "
2223 "handle(0x%04x)\n", ioc->name, handle)); 2223 "handle(0x%04x)\n", ioc->name, handle));
2224 sas_device_priv_data->block = 0; 2224 sas_device_priv_data->block = 0;
2225 scsi_device_set_state(sdev, SDEV_RUNNING); 2225 scsi_internal_device_unblock(sdev);
2226 } 2226 }
2227 } 2227 }
2228} 2228}
@@ -2251,7 +2251,7 @@ _scsih_block_io_device(struct MPT2SAS_ADAPTER *ioc, u16 handle)
2251 MPT2SAS_INFO_FMT "SDEV_BLOCK: " 2251 MPT2SAS_INFO_FMT "SDEV_BLOCK: "
2252 "handle(0x%04x)\n", ioc->name, handle)); 2252 "handle(0x%04x)\n", ioc->name, handle));
2253 sas_device_priv_data->block = 1; 2253 sas_device_priv_data->block = 1;
2254 scsi_device_set_state(sdev, SDEV_BLOCK); 2254 scsi_internal_device_block(sdev);
2255 } 2255 }
2256 } 2256 }
2257} 2257}
@@ -2327,6 +2327,7 @@ _scsih_block_io_to_children_attached_directly(struct MPT2SAS_ADAPTER *ioc,
2327 u16 handle; 2327 u16 handle;
2328 u16 reason_code; 2328 u16 reason_code;
2329 u8 phy_number; 2329 u8 phy_number;
2330 u8 link_rate;
2330 2331
2331 for (i = 0; i < event_data->NumEntries; i++) { 2332 for (i = 0; i < event_data->NumEntries; i++) {
2332 handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle); 2333 handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle);
@@ -2337,6 +2338,11 @@ _scsih_block_io_to_children_attached_directly(struct MPT2SAS_ADAPTER *ioc,
2337 MPI2_EVENT_SAS_TOPO_RC_MASK; 2338 MPI2_EVENT_SAS_TOPO_RC_MASK;
2338 if (reason_code == MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING) 2339 if (reason_code == MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING)
2339 _scsih_block_io_device(ioc, handle); 2340 _scsih_block_io_device(ioc, handle);
2341 if (reason_code == MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED) {
2342 link_rate = event_data->PHY[i].LinkRate >> 4;
2343 if (link_rate >= MPI2_SAS_NEG_LINK_RATE_1_5)
2344 _scsih_ublock_io_device(ioc, handle);
2345 }
2340 } 2346 }
2341} 2347}
2342 2348
@@ -3690,6 +3696,9 @@ _scsih_remove_device(struct MPT2SAS_ADAPTER *ioc, u16 handle)
3690 le32_to_cpu(mpi_reply.IOCLogInfo))); 3696 le32_to_cpu(mpi_reply.IOCLogInfo)));
3691 3697
3692 out: 3698 out:
3699
3700 _scsih_ublock_io_device(ioc, handle);
3701
3693 mpt2sas_transport_port_remove(ioc, sas_device->sas_address, 3702 mpt2sas_transport_port_remove(ioc, sas_device->sas_address,
3694 sas_device->parent_handle); 3703 sas_device->parent_handle);
3695 3704
@@ -3871,10 +3880,6 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,
3871 link_rate_); 3880 link_rate_);
3872 } 3881 }
3873 } 3882 }
3874 if (reason_code == MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED) {
3875 if (link_rate_ >= MPI2_SAS_NEG_LINK_RATE_1_5)
3876 _scsih_ublock_io_device(ioc, handle);
3877 }
3878 if (reason_code == MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED) { 3883 if (reason_code == MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED) {
3879 if (link_rate_ < MPI2_SAS_NEG_LINK_RATE_1_5) 3884 if (link_rate_ < MPI2_SAS_NEG_LINK_RATE_1_5)
3880 break; 3885 break;