From owner-freebsd-usb@FreeBSD.ORG Thu Dec 1 17:08:52 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 54BD216A41F; Thu, 1 Dec 2005 17:08:52 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 362AA43D5F; Thu, 1 Dec 2005 17:08:51 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2948484 for multiple; Thu, 01 Dec 2005 12:06:46 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jB1H8dLQ090530; Thu, 1 Dec 2005 12:08:41 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: jpeg@thilelli.net Date: Thu, 1 Dec 2005 12:03:15 -0500 User-Agent: KMail/1.8.2 References: <49704.192.168.1.18.1113475314.squirrel@webmail.thilelli.net> <200511291650.08922.jhb@freebsd.org> <59463.192.168.1.20.1133380176.squirrel@webmail.thilelli.net> In-Reply-To: <59463.192.168.1.20.1133380176.squirrel@webmail.thilelli.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512011203.17304.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: freebsd-acpi@freebsd.org, freebsd-usb@freebsd.org, bug-followup@freebsd.org Subject: Re: usb/74989: (regression) Lost USB support between 5.2.1-RELEASE and 5.3-RELEASE on K7T266 Pro2. X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2005 17:08:52 -0000 On Wednesday 30 November 2005 02:49 pm, Julien Gabel wrote: > >>>> I made some progress here. After playing with BIOS settings, i am now > >>>> able to: > >>>> - Boot with ACPI enable (shutdown -p works as expected now); > >>>> - Use USB devices. > >>>> > >>>> In order to do that, i had to totally disable "APIC Function" in the > >>>> BIOS. With "APIC Function" enabled, neither version 1.4 nor 1.1 of > >>>> the "MPS Table Version" settings solved my problem. > >>>> > >>>> So, although i need to disable "APIC Function", all seems to works > >>>> correctly together: ACPI support and USB support. As a side note, i > >>>> did not encountered anymore the interrupt storm on the uhci USB host > >>>> controller driver. > >>>> > >>>> Maybe can someone explain me what may be wrong with "APIC Function", > >>>> and if there is some drawbacks to disable it (or what is the purpose > >>>> of this setting)? > >>> > >>> APIC is used to route interrupts differently. You can also disable it > >>> from the loader with 'hint.apic.0.disabled=1'. I've looked at your > >>> dmesg's, and the problem is that in the ACPI case the IRQ 10 that your > >>> USB controllers are using is configured as an ISA IRQ (edge/high). > >>> For now you can either disable APIC or ACPI as a workaround until I > >>> figure out a better solution. > >> > >> Thanks. I effectively prefer turn APIC off via the loader configuration > >> than from the BIOS settings, i think it is far more easily to remember > >> what i have done from this place. > >> > >> I can try patch(es) or make test(s) without problem on this machine, if > >> any. Thanks a lot. > > > > Actually, can you try this patch: > > > > Index: acpi_pci_link.c > > =================================================================== > > RCS file: /host/cvs/usr/cvs/src/sys/dev/acpica/acpi_pci_link.c,v > > retrieving revision 1.48 > > diff -u -r1.48 acpi_pci_link.c > > --- acpi_pci_link.c 1 Nov 2005 22:44:07 -0000 1.48 > > +++ acpi_pci_link.c 28 Nov 2005 13:03:29 -0000 > > @@ -859,7 +859,18 @@ > > if (!link->l_routed && > > PCI_INTERRUPT_VALID(link->l_irq)) { > > link->l_routed = TRUE; > > + /* > > + * Some BIOSen are broken and actually set > > + * some interrupts to active-high with level > > + * trigger. Workaround this by hard-coding > > + * active-low and level-trigger. > > + */ > > +#if 0 > > acpi_config_intr(dev, resource); > > +#else > > + BUS_CONFIG_INTR(dev, link->l_irq, > > + INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW); > > +#endif > > pci_link_interrupt_weights[link->l_irq] += > > link->l_references; > > } > > I applied this patch, rebuild and installed the kernel, set the loader.conf > directive `hint.apic.0.disabled' to "0" and reboot on the system. Sadly, > the same behaviour happened (as before), i.e. USB mouse simply hang, USB > thumbdrive doesn't work, etc. > > The patch was applied on src/sys/dev/acpica/acpi_pci_link.c before your > last commit on RELENG_6 (version 1.44.2.4, 2005/11/30 16:03:55). Don't > know if this may change something or not in this case. Well, I can't get to your dmesg's anymore. If I understand correctly, USB works for you so long as you have APIC disabled, both with ACPI enabled and disabled correct? And USB is broken if you have both ACPI and APIC enabled. Have you tried booting with ACPI disabled (hint.acpi.0.disabled=1) but with APIC enabled? Does it work then or break? -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org