On Mon, 31 Jan 2011, Maulik Mankad wrote: > Alan, Michal, > > Thanks for your comments. > > On further investigation I found the below code in f_rndis.c > rndis_bind_config() which disables rndis by default. > > ifdef CONFIG_USB_ANDROID_RNDIS > /* start disabled */ > rndis->port.func.disabled = 1; > #endif > > It looks like on enumeration with a Windows PC, since the RNDIS > function is disabled, Windows does not know about this interface at > all. > > It therefore considers UMS as the first interface and issues SETUP > packet with wIndex = 0. But on the device side UMS is at interface 2 > and hence the check in fsg_setup() fails. > > Since RNDIS is disabled by default the Configuration descriptor also > shows UMS as the first interface. That sounds like a bug. The gadget should know what its own interfaces are! Is the UMS interface number 0 or number 2? What value does the bNumInterfaces field have in the config descriptor? > Do you agree with my understanding here? > > Also if I enable RNDIS by default, Windows sees all the interfaces > correctly i.e rndis(interface 0 and 1), UMS as interface 2 and ADB as > interface 3. Although the enumeration is not complete. Seems like some > issues when all functions are enabled together by default. > > Any idea why is RNDIS disabled by default for android gadget? Maybe you should ask the Android people instead of us. They added that code. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html