aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt3sas
diff options
context:
space:
mode:
authorSreekanth Reddy <Sreekanth.Reddy@lsi.com>2013-06-28 18:24:51 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-07-09 03:58:21 -0400
commitf5edbe77d93b99f169d752d91bf31df0432ca990 (patch)
tree8f86b8d03b0bdf027e47b0e59aebb81e9cb91f07 /drivers/scsi/mpt3sas
parent17263e754d87fac1be2825b43d984f594a68845e (diff)
[SCSI] mpt3sas: when async scanning is enabled then while scanning, devices are removed but their transport layer entries are not removed
When Async scanning mode is enabled and device scanning is in progress, devices should not be removed. But in actuality, devices are removed but their transport layer entries are not removed. This causes error to add the same device to the transport layer after host reset or diagnostic reset. So, in this patch, modified the code in such a way that device is not removed when Async scanning mode is enabled and device scanning is in progress. Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mpt3sas')
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_scsih.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index 632eba75971c..8cbe8fd21fc4 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -675,11 +675,12 @@ _scsih_sas_device_add(struct MPT3SAS_ADAPTER *ioc,
675 * devices while scanning is turned on due to an oops in 675 * devices while scanning is turned on due to an oops in
676 * scsi_sysfs_add_sdev()->add_device()->sysfs_addrm_start() 676 * scsi_sysfs_add_sdev()->add_device()->sysfs_addrm_start()
677 */ 677 */
678 if (!ioc->is_driver_loading) 678 if (!ioc->is_driver_loading) {
679 mpt3sas_transport_port_remove(ioc, 679 mpt3sas_transport_port_remove(ioc,
680 sas_device->sas_address, 680 sas_device->sas_address,
681 sas_device->sas_address_parent); 681 sas_device->sas_address_parent);
682 _scsih_sas_device_remove(ioc, sas_device); 682 _scsih_sas_device_remove(ioc, sas_device);
683 }
683 } 684 }
684} 685}
685 686
@@ -7531,10 +7532,12 @@ _scsih_probe_boot_devices(struct MPT3SAS_ADAPTER *ioc)
7531 sas_address_parent)) { 7532 sas_address_parent)) {
7532 _scsih_sas_device_remove(ioc, sas_device); 7533 _scsih_sas_device_remove(ioc, sas_device);
7533 } else if (!sas_device->starget) { 7534 } else if (!sas_device->starget) {
7534 if (!ioc->is_driver_loading) 7535 if (!ioc->is_driver_loading) {
7535 mpt3sas_transport_port_remove(ioc, sas_address, 7536 mpt3sas_transport_port_remove(ioc,
7537 sas_address,
7536 sas_address_parent); 7538 sas_address_parent);
7537 _scsih_sas_device_remove(ioc, sas_device); 7539 _scsih_sas_device_remove(ioc, sas_device);
7540 }
7538 } 7541 }
7539 } 7542 }
7540} 7543}
@@ -7590,13 +7593,14 @@ _scsih_probe_sas(struct MPT3SAS_ADAPTER *ioc)
7590 * oops in scsi_sysfs_add_sdev()->add_device()-> 7593 * oops in scsi_sysfs_add_sdev()->add_device()->
7591 * sysfs_addrm_start() 7594 * sysfs_addrm_start()
7592 */ 7595 */
7593 if (!ioc->is_driver_loading) 7596 if (!ioc->is_driver_loading) {
7594 mpt3sas_transport_port_remove(ioc, 7597 mpt3sas_transport_port_remove(ioc,
7595 sas_device->sas_address, 7598 sas_device->sas_address,
7596 sas_device->sas_address_parent); 7599 sas_device->sas_address_parent);
7597 list_del(&sas_device->list); 7600 list_del(&sas_device->list);
7598 kfree(sas_device); 7601 kfree(sas_device);
7599 continue; 7602 continue;
7603 }
7600 } 7604 }
7601 7605
7602 spin_lock_irqsave(&ioc->sas_device_lock, flags); 7606 spin_lock_irqsave(&ioc->sas_device_lock, flags);