Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 523326

Summary: net-wireless/broadcom-sta-6.30.223.248-r1 with kernel 3.17 and 3.18
Product: Gentoo Linux Reporter: mike <mike>
Component: [OLD] Core systemAssignee: Matt Turner <mattst88>
Status: RESOLVED FIXED    
Severity: normal CC: bpshacklett, darwinskernel, proxy-maint, v.simankin
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: broadcom-sta-6.30.223.248-linux-3.17.patch
ebuild patch
broadcom-sta-6.30.223.248-linux-3.18.patch
ebuild patch w/ 3.18
ebuild patch w/ 3.18 (typo fix)
gcc 4.9 patch
Patch for panic of broadcom-sta-6.30.223.248 on kernel 3.18

Description mike@marineau.org 2014-09-20 20:12:35 UTC
Created attachment 385198 [details, diff]
broadcom-sta-6.30.223.248-linux-3.17.patch

Linux 3.17-rc introduces a minor API change:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c835a677331495cf137a7f8a023463afd9f032f8

Attached patch has been tested against 3.17-rc5
Comment 1 mike@marineau.org 2014-09-20 20:18:11 UTC
Created attachment 385200 [details, diff]
ebuild patch
Comment 2 Vladi 2014-10-08 16:56:35 UTC
confirmed working on 3.17.0
Comment 3 Stefan Schmid 2014-10-23 12:56:43 UTC
tested on 3.17.1 and it works
Comment 4 rtlanceroad 2014-10-28 11:35:13 UTC
Tested, build fine with kernel 3.17.1-r1, please tell admin and add patch to portage tree.
Comment 5 pmn 2014-11-10 17:06:34 UTC
(In reply to mike@marineau.org from comment #0)
> Created attachment 385198 [details, diff] [details, diff]
> broadcom-sta-6.30.223.248-linux-3.17.patch
> 
> Linux 3.17-rc introduces a minor API change:
> 
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/
> ?id=c835a677331495cf137a7f8a023463afd9f032f8
> 
> Attached patch has been tested against 3.17-rc5

could you please test for 802.11n?

i have:

02:00.0 Network controller [0280]: Broadcom Corporation BCM4321 802.11a/b/g/n [14e4:4328] (rev 03)

and it doesn't do 11n here with 3.16.x series. i can provide more info/logs if need be.
Comment 6 mike@marineau.org 2014-11-11 00:45:05 UTC
(In reply to darwinskernel from comment #5)
> could you please test for 802.11n?
> 
> i have:
> 
> 02:00.0 Network controller [0280]: Broadcom Corporation BCM4321
> 802.11a/b/g/n [14e4:4328] (rev 03)
> 
> and it doesn't do 11n here with 3.16.x series. i can provide more info/logs
> if need be.

The patch posted here does not have any impact on 3.16 kernels and n/ac work just fine for me with a BCM4360. Your issue should be unrelated to this bug.
Comment 7 mike@marineau.org 2014-11-11 23:35:22 UTC
Created attachment 389138 [details, diff]
broadcom-sta-6.30.223.248-linux-3.18.patch

Another kernel cycle, another small API change:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5bc8c1f2b070bab82ed738f98ecfac725e33c57f

Fixes build w/ 3.18-rc4
Comment 8 mike@marineau.org 2014-11-11 23:35:55 UTC
Created attachment 389140 [details, diff]
ebuild patch w/ 3.18
Comment 9 mike@marineau.org 2014-11-11 23:52:49 UTC
Created attachment 389142 [details, diff]
ebuild patch w/ 3.18 (typo fix)
Comment 10 Gilles Dartiguelongue (RETIRED) gentoo-dev 2014-11-13 20:24:40 UTC
Patch for 3.17 works fine for me since I updated my laptop to 3.17.
Comment 11 pmn 2014-11-18 03:57:44 UTC
(In reply to mike@marineau.org from comment #6)
> (In reply to darwinskernel from comment #5)
> > could you please test for 802.11n?
> > 
> > i have:
> > 
> > 02:00.0 Network controller [0280]: Broadcom Corporation BCM4321
> > 802.11a/b/g/n [14e4:4328] (rev 03)
> > 
> > and it doesn't do 11n here with 3.16.x series. i can provide more info/logs
> > if need be.
> 
> The patch posted here does not have any impact on 3.16 kernels and n/ac work
> just fine for me with a BCM4360. Your issue should be unrelated to this bug.

how did you check for n/ac? with 3.17 patch on 3.17.3 kernel none of the popular wireless tools (iwlist, wavemon) work here! the link is up though but i don't know how to tell what the bitrate/mode is.
Comment 12 Bjoern Ottervik 2014-11-27 23:23:21 UTC
The 3.17 patch works for me on sys-kernel/gentoo-sources-3.17.4.

I think it'd be nice if this fix could be pushed out as soon as possible now that 3.16 is EOL.
Comment 13 Yixun Lan archtester gentoo-dev 2014-11-28 01:54:58 UTC
hello maintainer, please voice, we can help push this

the 3.18 patch can wait, since no 3.18 kernel has hit into portage tree
Comment 14 rtlanceroad 2014-12-15 00:43:42 UTC
Hi, guys, Kernel 3.18 has been released for several days, but our patch is still not in portage, why?
Comment 15 Yixun Lan archtester gentoo-dev 2014-12-15 06:28:05 UTC
+*broadcom-sta-6.30.223.248-r2 (15 Dec 2014)
+
+  15 Dec 2014; Yixun Lan <dlan@gentoo.org>
+  +broadcom-sta-6.30.223.248-r2.ebuild,
+  +files/broadcom-sta-6.30.223.248-linux-3.17.patch,
+  +files/broadcom-sta-6.30.223.248-linux-3.18.patch:
+  fix build err with kernel 3.17/3.18, bug 523326

maintainer timeout, so pushed this.

you may still have problem to build with gcc-4.9 + kernel3.18 (should open as another bug)

/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r2/work/src/wl/sys/wl_linux.c:2054:3: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
   __DATE__, __TIME__, EPI_VERSION_STR);
   ^
/var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r2/work/src/wl/sys/wl_linux.c:2054:13: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
   __DATE__, __TIME__, EPI_VERSION_STR);
Comment 16 rtlanceroad 2014-12-16 01:02:27 UTC
Created attachment 391798 [details, diff]
gcc 4.9 patch
Comment 17 rtlanceroad 2014-12-16 01:07:09 UTC
(In reply to Yixun Lan from comment #15)
> +*broadcom-sta-6.30.223.248-r2 (15 Dec 2014)
> +
> +  15 Dec 2014; Yixun Lan <dlan@gentoo.org>
> +  +broadcom-sta-6.30.223.248-r2.ebuild,
> +  +files/broadcom-sta-6.30.223.248-linux-3.17.patch,
> +  +files/broadcom-sta-6.30.223.248-linux-3.18.patch:
> +  fix build err with kernel 3.17/3.18, bug 523326
> 
> maintainer timeout, so pushed this.
> 
> you may still have problem to build with gcc-4.9 + kernel3.18 (should open
> as another bug)
> 
> /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r2/work/src/wl/sys/
> wl_linux.c:2054:3: error: macro "__DATE__" might prevent reproducible builds
> [-Werror=date-time]
>    __DATE__, __TIME__, EPI_VERSION_STR);
>    ^
> /var/tmp/portage/net-wireless/broadcom-sta-6.30.223.248-r2/work/src/wl/sys/
> wl_linux.c:2054:13: error: macro "__TIME__" might prevent reproducible
> builds [-Werror=date-time]
>    __DATE__, __TIME__, EPI_VERSION_STR);

Thanks for pushing this into portage tree. I think -Werror=date-time can be bypassed by adding an cflags which is Wno-date-time. see gcc 4.9 patch from package "broadcom-wl" in archlinux AUR.
Comment 18 Vladi 2014-12-26 19:21:42 UTC
Anyone else seeing a kernel lockup with this + 3.18?
Comment 19 Vladi 2014-12-29 04:13:13 UTC
http://imgur.com/4LLkGtW

here is the lockup
Comment 20 mike@marineau.org 2014-12-29 04:29:02 UTC
(In reply to Vladi from comment #19)
> http://imgur.com/4LLkGtW
> 
> here is the lockup

A null pointer dereference during a mprotect() systemc call, that seems unlikely to be this driver unless it is scribbling over random memory. Is it repoducable? Do you get similar stack traces or is the crash entirely different/random looking each time? In any case the report should be a new bug, not this old one.
Comment 21 Vladi 2014-12-30 00:16:26 UTC
not sure that seems to come before the actual lockup right after i modprobe wl module.
Comment 22 Brennan Shacklett 2015-01-02 21:19:44 UTC
I also get a kernel panic on 3.18 with these patches.
Comment 23 rtlanceroad 2015-01-03 01:53:26 UTC
(In reply to Brennan Shacklett from comment #22)
> I also get a kernel panic on 3.18 with these patches.

Hi,did you blacklist these modules(b43 b44 ssb bcma brcmsmac brcmfmac) in /etc/modprobe.d/ ?  These modules are quite conflicted with wl driver.
Comment 24 Bolko Maass 2015-01-06 21:05:33 UTC
Created attachment 393374 [details, diff]
Patch for panic of broadcom-sta-6.30.223.248 on kernel 3.18

I too had the panic/lockup of wl.ko from version 6.30.223.248 after upgrading to 3.18 from 3.17.4. I bisected and arrived at kernel commit bec3cfdca36bf43cfa3751ad7b56db1a307e0760 by Eric Dumazet that first triggered this bug. I contacted him and he was so nice to look at the Broadcom source and proposed the fix that I attached as a patch here. This fixes it for me.
Comment 25 Francisco J. Vazquez 2015-01-08 21:08:30 UTC
I can confirm that the gcc-4.9 and kernel panic patches are needed too.
Comment 26 Olaf Dreyer 2015-01-12 16:19:43 UTC
I can confirm that the patch suplied by  Bolko Maass fixes the kernel panic in 3.18.1 and 3.18.2. But I compiled it with gcc-3.8.4 and it runs OK for me.
Comment 27 Olaf Dreyer 2015-01-22 07:13:13 UTC
The patch above is also working for me on kernel 3.18.3.
Comment 28 Matt Turner gentoo-dev 2015-01-27 19:39:26 UTC
(In reply to Bolko Maass from comment #24)
> Created attachment 393374 [details, diff] [details, diff]
> Patch for panic of broadcom-sta-6.30.223.248 on kernel 3.18
> 
> I too had the panic/lockup of wl.ko from version 6.30.223.248 after
> upgrading to 3.18 from 3.17.4. I bisected and arrived at kernel commit
> bec3cfdca36bf43cfa3751ad7b56db1a307e0760 by Eric Dumazet that first
> triggered this bug. I contacted him and he was so nice to look at the
> Broadcom source and proposed the fix that I attached as a patch here. This
> fixes it for me.

Thanks, that's great work. Much appreciated!

It looks like the Arch maintainers found this bug report and the patch you attached and rolled it into a nice patch that takes care of the API changes since 3.15. I've committed that, so this bug should legitimately be fixed now.

I've been using 3.18 and this patch for about a week now without any trouble.