All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/1] config_distro_bootcmd: Run 'scsi scan' before trying scsi
@ 2014-09-16  7:26 Hans de Goede
  2014-09-16  7:26 ` [U-Boot] [PATCH] config_distro_bootcmd: Run 'scsi scan' before trying scsi disks Hans de Goede
  0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2014-09-16  7:26 UTC (permalink / raw)
  To: u-boot

Hi Tom,

Here is a bug-fix patch for config_distro_bootcmd which I would like to get
into v2014.10 .

Stephen, may we have your Acked-by for this one ?

Karsten, may we have your Reported-and-tested-by for this one ?

Thanks & Regards,

Hans

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

* [U-Boot] [PATCH] config_distro_bootcmd: Run 'scsi scan' before trying scsi disks
  2014-09-16  7:26 [U-Boot] [PATCH 0/1] config_distro_bootcmd: Run 'scsi scan' before trying scsi Hans de Goede
@ 2014-09-16  7:26 ` Hans de Goede
  2014-09-16 14:33   ` Stephen Warren
  2014-09-25 14:45   ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2014-09-16  7:26 UTC (permalink / raw)
  To: u-boot

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

Reported-by: Karsten Merker <merker@debian.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 include/config_distro_bootcmd.h | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 90d9901..be616e8 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -53,10 +53,23 @@
 #endif
 
 #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_NAME_SCSI	BOOTENV_DEV_NAME_BLKDEV
 #else
+#define BOOTENV_RUN_SCSI_INIT
+#define BOOTENV_SET_SCSI_NEED_INIT
 #define BOOTENV_SHARED_SCSI
 #define BOOTENV_DEV_SCSI \
 	BOOT_TARGET_DEVICES_references_SCSI_without_CONFIG_CMD_SCSI
@@ -189,7 +202,7 @@
 	\
 	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 "                      \
 			"run bootcmd_${target}; "                         \
 		"done\0"
-- 
2.1.0

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

* [U-Boot] [PATCH] config_distro_bootcmd: Run 'scsi scan' before trying scsi disks
  2014-09-16  7:26 ` [U-Boot] [PATCH] config_distro_bootcmd: Run 'scsi scan' before trying scsi disks Hans de Goede
@ 2014-09-16 14:33   ` Stephen Warren
  2014-09-25 14:45   ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen Warren @ 2014-09-16 14:33 UTC (permalink / raw)
  To: u-boot

On 09/16/2014 01:26 AM, Hans de Goede wrote:
> Scsi disks need to be probed before we try to access them, otherwise all
> accesses fail with: ** Bad device size - scsi 0 **.

Reviewed-by: Stephen Warren <swarren@nvidia.com>

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

* [U-Boot] config_distro_bootcmd: Run 'scsi scan' before trying scsi disks
  2014-09-16  7:26 ` [U-Boot] [PATCH] config_distro_bootcmd: Run 'scsi scan' before trying scsi disks Hans de Goede
  2014-09-16 14:33   ` Stephen Warren
@ 2014-09-25 14:45   ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2014-09-25 14:45 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 16, 2014 at 09:26:23AM +0200, Hans de Goede wrote:

> Scsi disks need to be probed before we try to access them, otherwise all
> accesses fail with: ** Bad device size - scsi 0 **.
> 
> Reported-by: Karsten Merker <merker@debian.org>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Reviewed-by: Stephen Warren <swarren@nvidia.com>
> Tested-by: Karsten Merker <merker@debian.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140925/44567410/attachment.pgp>

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

end of thread, other threads:[~2014-09-25 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-16  7:26 [U-Boot] [PATCH 0/1] config_distro_bootcmd: Run 'scsi scan' before trying scsi Hans de Goede
2014-09-16  7:26 ` [U-Boot] [PATCH] config_distro_bootcmd: Run 'scsi scan' before trying scsi disks Hans de Goede
2014-09-16 14:33   ` Stephen Warren
2014-09-25 14:45   ` [U-Boot] " Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.