Hello,
I'm working with PXA27x hardware and going to check USB ethernet gadget (RNDIS
mode)
with 2.6.18 on PC host. After a short investigation, I was stucked because:
1) help on CONFIG_USB_ETH_RNDIS (taken from drivers/usb/gadget/Kconfig) says
that
RNDIS-aware configuration will be second (behind CDC);
2) gadget code (taken from drivers/usb/gadget/ether.c) says "list the RNDIS
config
first, to make Microsoft's drivers happy";
3) choose_configuration() from drivers/usb/core/hub.c will choose 2nd
configuration
even if CONFIG_USB_NET_RNDIS_HOST is enabled.
I believe that the valid configuration order (if RNDIS is enabled) is RNDIS
1st, CDC
2nd (mostly to be compatible with Microsoft stuff, as comment from 2) says).
But,
if this is true, then choose_configuration() works wrong - if RNDIS support is
enabled,
it should choose 1st configuration and relax about others. Moreover, since
RNDIS host
support may be modular, CONFIG_USB_NET_RNDIS_HOST_MODULE should also be taken
into
account. So, here is a tiny patch.
--- 2.6.18/drivers/usb/core/hub.c 2006-09-22 14:49:57.000000000 +0400
+++ 2.6.18.devel/drivers/usb/core/hub.c 2006-09-26 18:32:25.000000000 +0400
@@ -1244,10 +1244,11 @@
&& desc->bInterfaceClass == USB_CLASS_COMM
&& desc->bInterfaceSubClass == 2
&& desc->bInterfaceProtocol == 0xff) {
-#ifndef CONFIG_USB_NET_RNDIS_HOST
- continue;
-#else
+#if defined(CONFIG_USB_NET_RNDIS_HOST) ||
defined(CONFIG_USB_NET_RNDIS_HOST_MODULE)
best = c;
+ break;
+#else
+ continue;
#endif
}
What do you think about it ?
TIA, Dmitry
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel