On Mon, Feb 06, 2012 at 08:17:10AM -0800, Andi Kleen wrote:
> My Acer laptop has a large number of false EC interrupts
> (interrupts when the EC indexed data register protocol is in the wrong
> state, expecting input when we should send output or vice versa)
> It seems the hardware triggers the interrupt before it actually
> sets the right status in the register.
Our EC code is, at this point, a layer of hacks piled on top of other
hacks. We have various patches that fix some machines and break others
and a lack of a detailed description of what the driver actually does
and where it deviates from the specification (and why).
I mention this not because I object to adding more hacks to the pile,
but because at some point we're really going to need to bite the bullet
and figure out how Windows deals with this hardware and what we're doing
differently. That probably means adding ec emulation to qemu.
--
Matthew Garrett | [email protected]
> Our EC code is, at this point, a layer of hacks piled on top of other
> hacks. We have various patches that fix some machines and break others
> and a lack of a detailed description of what the driver actually does
> and where it deviates from the specification (and why).
The moving to an interrupt thread will enable a lot of cleanups
in fact. A lot of the existing code could be simplified now that
you can sleep. A lot of the nasty code was simply a workaround
for that.
I don't have plans to work on this however, since my laptop
works now (sorry). But I believe the patchkit is a good base
for further cleanups.
-Andi
--
[email protected] -- Speaking for myself only.