Skip to contentSkip to conversation

dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression

PATCH Superseded Marcel Ziswiler 4 participants 7 messages Aug 5, 2015 – Aug 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression

From: Marcel Ziswiler <[email protected]>

The following commit enforces CONFIG_DM_ETH for USB Ethernet which breaks any board using CONFIG_USB_HOST_ETHER without CONFIG_DM_ETH which this patch fixes.

commit 69559093f6173dcfcb041df0995063bdbd07d49b
dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETH

Tested on Colibri T20/T30 as well as Apalis T30 with CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX enabled and a LevelOne USB-0301 ASIX AX88772 dongle.

---
Changes in v2: Fix commit message as pointed out by Simon.

 common/cmd_usb.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
common/cmd_usb.c +6 -3
index 0ade775..6874af7 100644
@@ -530,13 +530,16 @@ static void do_usb_start(void)
 	/* try to recognize storage devices immediately */
 	usb_stor_curr_dev = usb_stor_scan(1);
 #endif
+#endif
 #ifdef CONFIG_USB_HOST_ETHER
 # ifdef CONFIG_DM_ETH
-#  error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH"
-# endif
+#  ifndef CONFIG_DM_USB
+#   error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH"
+#  endif
+# else
 	/* try to recognize ethernet devices immediately */
 	usb_ether_curr_dev = usb_host_eth_scan(1);
-#endif
+# endif
 #endif
 #ifdef CONFIG_USB_KEYBOARD
 	drv_usb_kbd_init();
Signature · 1 line
2.4.3
#1 lore raw

PATCH v2 1/1 dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression

Quoted 13 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

The following commit enforces CONFIG_DM_ETH for USB Ethernet which breaks any board using CONFIG_USB_HOST_ETHER without CONFIG_DM_ETH which this patch fixes.

commit 69559093f6173dcfcb041df0995063bdbd07d49b
dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETH

Tested on Colibri T20/T30 as well as Apalis T30 with CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX enabled and a LevelOne USB-0301 ASIX AX88772 dongle.

Quoted 6 lines

---
Changes in v2: Fix commit message as pointed out by Simon.

 common/cmd_usb.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Dumb question -- won't it make more sense to add USB_HOST_ETHER Kconfig option and make it depend on CONFIG_DM_USB ?

Best regards,
Marek Vasut

#2 lore raw

PATCH v2 1/1 dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression

Quoted 3 lines · Marek Vasut

Dumb question -- won't it make more sense to add USB_HOST_ETHER Kconfig
option and make it depend on CONFIG_DM_USB ?

I don't think it depends on this. As I understand currently one would be able to run a) USB_HOST_ETHER either without DM_USB at all, b) with just DM_USB (e.g. as currently the case on Colibri T20/T30) or c) later even with DM_ETH which then might depend on DM_USB as well.

#3 lore raw

PATCH v2 1/1 dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression

Quoted 9 lines · Marcel Ziswiler
Quoted 3 lines · Marek Vasut

Dumb question -- won't it make more sense to add USB_HOST_ETHER Kconfig
option and make it depend on CONFIG_DM_USB ?

I don't think it depends on this. As I understand currently one would be able to run a) USB_HOST_ETHER either without DM_USB at all, b) with just DM_USB (e.g. as currently the case on Colibri T20/T30) or c) later even with DM_ETH which then might depend on DM_USB as well.

OK, I see, makes sense. Thanks for clarifying this chaos :)

Best regards,
Marek Vasut

#4 lore raw

PATCH v2 1/1 dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression

In reply to Marcel Ziswiler

Hi Marcel,

Quoted 13 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

The following commit enforces CONFIG_DM_ETH for USB Ethernet which breaks any board using CONFIG_USB_HOST_ETHER without CONFIG_DM_ETH which this patch fixes.

commit 69559093f6173dcfcb041df0995063bdbd07d49b
dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETH

Tested on Colibri T20/T30 as well as Apalis T30 with CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX enabled and a LevelOne USB-0301 ASIX AX88772 dongle.

Quoted 6 lines

---
Changes in v2: Fix commit message as pointed out by Simon.

 common/cmd_usb.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

What do you think about changing Tegra over to CONFIG_DM_ETH? Do you have any leads on the problem you found?

Quoted 26 lines
common/cmd_usb.c +6 -4
index 0ade775..6874af7 100644
@@ -530,13 +530,16 @@ static void do_usb_start(void)
        /* try to recognize storage devices immediately */
        usb_stor_curr_dev = usb_stor_scan(1);
 #endif
+#endif
 #ifdef CONFIG_USB_HOST_ETHER
 # ifdef CONFIG_DM_ETH
-#  error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH"
-# endif
+#  ifndef CONFIG_DM_USB
+#   error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH"
+#  endif
+# else
        /* try to recognize ethernet devices immediately */
        usb_ether_curr_dev = usb_host_eth_scan(1);
-#endif
+# endif
 #endif
 #ifdef CONFIG_USB_KEYBOARD
        drv_usb_kbd_init();
--
Quoted 2 lines

2.4.3

Regards,
Simon

#5 lore raw

PATCH v2 1/1 dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression

Quoted 3 lines · Simon Glass

What do you think about changing Tegra over to CONFIG_DM_ETH?

Sure, once it actually works (;-p).

Right now I would just be happy if it works at all again (e.g. reason for this patch).

Quoted 2 lines

Do you
have any leads on the problem you found?

No, not yet. Sorry, too many other cans of worms currently (e.g. chasing why upon watchdog reset on T20 one gets stuck in the SPL unfortunately no mainline watchdog driver for T20 yet so using downstream L4T kernel).

#6 lore raw

PATCH v2 1/1 dm: usb: fix USB Ethernet without CONFIG_DM_ETH regression

In reply to Simon Glass

Hi,

Quoted 16 lines · Simon Glass

Hi Marcel,

Quoted 13 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

The following commit enforces CONFIG_DM_ETH for USB Ethernet which breaks any board using CONFIG_USB_HOST_ETHER without CONFIG_DM_ETH which this patch fixes.

commit 69559093f6173dcfcb041df0995063bdbd07d49b
dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETH

Tested on Colibri T20/T30 as well as Apalis T30 with CONFIG_USB_HOST_ETHER and CONFIG_USB_ETHER_ASIX enabled and a LevelOne USB-0301 ASIX AX88772 dongle.

Quoted 8 lines
Quoted 6 lines

---
Changes in v2: Fix commit message as pointed out by Simon.

 common/cmd_usb.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Applied to u-boot-dm, thanks!

It turns out I dropped missed applying a patch:

http://patchwork.ozlabs.org/patch/492686/

Thanks for fixing this.

Regards,
Simon