diff options
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_ctl.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_ctl.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c index 9adb0133d6fb..aabcb911706e 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c +++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.c | |||
@@ -1207,6 +1207,9 @@ _ctl_do_reset(void __user *arg) | |||
1207 | if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc) | 1207 | if (_ctl_verify_adapter(karg.hdr.ioc_number, &ioc) == -1 || !ioc) |
1208 | return -ENODEV; | 1208 | return -ENODEV; |
1209 | 1209 | ||
1210 | if (ioc->shost_recovery || ioc->pci_error_recovery || | ||
1211 | ioc->is_driver_loading) | ||
1212 | return -EAGAIN; | ||
1210 | dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name, | 1213 | dctlprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name, |
1211 | __func__)); | 1214 | __func__)); |
1212 | 1215 | ||
@@ -2178,7 +2181,8 @@ _ctl_ioctl_main(struct file *file, unsigned int cmd, void __user *arg) | |||
2178 | !ioc) | 2181 | !ioc) |
2179 | return -ENODEV; | 2182 | return -ENODEV; |
2180 | 2183 | ||
2181 | if (ioc->shost_recovery || ioc->pci_error_recovery) | 2184 | if (ioc->shost_recovery || ioc->pci_error_recovery || |
2185 | ioc->is_driver_loading) | ||
2182 | return -EAGAIN; | 2186 | return -EAGAIN; |
2183 | 2187 | ||
2184 | if (_IOC_SIZE(cmd) == sizeof(struct mpt2_ioctl_command)) { | 2188 | if (_IOC_SIZE(cmd) == sizeof(struct mpt2_ioctl_command)) { |
@@ -2297,7 +2301,8 @@ _ctl_compat_mpt_command(struct file *file, unsigned cmd, unsigned long arg) | |||
2297 | if (_ctl_verify_adapter(karg32.hdr.ioc_number, &ioc) == -1 || !ioc) | 2301 | if (_ctl_verify_adapter(karg32.hdr.ioc_number, &ioc) == -1 || !ioc) |
2298 | return -ENODEV; | 2302 | return -ENODEV; |
2299 | 2303 | ||
2300 | if (ioc->shost_recovery || ioc->pci_error_recovery) | 2304 | if (ioc->shost_recovery || ioc->pci_error_recovery || |
2305 | ioc->is_driver_loading) | ||
2301 | return -EAGAIN; | 2306 | return -EAGAIN; |
2302 | 2307 | ||
2303 | memset(&karg, 0, sizeof(struct mpt2_ioctl_command)); | 2308 | memset(&karg, 0, sizeof(struct mpt2_ioctl_command)); |