From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VFsTG-0003q9-9A for mharc-grub-devel@gnu.org; Sat, 31 Aug 2013 17:12:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFsT8-0003po-US for grub-devel@gnu.org; Sat, 31 Aug 2013 17:12:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFsT3-0005UN-Ii for grub-devel@gnu.org; Sat, 31 Aug 2013 17:12:30 -0400 Received: from smtp.volny.cz ([2001:4de8:71c:62::33]:51053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFsT3-0005TE-7U for grub-devel@gnu.org; Sat, 31 Aug 2013 17:12:25 -0400 Received: from [192.168.6.11] (unknown [193.86.90.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: starous@volny.cz) by smtp.volny.cz (Postfix) with ESMTPSA id D99E5260997 for ; Sat, 31 Aug 2013 23:12:22 +0200 (CEST) Message-ID: <52225C41.2080509@volny.cz> Date: Sat, 31 Aug 2013 23:12:33 +0200 From: =?windows-1252?Q?Ale=9A_Nesrsta?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130806 Thunderbird/17.0.8 MIME-Version: 1.0 To: The development of GNU GRUB Subject: [PATCH] Re: Missing USB devices. References: <20130807201137.08332daf@opensuse.site> <520534A0.4030009@volny.cz> <52056C1F.5070003@volny.cz> <521D0A45.5000407@volny.cz> <522231B0.8080106@volny.cz> <5222327B.7090103@volny.cz> In-Reply-To: <5222327B.7090103@volny.cz> Content-Type: multipart/mixed; boundary="------------090203060801020604000300" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4de8:71c:62::33 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Aug 2013 21:12:36 -0000 This is a multi-part message in MIME format. --------------090203060801020604000300 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hmmm, today is not a good day - I sent wrong patch with mistake, sorry... :-( I hope attached patch is finally OK... BR, Ales > Sorry, I missed the patch... :-) > There it is. > >> 28.8.2013 08:59, Melki Christian (consultant) wrote: >>> I'm thinking of the EHCI hand-over. In the case of EHCI handover >>> beeing successful within the timeout, you never clear the USBLEGCTLSTS >>> register (SMI's). You do that in the other cases however. Why? I can >>> not think of any case of a successful handover with SMI's still >>> enabled. To what purpose? A buggy BIOS would maybe act upon such >>> stuff? Maybe thats a case for lost devices etc? >> Ok, I made a short look into Linux USB source code and I saw there is >> USBLEGCTLSTS register reset in any case. >> (What is maybe more interesting, Linux driver DOES NOT handover on some >> (broken) devices, only reset SMI...) >> >> So I prepared simple "SMI" patch (attached). >> >> BR, >> Ales > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > --------------090203060801020604000300 Content-Type: text/x-patch; name="usb_patch_130831.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="usb_patch_130831.patch" --- ./grub/grub-core/bus/usb/ehci.c 2013-05-12 23:15:17.857567000 +0200 +++ ./grub_patched/grub-core/bus/usb/ehci.c 2013-08-31 23:03:54.587218402 +0200 @@ -716,7 +716,7 @@ grub_ehci_pci_iter (grub_pci_device_t de usblegsup = grub_pci_read (pciaddr_eecp); if (usblegsup & GRUB_EHCI_BIOS_OWNED) { - grub_boot_time ("Taking ownership of EHCI port"); + grub_boot_time ("Taking ownership of EHCI controller"); grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: EHCI owned by: BIOS\n"); /* Ownership change - set OS_OWNED bit */ @@ -737,13 +737,8 @@ grub_ehci_pci_iter (grub_pci_device_t de grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED); /* Ensure PCI register is written */ grub_pci_read (pciaddr_eecp); - /* Disable SMI. */ - pciaddr_eecp = grub_pci_make_address (dev, eecp_offset + 4); - grub_pci_write (pciaddr_eecp, 0); - /* Ensure PCI register is written */ - grub_pci_read (pciaddr_eecp); } - grub_boot_time ("Ownership of EHCI port taken"); + grub_boot_time ("Ownership of EHCI controller taken"); } else if (usblegsup & GRUB_EHCI_OS_OWNED) /* XXX: What to do in this case - nothing ? Can it happen ? */ @@ -758,12 +753,14 @@ grub_ehci_pci_iter (grub_pci_device_t de grub_pci_write (pciaddr_eecp, GRUB_EHCI_OS_OWNED); /* Ensure PCI register is written */ grub_pci_read (pciaddr_eecp); - /* Disable SMI, just to be sure. */ - pciaddr_eecp = grub_pci_make_address (dev, eecp_offset + 4); - grub_pci_write (pciaddr_eecp, 0); - /* Ensure PCI register is written */ - grub_pci_read (pciaddr_eecp); } + + /* Disable SMI, just to be sure. */ + pciaddr_eecp = grub_pci_make_address (dev, eecp_offset + 4); + grub_pci_write (pciaddr_eecp, 0); + /* Ensure PCI register is written */ + grub_pci_read (pciaddr_eecp); + } grub_dprintf ("ehci", "inithw: EHCI grub_ehci_pci_iter: ownership OK\n"); --------------090203060801020604000300--