linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] scsi: Some minor scan improvements
@ 2022-11-21 12:17 John Garry
  2022-11-21 12:17 ` [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() John Garry
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: John Garry @ 2022-11-21 12:17 UTC (permalink / raw)
  To: martin.petersen, jejb; +Cc: linux-scsi, linux-kernel, damien.lemoal, 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()

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

-- 
2.35.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in  __scsi_add_device()
  2022-11-21 12:17 [PATCH 0/2] scsi: Some minor scan improvements John Garry
@ 2022-11-21 12:17 ` John Garry
  2022-11-21 14:30   ` Jason Yan
  2022-11-21 12:17 ` [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host() John Garry
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: John Garry @ 2022-11-21 12:17 UTC (permalink / raw)
  To: martin.petersen, jejb; +Cc: linux-scsi, linux-kernel, damien.lemoal, 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.

Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
---
 drivers/scsi/scsi_scan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()
  2022-11-21 12:17 [PATCH 0/2] scsi: Some minor scan improvements John Garry
  2022-11-21 12:17 ` [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() John Garry
@ 2022-11-21 12:17 ` John Garry
  2022-11-21 12:33   ` Damien Le Moal
  2022-11-21 14:31   ` Jason Yan
  2022-11-26  2:39 ` [PATCH 0/2] scsi: Some minor scan improvements Martin K. Petersen
  2022-12-01  3:45 ` Martin K. Petersen
  3 siblings, 2 replies; 10+ messages in thread
From: John Garry @ 2022-11-21 12:17 UTC (permalink / raw)
  To: martin.petersen, jejb; +Cc: linux-scsi, linux-kernel, damien.lemoal, 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.

Signed-off-by: John Garry <john.g.garry@oracle.com>
---
 drivers/scsi/scsi_scan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 6cc974b382c1..920b145f80b7 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -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);
 	}
 }
 
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()
  2022-11-21 12:17 ` [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host() John Garry
@ 2022-11-21 12:33   ` Damien Le Moal
  2022-11-21 13:48     ` [External] : " John Garry
  2022-11-21 14:31   ` Jason Yan
  1 sibling, 1 reply; 10+ messages in thread
From: Damien Le Moal @ 2022-11-21 12:33 UTC (permalink / raw)
  To: John Garry, martin.petersen, jejb; +Cc: linux-scsi, linux-kernel

On 11/21/22 21:17, John Garry wrote:
> Instead of using hardcoded '0' as the do_scsi_scan_host() ->
> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.
> 
> Signed-off-by: John Garry <john.g.garry@oracle.com>

Looks good.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

> ---
>  drivers/scsi/scsi_scan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
> index 6cc974b382c1..920b145f80b7 100644
> --- a/drivers/scsi/scsi_scan.c
> +++ b/drivers/scsi/scsi_scan.c
> @@ -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);
>  	}
>  }
>  

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [External] : Re: [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()
  2022-11-21 12:33   ` Damien Le Moal
@ 2022-11-21 13:48     ` John Garry
  2022-11-26  0:13       ` Bart Van Assche
  0 siblings, 1 reply; 10+ messages in thread
From: John Garry @ 2022-11-21 13:48 UTC (permalink / raw)
  To: Damien Le Moal, martin.petersen, jejb; +Cc: linux-scsi, linux-kernel

On 21/11/2022 12:33, Damien Le Moal wrote:
> On 11/21/22 21:17, John Garry wrote:
>> Instead of using hardcoded '0' as the do_scsi_scan_host() ->
>> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.
>>
>> Signed-off-by: John Garry<john.g.garry@oracle.com>
> Looks good.
> 
> Reviewed-by: Damien Le Moal<damien.lemoal@opensource.wdc.com>
> 

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

John

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device()
  2022-11-21 12:17 ` [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() John Garry
@ 2022-11-21 14:30   ` Jason Yan
  0 siblings, 0 replies; 10+ messages in thread
From: Jason Yan @ 2022-11-21 14:30 UTC (permalink / raw)
  To: John Garry, martin.petersen, jejb; +Cc: linux-scsi, linux-kernel, damien.lemoal

On 2022/11/21 20:17, John Garry wrote:
> 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>
> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> ---
>   drivers/scsi/scsi_scan.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 

Looks good,
Reviewed-by: Jason Yan <yanaijie@huawei.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()
  2022-11-21 12:17 ` [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host() John Garry
  2022-11-21 12:33   ` Damien Le Moal
@ 2022-11-21 14:31   ` Jason Yan
  1 sibling, 0 replies; 10+ messages in thread
From: Jason Yan @ 2022-11-21 14:31 UTC (permalink / raw)
  To: John Garry, martin.petersen, jejb; +Cc: linux-scsi, linux-kernel, damien.lemoal

On 2022/11/21 20:17, John Garry wrote:
> Instead of using hardcoded '0' as the do_scsi_scan_host() ->
> scsi_scan_host_selected() rescan arg, use proper macro SCSI_SCAN_INITIAL.
> 
> Signed-off-by: John Garry<john.g.garry@oracle.com>
> ---
>   drivers/scsi/scsi_scan.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Looks good,
Reviewed-by: Jason Yan <yanaijie@huawei.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [External] : Re: [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host()
  2022-11-21 13:48     ` [External] : " John Garry
@ 2022-11-26  0:13       ` Bart Van Assche
  0 siblings, 0 replies; 10+ messages in thread
From: Bart Van Assche @ 2022-11-26  0:13 UTC (permalink / raw)
  To: John Garry, Damien Le Moal, martin.petersen, jejb
  Cc: linux-scsi, linux-kernel

On 11/21/22 05:48, John Garry wrote:
> 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: Bart Van Assche <bvanassche@acm.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/2] scsi: Some minor scan improvements
  2022-11-21 12:17 [PATCH 0/2] scsi: Some minor scan improvements John Garry
  2022-11-21 12:17 ` [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() John Garry
  2022-11-21 12:17 ` [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host() John Garry
@ 2022-11-26  2:39 ` Martin K. Petersen
  2022-12-01  3:45 ` Martin K. Petersen
  3 siblings, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2022-11-26  2:39 UTC (permalink / raw)
  To: John Garry; +Cc: martin.petersen, jejb, linux-scsi, linux-kernel, damien.lemoal


John,

> 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!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/2] scsi: Some minor scan improvements
  2022-11-21 12:17 [PATCH 0/2] scsi: Some minor scan improvements John Garry
                   ` (2 preceding siblings ...)
  2022-11-26  2:39 ` [PATCH 0/2] scsi: Some minor scan improvements Martin K. Petersen
@ 2022-12-01  3:45 ` Martin K. Petersen
  3 siblings, 0 replies; 10+ messages in thread
From: Martin K. Petersen @ 2022-12-01  3:45 UTC (permalink / raw)
  To: John Garry, jejb
  Cc: Martin K . Petersen, damien.lemoal, linux-kernel, linux-scsi

On Mon, 21 Nov 2022 12:17:23 +0000, John Garry wrote:

> 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

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-12-01  3:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 12:17 [PATCH 0/2] scsi: Some minor scan improvements John Garry
2022-11-21 12:17 ` [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() John Garry
2022-11-21 14:30   ` Jason Yan
2022-11-21 12:17 ` [PATCH 2/2] scsi: core: Use SCSI_SCAN_INITIAL in do_scsi_scan_host() John Garry
2022-11-21 12:33   ` Damien Le Moal
2022-11-21 13:48     ` [External] : " John Garry
2022-11-26  0:13       ` Bart Van Assche
2022-11-21 14:31   ` Jason Yan
2022-11-26  2:39 ` [PATCH 0/2] scsi: Some minor scan improvements Martin K. Petersen
2022-12-01  3:45 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).