* EHCI: don't stop after finding the first controller
@ 2012-05-31 8:46 Christer Weinigel
2012-05-31 9:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-05-31 11:32 ` Christer Weinigel
0 siblings, 2 replies; 3+ messages in thread
From: Christer Weinigel @ 2012-05-31 8:46 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: Aleš Nesrsta
Hi,
Modern Intel chipsets have multiple EHCI controllers but the EHCI code
will only detect the first one. I noticed this because on a test
laptop all external USB ports are connected to the second EHCI
controller so none of them would show up in grub.
The reason is that the PCI code will stop if the PCI iterator function
returns a nonzero value. Change the return value to zero on success so
that the PCI iterator continues with the next controller.
diff --git a/grub-core/bus/usb/ehci.c b/grub-core/bus/usb/ehci.c
index d8ecf26..240c0d5 100644
--- a/grub-core/bus/usb/ehci.c
+++ b/grub-core/bus/usb/ehci.c
@@ -839,7 +839,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev,
grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CONFIG_FLAG: %08x\n",
grub_ehci_oper_read32 (e, GRUB_EHCI_CONFIG_FLAG));
- return 1;
+ return 0;
fail:
if (e)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: EHCI: don't stop after finding the first controller
2012-05-31 8:46 EHCI: don't stop after finding the first controller Christer Weinigel
@ 2012-05-31 9:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-05-31 11:32 ` Christer Weinigel
1 sibling, 0 replies; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-05-31 9:44 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]
Please update to latest bzr. Something similar was applied quite some
time ago.
On 31.05.2012 10:46, Christer Weinigel wrote:
> Hi,
>
> Modern Intel chipsets have multiple EHCI controllers but the EHCI code
> will only detect the first one. I noticed this because on a test
> laptop all external USB ports are connected to the second EHCI
> controller so none of them would show up in grub.
>
> The reason is that the PCI code will stop if the PCI iterator function
> returns a nonzero value. Change the return value to zero on success so
> that the PCI iterator continues with the next controller.
>
> diff --git a/grub-core/bus/usb/ehci.c b/grub-core/bus/usb/ehci.c
> index d8ecf26..240c0d5 100644
> --- a/grub-core/bus/usb/ehci.c
> +++ b/grub-core/bus/usb/ehci.c
> @@ -839,7 +839,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev,
> grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CONFIG_FLAG: %08x\n",
> grub_ehci_oper_read32 (e, GRUB_EHCI_CONFIG_FLAG));
>
> - return 1;
> + return 0;
>
> fail:
> if (e)
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: EHCI: don't stop after finding the first controller
2012-05-31 8:46 EHCI: don't stop after finding the first controller Christer Weinigel
2012-05-31 9:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2012-05-31 11:32 ` Christer Weinigel
1 sibling, 0 replies; 3+ messages in thread
From: Christer Weinigel @ 2012-05-31 11:32 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: Aleš Nesrsta
On 2012-05-31 10:46, Christer Weinigel wrote:
> diff --git a/grub-core/bus/usb/ehci.c b/grub-core/bus/usb/ehci.c
> index d8ecf26..240c0d5 100644
> --- a/grub-core/bus/usb/ehci.c
> +++ b/grub-core/bus/usb/ehci.c
> @@ -839,7 +839,7 @@ grub_ehci_pci_iter (grub_pci_device_t dev,
> grub_dprintf ("ehci", "EHCI grub_ehci_pci_iter: CONFIG_FLAG: %08x\n",
> grub_ehci_oper_read32 (e, GRUB_EHCI_CONFIG_FLAG));
>
> - return 1;
> + return 0;
>
> fail:
> if (e)
Darn. That one had been fixed in bazaar already.
Sorry about the noise.
/Christer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-31 11:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 8:46 EHCI: don't stop after finding the first controller Christer Weinigel
2012-05-31 9:44 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-05-31 11:32 ` Christer Weinigel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.