Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2001 11:09:08 +0100
From:      Thorsten Greiner <Thorsten.Greiner@consol.de>
To:        freebsd-stable@freebsd.org
Subject:   Patch for USB (uhci)
Message-ID:  <200112191109.MAA18428@bonn.rtg.consol.de>

next in thread | raw e-mail | index | archive | help
Hello,

please find enclosed a patch for /usr/src/sys/pci/uhci_pci.c which gets the 
uhci controller working on my ASUS L7300 notebook. This is a merge from the 
NetBSD usb stack, which seems to be a bit newer the FreeBSD's usb stack.

I wonder if you can review this patch and maybe integrate it into -STABLE. Or 
should I open a pr?

Thanks

	-Thorsten


Here is the patch:

--- uhci_pci.c_orig	Wed Dec 19 10:56:47 2001
+++ uhci_pci.c	Wed Dec 19 10:56:50 2001
@@ -182,6 +182,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,
@@ -275,6 +276,11 @@
 		uhci_pci_detach(self);
 		return ENXIO;
 	}
+
+	/* Enable the device. */
+	csr = pci_read_config(self, PCI_COMMAND_STATUS_REG, 4);
+	pci_write_config(self, PCI_COMMAND_STATUS_REG, 
+		csr | PCIM_CMD_BUSMASTEREN, 4);
 
 	/* Set the PIRQD enable bit and switch off all the others. We don't
 	 * want legacy support to interfere with us

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112191109.MAA18428>