diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index a8fe1e1272c18e6aaa3cf33ce36cb7392d877390..c70c998743ac4a308f97ebac36a75770c974dc80 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -1565,6 +1565,7 @@ struct aac_dev spinlock_t fib_lock; struct mutex ioctl_mutex; + struct mutex scan_mutex; struct aac_queue_block *queues; /* * The user API will use an IOCTL to register itself to receive diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 34155b1aa83e2e6a828ef67e6c265c34593190b8..491e6338c483b8a1830ee727d3af5fecf02fbfd4 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -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_BPCFG_CHANGE: + mutex_lock(&dev->scan_mutex); aac_update_safw_host_devices(dev, AAC_RESCAN); + mutex_unlock(&dev->scan_mutex); break; case SA_AIF_BPSTAT_CHANGE: diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index b2273e3cba6247b0964600490bf4fe0ad7c90255..2c862cd26a21b53b188bea0b2e275c18c8e9948c 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -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); mutex_init(&aac->ioctl_mutex); + mutex_init(&aac->scan_mutex); /* * Map in the registers from the adapter. */