Skip to content
Snippets Groups Projects
Commit a03bdaa1 authored by Hans de Goede's avatar Hans de Goede Committed by Tom Rini
Browse files

config_distro_bootcmd: Run 'scsi scan' before trying scsi disks


Scsi disks need to be probed before we try to access them, otherwise all
accesses fail with: ** Bad device size - scsi 0 **.

Reported-by: default avatarKarsten Merker <merker@debian.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Reviewed-by: default avatarStephen Warren <swarren@nvidia.com>
Tested-by: default avatarKarsten Merker <merker@debian.org>
parent 535aad29
No related branches found
No related tags found
No related merge requests found
...@@ -53,10 +53,23 @@ ...@@ -53,10 +53,23 @@
#endif #endif
#ifdef CONFIG_CMD_SCSI #ifdef CONFIG_CMD_SCSI
#define BOOTENV_SHARED_SCSI BOOTENV_SHARED_BLKDEV(scsi) #define BOOTENV_RUN_SCSI_INIT "run scsi_init; "
#define BOOTENV_SET_SCSI_NEED_INIT "setenv scsi_need_init; "
#define BOOTENV_SHARED_SCSI \
"scsi_init=" \
"if ${scsi_need_init}; then " \
"setenv scsi_need_init false; " \
"scsi scan; " \
"fi\0" \
\
"scsi_boot=" \
BOOTENV_RUN_SCSI_INIT \
BOOTENV_SHARED_BLKDEV_BODY(scsi)
#define BOOTENV_DEV_SCSI BOOTENV_DEV_BLKDEV #define BOOTENV_DEV_SCSI BOOTENV_DEV_BLKDEV
#define BOOTENV_DEV_NAME_SCSI BOOTENV_DEV_NAME_BLKDEV #define BOOTENV_DEV_NAME_SCSI BOOTENV_DEV_NAME_BLKDEV
#else #else
#define BOOTENV_RUN_SCSI_INIT
#define BOOTENV_SET_SCSI_NEED_INIT
#define BOOTENV_SHARED_SCSI #define BOOTENV_SHARED_SCSI
#define BOOTENV_DEV_SCSI \ #define BOOTENV_DEV_SCSI \
BOOT_TARGET_DEVICES_references_SCSI_without_CONFIG_CMD_SCSI BOOT_TARGET_DEVICES_references_SCSI_without_CONFIG_CMD_SCSI
...@@ -189,7 +202,7 @@ ...@@ -189,7 +202,7 @@
\ \
BOOT_TARGET_DEVICES(BOOTENV_DEV) \ BOOT_TARGET_DEVICES(BOOTENV_DEV) \
\ \
"bootcmd=" BOOTENV_SET_USB_NEED_INIT \ "bootcmd=" BOOTENV_SET_USB_NEED_INIT BOOTENV_SET_SCSI_NEED_INIT \
"for target in ${boot_targets}; do " \ "for target in ${boot_targets}; do " \
"run bootcmd_${target}; " \ "run bootcmd_${target}; " \
"done\0" "done\0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment