Commit 3395614e authored by Raghava Aditya Renukunta's avatar Raghava Aditya Renukunta Committed by Martin K. Petersen

scsi: aacraid: Block concurrent hotplug event handling

Currently driver will attempt to process hotplug events concurrently based
on the FW interrupt.

Protect safw update function with a scan mutex.
Signed-off-by: default avatarRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6f44a22b
...@@ -1565,6 +1565,7 @@ struct aac_dev ...@@ -1565,6 +1565,7 @@ struct aac_dev
spinlock_t fib_lock; spinlock_t fib_lock;
struct mutex ioctl_mutex; struct mutex ioctl_mutex;
struct mutex scan_mutex;
struct aac_queue_block *queues; struct aac_queue_block *queues;
/* /*
* The user API will use an IOCTL to register itself to receive * The user API will use an IOCTL to register itself to receive
......
...@@ -1997,7 +1997,9 @@ static void aac_handle_sa_aif(struct aac_dev *dev, struct fib *fibptr) ...@@ -1997,7 +1997,9 @@ static void aac_handle_sa_aif(struct aac_dev *dev, struct fib *fibptr)
case SA_AIF_LDEV_CHANGE: case SA_AIF_LDEV_CHANGE:
case SA_AIF_BPCFG_CHANGE: case SA_AIF_BPCFG_CHANGE:
mutex_lock(&dev->scan_mutex);
aac_update_safw_host_devices(dev, AAC_RESCAN); aac_update_safw_host_devices(dev, AAC_RESCAN);
mutex_unlock(&dev->scan_mutex);
break; break;
case SA_AIF_BPSTAT_CHANGE: case SA_AIF_BPSTAT_CHANGE:
......
...@@ -1683,6 +1683,7 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1683,6 +1683,7 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
spin_lock_init(&aac->fib_lock); spin_lock_init(&aac->fib_lock);
mutex_init(&aac->ioctl_mutex); mutex_init(&aac->ioctl_mutex);
mutex_init(&aac->scan_mutex);
/* /*
* Map in the registers from the adapter. * Map in the registers from the adapter.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment