Hi Stanislaw, On Mon, 7 Jan 2019 at 16:09, Stanislaw Gruszka <sgruszka@xxxxxxxxxx> wrote: > On Mon, Jan 07, 2019 at 01:47:19PM +0100, Jeroen Roovers wrote: > > Maybe I am wrong about this, but then again I have neither ever seen > > the driver respond to an ENOENT like this when an RT5592 > > "disappeared". By "neither ever seen" I mean I have never seen rt2x00usb respond properly like that because no -ENOENT was ever seen. I have many system logs collected over the years showing the exact error that the code was trying to catch and still does try to catch: with USB debug messages enabled, I tend to see usb: kworker.* timed out on ep.* followed by rt2x00 specific warnings about the queues filling up: rt2800usb_txdone: Warning - Data pending for entry N in queue N [may repeat a few times] followed by the fatal: rt2x00usb_vendor_request: Error - Vendor Request X failed for offset X with error -110 [many of these, system is slowly locking up] So the only clue that I had was that perhaps rt2x00usb_vendor_request wasn't catching the correct return value. > According to Documentation/driver-api/usb/error-codes.rst > ENOENT is valid error code when interface does not exist or > when URB was unlinked. rt2x00usb_vendor_request calls usb_control_msg. usb_control_msg according to that document can return -ETIMEDOUT. 1. rt2x00usb_vendor_request calls usb_control_msg. 2. usb_control_msg calls usb_internal_control_msg and passes on its return value. 3. usb_internal_control_msg calls usb_start_wait_urb and passes on its return value. 4. usb_start_wait_urb very specifically substitutes -ETIMEDOUT for -ENOENT as the return value of usb_kill_urb and 5. that is passed back all the way up to rt2x00usb_vendor_request. Kind regards, jer