Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

John Garry and committed by
Martin K. Petersen
35bd6f9f d29c32ef

+2 -1
+2 -1
drivers/scsi/scsi_scan.c
··· 1580 1580 scsi_complete_async_scans(); 1581 1581 1582 1582 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); 1584 1585 scsi_autopm_put_host(shost); 1585 1586 } 1586 1587 mutex_unlock(&shost->scan_mutex);