Re: USB reset problem

2019-06-06 Thread Greg KH
On Thu, Jun 06, 2019 at 03:19:14PM +, Bollinger, Seth wrote: > > On Jun 6, 2019, at 10:03 AM, Alan Stern wrote: > > > > EPERM means that the file descriptor was not opened with write access. > > It has nothing to do with reset failures. > > Yes, I was confused by that as well so spent some

Re: USB reset problem

2019-06-06 Thread Bollinger, Seth
> On Jun 6, 2019, at 10:03 AM, Alan Stern wrote: > > EPERM means that the file descriptor was not opened with write access. > It has nothing to do with reset failures. Yes, I was confused by that as well so spent some time instrumenting the kernel. It definitely is open for writing, and get’

Re: USB reset problem

2019-06-06 Thread Alan Stern
On Thu, 6 Jun 2019, Bollinger, Seth wrote: > > On Jun 6, 2019, at 9:36 AM, Greg KH wrote: > > > > If the descriptor changes between resets, that means that something > > changed and we need to start over with it. What is the problem that > > this is causing > > We have code doing a USBDEVFS_RES

Re: USB reset problem

2019-06-06 Thread Bollinger, Seth
> On Jun 6, 2019, at 9:37 AM, Alan Stern > mailto:st...@rowland.harvard.edu>> wrote: > > 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 > li

Re: USB reset problem

2019-06-06 Thread Bollinger, Seth
> On Jun 6, 2019, at 9:36 AM, Greg KH wrote: > > If the descriptor changes between resets, that means that something > changed and we need to start over with it. What is the problem that > this is causing We have code doing a USBDEVFS_RESET that fails when the ioctl returns EPERM. I think the

Re: USB reset problem

2019-06-06 Thread Alan Stern
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(&ud

Re: USB reset problem

2019-06-06 Thread Greg KH
On Thu, Jun 06, 2019 at 01:55:37PM +, 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) { >

USB reset problem

2019-06-06 Thread Bollinger, Seth
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",