mpt3sas: Don't block the drive when drive addition under the control of SML
During hot-plugging of a disk(having a flaky link), the disk addition stops and any further disk addition or removal doesn't happen on that controller. This is because, when driver receives DELAY_NOT_RESPONDING event for a disk while it is undergoing addition at the SCSI Transport layer, the driver would block the I/O to that disk resulting in a deadlock. i.e the disk addition work couldn't be completed at the SCSI Transport Layer as it can't send any I/Os (such as Inquiry, Report LUNs etc) to the disk as I/Os are blocked to this drive. Also any subsequent device removal (TARGET_NOT_RESPONDING) or link update(RC_PHY_CHANGED) event couldn't be processed as they are in the queue to get processed after disk addition event. Description of Change: Don't block the drive when drive addition is under the control of SML. So that SML won't be blocked of issuing the device dicovery commands (such as Inquiry, Report LUNs etc). Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
This commit is contained in:

committed by
James Bottomley

parent
4dc8c8087f
commit
e4bc7f5c21
@@ -2644,6 +2644,11 @@ _scsih_block_io_device(struct MPT3SAS_ADAPTER *ioc, u16 handle)
|
||||
{
|
||||
struct MPT3SAS_DEVICE *sas_device_priv_data;
|
||||
struct scsi_device *sdev;
|
||||
struct _sas_device *sas_device;
|
||||
|
||||
sas_device = _scsih_sas_device_find_by_handle(ioc, handle);
|
||||
if (!sas_device)
|
||||
return;
|
||||
|
||||
shost_for_each_device(sdev, ioc->shost) {
|
||||
sas_device_priv_data = sdev->hostdata;
|
||||
@@ -2653,6 +2658,8 @@ _scsih_block_io_device(struct MPT3SAS_ADAPTER *ioc, u16 handle)
|
||||
continue;
|
||||
if (sas_device_priv_data->block)
|
||||
continue;
|
||||
if (sas_device->pend_sas_rphy_add)
|
||||
continue;
|
||||
sas_device_priv_data->block = 1;
|
||||
scsi_internal_device_block(sdev);
|
||||
sdev_printk(KERN_INFO, sdev,
|
||||
|
Reference in New Issue
Block a user