mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device()
Instead of using hardcoded '1' as the __scsi_add_device() -> scsi_probe_and_add_lun() rescan arg, use proper macro SCSI_SCAN_RESCAN. Signed-off-by: John Garry <john.g.garry@oracle.com> Link: https://lore.kernel.org/r/20221121121725.1910795-2-john.g.garry@oracle.com Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
d29c32efeb
commit
35bd6f9fd3
1 changed files with 2 additions and 1 deletions
|
@ -1580,7 +1580,8 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
|
||||||
scsi_complete_async_scans();
|
scsi_complete_async_scans();
|
||||||
|
|
||||||
if (scsi_host_scan_allowed(shost) && scsi_autopm_get_host(shost) == 0) {
|
if (scsi_host_scan_allowed(shost) && scsi_autopm_get_host(shost) == 0) {
|
||||||
scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata);
|
scsi_probe_and_add_lun(starget, lun, NULL, &sdev,
|
||||||
|
SCSI_SCAN_RESCAN, hostdata);
|
||||||
scsi_autopm_put_host(shost);
|
scsi_autopm_put_host(shost);
|
||||||
}
|
}
|
||||||
mutex_unlock(&shost->scan_mutex);
|
mutex_unlock(&shost->scan_mutex);
|
||||||
|
|
Loading…
Reference in a new issue