From: sreekanth.reddy@lsi.com Date: Tue, 17 Jul 2012 10:26:13 +0000 (+0530) Subject: [SCSI] mpt2sas: Fix for With post diag reset same set of device gets added, removed... X-Git-Tag: upstream/snapshot3+hdmi~6556^2^2~182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=14aa7f7eaf8bb1443d043615d8b4827821292204;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [SCSI] mpt2sas: Fix for With post diag reset same set of device gets added, removed and then again gets added with new target ids 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 Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 66c7736..7d774c5 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -7264,7 +7264,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);