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

From: Pete Zaitcev
Date: Tue Jul 13 2004 - 17:01:01 EST


On Tue, 13 Jul 2004 15:52:43 -0500
<Stuart_Hayes@xxxxxxxx> wrote:

> the "OS wants the controller" bit is getting written to 1 (first part of
> the Linux write, which the system broke into pieces)

If something breaks word writes into pieces, all hell breaks lose.
I don't believe it can happen.

I hit regressions when we implemented the proper handoff as requested
by Stuart @Dell, so I think for the moment the right thing would be this:

--- linux-2.4.21-15.18.EL/drivers/usb/host/ehci-hcd.c 2004-07-01
08:07:56.000000000 -0700
+++ linux-2.4.21-15.18-usb/drivers/usb/host/ehci-hcd.c 2004-07-08
15:15:05.944863675 -0700
@@ -302,7 +302,8 @@
if (cap & (1 << 16)) {
ehci_err (ehci, "BIOS handoff failed (%d, %04x)\n",
where, cap);
- return 1;
+ pci_write_config_dword (ehci->hcd.pdev, where, 0);
+ return 0;
}
ehci_dbg (ehci, "BIOS handoff succeeded\n");
}

Essentially, here I insist on doing the right thing with cap|=(1<<24),
which fixes Dell boxes which implement proper handoff, but then if we
time out as on Thinkpads, write zero as the old code did (probably
pointless, but just to be safe) and continue.

David, any comment?

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/