summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorDavid Lechner <[email protected]>2026-03-26 17:59:26 -0500
committerTom Rini <[email protected]>2026-04-08 11:07:07 -0600
commitb382cd0973521a5197a097d4e190f47aadb79757 (patch)
tree1189d77573aafcd5876386b21f4f7d4676c650fd /env
parent7b824e75056a45d7c40eea9014edffa1b5289750 (diff)
scsi: move scsi_scan() call out of scsi_get_blk_by_uuid()
Move scsi_scan() call out of scsi_get_blk_by_uuid(). The only caller, env_scsi_get_part(), should be managing this call since it may also want to use different ways to get the partition information in the future. Signed-off-by: David Lechner <[email protected]>
Diffstat (limited to 'env')
-rw-r--r--env/scsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/env/scsi.c b/env/scsi.c
index f376f731870..1787dcca92a 100644
--- a/env/scsi.c
+++ b/env/scsi.c
@@ -33,8 +33,14 @@ static struct env_scsi_info env_part;
static inline struct env_scsi_info *env_scsi_get_part(void)
{
+ static bool is_scsi_scanned;
struct env_scsi_info *ep = &env_part;
+ if (!is_scsi_scanned) {
+ scsi_scan(false /* no verbose */);
+ is_scsi_scanned = true;
+ }
+
if (scsi_get_blk_by_uuid(CONFIG_ENV_SCSI_PART_UUID, &ep->blk, &ep->part))
return NULL;