On Mon, 3 Oct 2022 at 19:17, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > > On Mon, Oct 03, 2022 at 07:04:05PM +0100, James Dutton wrote: > > I have done some more tests. > > With the device plugged in, I manually send a command to reset > > the USB device. > > Using instructions listed here: > > https://askubuntu.com/questions/645/how-do-you-reset-a-usb-device-from-the-command-line > > > > The reset fails. > > It never recovers. > > So, I think there is some problem relating to USB 3.x reset, and maybe > > just my specific device which is an NVME storage in a USB dock. > > I think the problem is more to do with the Linux kernel's USB 3.x > > reset procedure, rather than any other cause. > > Is there any quirk or test I can add, that would remove power from the > > USB port and return it, as part of the reset procedure? > > Or, is there any extra debug logging I can enable to help diagnose > > where the reset function is failing? > > You can try collecting a usbmon trace of the reset (instructions on the > web or in Documentation/usb/usbmon.rst in the kernel source). That will > provide some clues as to whether the problem lies in the reset itself or > in the activities that follow the reset. > > Have you tried running a similar test using, say, a plain old USB thumb > drive in place of the NVME storage device? > I have tried the reset command on USB 2.0 and USB 3.0 flash sticks, and they reset OK. So, it seems to be a problem with this specific NVME USB device. This NVME USB device says it is USB 3.2 when I do lsusb. I don't have a USB 3.2 flash stick lsusb output: Bus 004 Device 002: ID 0bda:9210 Realtek Semiconductor Corp. RTL9210 M.2 NVME Adapter Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.20 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x0bda Realtek Semiconductor Corp. idProduct 0x9210 RTL9210 M.2 NVME Adapter bcdDevice 20.01 I will try to capture a usbmon and compare the flash sticks reset vs the NVME USB device.