Subject: Re: Still ehci+umass trouble...
To: None <current-users@netbsd.org>
From: Martin S. Weber <Ephaeton@gmx.net>
List: current-users
Date: 01/24/2006 22:42:53
On Mon, Jan 23, 2006 at 04:30:36PM +0100, Martin S. Weber wrote:
> On Mon, Jan 23, 2006 at 01:49:39PM +0100, Juan RP wrote:
> > (...)
> > The code we added from OpenBSD only tries to fix this problem on VIA
> > EHCI controllers, your controller is an Intel ICH.
> > 
> 
> Uh yes; I had the umass lying next to it (the machine with the intel ehci)
>  and I claimed that this problem also exists for intel controllers; 
> thus I tested the latest kernel to back up my claim; 
> this was the accompagnying data (and more detailled still follows).
> 

And now I finally came around to bring the next NetBSD machine to its
knees. I hope you are aware of the massive pain you inflict on me as
NetBSD user, seeing the machine at the ddb> prompt trying helplessly
to sync on a drive where it has queued up half a dozen timeouts already
and neatly punishes the other filesystems. Yay.

(Teaser: let's add a /etc/rc.d/sync: while:; do sync; done)

Actually it punished the other filesystems so much so I lost my
copy of /var/log/messages I made. Yay^2.

Oh yeah. my existing /var/log/messages "of course" also lost half of its
content. Yay^3.

That is, all I can say right now is that the problem is *not* fixed,
kern/26681 should *not* be 'closed' but 'open' again please.

Hardware:

Jan 24 20:34:58 circe /netbsd: uhci0 at pci0 dev 2 function 0: VIA Technologies VT83C572 USB Controller (rev. 0x61)
Jan 24 20:34:58 circe /netbsd: uhci0: interrupting at ioapic1 pin 2 (irq 11)
Jan 24 20:34:58 circe /netbsd: usb0 at uhci0: USB revision 1.0
Jan 24 20:34:58 circe /netbsd: uhub0 at usb0
Jan 24 20:34:58 circe /netbsd: uhub0: VIA Technologies UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Jan 24 20:34:58 circe /netbsd: uhub0: 2 ports with 2 removable, self powered
Jan 24 20:34:58 circe /netbsd: uhci1 at pci0 dev 2 function 1: VIA Technologies VT83C572 USB Controller (rev. 0x61)
Jan 24 20:34:58 circe /netbsd: uhci1: interrupting at ioapic1 pin 3 (irq 11)
Jan 24 20:34:58 circe /netbsd: usb1 at uhci1: USB revision 1.0
Jan 24 20:34:58 circe /netbsd: uhub1 at usb1
Jan 24 20:34:58 circe /netbsd: uhub1: VIA Technologies UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
Jan 24 20:34:58 circe /netbsd: uhub1: 2 ports with 2 removable, self powered
Jan 24 20:34:58 circe /netbsd: ehci0 at pci0 dev 2 function 2: VIA Technologies VT8237 EHCI USB Controller (rev. 0x63)
Jan 24 20:34:58 circe /netbsd: ehci0: offs=16
Jan 24 20:34:58 circe /netbsd: ehci0: interrupting at ioapic1 pin 2 (irq 11)
Jan 24 20:34:58 circe /netbsd: ehci_pci_attach: companion uhci0
Jan 24 20:34:58 circe /netbsd: ehci_pci_attach: companion uhci1
Jan 24 20:34:58 circe /netbsd: ehci_dump_caps: legsup=0x00000001 legctlsts=0xc0000000
Jan 24 20:34:58 circe /netbsd: ehci0: BIOS has given up ownership
Jan 24 20:34:58 circe /netbsd: ehci_init: start
Jan 24 20:34:58 circe /netbsd: ehci0: EHCI version 1.0 
Jan 24 20:34:58 circe /netbsd: ehci_init: sparams=0x2204
Jan 24 20:34:58 circe /netbsd: ehci0: companion controllers, 2 ports each: uhci0 uhci1
Jan 24 20:34:58 circe /netbsd: ehci_init: cparams=0x6872
Jan 24 20:34:58 circe /netbsd: ehci0: resetting 
Jan 24 20:34:58 circe /netbsd: ehci0: flsize=1024 
Jan 24 20:34:58 circe /netbsd: QH(0xcad93e40) at 0x01895e40:
Jan 24 20:34:58 circe /netbsd: link=0x01895e42<QH>
Jan 24 20:34:58 circe /netbsd: endp=0x0000a000
Jan 24 20:34:58 circe /netbsd: addr=0x00 inact=0 endpt=0 eps=2 dtc=0 hrecl=1
Jan 24 20:34:58 circe /netbsd: mpl=0x0 ctl=0 nrl=0
Jan 24 20:34:58 circe /netbsd: endphub=0x00000000
Jan 24 20:34:58 circe /netbsd: smask=0x00 cmask=0x00 huba=0x00 port=0 mult=0
Jan 24 20:34:58 circe /netbsd: curqtd=0x00000001<T>
Jan 24 20:34:58 circe /netbsd: Overlay qTD:
Jan 24 20:34:58 circe /netbsd: next=0x00000001<T> altnext=0x00000001<T>
Jan 24 20:34:58 circe /netbsd: status=0x00000040: toggle=0 bytes=0x0 ioc=0 c_page=0x0
Jan 24 20:34:58 circe /netbsd: cerr=0 pid=0 stat=0x40<HALTED>
Jan 24 20:34:58 circe /netbsd: buffer[0]=0x00000000
Jan 24 20:34:58 circe /netbsd: buffer[1]=0x00000000
Jan 24 20:34:58 circe /netbsd: buffer[2]=0x00000000
Jan 24 20:34:58 circe /netbsd: buffer[3]=0x00000000
Jan 24 20:34:58 circe /netbsd: buffer[4]=0x00000000
Jan 24 20:34:58 circe /netbsd: usb2 at ehci0: USB revision 2.0
Jan 24 20:34:58 circe /netbsd: uhub2 at usb2
Jan 24 20:34:58 circe /netbsd: uhub2: VIA Technologies EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
Jan 24 20:34:58 circe /netbsd: uhub2: 4 ports with 4 removable, self powered

(BTW: These syslog messages do *NOT* come from /netbsd but from /nbsd-mp-usbdb !)

Problem:

Basically the same as with the intel controller and as described elsewhere numerously.
STALL, blah, repeat & cycle, with a lot of ehci_intrlist_timeout in between.

Ok. Strategy hint please ?

Reply to 26681 appending both problems (Intel and VIA stuff, both not fixed by
the INTR_WORKAROUND), open two PRs (one per ehci type), open a new PR (umass and
ehci "Just Won't Work" on netbsd?) ? Developers, in which pieces would you like
to look at it ? :)

I suppose while at it open another PR for syslog to use the name of 
machdep.booted_kernel (like half of the rest of NetBSD) instead of 
"/netbsd" hardcoded. Grmpf.

And if you want details on the broken VIA case (i.e. exact reset retur values
or stuff) please yell; making the problem appear took me over an hour of work,
and I'm not in the mood to invest an hour just to forget a 'sync' at the end :(
Trying to be best of help I can be with my limited resources on time and nerves :(

Regards,

-Martin, -frustrated.