uhci0 excessive interrupts---how can I disable or reset specific USB port?

Paul Mather paul at gromit.dlib.vt.edu
Wed Aug 15 17:05:31 UTC 2012


I am running FreeBSD/amd64 9-STABLE (built Mon Jul 23 10:45:51 EDT 2012) on a Dell Optiplex 760 and, today, noticed I had almost 30% system CPU load in top even when the system was idle.  A perusal of vmstat revealed the cause to be excessive interrupts on uhci0, even though nothing was plugged into that USB port:

# vmstat -i
interrupt                          total       rate
irq4: uart0                           22          0
irq16: uhci0                617002282738     310969
irq23: uhci3 ehci1                    83          0
irq256: hpet0:t0               135818421         68
irq257: hpet0:t1              2222659301       1120
irq264: em0                     29529304         14
irq265: ahci0                   11132506          5
Total                       619401422375     312178


Because I am only using the front USB ports on that hardware, I thought I would disable the other (rear) USB ports in the BIOS.  I rebooted and duly disabled them.  However, when FreeBSD booted, it appeared to ignore the BIOS setting: all the USB ports were probed as usual.  (The high interrupts had vanished, though that might have been due to FreeBSD correctly shutting down the controllers at shutdown, or just the act of rebooting itself.)

I added "hint.uhci.0.disabled=1" to /boot/loader.conf (hoping it would disable uhci0), but, again all the USB ports appeared in the boot probes.  (However, it *appears* as if uhci0 has been disabled because the "irq16: uhci0" line no longer appears in "vmstat -i".  However, all the same ugen devices appear in /dev.)

Is there a way of disabling a specific USB controller that you don't want to use?  If so, how?  I looked at usbconfig, but that appears to me to be more about controlling devices plugged in to a USB port rather than the port itself.  The "reset" command of usbconfig appears to be about resetting USB devices, not ports.

If I can't disable a specific USB port, is there a way to reset it without rebooting?  If I ever get another crazy interrupt storm like I noticed today it would be nice to be able to stop it without having to do a reboot.

Cheers,

Paul.



More information about the freebsd-stable mailing list