diff options
author | thompsa <thompsa@FreeBSD.org> | 2009-11-08 20:51:15 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2009-11-08 20:51:15 +0000 |
commit | 138b1174a623634b265299a95c263adcbc9c76de (patch) | |
tree | 58453478da79b83d50f1f9b6a76b6554e1ff82e8 /sys/dev/usb/controller/ehci_pci.c | |
parent | 410f2a9fd7c27f9feea4855407b8a73cc612993d (diff) | |
download | FreeBSD-src-138b1174a623634b265299a95c263adcbc9c76de.zip FreeBSD-src-138b1174a623634b265299a95c263adcbc9c76de.tar.gz |
Integrate lost interrupts patch from the old USB stack.
Some EHCI chips from VIA / ATI seem to trigger interrupts before writing back
the qTD status, or miss signalling occasionally under heavy load. If the host
machine is too fast, we can miss transaction completion - when we scan the
active list the transaction still seems to be active. This generally exhibits
itself as a umass stall that never recovers.
We work around this behaviour by setting up this callback after any softintr
that completes with transactions still pending, giving us another chance to
check for completion after the writeback has taken place
Submitted by: Alexander Nedotsuko
MFC after: 3 days
Diffstat (limited to 'sys/dev/usb/controller/ehci_pci.c')
-rw-r--r-- | sys/dev/usb/controller/ehci_pci.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/usb/controller/ehci_pci.c b/sys/dev/usb/controller/ehci_pci.c index d1440c1..ec6f3f7 100644 --- a/sys/dev/usb/controller/ehci_pci.c +++ b/sys/dev/usb/controller/ehci_pci.c @@ -439,6 +439,19 @@ ehci_pci_attach(device_t self) break; } + /* Dropped interrupts workaround */ + switch (pci_get_vendor(self)) { + case PCI_EHCI_VENDORID_ATI: + case PCI_EHCI_VENDORID_VIA: + sc->sc_flags |= EHCI_SCFLG_LOSTINTRBUG; + if (bootverbose) + device_printf(self, + "Dropped interrupts workaround enabled\n"); + break; + default: + break; + } + err = ehci_init(sc); if (!err) { err = device_probe_and_attach(sc->sc_bus.bdev); |