Skip to content

Commit 35bd6f9

Browse files
johnpgarrymartinkpetersen
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent d29c32e commit 35bd6f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/scsi/scsi_scan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,8 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
15801580
scsi_complete_async_scans();
15811581

15821582
if (scsi_host_scan_allowed(shost) && scsi_autopm_get_host(shost) == 0) {
1583-
scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata);
1583+
scsi_probe_and_add_lun(starget, lun, NULL, &sdev,
1584+
SCSI_SCAN_RESCAN, hostdata);
15841585
scsi_autopm_put_host(shost);
15851586
}
15861587
mutex_unlock(&shost->scan_mutex);

0 commit comments

Comments
 (0)