Subject: Re: Still ehci+umass trouble...
To: Martin S. Weber <Ephaeton@gmx.net>
From: Juan RP <juan@xtrarom.org>
List: current-users
Date: 01/23/2006 13:49:39
On Mon, 23 Jan 2006 10:26:56 +0100
"Martin S. Weber" <Ephaeton@gmx.net> wrote:

> On Sun, Jan 22, 2006 at 04:15:02PM +0100, Martin S. Weber wrote:
> > (...)
> > 1. I have these (exact same) problems with an Intel EHCI too:
> > 
> > NetBSD rfhinf038 3.99.11 NetBSD 3.99.11 (GENERIC) 
> >  #0: Sat Nov 19 17:13:02 CET 2005  
> >  root@rfhinf038:/usr/home/netbsd/obj/sys/arch/i386/compile/GENERIC
> > i386 (...)
> 
> Updated.
> 
> NetBSD rfhinf038 3.99.15 NetBSD 3.99.15 (GENERIC.MP_USBDEBUG) 
>  #0: Sun Jan 22 17:52:54 CET 2006  
>  root@circe.entropie.net:/src/obj/sys/arch/i386/compile/GENERIC.MP_USBDEBUG
> i386
> 
> ehci0 at pci0 dev 29 function 7: Intel 82801EB/ER USB EHCI Controller
> (rev. 0x02) ehci0: interrupting at ioapic0 pin 23 (irq 5)
> ehci0: BIOS has given up ownership
> ehci0: EHCI version 1.0
> ehci0: companion controllers, 2 ports each: uhci0 uhci1 uhci2 uhci3
> usb4 at ehci0: USB revision 2.0

The code we added from OpenBSD only tries to fix this problem on VIA
EHCI controllers, your controller is an Intel ICH.

FreeBSD uses this code on VIA and ATI EHCI controllers to workaround
umass stalls.

Maybe you could try to match your EHCI controller and see if that
workarounds your problem.

Something like:

        /* Enable workaround for dropped interrupts as required */
        if (sc->sc.sc_id_vendor == PCI_VENDOR_VIATECH)
                sc->sc.sc_flags |= EHCIF_DROPPED_INTR_WORKAROUND;

To

	if (sc->sc.sc_id.vendor == PCI_VENDOR_VIATECH ||
	    sc->sc.sc_id.vendor == PCI_VENDOR_INTEL)
		sc->sc.sc_flags |= EHCIF_DROPPED_INTR_WORKAROUND;

Good luck.