summaryrefslogtreecommitdiff
path: root/drivers/scsi/aacraid/commsup.c
diff options
context:
space:
mode:
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>2017-12-26 20:34:45 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-01-03 23:26:43 -0500
commit8ebaa67fc23a09bcf2b285ae4130508256b31923 (patch)
tree6ddf125dd668e4c159198f38121941a268e5f064 /drivers/scsi/aacraid/commsup.c
parent3395614e48e26c6b05f87662ef354bca38999d2a (diff)
scsi: aacraid: Use hotplug handling function in place of scsi_scan_host
Driver uses scsi_scan_host to add new devices in the driver init path, which adds all the fw exposed devices. The drivers resorts to queue command checks to block out commands to _hidden_ devices. Use the hotplug handler code to add new devices during driver init and other areas, this is only for safw. For ARC scsi_scan_host will still apply. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aacraid/commsup.c')
-rw-r--r--drivers/scsi/aacraid/commsup.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 491e6338c483..4e2687ce2456 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1964,6 +1964,19 @@ out:
return rcode;
}
+int aac_scan_host(struct aac_dev *dev, int rescan)
+{
+ int rcode = 0;
+
+ mutex_lock(&dev->scan_mutex);
+ if (dev->sa_firmware)
+ rcode = aac_update_safw_host_devices(dev, rescan);
+ else
+ scsi_scan_host(dev->scsi_host_ptr);
+ mutex_unlock(&dev->scan_mutex);
+ return rcode;
+}
+
/**
* aac_handle_sa_aif Handle a message from the firmware
* @dev: Which adapter this fib is from
@@ -1997,9 +2010,8 @@ static void aac_handle_sa_aif(struct aac_dev *dev, struct fib *fibptr)
case SA_AIF_LDEV_CHANGE:
case SA_AIF_BPCFG_CHANGE:
- mutex_lock(&dev->scan_mutex);
- aac_update_safw_host_devices(dev, AAC_RESCAN);
- mutex_unlock(&dev->scan_mutex);
+ aac_scan_host(dev, AAC_RESCAN);
+
break;
case SA_AIF_BPSTAT_CHANGE: