Skip to content

Commit

Permalink
ipr: Fix sync scsi scan
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reported-and-tested-by: Michael Ellerman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
bjking1 authored and torvalds committed Aug 9, 2016
1 parent c4159a7 commit a3d1ddd
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -10410,8 +10410,11 @@ static int ipr_probe(struct pci_dev *pdev, const struct pci_device_id *dev_id)
__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) {
Expand All @@ -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);
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;
}

Expand Down

0 comments on commit a3d1ddd

Please sign in to comment.