USB woes.

Thorsten Greiner thorsten at tgreiner.net
Tue Jun 15 11:18:59 GMT 2004


* Ian FREISLICH <if at hetzner.co.za> [2004-06-15 12:31]:
> Do any of the USB gurus have any ideas?

I hardly count as a guru, but you may want to try a little patch
derived from the NetBSD usb stack which turns on bus mastering. This
patch is needed on my little ASUS notebook to make USB work
properly. Maybe it works in your case too, since the symptoms are
similar.

The file to patch is /usr/src/sys/dev/usb/uhci_pci.c.

Cheers
        -Thorsten

-- 
Never attribute to malice what can adequately be explained by
incompetence.
 
This message is digitally signed. To verify its integrity, download a copy
of GnuPG for your operating system from http://www.gnupg.org .
-------------- next part --------------
--- uhci_pci.c.orig	Wed Aug 28 22:24:49 2002
+++ uhci_pci.c	Wed Jan 15 00:49:13 2003
@@ -224,6 +224,7 @@
 	uhci_softc_t *sc = device_get_softc(self);
 	int rid;
 	int err;
+	u_int32_t csr;
 
 	rid = PCI_UHCI_BASE_REG;
 	sc->io_res = bus_alloc_resource(self, SYS_RES_IOPORT, &rid,
@@ -282,6 +283,11 @@
 		sc->sc_bus.usbrev = USBREV_UNKNOWN;
 		break;
 	}
+
+	/* Enable the device. */
+	csr = pci_read_config(self, PCIR_COMMAND, 4);
+	pci_write_config(self, PCIR_COMMAND, 
+		csr | PCIM_CMD_BUSMASTEREN, 4);
 
 	err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO,
 	    (driver_intr_t *) uhci_intr, sc, &sc->ih);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040615/427b52fc/attachment.bin


More information about the freebsd-current mailing list