Comment 38 for bug 659143

Revision history for this message
Seth Forshee (sforshee) wrote : Re: [Bug 659143] Re: 64bit-only: regression: kernels >=2.6.34: rt2800pci: load firmware Error with ralink [1814:0781]

@Wolfgang:

Thanks again for testing. The unlikely() might make sense. It's actually
a hint to the compiler to allow it to optimize certain code paths that
have an extremely probability of not being taken (90%+ or so), which
would seem to be the case here, although I get the idea that this
particular code is not performance-critical.

I'll fix the missing entry->skb = NULL. I'm also wondering whether there
should be a check that padding_len != 0 to avoid skb_pad() when it's not
needed, because it looks like it assumes that it will be doing some
padding (not that I think there's an actualy bug if padding_len is zero,
just a potential for a significant amount of unnecessary work).

Probably what I ought to do is prepare a patch against mainline and get
some review from the wireless maintainers to answer some of these
lingering questions. I'll plan to do that early next week before I do
any more patches agains maverick.

On Fri, Jan 28, 2011 at 10:10:15PM -0000, Wolfgang Kufner wrote:
> @Seth
>
> I tested the error path and entry->skb = NULL turns out to be absolutely needed before returning, otherwise there will also be a hard panic.
> Moving padding to the start looks good to me. The only thing changing the skb length afterwards is guaranteed to do so by multiples of 32 bits.
> Maybe add a full stop at the end of message while you're at it and maybe even an unlikely() if that looks right to you. The other files in the rt2x00 project seem to use it a lot and it does make it nicely explicit that we're not expecting it.
>
> Thanks,
> Wolfgang
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/659143
>
> Title:
> 64bit-only: regression: kernels >=2.6.34: rt2800pci: load firmware
> Error with ralink [1814:0781]
>
> Status in The Linux Kernel:
> Fix Released
> Status in “linux” package in Ubuntu:
> Fix Released
> Status in “linux” source package in Maverick:
> In Progress
>
> Bug description:
> [UPDATE Dec 16, 2010]
> My fix is in linux-next. See comment 16.
>
> UPSTREAM:
> http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/2010-November/002310.html
>
> HARDWARE:
> RaLink RT2860 [1814:0781]
> rt2x00_set_chip: Info - Chipset detected - rt: 2872, rf: 0003, rev: 0200.
>
> SYMPTOM:
> Syslog says: "phy0 -> rt2800pci_load_firmware: Error - PBF system register not ready.".
>
> WLAN does not work at all. The Network Manager Applet says: "Wireless networks disconnected".
> That log entry comes from module rt2800lib which is pulled in by module rt2800pci. (http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/net/wireless/rt2x00/rt2800lib.c;hb=HEAD)
>
> WHERE:
> In summary this happens on all tested ubuntu and debian 64 bit kernels 2.6.34 or newer, but not on 2.6.33 or older. It does however work on fedora's 2.6.35 64 bit live.
>
> POSSIBLE DUPLICATES:
> bug #594866 (ref. comment 10)
>
> WHERE IN DETAIL:
> where it happens:
> In final maverick 64 bit live.
>
> This also happens on the 2.6.36rc8 mainline kernel in a current installed maverick.
> Also happens there with compat-wireless-2010-10-20.
>
> Also happens on lucid with a backported natty kernel: (details in comment #5)
> on lucid (installed) 64bit:
> Linux w 2.6.36-1-generic #7~lucid1-Ubuntu
> Both with this kernels stock rt2800pci and with self compiled compat-wireless-2010-10-25-pc.
>
> Also happens with that 2.6.36-1.7~lucid1 kernel (natty for lucid from
> kernel team ppa) on maverick. The rt2800pci (stock from that kernel)
> produced the load firmware error. (comment #3)
>
> Happens with debian live (aptosid) kernel 2.6.35 64 bit, but not with
> 32bit. (ref. comment 6)
>
> Happens with 2.6.34 (ref. comment 7)
>
> This bug does not happen with:
> not with 2.6.33 (ref. comment 7)
>
> This does not happen on 32 bit maverick live where WLAN works (out of
> the box) just as well as with the rt2860sta.
>
> Does _not_ happen with compat-wireless-2010-10-25-pc on lucid 64bit
> with the standard 2.6.32 kernel. It can connect. (Ping is 1000-25000ms
> though.)
>
> Does _not_ happen with compat-wireless-2010-10-25-pc on maverick
> (2.6.35 kernel) 32 bit live (ping went from good to 1000ms there
> within a minute after connecting however, but that is beside the point
> here.)
>
> This does not happen on Fedora 14 beta live 64bit. (I achieved a
> respectable 10Mb/s with iperf in ad hoc mode with the rt2800pci.
> rt2860sta is not included.)
>
> Not with 32 bit lucid:
> Linux ubu 2.6.32-24-generic (ref. comment 8)
>
> Not with 2.6.37rc1 32 bit (ref. comment 9)
>
> REPRODUCIBILITY: 100%
> best keep the competing rt2860sta from loading with the entry "install rt2860sta /bin/false" in a file in /etc/modprobe.d/;
> maverick also comes with the rt2860sta module which will often load and get used if it is just blacklisted ("blacklist rt2860sta");
>
> ProblemType: Bug
> DistroRelease: Ubuntu 10.10
> Package: linux-image-2.6.35-22-generic 2.6.35-22.33
> Regression: No
> Reproducible: Yes
> ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
> Uname: Linux 2.6.35-22-generic x86_64
> AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
> Architecture: amd64
> AudioDevicesInUse:
>  Cannot stat file /proc/3101/fd/40: Stale NFS file handle
>                       USER PID ACCESS COMMAND
>  /dev/snd/controlC0: ubuntu 3097 F.... pulseaudio
> CRDA: Error: [Errno 2] No such file or directory
> Card0.Amixer.info:
>  Card hw:0 'Intel'/'HDA Intel at 0xf4800000 irq 46'
>    Mixer name : 'Intel Cantiga HDMI'
>    Components : 'HDA:10ec0268,1025013c,00100101 HDA:14f12c06,10250093,00100000 HDA:80862802,80860101,00100000'
>    Controls : 21
>    Simple ctrls : 12
> Date: Tue Oct 12 12:23:21 2010
> LiveMediaBuild: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
> MachineType: Acer Extensa 5630
> PccardctlIdent:
>  Socket 0:
>    no product info available
> PccardctlStatus:
>  Socket 0:
>    no card
> ProcCmdLine: BOOT_IMAGE=(loop)/casper/vmlinuz boot=casper iso-scan/filename=/boot/isostick/hostname/hostname-10.10-desktop-amd64.iso noprompt --
> ProcEnviron:
>  LANG=en_US.UTF-8
>  SHELL=/bin/bash
> RelatedPackageVersions: linux-firmware 1.38
> SourcePackage: linux
> StagingDrivers: rt2860sta
> Title: [STAGING]
> dmi.bios.date: 12/05/2008
> dmi.bios.vendor: Phoenix Technologies LTD
> dmi.bios.version: V1.25
> dmi.board.name: Homa
> dmi.board.vendor: Acer
> dmi.board.version: Rev
> dmi.chassis.type: 10
> dmi.chassis.vendor: Acer
> dmi.chassis.version: N/A
> dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvrV1.25:bd12/05/2008:svnAcer:pnExtensa5630:pvr0100:rvnAcer:rnHoma:rvrRev:cvnAcer:ct10:cvrN/A:
> dmi.product.name: Extensa 5630
> dmi.product.version: 0100
> dmi.sys.vendor: Acer
>
>