Skip to content

Commit a3d1ddd

Browse files
bjking1torvalds
authored andcommitted
ipr: Fix sync scsi scan
Commit b195d5e ("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>
1 parent c4159a7 commit a3d1ddd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/scsi/ipr.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10410,8 +10410,11 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
1041010410
__ipr_remove(pdev);
1041110411
return rc;
1041210412
}
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);
1041310417

10414-
scsi_scan_host(ioa_cfg->host);
1041510418
ioa_cfg->iopoll_weight = ioa_cfg->chip_cfg->iopoll_weight;
1041610419

1041710420
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)
1042110424
}
1042210425
}
1042310426

10424-
spin_lock_irqsave(ioa_cfg->host->host_lock, flags);
10425-
ioa_cfg->scan_enabled = 1;
10426-
schedule_work(&ioa_cfg->work_q);
10427-
spin_unlock_irqrestore(ioa_cfg->host->host_lock, flags);
10427+
scsi_scan_host(ioa_cfg->host);
10428+
1042810429
return 0;
1042910430
}
1043010431

0 commit comments

Comments
 (0)