Re: USB transaction errors causing RCU stalls and kernel panics

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

 



Am Dienstag, den 03.03.2020, 20:08 +0000 schrieb Jonas Karlsson:

Hi,

> > > If I pull the reset pin of the USB hub and keep it in reset state at
> > > this point, the event loop of failing transfers continues despite
> > > there is nothing on the USB bus any longer. The only way to get out of that

Well, if nothing is on the bus, CDC-ACM's disconnect() should be
called. Is the HC so broken, that even that does not work?

> > loop is to either unbind the usb driver or power cycle the board.
> > > 
> > > Is this the expected behavior when USB transaction error happens for all
> > 
> > transfers when using cdc-acm class driver?

Well, it will happen on a lot of drivers. Generally the higher level
drivers are written under the assumption that you can submit URBs as
often as you want.

> The reason I posted on this mailing list was that I was afraid that the cdc-acm driver could
> be causing new transfers to be started when the previous fails due to USB transaction errors and
> then trigger this event storm.

It does. However it does so in a way that the lower layers
should survive. You may argue that cdc_acm should do error handling.
The question is which handling. If a reset does not help as you
said, I do not see what cdc_acm can do.

> The acm_ctrl_irq() function seems to submit a new urb directly if the previous fails, but I cannot

Yes. There is no error handling in the CDC specification.
Unless you want to reset the whole device you are stuck.
The device is free to respond with a control message any time
it wants. You need to keep that URB running if you want the
device to remain fully functional.

> say that I understand that code very well yet. The acm_read_bulk_callback() function also seem
> to submit a new read urb on USB transaction Errors. But If you think this could not cause this
> behavior I will ask our supplier to fix the cdns driver.

This has the same issue as the irq endpoint. We need to keep the data
pump running while the device is operational.

	Regards
		Oliver




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

  Powered by Linux