[ltp] [patch 11/12][2.6.18] ibm-acpi: workaround for EC 0x2f initialization bug
Shem Multinymous
linux-thinkpad@linux-thinkpad.org
Mon, 23 Oct 2006 23:22:27 +0200
Hi,
On 10/23/06, Henrique de Moraes Holschuh <hmh@hmh.eng.br> wrote:
> There is another option. I can overengineer the thing. I can read all
> thermal sensors, and if all sensors are within some safe range (say, below
> 60 C), kick the fan to mode auto. If they are outside that range, kick the
> fan to mode 0x07.
That's dangerous; for one, nothing guarantees we see all sensors. It's
best done by userspace, if at all.
> What is your vote on the issue, as a T43 owner?
Don't lose information. Output "uninitialized" and let userspace deal
with it as it wishes.
> > > if (unlikely(!acpi_ec_read(fan_rpm_offset, &lo) ||
> > > !acpi_ec_read(fan_rpm_offset + 1, &hi)))
> > > return -EIO;
Sorry, that's perfectly fine. I read it wrong.
> I am hooking the watchdog to the procfs (and later, sysfs) handlers and not
> from the generic functions, so they won't clash.
>
> Do you think the watchdog should be hooked from the generic functions
> instead? I could do that, as well... might be a better idea, actually, but
> if I do that we lose the ability to call them without affecting the
> watchdog.
No, you're right, it's better this way. The watchdog should only be
reset by explicit writes from userspace, so procfs and sysfs are the
right place for the hook.
Shem