Skip to contentSkip to conversation

scsi: Some minor scan improvements

PATCH Applied John Garry 5 participants 10 messages Nov 21, 2022 – Dec 1, 2022 SCSI

lore
Share & tools
lore

John Garry

author
#0 lore raw

cover scsi: Some minor scan improvements

The __scsi_add_device() change is from another series which I sent a while ago.

The new change in do_scsi_scan_host() could be combined into the __scsi_add_device() change if I have anothter RB tag (hint, hint).

John Garry (2):
scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device()
scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()

 drivers/scsi/scsi_scan.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
2.35.3
author
#1 lore raw

PATCH 1/2 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.

---
 drivers/scsi/scsi_scan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/scsi_scan.c +2 -1
index 5d27f5196de6..6cc974b382c1 100644
@@ -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);
Signature · 1 line
2.35.3
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device()

Quoted 9 lines · John Garry

Instead of using hardcoded '1' as the __scsi_add_device() -> scsi_probe_and_add_lun() rescan arg, use proper macro SCSI_SCAN_RESCAN.

---
  drivers/scsi/scsi_scan.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Looks good,

author
#3 lore raw

PATCH 2/2 scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()

In reply to John Garry

Instead of using hardcoded '0' as the do_scsi_scan_host() -> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.

---
 drivers/scsi/scsi_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_scan.c +1 -1
index 6cc974b382c1..920b145f80b7 100644
@@ -1920,7 +1920,7 @@ static void do_scsi_scan_host(struct Scsi_Host *shost)
 			msleep(10);
 	} else {
 		scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
-				SCAN_WILD_CARD, 0);
+				SCAN_WILD_CARD, SCSI_SCAN_INITIAL);
 	}
 }
 
Signature · 1 line
2.35.3
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()

Quoted 4 lines · John Garry

Instead of using hardcoded '0' as the do_scsi_scan_host() -> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.

Looks good.

Quoted 17 lines
---
 drivers/scsi/scsi_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_scan.c +1 -1
index 6cc974b382c1..920b145f80b7 100644
@@ -1920,7 +1920,7 @@ static void do_scsi_scan_host(struct Scsi_Host *shost)
 			msleep(10);
 	} else {
 		scsi_scan_host_selected(shost, SCAN_WILD_CARD, SCAN_WILD_CARD,
-				SCAN_WILD_CARD, 0);
+				SCAN_WILD_CARD, SCSI_SCAN_INITIAL);
 	}
 }
 
Signature · 2 lines
Damien Le Moal
Western Digital Research
author
#5 lore raw

Re: [External] : Re: [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()

Quoted 9 lines · Damien Le Moal
Quoted 4 lines · John Garry

Instead of using hardcoded '0' as the do_scsi_scan_host() -> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.

Looks good.

cheers. As mentioned, I can combine these patches if people prefer.

John

Reviewed-by
#6 lore raw

Re: [External] : Re: [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()

Quoted 1 line · John Garry

cheers. As mentioned, I can combine these patches if people prefer.

I'm in favor of combining both patches.

Whether or not these patches get combined, feel free to add:

Reviewed-by on v1 2/2
#7 lore raw

Re: [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()

In reply to John Garry
Quoted 7 lines · John Garry

Instead of using hardcoded '0' as the do_scsi_scan_host() -> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.

---
  drivers/scsi/scsi_scan.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Looks good,

#8 lore raw
In reply to John Garry

John,

Quoted 5 lines

The __scsi_add_device() change is from another series which I sent a while ago.

The new change in do_scsi_scan_host() could be combined into the __scsi_add_device() change if I have anothter RB tag (hint, hint).

Applied to 6.2/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#9 lore raw
In reply to John Garry
Quoted 11 lines · John Garry

The __scsi_add_device() change is from another series which I sent a while ago.

The new change in do_scsi_scan_host() could be combined into the __scsi_add_device() change if I have anothter RB tag (hint, hint).

John Garry (2):
scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device()
scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()

[...]

Applied to 6.2/scsi-queue, thanks!

[1/2] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device()

      https://git.kernel.org/mkp/scsi/c/35bd6f9fd33b
[2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()
      https://git.kernel.org/mkp/scsi/c/425b27a04dd8
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering