Re: [linux-usb-devel] [PATCH] proper bios handoff in ehci-hcd

From: David Brownell
Date: Tue Jul 13 2004 - 16:38:59 EST


Will Beers wrote:
> Sounds to me like your BIOS may be broken. But if you're
> up for it, you could try using byte access to write that one

Changing the pci_read_config to a byte access fixes it, thanks!

You're reading byte 0 not byte 2 of that field ... I meant
more like the attached patch to _write_ the flag (untested).


- pci_read_config_dword(pdev, where, &cap);
+ pci_read_config_byte(pdev, where, &cap);
--- 1.89/drivers/usb/host/ehci-hcd.c Wed Jun 30 19:10:04 2004
+++ edited/drivers/usb/host/ehci-hcd.c Tue Jul 13 14:33:41 2004
@@ -293,8 +293,7 @@
struct pci_dev *pdev = to_pci_dev(ehci->hcd.self.controller);

/* request handoff to OS */
- cap |= 1 << 24;
- pci_write_config_dword(pdev, where, cap);
+ pci_write_config_byte(pdev, where + 3, 1);

/* and wait a while for it to happen */
do {