Commit a3d1ddd9 authored by Brian King's avatar Brian King Committed by Linus Torvalds

ipr: Fix sync scsi scan

Commit b195d5e2 ("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: default avatarBrian King <brking@linux.vnet.ibm.com>
Reported-and-tested-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c4159a75
...@@ -10410,8 +10410,11 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id) ...@@ -10410,8 +10410,11 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
__ipr_remove(pdev); __ipr_remove(pdev);
return rc; 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; ioa_cfg->iopoll_weight = ioa_cfg->chip_cfg->iopoll_weight;
if (ioa_cfg->iopoll_weight && ioa_cfg->sis64 && ioa_cfg->nvectors > 1) { 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,10 +10424,8 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
} }
} }
spin_lock_irqsave(ioa_cfg->host->host_lock, flags); scsi_scan_host(ioa_cfg->host);
ioa_cfg->scan_enabled = 1;
schedule_work(&ioa_cfg->work_q);
spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment