aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Garry <[email protected]>2022-11-21 12:17:24 +0000
committerMartin K. Petersen <[email protected]>2022-11-26 02:39:11 +0000
commit35bd6f9fd33b8beb043aea0db51b726ca6edfd87 (patch)
tree993b70082ce91e7326456cc752c66fa3e73f6d7f
parentd29c32efebf3f10b25e9f88ac75c962e7259412d (diff)
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]>
-rw-r--r--drivers/scsi/scsi_scan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 5d27f5196de6..6cc974b382c1 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -1580,7 +1580,8 @@ struct scsi_device *__scsi_add_device(struct Scsi_Host *shost, uint channel,
scsi_complete_async_scans();
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);
}
mutex_unlock(&shost->scan_mutex);