[U-Boot] [PATCH 02/20] dm: usb: Allow USB Ethernet whenever CONFIG_DM_ETH is not defined

Simon Glass sjg at chromium.org
Wed Jul 8 04:53:34 CEST 2015


We can support USB Ethernet regardless of the setting of CONFIG_DM_USB.
Update the code to reflect this.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 common/cmd_usb.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index b385743..bc45c48 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -525,7 +525,12 @@ static void do_usb_start(void)
 		return;
 
 	/* Driver model will probe the devices as they are found */
-#ifndef CONFIG_DM_USB
+#ifdef CONFIG_DM_USB
+# ifndef CONFIG_DM_ETH
+	/* try to recognize ethernet devices immediately */
+	usb_ether_curr_dev = usb_host_eth_scan(1);
+# endif
+#else /* !CONFIG_DM_USB */
 # ifdef CONFIG_USB_STORAGE
 	/* try to recognize storage devices immediately */
 	usb_stor_curr_dev = usb_stor_scan(1);
-- 
2.4.3.573.g4eafbef



More information about the U-Boot mailing list