recent usb2 regression

Hans Petter Selasky hselasky at c2i.net
Thu Mar 5 01:11:25 PST 2009


On Thursday 05 March 2009, Giorgos Keramidas wrote:
> After my last update to March 1 sources, uhci started going into
> interrupt storm mode:
>
>   $ vmstat -i
>   interrupt                          total       rate
>   irq1: atkbd0                        8676          1
>   irq9: acpi0                        12412          2
>   irq12: psm0                         5979          1
>   irq14: ata0                       601562        136
>   irq15: ata1                           69          0
>   irq16: uhci0                   745625990     169191
>   irq19: uhci3                        5906          1
>   irq23: uhci2 ehci1                     1          0
>   cpu0: timer                      8813127       1999
>   irq256: hdac0                     116677         26
>   irq258: re0                         2438          0
>   cpu1: timer                      8804089       1997
>   irq259: vgapci0                    20525          4
>   Total                          764017451     173364
>
> Setting hw.usb2.uhci.debug=1 I see many repeated messages like:
>
>   Mar  5 10:06:39 foo kernel: uhci_interrupt:1453: uhci_interrupt: host
> controller halted Mar  5 10:06:39 foo kernel: uhci_dumpregs:691: usbus0
> regs: cmd=0080, sts=0020, intr=000f, frnum=0072, flbase=010be1c8, sof=0040,
> portsc1=0080, portsc2=0080 Mar  5 10:06:39 foo kernel: uhci_dump_qh:764:
> QH(0xc6251e00) at 0x01a51e02: h_next=0x01a79e82 e_next=0x00000001 Mar  5
> 10:06:39 foo kernel: uhci_dump_qh:764: QH(0xc6279e80) at 0x01a79e82:
> h_next=0x01a76702 e_next=0x00000001 Mar  5 10:06:39 foo kernel:
> uhci_dump_qh:764: QH(0xc6276700) at 0x01a76702: h_next=0x01a8b002
> e_next=0x00000001 Mar  5 10:06:39 foo kernel: uhci_dump_qh:764:
> QH(0xc628b000) at 0x01a8b002: h_next=0x00000001 e_next=0x01a77080
>
> There are local changes in this src/ tree, but none of them seems
> related to usb2 going crazy.  I am running an i386 kernel build from the
> `KOBE' config file shown in the patch uploaded at:
>
>   http://people.freebsd.org/~keramida/diff/gker.head.r189392.diff
>
> usbconfig shows only my USB mouse attached at the time:
>
>   # usbconfig
>   ugen5.1: <UHCI root HUB Intel> at usbus5, cfg=0 md=HOST spd=FULL (12Mbps)
> pwr=ON ugen6.1: <EHCI root HUB Intel> at usbus6, cfg=0 md=HOST spd=HIGH
> (480Mbps) pwr=ON ugen0.1: <UHCI root HUB Intel> at usbus0, cfg=0 md=HOST
> spd=FULL (12Mbps) pwr=ON ugen1.1: <UHCI root HUB Intel> at usbus1, cfg=0
> md=HOST spd=FULL (12Mbps) pwr=ON ugen2.1: <EHCI root HUB Intel> at usbus2,
> cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON ugen3.1: <UHCI root HUB Intel> at
> usbus3, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen4.1: <UHCI root HUB
> Intel> at usbus4, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON ugen4.2: <product
> 0x0003 Creative Labs> at usbus4, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON
>
> Is this a known problem with kernels from March 1, or a new one?

Hi,

The only active interrupt is the HCH status bit.

You can try editing /sys/dev/usb/controller/uhci.c and apply the following 
patch:

        /* get acknowledge bits */
        status &= (UHCI_STS_USBINT |
            UHCI_STS_USBEI |
            UHCI_STS_RD |
+           UHCI_STS_HCH |
            UHCI_STS_HSE |
            UHCI_STS_HCPE);

--HPS


More information about the freebsd-usb mailing list