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

From: Stuart_Hayes
Date: Tue Jul 13 2004 - 15:56:47 EST


Will Beers wrote:
> > though maybe 500 msec is too short a period to wait.
> > See if 5000 msec helps.
>
> I went all the way up to 20000 msec and it still didn't help. I'm
> sure it's a bad idea, but removing that whole if-block below it makes
> it work (which is effectively what switching the and/or did). I
> don't know enough about it to judge whether it's correct, but what
> exactly is it checking for there?
>
> -Will

Without the patch, Linux would just ignore the BIOS handoff--Linux was
writing "0" to the bit that it was supposed to wait for the BIOS to
clear, so it never waited for the BIOS to let go of the controller.

I bet you have a bad BIOS that won't hand off, but I would try the other
thing David suggested--change the write to a byte write. It seems
unlikely, but, since Linux is writing a "1" to the "BIOS owns the
controller" bit right now, you might be hitting something like this, if
the system is breaking up the write into multiple smaller writes:

the "OS wants the controller" bit is getting written to 1 (first part of
the Linux write, which the system broke into pieces)
the system BIOS (SMI handler) sees that bit set to 1, and clears the
"BIOS owns" bit
the "BIOS owns" bit is getting written back to a 1 (the second part of
the Linux write)
Linux waits in vain for BIOS to clear the "BIOS owns" bit\

Again, seems unlikely, but worth a try if you're recompiling and
testing.


-
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/