Bug 691128 - rebooting and suspend freezes with Ralink RT3090 (rt2800)
Summary: rebooting and suspend freezes with Ralink RT3090 (rt2800)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 15
Hardware: i686
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Stanislaw Gruszka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-26 23:26 UTC by Bastiaan Jacques
Modified: 2011-05-25 14:16 UTC (History)
7 users (show)

Fixed In Version: kernel-2.6.38.3-15.rc1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-25 14:16:24 UTC


Attachments (Terms of Use)
photo of oops message (956.74 KB, image/jpeg)
2011-04-03 19:47 UTC, Bastiaan Jacques
no flags Details
photo of second oops message (911.93 KB, image/jpeg)
2011-04-03 20:03 UTC, Bastiaan Jacques
no flags Details
0001-rt2x00-fix-cancelling-uninitialized-work.patch (1.04 KB, text/plain)
2011-04-04 08:17 UTC, Stanislaw Gruszka
no flags Details
fix (995 bytes, patch)
2011-04-04 23:25 UTC, Bastiaan Jacques
no flags Details | Diff

Description Bastiaan Jacques 2011-03-26 23:26:41 UTC
Description of problem:
When the integrated RT3090 (Bluetooth combo) is enabled in the BIOS, Fedora freezes after going through most of the systemd tasks prior to actual shutdown. The task that is shown when the system freezes varies.

Version-Release number of selected component (if applicable):
kernel-2.6.38.1-6.fc15.i686
kernel-PAE-2.6.38.1-6.fc15.i686

How reproducible:
Every time (except when WiFi chip is disabled in BIOS).

Steps to Reproduce:
1. Boot with WiFi enabled.
2. At any time, reboot, shutdown or suspend the system, for example using GDM.

Actual results:
Observe Fedora goes into the console, and freezes, refusing all user input, including terminal switching.
  

Expected results:
Shutdown, reboot or suspend as normal.

Additional info:
lspci -v:

43:00.0 Network controller: RaLink RT3090 Wireless 802.11n 1T/1R PCIe
        Subsystem: Hewlett-Packard Company Device 1453
        Flags: bus master, fast devsel, latency 0, IRQ 19
        Memory at 90700000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Device Serial Number 00-00-17-2d-5b-82-2a-e0
        Kernel driver in use: rt2800pci
        Kernel modules: rt2800pci


kernel messages containing rt2800:
[   11.602278] rt2800pci 0000:43:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[   11.602311] rt2800pci 0000:43:00.0: setting latency timer to 64

Comment 1 Stanislaw Gruszka 2011-04-02 19:39:38 UTC
Does it hung when iptables script stop? Can you install kernel-debug and see if there are some additional messages when you rmmod the module or do "/etc/init.d/iptables stop" (or corresponding systemd action that disable iptables) ?

Comment 2 Bastiaan Jacques 2011-04-02 22:23:04 UTC
(In reply to comment #1)
> Does it hung when iptables script stop? Can you install kernel-debug and see if

The machine does not hang when I stop iptables using 'service iptables stop' (which invokes systemd). There are no additional messages when I stop or start iptables, with kernel-debug installed.

> there are some additional messages when you rmmod the module or do
> "/etc/init.d/iptables stop"

rmmod rt2800pci freezes the machine immediately; if there are additional messages, I can't type dmesg to see them.

Comment 3 Stanislaw Gruszka 2011-04-03 18:04:16 UTC
Please do (as root):

$ echo "kernel.panic_on_oops = 1" >> /etc/sysctl.conf
$ sysctl -p /etc/sysctl.conf

then login on virtual terminal (eg. Ctrl+Alt+F2), reproduce the problem and take a photo of messages that will show up.

Comment 4 Bastiaan Jacques 2011-04-03 19:03:32 UTC
(In reply to comment #3)
> $ echo "kernel.panic_on_oops = 1" >> /etc/sysctl.conf
> $ sysctl -p /etc/sysctl.conf
> 
> then login on virtual terminal (eg. Ctrl+Alt+F2), reproduce the problem and
> take a photo of messages that will show up.

With that sysctl enabled, and executing `rmmod rt2800pci', no messages are printed on the screen; there is only what I typed, and no new input is accepted.

Comment 5 Bastiaan Jacques 2011-04-03 19:47:27 UTC
Created attachment 489681 [details]
photo of oops message

I had to boot into single user mode with the debug kernel and enable the panic_on_oops in order to get any output at all after rmmod'ing the rt2800pci module. When following these steps, an 'oops' was printed, but the system did *not* freeze.

It is perhaps worth noting that I can load and unload the module without freezing in single user mode, even with a non-debug kernel, so long as I don't enable wlan1 using ifconfig.

Attaching photo.

Comment 6 Bastiaan Jacques 2011-04-03 19:50:02 UTC
(In reply to comment #5)
> I had to boot into single user mode with the debug kernel and enable the
> panic_on_oops in order to get any output at all after rmmod'ing the rt2800pci
> module. When following these steps, an 'oops' was printed, but the system did
> *not* freeze.

typing 'modprobe rt2800pci' again after rmmod does freeze the system without further messages.

Comment 7 Bastiaan Jacques 2011-04-03 20:03:28 UTC
Created attachment 489682 [details]
photo of second oops message

I repeated the steps from Comment #5, and yielded a different oops call trace.

I was able to reload the module after the oops several times without a freeze, but when I typed 'ifconfig wlan1 up' again and unloaded the module, the system froze.

Comment 8 Stanislaw Gruszka 2011-04-04 08:17:00 UTC
Created attachment 489715 [details]
0001-rt2x00-fix-cancelling-uninitialized-work.patch

I think patch will fix the problem, at least problem of hung when module is unloaded. I'm not sure if that is the same problem as suspend/reboot, I will prepare patched module to test.

Comment 9 Stanislaw Gruszka 2011-04-04 09:20:41 UTC
Please download tarbal from http://people.redhat.com/sgruszka/rt2x00.tar.bz2, unpack it and install like below (need kernel-devel package and perhaps some other packages for compilation)

$ cd rt2x00
$ make KDIR=/lib/modules/`uname -r`/build
$ su -c 'make KDIR=/lib/modules/`uname -r`/build install'
$ sync # to synchronize filesystems if case of reboot hang

After reboot patched rt2x00 modules should be used, check them out.

Comment 10 Bastiaan Jacques 2011-04-04 17:46:16 UTC
(In reply to comment #9)
> Please download tarbal from http://people.redhat.com/sgruszka/rt2x00.tar.bz2,
> unpack it and install like below (need kernel-devel package and perhaps some
> other packages for compilation)

With this driver, there is no freeze when I rmmod or modprobe -r rt2800pci (ifconfig wlan1 up prior to the first rmmod). However, there *is* a freeze when I then proceed to modprobe rt2800pci after unloading it. I have not seen an oops call trace with this modified driver, unfortunately.

For the end user, the end result is also the same: a reboot still freezes.

Comment 11 Bastiaan Jacques 2011-04-04 23:25:26 UTC
Created attachment 489879 [details]
fix

I spent the evening tracking this bug down. The freeze was happening while loading the EEPROM on the second load, which wasn't very helpful for finding the cause. Ultimately I found the culprit in rt2800_disable_radio().

It is conceivable that setting the power bits to zero does no harm on other devices that use this chip, but I think the chances of it being useful are pretty slim. I attempted to reset the power bits to 0x2 in the probe function, but that had no effect.

It should be possible to apply this patch using git-am.

Comment 12 Stanislaw Gruszka 2011-04-05 07:27:15 UTC
Thank you very much for debugging.

We have already this commit on 2.6.39+, which do the same thing as your patch and some more:
http://git.kernel.org/linus/7f6e144fb99a4a70d3c5ad5f074204c5b89a6f65
I'll will post it to stable and fedora.

Comment 13 Bastiaan Jacques 2011-04-05 10:55:43 UTC
(In reply to comment #12)
> We have already this commit on 2.6.39+, which do the same thing as your patch
> and some more:
> http://git.kernel.org/linus/7f6e144fb99a4a70d3c5ad5f074204c5b89a6f65
> I'll will post it to stable and fedora.

This hang fix should go into the upstream 2.6.38 stable tree as well.

Thanks!

Comment 14 Bastiaan Jacques 2011-04-17 17:06:37 UTC
(In reply to comment #12)
> http://git.kernel.org/linus/7f6e144fb99a4a70d3c5ad5f074204c5b89a6f65
> I'll will post it to stable and fedora.

When do you plan to do this?

Comment 16 Bastiaan Jacques 2011-04-20 20:00:34 UTC
(In reply to comment #15)
> Fedora kernel build with fix is here:
> http://koji.fedoraproject.org/koji/buildinfo?buildID=238906

I have tested this kernel build, and I confirm that it does not freeze when suspending or rebooting.


Note You need to log in before you can comment on or make changes to this bug.