public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: martin.petersen@oracle.com, jejb@linux.ibm.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	damien.lemoal@opensource.wdc.com,
	John Garry <john.g.garry@oracle.com>
Subject: [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in  __scsi_add_device()
Date: Mon, 21 Nov 2022 12:17:24 +0000	[thread overview]
Message-ID: <20221121121725.1910795-2-john.g.garry@oracle.com> (raw)
In-Reply-To: <20221121121725.1910795-1-john.g.garry@oracle.com>

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


  reply	other threads:[~2022-11-21 12:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 12:17 [PATCH 0/2] scsi: Some minor scan improvements John Garry
2022-11-21 12:17 ` John Garry [this message]
2022-11-21 14:30   ` [PATCH 1/2] scsi: core: Use SCSI_SCAN_RESCAN in __scsi_add_device() 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221121121725.1910795-2-john.g.garry@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox