Modify

Opened 6 years ago

Last modified 4 years ago

#11394 accepted defect

b43 blank mac address / build processes and patches

Reported by: andrew.hakman@… Owned by: hauke
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Trunk
Keywords: b43 mac Cc:

Description (last modified by hauke)

Just compiled my own image for WRT54G3GV2-ST from r31549, and everything seems fine except the wireless has no mac address. nvram get il0macaddr returns the correct address, but it's not getting populated in the sprom, or b43 driver or something. It looks like the code that does this has changed drastically recently, in linux-3.2.16/patches/199-MIPS-BCM47xx-move-and-extend-sprom-parsing.patch which ends up in arch/mips/bcm47xx/sprom.c

Perhaps a related problem, trying to read the sprom from /sys/devices/pci0000:00/0000:00:01.0/ssb_sprom results in a bus error

root@OpenWrt:/# cat /sys/devices/pci0000\:00/0000\:00\:01.0/ssb_sprom 
[ 1831.724000] Data bus error, epc == 8014049c, ra == 8019d96c
[ 1831.724000] Oops[#1]:
[ 1831.724000] Cpu 0
[ 1831.724000] $ 0   : 00000000 1000b800 c0004000 00000001
[ 1831.724000] $ 4   : c0005000 80c74c00 00000000 802b0000
[ 1831.724000] $ 8   : 00000000 8012ec90 802ca284 00000000
[ 1831.724000] $12   : 802ca2b0 00000002 0000002b 004072d8
[ 1831.724000] $16   : 81834000 80c74c00 00000001 8183401c
[ 1831.724000] $20   : 8019d930 000000dc 81863c68 7fd341b0
[ 1831.724000] $24   : 000000a8 8019dbf8                  
[ 1831.724000] $28   : 80c1c000 80c1de30 80dbf000 8019d96c
[ 1831.724000] Hi    : 00000000
[ 1831.724000] Lo    : 00000000
[ 1831.724000] epc   : 8014049c 0x8014049c
[ 1831.724000]     Tainted: G           O
[ 1831.724000] ra    : 8019d96c 0x8019d96c
[ 1831.724000] Status: 1000b803    KERNEL EXL IE 
[ 1831.724000] Cause : 0080001c
[ 1831.724000] PrId  : 00029006 (Broadcom BMIPS3300)
	[ 1831.724000] Modules linked in: sr_mod nf_nat_irc nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_conntrack xt_CT xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack pppoe p)
	[ 1831.724000] Process cat (pid: 1692, threadinfo=80c1c000, task=81b33a18, tls=77559440)
	[ 1831.724000] Stack : 00000000 8007ad20 ffffff9c 81834000 81834000 fffffff4 80c74c00 8019d294
	[ 1831.724000]         81869180 80c1df10 80ccc798 8027964c 80ccc780 ffffffed 81869180 80c1df10
	[ 1831.724000]         80ccc798 8027964c 81863c68 7fd341b0 00001000 800e634c 8144d958 81504428
	[ 1831.724000]         00000101 00030002 00000000 00000000 80d98de0 00001000 7fd341b0 80c1df10
	[ 1831.724000]         00000004 00000000 00000003 00000001 00000000 80091158 80d98de0 80db2000
	[ 1831.724000]         ...
	[ 1831.724000] Call Trace:[<8007ad20>] 0x8007ad20
	[ 1831.724000] [<8019d294>] 0x8019d294
	[ 1831.724000] [<800e634c>] 0x800e634c
	[ 1831.724000] [<80091158>] 0x80091158
	[ 1831.724000] [<8009124c>] 0x8009124c
	[ 1831.724000] [<8000e2b0>] 0x8000e2b0
	[ 1831.724000] [<8012ec90>] 0x8012ec90
	[ 1831.724000] 
	[ 1831.724000] 
	[ 1831.724000] Code: 90820000  03e00008  304200ff 
	[ 1831.724000]  03e00008  3042ffff  94830000  3063ffff  00031200 
	[ 1831.952000] ---[ end trace 2f2a09e238b8b7b7 ]---
	Segmentation fault

I would like to fix this and submit a patch, but I could use a pointer as to what to look at next. I'll try throwing some debug output in sprom.c and in the b43 driver, and see what's happening, seeing as I can't see the sprom from sysfs. I'd like to fix this soon (in the next couple days), otherwise I will have to deploy an external AP as well, which will be a pain.

Attachments (2)

wrt54g3gv2-st.bootlog.txt (12.5 KB) - added by andrew.hakman@… 6 years ago.
boot log wrt54g3gv2-st
wrt54g3gv2-st.nvram.show.txt (10.6 KB) - added by andrew.hakman@… 6 years ago.
nvram show wrt54g3gv2-st

Download all attachments as: .zip

Change History (8)

comment:1 follow-up: Changed 6 years ago by hauke

  • Description modified (diff)
  • Owner changed from developers to hauke
  • Status changed from new to accepted

Do you get a message like this "Using SPROM revision 1 provided by platform" ?
Could you add the output of "dmesg |grep ssb" and "nvram show |grep macaddr" to this ticket or attach a file with the full output.

The Data bus error you get when reading out the sprom manually could be that the device does not have a sprom on the pci device, but uses the data from the nvram.

comment:2 in reply to: ↑ 1 Changed 6 years ago by anonymous

Replying to hauke:

Do you get a message like this "Using SPROM revision 1 provided by platform" ?
Could you add the output of "dmesg |grep ssb" and "nvram show |grep macaddr" to this ticket or attach a file with the full output.

The Data bus error you get when reading out the sprom manually could be that the device does not have a sprom on the pci device, but uses the data from the nvram.

I don't get an error message like that (USING SPROM revision 1...).

I added a prink to sprom.c in the kernel, and it actually gets called twice - the first time with the correct mac, then again later in the init with all 0's. All output of a boot captured on the serial console and attached. 1st call of the printk in sprom.c is on line 23, the second one at line 77. Requested output also at the end of the file.

Andrew

Andrew

Changed 6 years ago by andrew.hakman@…

boot log wrt54g3gv2-st

comment:3 follow-up: Changed 6 years ago by hauke

Did this ever worked with the brcm47xx target?

The first sprom read is from the nvram for the ssb found on the SoC with the Ethernet core, Mips core, PCI core, ... and the second read is for the ssb on the pci card connected to the SoC via PCI.

The sprom values for the wifi card on your device is read from the sprom on the card itself and not from the nvram on the flash. There are some pci devices which have a own sprom and some (mostly the more recent ones) are getting their sprom values from nvram.

Could you print out et1mac in the sprom struct?

Do you have any sprom value in nvram starting with "pci/" ?

comment:4 in reply to: ↑ 3 ; follow-up: Changed 6 years ago by anonymous

Replying to hauke:

Did this ever worked with the brcm47xx target?

I'm not sure. I've only had this box for a few weeks, and have only been working on it for a few days. When I tried Backfire 10.03.1, I get similar behavior, but also messages that b43 couldn't read the maximum transmission power from sprom either. There are other tickets (7272) indicating problems with no mac address, and thus no wifi working, and some that indicate that it was fixed, but then stopped working in 10.03.1 final (9284).

The first sprom read is from the nvram for the ssb found on the SoC with the Ethernet core, Mips core, PCI core, ... and the second read is for the ssb on the pci card connected to the SoC via PCI.

Are there actually 2 sprom structures in the kernel then? One for each device? It would seem that when the second one is read, it overwrites the (good) values from the first read from the nvram, and then when b43 comes along later, everything is messed up, so it doesn't get a mac.

The sprom values for the wifi card on your device is read from the sprom on the card itself and not from the nvram on the flash. There are some pci devices which have a own sprom and some (mostly the more recent ones) are getting their sprom values from nvram.

I have a feeling this one doesn't have it's own sprom (but I don't know that for sure).

Could you print out et1mac in the sprom struct?

basically the same thing
first call

...
[    0.000000] found parallel flash.
[    0.000000] !!!!! sprom.c il0macaddr = 0:21:29:D8:27:21
[    0.000000] !!!!! sprom.c et1macaddr = 0:90:4C:60:0:2B
[    0.000000] can not parse nvram name ag0 with value 255 got -34
... }}}
second call
{{{
...
[    0.632000] ssb: chipcommon status is 0x0
[    0.636000] ssb: SPROM offset is 0x1000
[    0.644000] !!!!! sprom.c il0macaddr = 0:0:0:0:0:0
[    0.648000] !!!!! sprom.c et1macaddr = 0:0:0:0:0:0
[    0.688000] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0
... }}}

> Do you have any sprom value in nvram starting with "pci/" ?

yes: see attached


}}}

Changed 6 years ago by andrew.hakman@…

nvram show wrt54g3gv2-st

comment:5 in reply to: ↑ 4 Changed 6 years ago by andrew.hakman@…

sorry, I messed up the wiki formatting again :(

comment:6 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as accepted .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.