Re: [Bug #10670] BUG: linux-2.6.26-rc1 oops atthinkpad_acpi:led_set_status

From: Henrique de Moraes Holschuh
Date: Wed May 14 2008 - 21:01:49 EST


On Thu, 15 May 2008, Adrian Bunk wrote:
> static int led_set_status(unsigned int led, enum led_status_t ledstatus)
> {
> ...
> switch (led_supported) {
> ...
> case TPACPI_LED_OLD:
> /* 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20 */
> -----> led = 1 << led;
> rc = ec_write(TPACPI_LED_EC_HLMS, led);
> if (rc >= 0)
> rc = ec_write(TPACPI_LED_EC_HLBL,
> led * led_exp_hlbl[ledstatus]);
> if (rc >= 0)
> rc = ec_write(TPACPI_LED_EC_HLCL,
> led * led_exp_hlcl[ledstatus]);
> break;
> ...
> if (!rc)
> tpacpi_led_state_cache[led] = ledstatus;
> ... ^^^
> }

ARGH. Thanks. Will fix ASAP. This is really one of those cases where
one is "too close to actualy see the picture".

> What happens when you write to tpacpi_led_state_cache[0x80] is
> undefined, and it's not a surprise that random changes let the
> bug seem to disappear.

Indeed. Thanks Adrian.

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
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/