Re: Configuration selection when RNDIS Host not enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 26, 2010 at 8:13 AM, Adam Kropelin
<akropel1@xxxxxxxxxxxxxxxx> wrote:
> On Thu, Jul 22, 2010 at 9:56 AM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
>> 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?
>>
>> 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
>
> Thanks, Alan. This is exactly what I had in mind. I will work to get
> this tested and report back.

Works fine, as expected. Thanks!

Tested-by: Adam Kropelin <akropel1@xxxxxxxxxxxxxxxx>

--Adam
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux