diff options
author | Brian King <brking@linux.vnet.ibm.com> | 2016-08-08 18:53:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-09 13:17:42 -0400 |
commit | a3d1ddd932bc86f0f7027079754ab0aefd259109 (patch) | |
tree | 5a3ace8360b7e4951557e4120d626ff1e4c4999e | |
parent | c4159a75b64c0e67caededf4d7372c1b58a5f42a (diff) |
ipr: Fix sync scsi scan
Commit b195d5e2bffd ("ipr: Wait to do async scan until scsi host is
initialized") fixed async scan for ipr, but broke sync scan for ipr.
This fixes sync scan back up.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Reported-and-tested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/scsi/ipr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index bf85974be862..17d04c702e1b 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -10410,8 +10410,11 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) | |||
10410 | __ipr_remove(pdev); | 10410 | __ipr_remove(pdev); |
10411 | return rc; | 10411 | return rc; |
10412 | } | 10412 | } |
10413 | spin_lock_irqsave(ioa_cfg->host->host_lock, flags); | ||
10414 | ioa_cfg->scan_enabled = 1; | ||
10415 | schedule_work(&ioa_cfg->work_q); | ||
10416 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); | ||
10413 | 10417 | ||
10414 | scsi_scan_host(ioa_cfg->host); | ||
10415 | ioa_cfg->iopoll_weight = ioa_cfg->chip_cfg->iopoll_weight; | 10418 | ioa_cfg->iopoll_weight = ioa_cfg->chip_cfg->iopoll_weight; |
10416 | 10419 | ||
10417 | if (ioa_cfg->iopoll_weight && ioa_cfg->sis64 && ioa_cfg->nvectors > 1) { | 10420 | if (ioa_cfg->iopoll_weight && ioa_cfg->sis64 && ioa_cfg->nvectors > 1) { |
@@ -10421,10 +10424,8 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) | |||
10421 | } | 10424 | } |
10422 | } | 10425 | } |
10423 | 10426 | ||
10424 | spin_lock_irqsave(ioa_cfg->host->host_lock, flags); | 10427 | scsi_scan_host(ioa_cfg->host); |
10425 | ioa_cfg->scan_enabled = 1; | 10428 | |
10426 | schedule_work(&ioa_cfg->work_q); | ||
10427 | spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags); | ||
10428 | return 0; | 10429 | return 0; |
10429 | } | 10430 | } |
10430 | 10431 | ||