From owner-freebsd-bugs Wed Dec 19 5:50:27 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EB67137B41B for ; Wed, 19 Dec 2001 05:50:02 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBJDo2Z62194; Wed, 19 Dec 2001 05:50:02 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C917337B417 for ; Wed, 19 Dec 2001 05:49:45 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id fBJDnjb62094; Wed, 19 Dec 2001 05:49:45 -0800 (PST) (envelope-from nobody) Message-Id: <200112191349.fBJDnjb62094@freefall.freebsd.org> Date: Wed, 19 Dec 2001 05:49:45 -0800 (PST) From: Thorsten Greiner To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/33004: Patch for USB (uhci) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 33004 >Category: kern >Synopsis: Patch for USB (uhci) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Dec 19 05:50:02 PST 2001 >Closed-Date: >Last-Modified: >Originator: Thorsten Greiner >Release: 4.4-STABLE >Organization: >Environment: FreeBSD tybalt 4.4-STABLE FreeBSD 4.4-STABLE #51: Wed Dec 19 10:57:03 CET 2001 thorsten@tybalt:/usr/src/sys/compile/TYBALT i386 >Description: Out of the box 4.4-STABLE will not activate the uhci usb controller on my ASUS L7300 laptop. This usb host controller is recognized as follows: uhci0: port 0x1c00-0x1c1f at device 7.2 on pci0 pci_cfgintr_linked: linked (63) to hard-routed irq 11 pci_cfgintr: 0:7 INTD routed to irq 11 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered The symptoms of the problem are timeouts during bus exploration: Dec 18 10:34:38 tybalt /kernel: uhub0: device problem, disabling port 1 >How-To-Repeat: Probably difficult unless you have the same hardware... >Fix: Apply the following patch to /usr/src/sys/pci/uhci_pci.c: --- uhci_pci.c_orig Wed Dec 20 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 >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message