From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Tue, 7 Jul 2015 20:53:34 -0600 Subject: [U-Boot] [PATCH 02/20] dm: usb: Allow USB Ethernet whenever CONFIG_DM_ETH is not defined In-Reply-To: <1436324032-17931-1-git-send-email-sjg@chromium.org> References: <1436324032-17931-1-git-send-email-sjg@chromium.org> Message-ID: <1436324032-17931-3-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de We can support USB Ethernet regardless of the setting of CONFIG_DM_USB. Update the code to reflect this. Signed-off-by: Simon Glass --- 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