Subject: Re: USB controller goes nuts on Alpha
To: Lennart Augustsson <lennart@augustsson.net>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: current-users
Date: 02/08/2000 14:16:30
Lennart Augustsson <lennart@augustsson.net> writes:

> Do you have an i386 machine to try the card in?  Just to make sure
> it's to a card problem.

I tried the card in a Windows box, and it worked fine (In fact, with
the device I'm using to test, a Kensington videocam, the OHCI board
gave much better performance than that system's on-board Intel UHCI). 

> The next thing to do is to put USB_DEBUG in your kernel config file
> and then set ohci_debug=20 and try again.

Booting with USB_DEBUG defined and ohcidebug=20:

ohci0 at pci0 dev 12 function 0: Opti RM861HA (rev. 0x10)
ohci0: interrupting at isa irq 10
ohci_init: start
ohci0: OHCI version 1.0, legacy support
ohci_alloc_sed: allocating chunk
ohci_init: cold started
ohci0: resetting
ohci_dumpregs: rev=0x00000110 control=0x000000c0 command=0x00000000
               intrstat=0x00000000 intre=0x00000000 intrd=0x00000000
               hcca=0x00000000 percur=0x00000000 ctrlhd=0x00000000
               ctrlcur=0x00000000 bulkhd=0x00000000 bulkcur=0x00000000
               done=0x00000000 fmival=0x00002edf fmrem=0x00002edb
               fmnum=0x00000000 perst=0x00000000 lsthrs=0x00000628
               desca=0x01000002 descb=0x00000000 stat=0x00000000
               port1=0x00000000 port2=0x00000000
         HCCA: frame_number=0x0000 done_head=0x00000000
ohci_dumpregs: rev=0x00000110 control=0x000000bf command=0x00000000
               intrstat=0x00000005 intre=0x8000004b intrd=0x8000004b
               hcca=0x0074e000 percur=0xfffffff0 ctrlhd=0x00750fe0
               ctrlcur=0x00000000 bulkhd=0x00750fc0 bulkcur=0x00000000
               done=0x00000000 fmival=0xa7782edf fmrem=0x80002af0
               fmnum=0x00000171 perst=0x00002a2f lsthrs=0x00000628
               desca=0x01000002 descb=0x00000000 stat=0x00000000
               port1=0x00000100 port2=0x00000100
         HCCA: frame_number=0x0000 done_head=0x00000000
usb0 at ohci0: USB revision 1.0
ohci_open: pipe=0xfffffe0000003a00, addr=0, endpt=0 (0)
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0100
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0100
ohci_root_ctrl_control type=0x00 request=05
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0300
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0300
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0301
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0301
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0302
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0302
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0200
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0200
ohci_root_ctrl_control type=0x00 request=09
uhub0 at usb0ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0301
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0301
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0302
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0302

uhub0: Opti OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0200
ohci_root_ctrl_control type=0x80 request=06
ohci_root_ctrl_control wValue=0x0200
ohci_root_ctrl_control type=0x00 request=09
ohci_root_ctrl_control type=0xa0 request=06
uhub0: 2 ports with 2 removable, self powered
ohci_open: pipe=0xfffffe0000003800, addr=1, endpt=129 (1)
ohci_root_ctrl_control type=0x02 request=01
ohci_root_ctrl_control type=0xa3 request=00
ohci_root_ctrl_transfer: get port status i=1
ohci_root_ctrl_transfer: port status=0x0100
ohci_root_ctrl_control type=0xa3 request=00
ohci_root_ctrl_transfer: get port status i=2
ohci_root_ctrl_transfer: port status=0x0100

[rest of autoconfig for other devices]

ohci_intr: sc=0xfffffe000003f000 intrs=5(0) eintr=1
ohci0: scheduling overrun
ohci_intr: sc=0xfffffe000003f000 intrs=5(0) eintr=1
ohci0: scheduling overrun

[repeat endlessly]


> 
> Did you have any devices plugged in when this happened?

I've tried it both ways. Pre-debug, it made no difference. With the
debugging code, it fails the same way, but has slightly different
spew:

ohci_intr: sc=0xfffffe000003f000 intrs=45(40) eintr=41
ohci0: scheduling overrun
ohci_rhsc: sc=0xfffffe000003f000 xfer=0xfffffe0000003900
hstatus=0x00000000
ohci_rhsc: change=0x02
ohci_rhsc_able: on=0
ohci_intr: sc=0xfffffe000003f000 intrs=45(40) eintr=1
ohci0: scheduling overrun
ohci_intr: sc=0xfffffe000003f000 intrs=45(40) eintr=1
ohci0: scheduling overrun

[repeat endlessly]


> Yes, probably.  You could debug the ohci_intr1() routine if you want to
> see what happens.

Mmph. I don't really have my head wrapped around USB, so I'm not sure
what's supposed to be going on... I'll look at the OHCI document and
try to make some sense of it.

        - Nathan