Re: [PATCH] usb: Add a new quirk: USB_QUIRK_HONOR_BNUMINTERFACES

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

 



On Sun, 14 Mar 2010, Hans de Goede wrote:

> Hi,
> 
> The attached patch adds a new usb device quirk
> USB_QUIRK_HONOR_BNUMINTERFACES, when this quirk is set and a device
> has more interface descriptors in a configuration then it claims to
> have in config->bNumInterfaces, ignore all additional interfaces.
> 
> This is needed for devices which try to hide unused interfaces by only
> lowering config->bNumInterfaces, and which can't handle if you try to talk
> to the "hidden" interfaces.
> 
> This patch also adds a quirk table entry for one such device, which existence
> is the reason for this patch.

The problem with this patch is that it assumes the "hidden" interfaces 
are always the last ones in the descriptor listing.  That's not 
necessarily true; devices don't have to list their interfaces in any 
particular order.

If instead you decide that the "hidden" interfaces are the ones with
bInterfaceNumber >= bNumInterfaces, then you face possible problems
with devices that leave gaps in the series of bInterfaceNumber values.  
I don't know whether any such devices exist, but they might.

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

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

  Powered by Linux