Re: USB reset problem

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

 



On Thu, 6 Jun 2019, Bollinger, Seth wrote:

> Hello All,
> 
> Recently we saw a problem where the device reset will fail due to a
> configuration descriptor check in hub.c:5600.
> 
>         if (memcmp(buf, udev->rawdescriptors[index], old_length)
>                 != 0) {
>             dev_dbg(&udev->dev, "config index %d changed (#%d)\n",
>                 index,
>                 ((struct usb_config_descriptor *) buf)->
>                     bConfigurationValue);
>             changed = 1;
>             break;
>         }
> 
> The descriptors returned from the device have a different iInterface.  
> I checked the usb spec and couldn’t find anything that says
> iInterface can’t change.  I don’t have the source for the device,
> but I think it’s probably generating the interface string each
> reset and returning a different index for it (“ADB interface”).
> 
> Has anyone else seen this?  Does the spec guarantee that iInterface
> should never change between device resets?

I have not seen this, and the spec doesn't really guarantee anything 
about what happens between device resets.

On the other hand, saying the reset failed in this case is not 
unreasonable.  The end result is that the device will be re-enumerated 
with its new iInterface value.

If this is really a problem we can change the code so that the 
iManufacturer, iProduct, iSerialNumber, iConfiguration, and iInterface 
descriptor values are exempt from the change check.  It would be a 
little difficult, though, because we would have to parse the 
descriptors to find out where the iInterface values are.

Alan Stern




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

  Powered by Linux