2011/1/31 Michal Nazarewicz <mina86@xxxxxxxxxx>: wrote > If the function is disabled, it should not be added to configuration > and thus should not occupy any interface numbers. At least that's > how I remember android gadget was working. Hmm. Looking at the code in file composite.c function usb_interface_id(), it seems that config->interface[id] array is assigned the function even if its disabled. In my case even if rndis is disabled by default usb_interface_id() assigns interface 0 and interface 1 to rndis. UMS comes next and gets assigned interface 2. The id returned is preserved as the interface id and stored in (for e.g ) fsg->interface_number. Also note that in function config_buf() there is a check to skip functions that are disabled. So this takes care of not adding the function to configuration if its disabled. Thus the host knows only about the enabled interfaces. But interface numbers are assigned to all interfaces(enabled/disabled). As per my understanding the problem is interface id is assigned even for disabled functions. Another query is should bind() be called (which in turn calls usb_interface_id()) if the interface is disabled? Regards, Maulik -- 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