2009-11-03 23:22:47

by Larry Finger

[permalink] [raw]
Subject: Possible fix for rtl8187: kernel oops when leds enabled

Rick,

Does this patch fix your problem? I tried to bisect this problem as it
looked like a regression; however, the problem was sometimes a little
flakey. On one boot of a given kernel, it might run for 3-400 cycles
without failing, then fail immediately after rebooting. I suspect that
the random contents of some memory location would control that.

This patch was inspired by the code in p54usb, which does not have the
problem.


Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_leds.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_leds.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_leds.c
@@ -210,10 +210,10 @@ void rtl8187_leds_exit(struct ieee80211_

/* turn the LED off before exiting */
ieee80211_queue_delayed_work(dev, &priv->led_off, 0);
- cancel_delayed_work_sync(&priv->led_off);
- cancel_delayed_work_sync(&priv->led_on);
rtl8187_unregister_led(&priv->led_rx);
rtl8187_unregister_led(&priv->led_tx);
+ cancel_delayed_work_sync(&priv->led_off);
+ cancel_delayed_work_sync(&priv->led_on);
}
#endif /* def CONFIG_RTL8187_LED */

Thanks for testing,

Larry








2009-11-04 05:50:17

by Sid Hayn

[permalink] [raw]
Subject: Re: Possible fix for rtl8187: kernel oops when leds enabled

Larry Finger wrote:
> Rick,
>
> Does this patch fix your problem? I tried to bisect this problem as it
> looked like a regression; however, the problem was sometimes a little
> flakey. On one boot of a given kernel, it might run for 3-400 cycles
> without failing, then fail immediately after rebooting. I suspect that
> the random contents of some memory location would control that.
>
>

Larry,
As you mentioned, this bug was not 100% reliable to reproduce in the
first place for either of us, I merely had a much much higher chance of
panick for some unknown reason. That said, I have plugged and unplugged
the device a few dozen times while bringing the interface up and down
and making the led blink and I'm thrilled to say it no longer kernel
panicks on my system. I'm left with a usable wifi card with a cool
flashing led, many thanks for fixing this.

John,

imho this patch should go upstream asap, next dot release if at all
possible. This fixes a significant issue in that the kernel panicked on
my system nearly 100% of the time on unplug if the led was enabled.
Either way it is up to the maintainers but consider this my vote of
confidence.

Acked-By: Rick Farina
Tested-By: Rick Farina

Thanks,
Rick Farina

> This patch was inspired by the code in p54usb, which does not have the
> problem.
>
>
> Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_leds.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_leds.c
> +++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_leds.c
> @@ -210,10 +210,10 @@ void rtl8187_leds_exit(struct ieee80211_
>
> /* turn the LED off before exiting */
> ieee80211_queue_delayed_work(dev, &priv->led_off, 0);
> - cancel_delayed_work_sync(&priv->led_off);
> - cancel_delayed_work_sync(&priv->led_on);
> rtl8187_unregister_led(&priv->led_rx);
> rtl8187_unregister_led(&priv->led_tx);
> + cancel_delayed_work_sync(&priv->led_off);
> + cancel_delayed_work_sync(&priv->led_on);
> }
> #endif /* def CONFIG_RTL8187_LED */
>
> Thanks for testing,
>
> Larry
>
>
>
>
>
>
>
>