Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm getting a strange behavior on an Android system when quickly plugging and unplugging usb devices from a usb hub. What happens is that after some quick plug/unplug of a device on the hub, I start getting:

<6>[18121.010764] usb 2-1: new low speed USB device number 8 using tegra-ehci
<3>[18121.253237] hub 2-0:1.0: cannot reset port 1 (err = -110)
<3>[18121.478006] hub 2-0:1.0: cannot reset port 1 (err = -110)
<3>[18121.702795] hub 2-0:1.0: cannot reset port 1 (err = -110)
<3>[18121.927899] hub 2-0:1.0: cannot reset port 1 (err = -110)
<3>[18122.153156] hub 2-0:1.0: cannot reset port 1 (err = -110)
<3>[18122.153272] hub 2-0:1.0: Cannot enable port 1.  Maybe the USB cable is bad?
<3>[18122.378371] hub 2-0:1.0: cannot reset port 1 (err = -110)
<3>[18122.603889] hub 2-0:1.0: cannot reset port 1 (err = -110)

After this, anything I plug into the hub does not work until the hub itself is unplugged/plugged again.

I've been able to fix this non-responsiveness by sending an ioctl with USBDEVFS_RESET. Unfortunately this requires root permissions, am I correct?

Is there any other possible way to fix this without requiring root permissions?

share|improve this question

1 Answer 1

I've been able to fix this non-responsiveness by sending an ioctl with USBDEVFS_RESET. Unfortunately this requires root permissions, am I correct?

Probably yes.

Is there any other possible way to fix this without requiring root permissions?

Well, if you're already writing your own application to send the ioctl, you could just make it setuid root so it always runs with root permissions, regardless of who is executing it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.