On Thu, 22 Jul 2010, David Brownell wrote: > > > In the broader case, to some extent I wonder if > > > the logic in > > > usb_choose_configuration() should be as simple as > > choosing the one and > > > only config regardless of any heuristics in all cases > > where only a > > > single config is present. Is there value in > > > failing to select any > > > configuration at all? > > Probably not; I don't recall the original code > working that way. The only reason for not selecting any config would be that all of them require more power than is available. I don't see anything wrong with changing the RNDIS test to apply only when more than one configuration is available. Adam, care to try the patch below? Alan Stern Index: usb-2.6/drivers/usb/core/generic.c =================================================================== --- usb-2.6.orig/drivers/usb/core/generic.c +++ usb-2.6/drivers/usb/core/generic.c @@ -105,8 +105,10 @@ int usb_choose_configuration(struct usb_ /* When the first config's first interface is one of Microsoft's * pet nonstandard Ethernet-over-USB protocols, ignore it unless * this kernel has enabled the necessary host side driver. + * But: Don't ignore it if it's the only config. */ - if (i == 0 && desc && (is_rndis(desc) || is_activesync(desc))) { + if (i == 0 && num_configs > 1 && desc && + (is_rndis(desc) || is_activesync(desc))) { #if !defined(CONFIG_USB_NET_RNDIS_HOST) && !defined(CONFIG_USB_NET_RNDIS_HOST_MODULE) continue; #else -- 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