]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mpt2sas: Fix for With post diag reset same set of device gets added, removed and...
authorsreekanth.reddy@lsi.com <sreekanth.reddy@lsi.com>
Tue, 17 Jul 2012 10:26:13 +0000 (15:56 +0530)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 27 Aug 2012 14:09:30 +0000 (07:09 -0700)
When device discovery is disabled during driver load time using module
parameter "disable_discovery=1" and when diag reset is issued then from logs,
it is observed that the devices get added, removed and then added with new
target ids.

So, in order to limit this turn-off the code which is deleting and devices
across host reset when the disable_discovery module parameter is turned on.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/mpt2sas/mpt2sas_scsih.c

index 948230a26fe3d8f80f85ebaacbc0daca014f99cb..b7c972e356e781ec1d40f96ecba5aaea498a10ae 100644 (file)
@@ -7259,7 +7259,8 @@ mpt2sas_scsih_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase)
                _scsih_search_responding_sas_devices(ioc);
                _scsih_search_responding_raid_devices(ioc);
                _scsih_search_responding_expanders(ioc);
-               if (!ioc->is_driver_loading) {
+               if ((!ioc->is_driver_loading) && !(disable_discovery > 0 &&
+                   !ioc->sas_hba.num_phys)) {
                        _scsih_prep_device_scan(ioc);
                        _scsih_search_responding_sas_devices(ioc);
                        _scsih_search_responding_raid_devices(ioc);