diff mbox

ipr: Fix sync scsi scan

Message ID 11d0860f-b8dd-61a4-ac32-3ce6da208d74@linux.vnet.ibm.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Brian King Aug. 8, 2016, 10:53 p.m. UTC
On 08/08/2016 05:02 AM, Michael Ellerman wrote:
> James Bottomley <James.Bottomley@HansenPartnership.com> writes:
> 
>> This is seven basic fixes (plus one MAINTAINERS update) which came in
>> close to the merge window.
>>
>> The patch is available here:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-misc
>>
>> The short changelog is:
>>
>> Brian King (1):
>>       ipr: Wait to do async scan until scsi host is initialized
> 
> This commit seems to be causing a ~10 minute pause during boot on my
> powerpc boxes which have an IPR, eg:

Sorry about that. I fixed up async scan and managed to break sync scan...

This patch fixes it on my box. Does it fix the issue for you as well?

Thanks,

Brian

Comments

Michael Ellerman Aug. 9, 2016, 6:44 a.m. UTC | #1
Brian King <brking@linux.vnet.ibm.com> writes:

> On 08/08/2016 05:02 AM, Michael Ellerman wrote:
>> James Bottomley <James.Bottomley@HansenPartnership.com> writes:
>> 
>>> This is seven basic fixes (plus one MAINTAINERS update) which came in
>>> close to the merge window.
>>>
>>> The patch is available here:
>>>
>>> git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git scsi-misc
>>>
>>> The short changelog is:
>>>
>>> Brian King (1):
>>>       ipr: Wait to do async scan until scsi host is initialized
>> 
>> This commit seems to be causing a ~10 minute pause during boot on my
>> powerpc boxes which have an IPR, eg:
>
> Sorry about that. I fixed up async scan and managed to break sync scan...
>
> This patch fixes it on my box. Does it fix the issue for you as well?

Yes, thanks!

If you like here's a:

Tested-by: Michael Ellerman <mpe@ellerman.id.au>


It would be good if we can we get that to Linus sooner rather than later.

cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Martin K. Petersen Aug. 11, 2016, 2:57 a.m. UTC | #2
>>>>> "Michael" == Michael Ellerman <mpe@ellerman.id.au> writes:

>> Sorry about that. I fixed up async scan and managed to break sync
>> scan...
>> 
>> This patch fixes it on my box. Does it fix the issue for you as well?

Michael> Yes, thanks!

Michael> If you like here's a:

Michael> Tested-by: Michael Ellerman <mpe@ellerman.id.au>

Michael> It would be good if we can we get that to Linus sooner rather
Michael> than later.

Brian: This was a wee bit short of a real patch submission but I hand
applied it to 4.8/scsi-fixes.
diff mbox

Patch

diff -puN drivers/scsi/ipr.c~ipr_async_scan_fixup_again drivers/scsi/ipr.c
--- linux-2.6.git/drivers/scsi/ipr.c~ipr_async_scan_fixup_again	2016-08-08 17:48:51.637984104 -0500
+++ linux-2.6.git-bjking1/drivers/scsi/ipr.c	2016-08-08 17:48:51.643984056 -0500
@@ -10410,8 +10410,11 @@  static int ipr_probe(struct pci_dev *pde
 		__ipr_remove(pdev);
 		return rc;
 	}
+	spin_lock_irqsave(ioa_cfg->host->host_lock, flags);
+	ioa_cfg->scan_enabled = 1;
+	schedule_work(&ioa_cfg->work_q);
+	spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags);
 
-	scsi_scan_host(ioa_cfg->host);
 	ioa_cfg->iopoll_weight = ioa_cfg->chip_cfg->iopoll_weight;
 
 	if (ioa_cfg->iopoll_weight && ioa_cfg->sis64 && ioa_cfg->nvectors > 1) {
@@ -10421,10 +10424,8 @@  static int ipr_probe(struct pci_dev *pde
 		}
 	}
 
-	spin_lock_irqsave(ioa_cfg->host->host_lock, flags);
-	ioa_cfg->scan_enabled = 1;
-	schedule_work(&ioa_cfg->work_q);
-	spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags);
+	scsi_scan_host(ioa_cfg->host);
+
 	return 0;
 }