Call for Test and Review: bwn(4) - another Broadcom Wireless driver

David Horn dhorn2000 at gmail.com
Fri Dec 25 05:10:45 UTC 2009


On Tue, Dec 22, 2009 at 10:53 PM, Weongyo Jeong <weongyo.jeong at gmail.com> wrote:
> Hello,
>
> Now bwn(4) is available at the public and waiting test and review.  The
> status of this driver is *alpha* so could make panics, warnings and
> errors.  Please let me know if you encounter problems.
>
> The following NICs all I have are only tested on the little endian 64bit
> machine and big endian 32bit machine.
>
>  - Broadcom BCM4306 802.11b/g Wireless
>  - Broadcom BCM4318 802.11b/g Wireless
>
> I tested basic RX, TX and WPA association as STA mode and checked it
> worked.
>
> As you might know there are still a lot of TODO in the driver so you
> could see some verbose messages during testing so please ignore or let
> me know it makes problems.
>
> == How to build and load ==
>
>  # cd /usr/src/sys
>  # fetch http://people.freebsd.org/~weongyo/bwn_20091222.tar.gz
>  # tar xzf bwn_20091222.tar.gz
>  # cd modules/ssb
>  # make && make install
>  # cd ../..
>  # cd modules/bwn
>  # make && make install
>  # cd somewhere
>  # fetch http://people.freebsd.org/~weongyo/bwn_ports_20091222.tar.gz
>  # tar xzf bwn_ports_20091222.tar.gz
>  # cd sysutils/b43-fwcutter
>  # make install clean
>  # cd ../..
>  # cd net/bwn-firmware-kmod
>  # make install clean
>  #
>  # kldload ssb
>  # kldload bwn_v4_ucode
>  # kldload if_bwn
>
> regards,
> Weongyo Jeong

I just ran a test of bwn (with additional ssb patch) against a bcm4311
(b/g) mini pci-e card I had previously used in my Dell laptop.

Unfortunately, I am getting a reproducible kernel page fault after bwn
attempts to attach.

pciconf -lv

none2 at pci0:11:0:0:      class=0x028000 card=0x00071028 chip=0x431114e4
rev=0x01 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'Broadcom Corporation Dell Wireless 1390 WLAN
Mini-PCI Card (BCM4311)'
    class      = network

uname -a

FreeBSD la 9.0-CURRENT FreeBSD 9.0-CURRENT #7 r200926M: Wed Dec 23
18:51:11 EST 2009     root at la:/usr/obj/usr/src/sys/DHORN  amd64

Select data from core.txt:

Unread portion of the kernel message buffer:
bwn0: firmware version (rev 410 patch 2160 date 0x751a time 0x7c0a)
Kernel page fault with the following non-sleepable locks held:
exclusive sleep mutex bwn0 (network driver) r = 0 (0xffffff0005722610)
locked @ /usr/src/sys/modules/bwn/../../dev/bwn/if_bwn.c:906
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
_witness_debugger() at _witness_debugger+0x2e
witness_warn() at witness_warn+0x2c2
trap() at trap+0x2ce
calltrap() at calltrap+0x8
--- trap 0xc, rip = 0xffffffff8127e070, rsp = 0xffffff80406d1a40, rbp
= 0xffffff80406d1a80 ---
bwn_dma_setup() at bwn_dma_setup+0x10
bwn_dma_init() at bwn_dma_init+0x32
bwn_core_init() at bwn_core_init+0x40f
bwn_init_locked() at bwn_init_locked+0xae
bwn_ioctl() at bwn_ioctl+0xff
taskqueue_run() at taskqueue_run+0x91
taskqueue_thread_loop() at taskqueue_thread_loop+0x3f
fork_exit() at fork_exit+0x12a
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xffffff80406d1d30, rbp = 0 ---


Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address   = 0x0
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff8127e070
stack pointer           = 0x28:0xffffff80406d1a40
frame pointer           = 0x28:0xffffff80406d1a80
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 0 (bwn0 taskq)
lock order reversal: (Giant after non-sleepable)
 1st 0xffffff0005722610 bwn0 (network driver) @
/usr/src/sys/modules/bwn/../../dev/bwn/if_bwn.c:906
 2nd 0xffffffff80c56ec0 Giant (Giant) @ /usr/src/sys/dev/usb/input/ukbd.c:1594


dmesg snippet:

ssb0: <Broadcom BCM4311 802.11b/g Wireless> mem 0xf9ffc000-0xf9ffffff
irq 16 at device 0.0 on pci11
ssb0: unsupportted coreid 0x817
pci12: driver added
pci13: driver added
firmware: 'bwn_v4_ucode5' version 0: 22384 bytes loaded at 0xffffffff8125d510
firmware: 'bwn_v4_ucode11' version 0: 29864 bytes loaded at 0xffffffff81262c80
firmware: 'bwn_v4_ucode13' version 0: 32232 bytes loaded at 0xffffffff8126a128
firmware: 'bwn_v4_pcm5' version 0: 1320 bytes loaded at 0xffffffff81271f10
firmware: 'bwn_v4_a0g1initvals5' version 0: 1840 bytes loaded at
0xffffffff81272438
firmware: 'bwn_v4_a0g0initvals5' version 0: 1840 bytes loaded at
0xffffffff81272b68
firmware: 'bwn_v4_b0g0initvals5' version 0: 1840 bytes loaded at
0xffffffff81273298
firmware: 'bwn_v4_b0g0initvals13' version 0: 2080 bytes loaded at
0xffffffff812739c8
firmware: 'bwn_v4_a0g1bsinitvals5' version 0: 158 bytes loaded at
0xffffffff812741e8
firmware: 'bwn_v4_a0g0bsinitvals5' version 0: 158 bytes loaded at
0xffffffff81274286
firmware: 'bwn_v4_b0g0bsinitvals5' version 0: 158 bytes loaded at
0xffffffff81274324
firmware: 'bwn_v4_n0bsinitvals11' version 0: 158 bytes loaded at
0xffffffff812743c2
bwn0 on ssb0
bwn0: WLAN (chipid 0x4311 rev 10) PHY (analog 4 type 2 rev 8) RADIO
(manuf 0x17f ver 0x2050 rev 2)
bwn0: DMA (32 bits)
ioapic0: routing intpin 16 (PCI IRQ 16) to lapic 1 vector 53
bwn0: [MPSAFE]
bwn0: [FILTER]
bwn0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
bwn0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps
24Mbps 36Mbps 48Mbps 54Mbps
wlan1: bpf attached
wlan1: bpf attached
wlan1: Ethernet address: 00:1d:60:96:eb:9f
bwn0: bwn_bt_disable: TODO
bwn0: firmware version (rev 410 patch 2160 date 0x751a time 0x7c0a)
bwn0: DMA initialized
bwn0: bwn_newstate: INIT -> SCAN
bwn0: bwn_newstate: SCAN -> INIT
bwn0: TODO: bwn_leds_exit
bwn0: bwn_bt_disable: TODO
bwn0: firmware version (rev 410 patch 2160 date 0x751a time 0x7c0a)
Kernel page fault with the following non-sleepable locks held:
exclusive sleep mutex bwn0 (network driver) r = 0 (0xffffff0005722610)
locked @ /usr/src/sys/modules/bwn/../../dev/bwn/if_bwn.c:906
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
_witness_debugger() at _witness_debugger+0x2e
witness_warn() at witness_warn+0x2c2
trap() at trap+0x2ce
calltrap() at calltrap+0x8
--- trap 0xc, rip = 0xffffffff8127e070, rsp = 0xffffff80406d1a40, rbp
= 0xffffff80406d1a80 ---


I do have a complete core.txt file if you want me to send it to you
privately.  I do not really need this card, so let me know if you
would like me to donate this wireless nic to the cause. (Email me
off-list if interested), or I can test patches if you prefer.

Thanks for your work on this driver.

---Dave Horn


More information about the freebsd-current mailing list