Hi,
We are using IMX6D based custom board. When we frequently plug and remove usb pendrive in USB host port, we are getting error message as mentioned below and thereafter usb pendrive is not detecting.
[ 38.600513] usb 1-1: new high-speed USB device number 2 using ci_hdrc
[ 38.632897] usb 1-1: New USB device found, idVendor=03f0, idProduct=5a07
[ 38.639622] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 38.646816] usb 1-1: Product: v220w
[ 38.650312] usb 1-1: Manufacturer: HP
[ 38.653997] usb 1-1: SerialNumber: 0410210000013931
[ 39.470600] usb 1-1: USB disconnect, device number 2
[ 40.340515] usb 1-1: new high-speed USB device number 3 using ci_hdrc
[ 40.372894] usb 1-1: New USB device found, idVendor=03f0, idProduct=5a07
[ 40.379617] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 40.386807] usb 1-1: Product: v220w
[ 40.390304] usb 1-1: Manufacturer: HP
[ 40.393988] usb 1-1: SerialNumber: 0410210000013931
[ 40.463327] usb 1-1: USB disconnect, device number 3
[ 41.180524] usb 1-1: new high-speed USB device number 4 using ci_hdrc
[ 41.306894] usb 1-1: device descriptor read/all, error -71
If we connect low speed device like usb keyword, it is detecting.
We are using 3.10.17 yocto bsp.
Any advice will be helpful,
Abdul Hussain
Solved! Go to Solution.
Hi Igor,
The below patch solves this fast plug and unplug usb issue,
linux-2.6-imx.git - Freescale i.MX Linux Tree
Regards,
Abdul Hussain
Hi Igor and Abdul,
The issue still seems to persist on kernel_imx 4.1.15 Series 4800.
The USB host controller 1 of imx6 is connected to USB hub which is connected to USB modem device.
If i perform fast plug/unplug the USB hub does not enumerated modem device.
usb 1-1: device not accepting address 5, error -110
usb usb1-port1: unable to enumerate USB device
Success case: (dmesgworking - logs attached)
/sys/kernel/debug/usb # lsusb
Bus 001 Device 002: ID 0424:2512
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 004: ID 1519:0443
Failure case: (dmesghaveissue - logs attached)
/sys/kernel/debug/usb # lsusb
Bus 001 Device 001: ID 1d6b:0002
Success dmesg:
Hi Abdul
seems it is necessary to safely remove device
(commands may depend on distros) using unmount.
Ubuntu has Safely Remove option. After unmounting one can try
udisks --detach /dev/sdX
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igor,
I have not loaded any storage modules. This issue is happening during enumeration itself.
Regards,
Abdul Hussain.
Hi Abdul
during enumeration it is not
allowed to plug and remove usb pendrive.
Best regards
igor
Hi Igor,
But in our use case, user may accidentally remove the usb pendrive during enumeration. So usb driver should not stop enumeraing the device after this error scenario.
We observed like the same error is happening in externally powered usb hub, but driver is automatically recovering and able to detect the device after that.
One more observation is like if i build the usbcore, ehci-hcd and chipidea driver into the loadable module, during error scenario if i rmmod the chipidea driver and load the chipidea module again, high speed usb device detection is happening.
Is there any document which will give overview of usb driver flow?
Regards,
Abdul Hussain
Hi Igor,
The below patch solves this fast plug and unplug usb issue,
linux-2.6-imx.git - Freescale i.MX Linux Tree
Regards,
Abdul Hussain
Hi Igor and Abdul,
The issue still seems to persist on kernel_imx 4.1.15 Series 4800.
The USB host controller 1 of imx6 is connected to USB hub which is connected to USB modem device.
If i perform fast plug/unplug the USB hub does not enumerated modem device.
usb 1-1: device not accepting address 5, error -110
usb usb1-port1: unable to enumerate USB device
Success case:
/sys/kernel/debug/usb # lsusb
Bus 001 Device 002: ID 0424:2512
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 004: ID 1519:0443
Failure case:
/sys/kernel/debug/usb # lsusb
Bus 001 Device 001: ID 1d6b:0002
Success dmesg: