Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

178 views
Skip to first unread message

Weongyo Jeong

unread,
Dec 22, 2009, 10:53:31 PM12/22/09
to
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

_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"

Aditya Sarawgi

unread,
Dec 23, 2009, 3:18:48 AM12/23/09
to

Hi,

The driver doesn't work with BCM4315, here's what dmesg shows

ssb0: <Broadcom BCM4315 802.11b/g Wireless> mem 0xf4000000-0xf4003fff
irq 19 at device 0.0 on pci6
bwn0 on ssb0
bwn0: unsupported PHY type (5)
device_attach: bwn0 attach returned 6

--
Aditya Sarawgi

Alex Keda

unread,
Dec 23, 2009, 12:18:31 PM12/23/09
to
Weongyo Jeong пишет:

> 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
none1@pci0:48:0:0: class=0x028000 card=0x1371103c chip=0x431214e4
rev=0x02 hdr=0x00
vendor = 'Broadcom Corporation'
device = 'BCM4310 UART (Wireless Ethernet Adapter)'
class = network
bar [10] = type Memory, range 64, base 0xc8000000, size 16384,
enabled
cap 01[40] = powerspec 3 supports D0 D1 D2 D3 current D0
cap 09[58] = vendor (length 120)
cap 05[e8] = MSI supports 1 message, 64 bit
cap 10[d0] = PCI-Express 1 endpoint max data 128(128) link x1(x1)

FreeBSD HP.lissyara.su 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r200750: Sun
Dec 20 14:47:53 MSK 2009
ro...@HP.lissyara.su:/usr/obj/usr/src/sys/GENERIC amd64

after load ssb
ssb0: <Broadcom BCM4312 802.11a/b/g Wireless> mem 0xc8000000-0xc8003fff
irq 18 at device 0.0 on pci48
ssb0: unsupportted coreid 0x817

after load if_bwn I have panic
bwn0 on ssb0
bwn: WLAN (chipid 0x4311 rev B) PHY (analog 4 type 2 rev 9) RADIO (manyf
0x17f ver 0x2050 rev 2)
bwn0: DMA (64 bits)
bwn0: [FILTER]
panic: ssb_add_child: 1960: SSB_DEV_80211 is only supported currently.
cpuid=1
KDB: enter: panic
[thread at kdb_enter+0x3d: movq $0,0x6ab980(%...)]

Weongyo Jeong

unread,
Dec 23, 2009, 2:51:34 PM12/23/09
to
On Wed, Dec 23, 2009 at 08:18:48AM +0000, Aditya Sarawgi wrote:
> On Tue, Dec 22, 2009 at 07:53:31PM -0800, Weongyo Jeong 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 see that your device has LP-PHY instead of A/B/G/N PHYs so currently
it's not supported by bwn(4).

AFAIK linux has a weak but working implementation so we could refer to
other Open Sources.

regards,
Weongyo Jeong

Weongyo Jeong

unread,
Dec 23, 2009, 3:14:38 PM12/23/09
to
On Wed, Dec 23, 2009 at 08:18:31PM +0300, Alex Keda wrote:
> Weongyo Jeong пишет:

> >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
> none1@pci0:48:0:0: class=0x028000 card=0x1371103c chip=0x431214e4
> rev=0x02 hdr=0x00
> vendor = 'Broadcom Corporation'
> device = 'BCM4310 UART (Wireless Ethernet Adapter)'
> class = network
> bar [10] = type Memory, range 64, base 0xc8000000, size 16384,
> enabled
> cap 01[40] = powerspec 3 supports D0 D1 D2 D3 current D0
> cap 09[58] = vendor (length 120)
> cap 05[e8] = MSI supports 1 message, 64 bit
> cap 10[d0] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
>
> FreeBSD HP.lissyara.su 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r200750: Sun
> Dec 20 14:47:53 MSK 2009
> ro...@HP.lissyara.su:/usr/obj/usr/src/sys/GENERIC amd64
>
> after load ssb
> ssb0: <Broadcom BCM4312 802.11a/b/g Wireless> mem 0xc8000000-0xc8003fff
> irq 18 at device 0.0 on pci48
> ssb0: unsupportted coreid 0x817

Interesting. It looks device has a USB 1.1 host controller(?) in
wireless NIC. I think you can ignore this message that looks no
harm.

> after load if_bwn I have panic
> bwn0 on ssb0
> bwn: WLAN (chipid 0x4311 rev B) PHY (analog 4 type 2 rev 9) RADIO (manyf
> 0x17f ver 0x2050 rev 2)
> bwn0: DMA (64 bits)
> bwn0: [FILTER]
> panic: ssb_add_child: 1960: SSB_DEV_80211 is only supported currently.

It's caused by unexpected SSB core. Could you please test with attached
patch with email and tell me the result?

regards,
Weongyo Jeong

patch_ssb_20091223.diff

Alex Keda

unread,
Dec 23, 2009, 3:48:45 PM12/23/09
to
Weongyo Jeong пїЅпїЅпїЅпїЅпїЅ:

> It's caused by unexpected SSB core. Could you please test with attached
> patch with email and tell me the result?
All OK

ssb0: <Broadcom BCM4312 802.11a/b/g Wireless> mem 0xc8000000-0xc8003fff
irq 18 at device 0.0 on pci48
ssb0: unsupportted coreid 0x817

info: [drm] Num pipes: 1
bwn0 on ssb0
bwn0: WLAN (chipid 0x4311 rev 13) PHY (analog 4 type 2 rev 9) RADIO
(manuf 0x17f ver 0x2050 rev 2)


bwn0: DMA (64 bits)
bwn0: [FILTER]

scan - works.
HP# ifconfig wlan0 scan
SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
0x000000000 00:19:e1:00:e1:d0 1 54M -79:-95 100 ES WME
Beeline_WiFi 00:19:e1:00:e1:d1 1 54M -79:-95 100 ES WME
Beeline_WiF... 00:19:e1:00:e1:d2 1 54M -79:-95 100 EPS RSN WPA WME
HP#

but, I can test it with access point only through two days

Alex Keda

unread,
Dec 23, 2009, 3:51:51 PM12/23/09
to
Weongyo Jeong пїЅпїЅпїЅпїЅпїЅ:

> Interesting. It looks device has a USB 1.1 host controller(?) in
> wireless NIC. I think you can ignore this message that looks no
> harm.
It's ordinary miniPCI-E card in my laptop. (Compaq 6715s)

Paul B Mahol

unread,
Dec 24, 2009, 5:25:21 AM12/24/09
to
On 12/23/09, Weongyo Jeong <weongy...@gmail.com> wrote:
> On Wed, Dec 23, 2009 at 08:18:31PM +0300, Alex Keda wrote:
>> Weongyo Jeong pishet:

>> >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
>> none1@pci0:48:0:0: class=0x028000 card=0x1371103c chip=0x431214e4
>> rev=0x02 hdr=0x00
>> vendor = 'Broadcom Corporation'
>> device = 'BCM4310 UART (Wireless Ethernet Adapter)'
>> class = network
>> bar [10] = type Memory, range 64, base 0xc8000000, size 16384,
>> enabled
>> cap 01[40] = powerspec 3 supports D0 D1 D2 D3 current D0
>> cap 09[58] = vendor (length 120)
>> cap 05[e8] = MSI supports 1 message, 64 bit
>> cap 10[d0] = PCI-Express 1 endpoint max data 128(128) link x1(x1)
>>
>> FreeBSD HP.lissyara.su 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r200750: Sun
>> Dec 20 14:47:53 MSK 2009
>> ro...@HP.lissyara.su:/usr/obj/usr/src/sys/GENERIC amd64
>>
>> after load ssb
>> ssb0: <Broadcom BCM4312 802.11a/b/g Wireless> mem 0xc8000000-0xc8003fff
>> irq 18 at device 0.0 on pci48
>> ssb0: unsupportted coreid 0x817
>
> Interesting. It looks device has a USB 1.1 host controller(?) in
> wireless NIC. I think you can ignore this message that looks no
> harm.
>
>> after load if_bwn I have panic
>> bwn0 on ssb0
>> bwn: WLAN (chipid 0x4311 rev B) PHY (analog 4 type 2 rev 9) RADIO (manyf

>> 0x17f ver 0x2050 rev 2)
>> bwn0: DMA (64 bits)
>> bwn0: [FILTER]
>> panic: ssb_add_child: 1960: SSB_DEV_80211 is only supported currently.
>
> It's caused by unexpected SSB core. Could you please test with attached
> patch with email and tell me the result?

It fixed panic in my case too.

Unlike bwi(4) bwn(4) works much better with this card:

ssb0: <Broadcom BCM4311 802.11b/g Wireless> mem 0xf4000000-0xf4003fff
irq 17 at device 0.0 on pci16
ssb0: unsupportted coreid 0x817
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)
bwn0: [FILTER]

and basic wep works just fine.

But I got panic in 'bwn taskq' if I play with hardware RF switch.

--
Paul B Mahol

Paul B Mahol

unread,
Dec 24, 2009, 5:26:13 AM12/24/09
to

John Baldwin

unread,
Dec 24, 2009, 9:25:05 AM12/24/09
to
On Wednesday 23 December 2009 3:14:38 pm Weongyo Jeong wrote:
> On Wed, Dec 23, 2009 at 08:18:31PM +0300, Alex Keda wrote:
> > Weongyo Jeong пишет:

I have a Broadcom card that bwn(4) doesn't recognize. It also required this
patch. Note that my laptop has a USB bluetooth device that is enabled by the
wireless radio button, so perhaps that is why I have a USB device? Anyway,
here are the messages I currently get from ssb/bwn. I've also included the
attach messages from my ndis(4) driver which claims this is a 4322 device. It
has a PCI device id of 0x432b.

ssb0: <Unknown> mem 0xe8000000-0xe8003fff irq 16 at device 0.0 on pci8
ssb0: warn: multiple PCI(E) cores
ssb0: unsupportted coreid 0x81a
ssb0: unsupportted coreid 0x8ff
ssb0: unsupportted coreid 0x80e
ssb0: unknown chipid 0x4322 for PLL & PMU init
bwn0 on ssb0
bwn0: unsupported PHY type (4)


device_attach: bwn0 attach returned 6
bwn0 on ssb0

bwn0: unsupported PHY type (4)


device_attach: bwn0 attach returned 6

ssb0: detached
ndis0: <Broadcom 4322AG 802.11a/b/g/draft-n Wi-Fi Adapter> mem
0xe8000000-0xe8003fff irq 16 at device 0.0 on pci8
ndis0: [ITHREAD]
ndis0: NDIS API version: 5.1
wlan0: Ethernet address: 00:21:00:ab:f7:55

--
John Baldwin

John Baldwin

unread,
Dec 24, 2009, 9:25:05 AM12/24/09
to

Weongyo Jeong

unread,
Dec 24, 2009, 3:11:23 PM12/24/09
to

Maybe yes. AFAIK SSB could have multiple cores including Wireless MAC,
USB Host controller and etc.

> here are the messages I currently get from ssb/bwn. I've also included the
> attach messages from my ndis(4) driver which claims this is a 4322 device. It
> has a PCI device id of 0x432b.
>
> ssb0: <Unknown> mem 0xe8000000-0xe8003fff irq 16 at device 0.0 on pci8
> ssb0: warn: multiple PCI(E) cores
> ssb0: unsupportted coreid 0x81a
> ssb0: unsupportted coreid 0x8ff
> ssb0: unsupportted coreid 0x80e
> ssb0: unknown chipid 0x4322 for PLL & PMU init
> bwn0 on ssb0
> bwn0: unsupported PHY type (4)
> device_attach: bwn0 attach returned 6
> bwn0 on ssb0
> bwn0: unsupported PHY type (4)
> device_attach: bwn0 attach returned 6
> ssb0: detached
> ndis0: <Broadcom 4322AG 802.11a/b/g/draft-n Wi-Fi Adapter> mem
> 0xe8000000-0xe8003fff irq 16 at device 0.0 on pci8
> ndis0: [ITHREAD]
> ndis0: NDIS API version: 5.1
> wlan0: Ethernet address: 00:21:00:ab:f7:55

It looks your device has N-PHY not supported by ssb/bwn and AFAIK
there's no any available open sources or datasheets. Currently I'm
little bit pessimistic whether bwn(4) could support it or not.

regards,
Weongyo Jeong

Gavin Atkinson

unread,
Dec 24, 2009, 4:19:40 PM12/24/09
to
On Tue, 22 Dec 2009, Weongyo Jeong wrote:
> 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.

Firstly, let me say thank you for working on this driver. It will be
great to be able to use the v4 cards!

May I ask, is there a reason you have written a new ssb(4) Sonics
SiliconBackplane driver, rather than using siba(4) which is already in the
tree? I don't know much about these devices, but it seems like these
are for the same (or very sumular) hardware, in which case could they be
merged into one?

Thanks,

Gavin

Weongyo Jeong

unread,
Dec 24, 2009, 3:11:23 PM12/24/09
to
On Thu, Dec 24, 2009 at 09:25:05AM -0500, John Baldwin wrote:
> On Wednesday 23 December 2009 3:14:38 pm Weongyo Jeong wrote:
> > On Wed, Dec 23, 2009 at 08:18:31PM +0300, Alex Keda wrote:
> > > Weongyo Jeong пишет:
> > > >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.
> > > >

regards,
Weongyo Jeong

_______________________________________________

Weongyo Jeong

unread,
Dec 24, 2009, 2:43:16 PM12/24/09
to
On Thu, Dec 24, 2009 at 11:25:21AM +0100, Paul B Mahol wrote:
> On 12/23/09, Weongyo Jeong <weongy...@gmail.com> wrote:
> > On Wed, Dec 23, 2009 at 08:18:31PM +0300, Alex Keda wrote:
> >> Weongyo Jeong pishet:
> >> after load if_bwn I have panic
> >> bwn0 on ssb0
> >> bwn: WLAN (chipid 0x4311 rev B) PHY (analog 4 type 2 rev 9) RADIO (manyf
> >> 0x17f ver 0x2050 rev 2)
> >> bwn0: DMA (64 bits)
> >> bwn0: [FILTER]
> >> panic: ssb_add_child: 1960: SSB_DEV_80211 is only supported currently.
> >
> > It's caused by unexpected SSB core. Could you please test with attached
> > patch with email and tell me the result?
>
> It fixed panic in my case too.
>
> Unlike bwi(4) bwn(4) works much better with this card:
>
> ssb0: <Broadcom BCM4311 802.11b/g Wireless> mem 0xf4000000-0xf4003fff
> irq 17 at device 0.0 on pci16
> ssb0: unsupportted coreid 0x817
> 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)
> bwn0: [FILTER]
>
> and basic wep works just fine.
>
> But I got panic in 'bwn taskq' if I play with hardware RF switch.

Does `hardware RF switch' indicates a switch to turn on/off RF feature
on laptop? If yes it didn't be tested fully because I can't reproduce
on my environment.

Could you please show me the backtrace when it got panic?

David Horn

unread,
Dec 25, 2009, 12:10:43 AM12/25/09
to
On Tue, Dec 22, 2009 at 10:53 PM, Weongyo Jeong <weongy...@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 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@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@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

Alex Keda

unread,
Dec 25, 2009, 11:27:20 AM12/25/09
to
Alex Keda пїЅпїЅпїЅпїЅпїЅ:
> Weongyo Jeong пїЅпїЅпїЅпїЅпїЅ:

>> It's caused by unexpected SSB core. Could you please test with attached
>> patch with email and tell me the result?
> All OK

>
> ssb0: <Broadcom BCM4312 802.11a/b/g Wireless> mem 0xc8000000-0xc8003fff
> irq 18 at device 0.0 on pci48
> ssb0: unsupportted coreid 0x817
> info: [drm] Num pipes: 1
> bwn0 on ssb0
> bwn0: WLAN (chipid 0x4311 rev 13) PHY (analog 4 type 2 rev 9) RADIO

> (manuf 0x17f ver 0x2050 rev 2)
> bwn0: DMA (64 bits)
> bwn0: [FILTER]
>
> scan - works.
> HP# ifconfig wlan0 scan
> SSID/MESH ID BSSID CHAN RATE S:N INT CAPS
> 0x000000000 00:19:e1:00:e1:d0 1 54M -79:-95 100 ES WME
> Beeline_WiFi 00:19:e1:00:e1:d1 1 54M -79:-95 100 ES WME
> Beeline_WiF... 00:19:e1:00:e1:d2 1 54M -79:-95 100 EPS RSN WPA WME
> HP#
>
> but, I can test it with access point only through two days
so, it's work, but I have reproduce panic.

I manually assign IP address:
# ifconfig wlan0 192.168.250.2
then, run command:
# /etc/netstart
and I see:
.....
wpa_supplicant[2084]: Failed to disable WPA in the driver
bwn0: bwn_newstate: RUN -> INIT


bwn0: TODO: bwn_leds_exit
bwn0: bwn_bt_disable TODO

Starting wpa_supplicant.
bwn0: firmware version ( rev 410 patch 2160 date 0x751a time 0x7c0a)
Kernel page fault with the following non-sleepable lock held:
exclusive sleep mutex bwn0 (network driver) r = 0 (0xffffff005a769010)
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_sebugger() at _witness_debugger+0x2e


witness_warn() at witness_warn+0x2c2
trap() at trap+0x2ce
calltrap() at calltrap+0x8

--- trap 0xc, rip = 0xffffffff81516070, rsp = 0xffffff803ceeaa40, rbp =
0xffffff803ceeaa80 ---


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_tramponline() at fork_tramponline+0xe
--- trap 0, rip = 0, rsp = 0xffffff803ceead30, 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:0xffffffff81516070
stack pointer = 0x28:0xffffff803ceeaa40
frame pointer = 0x28:0xffffff803ceeaa80


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)

[thread pid 0 tid 100239 ]
Stopped at bwn_dma_setup+0x10: movq (%rax), %rax

Paul B Mahol

unread,
Dec 25, 2009, 1:14:41 PM12/25/09
to
On 12/25/09, Alex Keda <ad...@lissyara.su> wrote:
> Alex Keda pishet:
>> Weongyo Jeong pishet:

Exactly the same one I get when playing with hw RF switch.

--
Paul B Mahol

Weongyo Jeong

unread,
Dec 25, 2009, 10:49:30 PM12/25/09
to
On Thu, Dec 24, 2009 at 09:19:40PM +0000, Gavin Atkinson wrote:
> On Tue, 22 Dec 2009, Weongyo Jeong wrote:
> >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.
>
> Firstly, let me say thank you for working on this driver. It will be
> great to be able to use the v4 cards!
>
> May I ask, is there a reason you have written a new ssb(4) Sonics
> SiliconBackplane driver, rather than using siba(4) which is already in the
> tree? I don't know much about these devices, but it seems like these
> are for the same (or very sumular) hardware, in which case could they be
> merged into one?

Frankly speaking I didn't know siba(4) during I'd written ssb(4). It's
my bad and I think you opinion is right to go forward though siba(4)
missed 802.11 related codes. Before committing bwn(4) into tree I'd
merge codes into siba(4) firstly.

regards,
Weongyo Jeong

Weongyo Jeong

unread,
Dec 25, 2009, 10:56:48 PM12/25/09
to
On Fri, Dec 25, 2009 at 07:27:20PM +0300, Alex Keda wrote:
> Alex Keda пишет:
> >Weongyo Jeong пишет:

OK. I'll try to make a patch against this bug but not sure I can
make it soon because I'll be on vacation for next whole weeks.

Thank you for reporting!

Merry christmas,

Weongyo Jeong

unread,
Dec 25, 2009, 11:08:04 PM12/25/09
to
On Fri, Dec 25, 2009 at 12:10:43AM -0500, David Horn wrote:
> On Tue, Dec 22, 2009 at 10:53 PM, Weongyo Jeong <weongy...@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@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@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

It looks it's a same bug like others but let me give some times because
I'll be on vacation until next weeks.

I'll post a patch after coming back from holidays.

regards,

Bruce Simpson

unread,
Dec 27, 2009, 2:22:38 PM12/27/09
to
On 26/12/2009 03:49, Weongyo Jeong wrote:
> Frankly speaking I didn't know siba(4) during I'd written ssb(4). It's
> my bad and I think you opinion is right to go forward though siba(4)
> missed 802.11 related codes. Before committing bwn(4) into tree I'd
> merge codes into siba(4) firstly.
>

I wrote some of the siba(4) stuff originally, a few years ago, when
trying to get FreeBSD booting on the Netgear WGT824, which has a
Broadcom BCM5365P (aka Sentry5) embedded system processor, and contains
Sonics SiliconBackPlane for its onboard peripherals.

I had based some of it off a patch I think David Young came up with for
NetBSD on the same beast. I got as far as getting the onboard bfe(4) to
do NEWBUS attachment on the siba(4) bus, but because I hadn't gotten IRQ
allocation/routing working on BCM5365P, bfe(4) didn't fully attach.

Interestingly it looked like ubsec(4) might have worked with just a few
tweaks, for the otherwise ppoorly] [un]documented crypto hardware on the
Sentry5 chip.

I believe other folk have taken what was there in the FreeBSD MIPS
branch and run with it since then, so siba(4) might be closer to
completion now.

cheers,
BMS

Weongyo Jeong

unread,
Jan 1, 2010, 6:11:17 PM1/1/10
to
> bwn0: firmware version ( rev 410 patch 2160 date 0x751a time 0x7c0a)
> Kernel page fault with the following non-sleepable lock held:
> exclusive sleep mutex bwn0 (network driver) r = 0 (0xffffff005a769010)
> 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_sebugger() at _witness_debugger+0x2e

> witness_warn() at witness_warn+0x2c2
> trap() at trap+0x2ce
> calltrap() at calltrap+0x8
> --- trap 0xc, rip = 0xffffffff81516070, rsp = 0xffffff803ceeaa40, rbp =
> 0xffffff803ceeaa80 ---

> 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_tramponline() at fork_tramponline+0xe
> --- trap 0, rip = 0, rsp = 0xffffff803ceead30, 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:0xffffffff81516070
> stack pointer = 0x28:0xffffff803ceeaa40
> frame pointer = 0x28:0xffffff803ceeaa80
> 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)
> [thread pid 0 tid 100239 ]
> Stopped at bwn_dma_setup+0x10: movq (%rax), %rax

Just come back from vacation. Could you please test with attached
patch? Additionally it could be downloaded at the following URL:

http://people.freebsd.org/~weongyo/patch_bwn_20100101.diff

regards,
Weongyo Jeong

patch_bwn_20100101.diff

Weongyo Jeong

unread,
Jan 2, 2010, 4:49:25 PM1/2/10
to
On Sun, Dec 27, 2009 at 07:22:38PM +0000, Bruce Simpson wrote:
> On 26/12/2009 03:49, Weongyo Jeong wrote:
> >Frankly speaking I didn't know siba(4) during I'd written ssb(4). It's
> >my bad and I think you opinion is right to go forward though siba(4)
> >missed 802.11 related codes. Before committing bwn(4) into tree I'd
> >merge codes into siba(4) firstly.
> >
>
> I wrote some of the siba(4) stuff originally, a few years ago, when
> trying to get FreeBSD booting on the Netgear WGT824, which has a
> Broadcom BCM5365P (aka Sentry5) embedded system processor, and contains
> Sonics SiliconBackPlane for its onboard peripherals.
>
> I had based some of it off a patch I think David Young came up with for
> NetBSD on the same beast. I got as far as getting the onboard bfe(4) to
> do NEWBUS attachment on the siba(4) bus, but because I hadn't gotten IRQ
> allocation/routing working on BCM5365P, bfe(4) didn't fully attach.
>
> Interestingly it looked like ubsec(4) might have worked with just a few
> tweaks, for the otherwise ppoorly] [un]documented crypto hardware on the
> Sentry5 chip.
>
> I believe other folk have taken what was there in the FreeBSD MIPS
> branch and run with it since then, so siba(4) might be closer to
> completion now.

In HEAD it looks Makefile and siba.4 are missed and can't build it that
it outputs some errors.

Do you have the latest patches or sources to build or man page? Please
let me know if you have to avoid duplicate works.

And one another question is that are there drivers which uses siba(4)
driver in HEAD? It could be helpful for me if I have some examples to
use.

regards,
Weongyo Jeong

Rohit Grover

unread,
Jan 2, 2010, 10:00:26 PM1/2/10
to
Hi,

Thanks a lot for writing a driver for Broadcom Wireless cards.
I have a BCM4321 on my laptop.

Upon loading ssb, I get the following on the console:
ssb0: <Unknown> mem 0xd0500000-0xd0503fff,0xd0000000-0xd00fffff irq 16 at
device 0.0 on pci2


ssb0: warn: multiple PCI(E) cores

ssb0: unsupportted coreid 0x817

Thereafter, upon loading bwn_v4_ucode and if_bwn, I get nothing on the
console; and the wlan interface doesn't
appear either.

Executing 'pciconfig -lv' after the above reveals the following about my
wireless card:

ssb0@pci0:2:0:0: class=0x028000 card=0x0088106b chip=0x432814e4
rev=0x03


hdr=0x00
vendor = 'Broadcom Corporation'

device = 'Broadcom 432AGN 802.11a/b/g/draft-n Wi-Fi Solution
(BCM4321KFBG)'
class = network


Could you please help with this?

Regards,
Rohit.


On Wed, Dec 23, 2009 at 4:53 PM, Weongyo Jeong <weongy...@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
>

Sergey Dyatko

unread,
Jan 3, 2010, 4:21:23 AM1/3/10
to
On Dec 23 2009, 5:53 am, weongyo.je...@gmail.com (Weongyo Jeong)
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
>
[..skipped..]
>   # kldload ssb

Jan 3 11:12:22 notebook kernel: ssb0: <Broadcom BCM4318 802.11b/g
Wireless> mem 0xdf7fc000-0xdf7fdfff irq 18 at device 3.0 on pci4

>   # kldload bwn_v4_ucode
>   # kldload if_bwn

notebook# kldload if_bwn
kldload: can't load if_bwn: No such file or directory

messages:
Jan 3 11:12:47 notebook kernel: link_elf: symbol _mtx_assert
undefined

pciconf:
ssb0@pci0:4:3:0: class=0x028000 card=0x120f1043 chip=0x431814e4
rev=0x02 hdr=0x00
vendor = 'Broadcom Corporation'
device = 'Broadcom 802.11b/g (BCM43XX)'
class = network
bar [10] = type Memory, range 32, base 0xdf7fc000, size 8192,
enabled

notebook# uname -a
FreeBSD notebook.minsk.domain 9.0-CURRENT FreeBSD 9.0-CURRENT #4
r201400M: Sun Jan 3 09:49:52 EET 2010 ro...@notebook.minsk.domain:/
usr/obj/usr/src/sys/tiger-asus-a6m i386

>
>
> regards,
> Weongyo Jeong

thanks

Paul B Mahol

unread,
Jan 3, 2010, 10:18:35 AM1/3/10
to
On 1/2/10, Weongyo Jeong <weongy...@gmail.com> wrote:
> On Fri, Dec 25, 2009 at 07:27:20PM +0300, Alex Keda wrote:
>> Alex Keda pishet:
>> >Weongyo Jeong pishet:

Can't reproduce panic any more.

--
Paul B Mahol

Alex Keda

unread,
Jan 4, 2010, 12:20:03 PM1/4/10
to
Weongyo Jeong пїЅпїЅпїЅпїЅпїЅ:

> On Fri, Dec 25, 2009 at 07:27:20PM +0300, Alex Keda wrote:
>> Alex Keda пїЅпїЅпїЅпїЅпїЅ:
>>> Weongyo Jeong пїЅпїЅпїЅпїЅпїЅ:
Now, all OK.
Thanks! =)

Weongyo Jeong

unread,
Jan 6, 2010, 9:57:27 PM1/6/10
to
On Sun, Jan 03, 2010 at 04:00:26PM +1300, Rohit Grover wrote:
> Hi,
>
> Thanks a lot for writing a driver for Broadcom Wireless cards.
> I have a BCM4321 on my laptop.
>
> Upon loading ssb, I get the following on the console:
> ssb0: <Unknown> mem 0xd0500000-0xd0503fff,0xd0000000-0xd00fffff irq 16 at
> device 0.0 on pci2
> ssb0: warn: multiple PCI(E) cores
> ssb0: unsupportted coreid 0x817
>
> Thereafter, upon loading bwn_v4_ucode and if_bwn, I get nothing on the
> console; and the wlan interface doesn't
> appear either.
>
> Executing 'pciconfig -lv' after the above reveals the following about my
> wireless card:
>
> ssb0@pci0:2:0:0: class=0x028000 card=0x0088106b chip=0x432814e4
> rev=0x03
> hdr=0x00
> vendor = 'Broadcom Corporation'
> device = 'Broadcom 432AGN 802.11a/b/g/draft-n Wi-Fi Solution
> (BCM4321KFBG)'
> class = network
>
>
> Could you please help with this?

It looks you have a N PHY device which isn't supported by bwn(4) yet so
there is a possibility that with bwn(4) you could fail to attach
currently.

Could you please show me your full dmesg? It's weird for me that if_bwn
doesn't print any messages that your device revision could not be
supported by bwn(4).

regards,
Weongyo Jeong

Rohit Grover

unread,
Jan 6, 2010, 10:38:12 PM1/6/10
to
Hi,


> Could you please show me your full dmesg? It's weird for me that if_bwn
> doesn't print any messages that your device revision could not be
> supported by bwn(4).
>

I get only the following on my console after loading ssb:

ssb0: <Unknown> mem 0xd0500000-0xd0503fff,0xd0000000-0xd00fffff irq 16 at
device 0.0 on pci2
ssb0: warn: multiple PCI(E) cores
ssb0: unsupportted coreid 0x817

There are no messages from the attach.

regards,
Rohit.

Weongyo Jeong

unread,
Jan 6, 2010, 11:06:00 PM1/6/10
to
On Thu, Jan 07, 2010 at 04:38:12PM +1300, Rohit Grover wrote:
> Hi,
>
>
> > Could you please show me your full dmesg? It's weird for me that if_bwn
> > doesn't print any messages that your device revision could not be
> > supported by bwn(4).
> >
>
> I get only the following on my console after loading ssb:
>
> ssb0: <Unknown> mem 0xd0500000-0xd0503fff,0xd0000000-0xd00fffff irq 16 at
> device 0.0 on pci2
> ssb0: warn: multiple PCI(E) cores
> ssb0: unsupportted coreid 0x817
>
> There are no messages from the attach.

Please try attached patch in bwn_probe() and show me dmesg output. If
bwn(4) doesn't print anything that means ssb(4) works incorrectly. But
there are some outputs and bwn(4) doesn't be attached then your device
revision isn't supported.

regards,
Weongyo Jeong

patch_bwn_20100106.diff

Rohit Grover

unread,
Jan 10, 2010, 12:41:21 AM1/10/10
to
Hi,

> Please try attached patch in bwn_probe() and show me dmesg output.  If
> bwn(4) doesn't print anything that means ssb(4) works incorrectly.  But
> there are some outputs and bwn(4) doesn't be attached then your device
> revision isn't supported.
>


After applying your patch, I get the following upon loading if_bwn:

bwn0: vendor 0x4243 cid 0x812 rev 12

Therefore, I should infer that the device revision isn't supported?
Do you know when this device might be supported?

Weongyo Jeong

unread,
Jan 10, 2010, 1:16:31 AM1/10/10
to
On Sun, Jan 10, 2010 at 06:41:21PM +1300, Rohit Grover wrote:
> Hi,
>
> > Please try attached patch in bwn_probe() and show me dmesg output. ?If
> > bwn(4) doesn't print anything that means ssb(4) works incorrectly. ?But

> > there are some outputs and bwn(4) doesn't be attached then your device
> > revision isn't supported.
> >
>
>
> After applying your patch, I get the following upon loading if_bwn:
>
> bwn0: vendor 0x4243 cid 0x812 rev 12
>
> Therefore, I should infer that the device revision isn't supported?

Yes it looks your revision isn't supported.

> Do you know when this device might be supported?

I think it could be supported when bwn(4) supports N PHYs I hope.

regards,
Weongyo Jeong

Rohit Grover

unread,
Jan 10, 2010, 4:30:13 AM1/10/10
to
Hi Weongyo,

On Sun, Jan 10, 2010 at 7:16 PM, Weongyo Jeong <weongy...@gmail.com> wrote:
> On Sun, Jan 10, 2010 at 06:41:21PM +1300, Rohit Grover wrote:
>> Hi,
>>
>> > Please try attached patch in bwn_probe() and show me dmesg output. ?If
>> > bwn(4) doesn't print anything that means ssb(4) works incorrectly. ?But
>> > there are some outputs and bwn(4) doesn't be attached then your device
>> > revision isn't supported.
>> >
>>
>>
>> After applying your patch, I get the following upon loading if_bwn:
>>
>> bwn0: vendor 0x4243 cid 0x812 rev 12
>>
>> Therefore, I should infer that the device revision isn't supported?
>
> Yes it looks your revision isn't supported.
>
>> Do you know when this device might be supported?
>
> I think it could be supported when bwn(4) supports N PHYs I hope.

Not being able to use the wireless hardware on my current laptop with
FreeBSD has caused me inconvenience to the point where I am seriously
contemplating the purchase of a new laptop.
Is there even a remote possibility that you may be able to estimate
when bwn(4) may be able to support such hardware?

regards,

John Baldwin

unread,
Jan 11, 2010, 10:42:19 AM1/11/10
to
On Sunday 10 January 2010 4:30:13 am Rohit Grover wrote:
> Hi Weongyo,
>
> On Sun, Jan 10, 2010 at 7:16 PM, Weongyo Jeong <weongy...@gmail.com>
wrote:
> > On Sun, Jan 10, 2010 at 06:41:21PM +1300, Rohit Grover wrote:
> >> Hi,
> >>
> >> > Please try attached patch in bwn_probe() and show me dmesg output. ?If
> >> > bwn(4) doesn't print anything that means ssb(4) works incorrectly. ?But
> >> > there are some outputs and bwn(4) doesn't be attached then your device
> >> > revision isn't supported.
> >> >
> >>
> >>
> >> After applying your patch, I get the following upon loading if_bwn:
> >>
> >> bwn0: vendor 0x4243 cid 0x812 rev 12
> >>
> >> Therefore, I should infer that the device revision isn't supported?
> >
> > Yes it looks your revision isn't supported.
> >
> >> Do you know when this device might be supported?
> >
> > I think it could be supported when bwn(4) supports N PHYs I hope.
>
> Not being able to use the wireless hardware on my current laptop with
> FreeBSD has caused me inconvenience to the point where I am seriously
> contemplating the purchase of a new laptop.
> Is there even a remote possibility that you may be able to estimate
> when bwn(4) may be able to support such hardware?

You might try ndis(4). I am using it for my Broadcom wireless card with an N-
phy until bwn(4) supports my part natively.

--
John Baldwin

John Baldwin

unread,
Jan 11, 2010, 10:42:19 AM1/11/10
to

m@g

unread,
Feb 19, 2010, 6:58:15 AM2/19/10
to
On 23 дек 2009, 06:53, weongyo.je...@gmail.com (Weongyo Jeong) 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
>   # fetchhttp://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
>   # fetchhttp://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
>
> _______________________________________________
> freebsd-curr...@freebsd.org mailing listhttp://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

after kldload if_bwn i have this:


kldload: can't load if_bwn: No such file or directory

How can i fix it?

Thanks for your work!

Weongyo Jeong

unread,
Feb 25, 2010, 7:51:15 PM2/25/10
to
On Wed, Dec 23, 2009 at 08:18:48AM +0000, Aditya Sarawgi wrote:

> On Tue, Dec 22, 2009 at 07:53:31PM -0800, Weongyo Jeong 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
> >
>
> Hi,
>
> The driver doesn't work with BCM4315, here's what dmesg shows
>
> ssb0: <Broadcom BCM4315 802.11b/g Wireless> mem 0xf4000000-0xf4003fff
> irq 19 at device 0.0 on pci6
> bwn0 on ssb0
> bwn0: unsupported PHY type (5)

> device_attach: bwn0 attach returned 6

FYI bwn(4) driver is committed into FreeBSD tree. I think the driver
supports your LP PHY device. After cvsup please try to rebuild siba_bwn
and bwn modules.

Could you please test with it? Please let me know and send me your
full dmesg when you encounters the following problems:

- if the driver doesn't work or is unstable.
- if it prints debugging or verbose messages.

regards,
Weongyo Jeong

_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"

Alex RAY

unread,
Feb 26, 2010, 6:15:35 PM2/26/10
to
Hi Weongyo,

Can new siba release operate in systems like in this SVG image?
System example: CPU BCM5836 + Wi-Fi BCM4318

And can we compile siba bus code without pci code?

--------- Cut this to file.svg -----------
<?xml version="1.0" standalone="no"?>
<svg width="640" height="480" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
<g>
<title>Layer 1</title>
<rect stroke-width="5" stroke="#000000" fill="#FF0000" id="svg_1" height="44" width="365" y="138" x="74.467"/>
<text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" stroke-width="0" stroke="#000000" fill="#000000" id="svg_2" y="169" x="256.967">SSB</text>
<rect id="svg_3" stroke-width="5" stroke="#000000" fill="#FF0000" height="44" width="365" y="341" x="217.467"/>
<text id="svg_4" xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" stroke-width="0" stroke="#000000" fill="#000000" y="372" x="399.967">SSB</text>

<rect stroke-width="5" stroke="#000000" fill="#00ff00" id="svg_5" height="50" width="115" y="50" x="72.4667"/>
<rect stroke-width="5" stroke="#000000" fill="#00ff00" id="svg_6" height="57" width="131" y="232" x="234.467"/>
<rect stroke-width="5" stroke="#000000" fill="#00ff00" id="svg_7" height="58" width="125" y="231" x="433.467"/>
<text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" stroke-width="0" stroke="#000000" fill="#000000" id="svg_8" y="83" x="127.467">MIPS</text>
<text id="svg_9" xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" stroke-width="0" stroke="#000000" fill="#000000" y="268" x="499.467">MIPS</text>
<text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" stroke-width="0" stroke="#000000" fill="#000000" id="svg_10" y="269" x="298.467">PCI</text>
<line fill="none" stroke-width="5" stroke="#000000" id="svg_11" y2="137" x2="127.467" y1="102" x1="127.467"/>

<line fill="none" stroke-width="5" stroke="#000000" id="svg_13" y2="343" x2="296.467" y1="290" x1="297.467"/>
<line fill="none" stroke-width="5" stroke="#000000" id="svg_14" y2="343" x2="499.467" y1="290" x1="499.467"/>
<line fill="none" stroke-width="5" stroke="#000000" id="svg_15" y2="182" x2="299.467" y1="231" x1="299.467"/>
<rect stroke-width="5" stroke="#000000" fill="none" id="svg_16" height="54" width="159" y="414" x="342.467"/>
<text xml:space="preserve" text-anchor="middle" font-family="serif" font-size="24" stroke-width="0" stroke="#000000" fill="#000000" id="svg_17" y="448" x="420.467">802.11</text>
<path stroke-width="5" stroke="#000000" fill="none" id="svg_18" d="m151.46666,310l247.53334,0l1,-102l214,0l2,267l-466,-1l1.46666,-164z"/>
<line fill="none" stroke-width="5" stroke="#000000" id="svg_19" y2="412" x2="416.467" y1="386" x1="416.467"/>
</g>

</svg>
--------- Cut this to file.svg -----------

--
Alex RAY <r...@ddteam.net>

Xin LI

unread,
Feb 26, 2010, 7:21:06 PM2/26/10
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, Weongyo,

On 2010/02/25 16:51, Weongyo Jeong wrote:
> FYI bwn(4) driver is committed into FreeBSD tree. I think the driver
> supports your LP PHY device. After cvsup please try to rebuild siba_bwn
> and bwn modules.
>
> Could you please test with it? Please let me know and send me your
> full dmesg when you encounters the following problems:
>
> - if the driver doesn't work or is unstable.
> - if it prints debugging or verbose messages.

Great! Thanks for the work!

Is it possible to MFC the work back to 8-STABLE at some point? A
colleague of mine has tried to compile the code on 8-STABLE but seems
that it's using some new API I guess... I've asked him to try a
9-CURRENT kernel but the Atom based netbook would take some while to
compile the code =-)

Cheers,
- --
Xin LI <del...@delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve! Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQEcBAEBAgAGBQJLiGVyAAoJEATO+BI/yjfBcYgH/2Ruc4z9+MsI3xvVm13YIRaH
rxkRIOXCs7ViyKLPPh5bwDQiBeiOY10WL+GFxJSg/pO7NBc+gHzkJDZNt6LJtlst
iKPcHPwWdxcPbCU7IhO3sIiuMa5WJfH/Aq8tAhlsovlfJwQiukZ4GuhI510q3qo1
2drYi8Z53Ad67/mExMl0gsk0QKIHK3AraQyDV/xRocqdReM+J7TvqxIi0E4dyqha
SFTocul34Hht9iH25fd7WPnSUNp+HRgyA6K5hh5ylKzTf2ojsRN/9YE81C+RVDys
nADEFN2w1ufbPepxJ7KURQuwTyf7MLkQdqCpKfWGyS90pDm4mh/5wLBk50rsZTs=
=kums
-----END PGP SIGNATURE-----

Weongyo Jeong

unread,
Feb 28, 2010, 4:52:59 AM2/28/10
to
On Sat, Feb 27, 2010 at 01:15:35AM +0200, Alex RAY wrote:
> Hi Weongyo,
>
> Can new siba release operate in systems like in this SVG image?
> System example: CPU BCM5836 + Wi-Fi BCM4318

Recent changes of siba(4) by myself doesn't change code flow, layout and
doesn't include enhancements if you're an user of SENTRY5 mips CPU (like
BCM5836)

All I did on recent changes were to put common routines or codes which
could be used for original siba(4). These codes are only used for
bwn(4) driver currently and don't be merged with original siba(4). That
means there are two separated codes in current siba(4) so merging two
into one is a TODO.

I have no idea current siba(4) supports a system using on CPU BCM5836 +
Wi-Fi BCM4318 but in theory it should work without problems though I
didn't test.

> And can we compile siba bus code without pci code?

I think it looks that it could be possible to compile without pci code.
But makes sure that your device doesn't have PCI core.

regards,
Weongyo Jeong

Aditya Sarawgi

unread,
Feb 28, 2010, 6:56:50 PM2/28/10
to
> I see that your device has LP-PHY instead of A/B/G/N PHYs so currently
> it's not supported by bwn(4).
>
> AFAIK linux has a weak but working implementation so we could refer to
> other Open Sources.
>
> regards,
> Weongyo Jeong
>

Hi,

It still doesn't work, when I try to do
ifconfig bwn0 scan
I get
ifconfig: unable to get the scan results

The device is getting recognized properly
here's the dmesg

siba_bwn0: <Broadcom BCM4312 802.11b/g Wireless> mem

0xf4000000-0xf4003fff irq 19 at device 0.0 on pci6

bwn0 on siba_bwn0
bwn0: WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO
(manuf 0x17f ver 0x2062 rev 2)
bwn0: DMA (64 bits)
bwn0: Using 1 MSI messages
bwn0: [FILTER]

I have loaded the following modules
bwn_v4_ucode.ko
if_bwn.ko
siba_bwn.ko

--
Aditya Sarawgi

Miki

unread,
Feb 28, 2010, 2:45:32 PM2/28/10
to
Hi,

Thanks for the work !

I have some problems here when I try to create a wlan interface :
bwn_v4_ucode5: could not load firmware image, error 2
bwn0: the fw file(bwn_v4_ucode5) not found

I have installed bwn-firmware-kmod from ports but the only files I have in
/boot/modules are bwn_v4_lp_ucode.ko and bwn_v4_ucode.ko. So I tried to
copy bwn_v4_ucode to bwn_v4_ucode5 and it seems to work : wlan0 is
created, I can associate to an open Access Point and obtain a DHCP lease.
But if I try to do some network IO (browsing the web) the interface hang
(I cannot obtain a lease anymore).

I'm running :
FreeBSD acheron.homeunix.org 9.0-CURRENT FreeBSD 9.0-CURRENT #3 r204476M:
Sun Feb 28 20:27:03 CET 2010
mi...@acheron.homeunix.org:/usr/obj/usr/src/sys/ACHERON amd64

kernel and world are in sync.

pciconf -lcv output :

siba_bwn0@pci0:4:0:0: class=0x028000 card=0x70011799 chip=0x432014e4


rev=0x03 hdr=0x00
vendor = 'Broadcom Corporation'

device = '802.11b/g Wireless LAN Controller (BCM4309)'
class = network

verbose dmesg output :

siba_bwn0: <Broadcom BCM4306 802.11b/g Wireless> mem
0xfe6fe000-0xfe6fffff irq 16 at device 0.0 on pci4
siba_bwn0: Reserved 0x2000 bytes for rid 0x10 type 3 at 0xfe6fe000
bwn0 on siba_bwn0
bwn0: WLAN (chipid 0x4306 rev 5) PHY (analog 2 type 2 rev 2) RADIO


(manuf 0x17f ver 0x2050 rev 2)

bwn0: DMA (30 bits)
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

dmesg output when I create a wlan interface :

wlan0: bpf attached
wlan0: Ethernet address: 00:11:50:16:c4:47
bwn0: need multicast update callback
last message repeated 2 times
firmware: 'bwn_v4_ucode5' version 0: 22384 bytes loaded at 0xffffffff80c40800
firmware: 'bwn_v4_ucode11' version 0: 29864 bytes loaded at 0xffffffff80c45f70
firmware: 'bwn_v4_ucode13' version 0: 32232 bytes loaded at 0xffffffff80c4d418
firmware: 'bwn_v4_ucode14' version 0: 31384 bytes loaded at 0xffffffff80c55200
firmware: 'bwn_v4_ucode15' version 0: 30488 bytes loaded at 0xffffffff80c5cc98
firmware: 'bwn_v4_pcm5' version 0: 1320 bytes loaded at 0xffffffff80c643b0
firmware: 'bwn_v4_a0g1initvals5' version 0: 1840 bytes loaded at
0xffffffff80c648d8
firmware: 'bwn_v4_a0g0initvals5' version 0: 1840 bytes loaded at
0xffffffff80c65008
firmware: 'bwn_v4_b0g0initvals5' version 0: 1840 bytes loaded at
0xffffffff80c65738
firmware: 'bwn_v4_b0g0initvals13' version 0: 2080 bytes loaded at
0xffffffff80c65e68
firmware: 'bwn_v4_a0g1bsinitvals5' version 0: 158 bytes loaded at
0xffffffff80c66688
firmware: 'bwn_v4_a0g0bsinitvals5' version 0: 158 bytes loaded at
0xffffffff80c66726
firmware: 'bwn_v4_b0g0bsinitvals5' version 0: 158 bytes loaded at
0xffffffff80c667c4
firmware: 'bwn_v4_lp0initvals13' version 0: 3618 bytes loaded at
0xffffffff80c66862
firmware: 'bwn_v4_lp0initvals14' version 0: 2064 bytes loaded at
0xffffffff80c67684
firmware: 'bwn_v4_lp0initvals15' version 0: 2052 bytes loaded at
0xffffffff80c67e94
firmware: 'bwn_v4_lp0bsinitvals13' version 0: 158 bytes loaded at
0xffffffff80c68698
firmware: 'bwn_v4_lp0bsinitvals14' version 0: 158 bytes loaded at
0xffffffff80c68736
firmware: 'bwn_v4_lp0bsinitvals15' version 0: 158 bytes loaded at
0xffffffff80c687d4
firmware: 'bwn_v4_n0bsinitvals11' version 0: 158 bytes loaded at
0xffffffff80c68872
bwn0: firmware version (rev 410 patch 2160 date 0x751a time 0x7c0a)
wlan0: ieee80211_new_state_locked: pending
INIT -> SCAN transition lost
Feb 28 19:57:19 acheron kernel: wlan0: link state changed to UP
Feb 28 19:57:19 acheron kernel: bwn0: need multicast update callback
Feb 28 19:57:19 acheron last message repeated 2 times
Feb 28 19:57:19 acheron dhclient: New IP Address (wlan0): 192.168.2.36
Feb 28 19:57:19 acheron dhclient: New Subnet Mask (wlan0): 255.255.255.0
Feb 28 19:57:19 acheron dhclient: New Broadcast Address (wlan0): 192.168.2.255
Feb 28 19:57:19 acheron dhclient: New Routers (wlan0): 192.168.2.1

Alexandr Rybalko

unread,
Mar 1, 2010, 3:32:40 AM3/1/10
to
On Sun, 28 Feb 2010 01:52:59 -0800
Weongyo Jeong <weongy...@gmail.com> wrote:

>> On Sat, Feb 27, 2010 at 01:15:35AM +0200, Alex RAY wrote:
>> > Hi Weongyo,
>> >
>> > Can new siba release operate in systems like in this SVG image?
>> > System example: CPU BCM5836 + Wi-Fi BCM4318
>>
>> Recent changes of siba(4) by myself doesn't change code flow, layout and
>> doesn't include enhancements if you're an user of SENTRY5 mips CPU (like
>> BCM5836)
>>
>> All I did on recent changes were to put common routines or codes which
>> could be used for original siba(4). These codes are only used for
>> bwn(4) driver currently and don't be merged with original siba(4). That
>> means there are two separated codes in current siba(4) so merging two
>> into one is a TODO.
>>
>> I have no idea current siba(4) supports a system using on CPU BCM5836 +
>> Wi-Fi BCM4318 but in theory it should work without problems though I
>> didn't test.
>>
>> > And can we compile siba bus code without pci code?
>>
>> I think it looks that it could be possible to compile without pci code.
>> But makes sure that your device doesn't have PCI core.
>>
>> regards,
>> Weongyo Jeong
>>

Can You test your driver without siba_switchcore, I see the device have mapping for all cores on SSB?


> ssb0: <Broadcom BCM4315 802.11b/g Wireless> mem 0xf4000000-0xf4003fff

Think thre is 4 cores.

When SSB on nexus, we don`t need core switching, maybe on PCI too.


--
Alexandr Rybalko <r...@dlink.ua>
aka Alex RAY <r...@ddteam.net>

Weongyo Jeong

unread,
Mar 1, 2010, 2:58:45 PM3/1/10
to
> > > ssb0: <Broadcom BCM4315 802.11b/g Wireless> mem 0xf4000000-0xf4003fff
> > > irq 19 at device 0.0 on pci6
> > > bwn0 on ssb0
> > > bwn0: unsupported PHY type (5)
> > > device_attach: bwn0 attach returned 6
> >
> > I see that your device has LP-PHY instead of A/B/G/N PHYs so currently
> > it's not supported by bwn(4).
> >
> > AFAIK linux has a weak but working implementation so we could refer to
> > other Open Sources.
> >
> > regards,
> > Weongyo Jeong
> >
>
> Hi,
>
> It still doesn't work, when I try to do
> ifconfig bwn0 scan
> I get
> ifconfig: unable to get the scan results

uses the following commands instead of it that you didn't create the
virtual wlan interface:

# ifconfig wlan0 create wlandev bwn0
# ifconfig wlan0 up
# ifconfig wlan0 scan
# ifconfig wlan0 list scan

> The device is getting recognized properly
> here's the dmesg
>
> siba_bwn0: <Broadcom BCM4312 802.11b/g Wireless> mem
> 0xf4000000-0xf4003fff irq 19 at device 0.0 on pci6

> bwn0 on siba_bwn0


> bwn0: WLAN (chipid 0x4312 rev 15) PHY (analog 6 type 5 rev 1) RADIO
> (manuf 0x17f ver 0x2062 rev 2)
> bwn0: DMA (64 bits)
> bwn0: Using 1 MSI messages
> bwn0: [FILTER]
>
> I have loaded the following modules
> bwn_v4_ucode.ko

Please uses bwn_v4_lp_ucode.ko because your device looks it's LP PHY.

> if_bwn.ko
> siba_bwn.ko

regards,
Weongyo Jeong

Weongyo Jeong

unread,
Mar 1, 2010, 3:12:54 PM3/1/10
to
On Sun, Feb 28, 2010 at 08:45:32PM +0100, Miki wrote:
> Hi,
>
> Thanks for the work !
>
> I have some problems here when I try to create a wlan interface :
> bwn_v4_ucode5: could not load firmware image, error 2
> bwn0: the fw file(bwn_v4_ucode5) not found

Did you try to UP the interface withload loading bwn_v4_ucode.ko? If
yes currently bwn(4) doesn't automatically load firmware module so you
need to do it by hand.

# kldload bwn_v4_ucode

The patch for this is ready to commit and it'll be happened soon.

> I have installed bwn-firmware-kmod from ports but the only files I have in
> /boot/modules are bwn_v4_lp_ucode.ko and bwn_v4_ucode.ko. So I tried to
> copy bwn_v4_ucode to bwn_v4_ucode5 and it seems to work : wlan0 is
> created, I can associate to an open Access Point and obtain a DHCP lease.
> But if I try to do some network IO (browsing the web) the interface hang
> (I cannot obtain a lease anymore).

I have a exact same device like you have but I didn't encounter this
issue.

Are there any messages from bwn(4) when you the interface becomes hang?
One more question, after the interface hang, does the system be hang
also?

One thing you can do is that trying the device with PIO mode not DMA
mode using the following tunable variable:

hw.bwn.usedma

Its default value is 1 to enable DMA operation so if you set it 0, PIO
mode would be used and could see the message like below:

bwn0: PIO

Could you please test with it?

regards,

Gustau Pérez

unread,
Mar 1, 2010, 3:22:34 PM3/1/10
to
En/na Weongyo Jeong ha escrit:

> On Fri, Feb 26, 2010 at 04:21:06PM -0800, Xin LI wrote:
>
>> Hi, Weongyo,
>>
>> On 2010/02/25 16:51, Weongyo Jeong wrote:
>>
>>> FYI bwn(4) driver is committed into FreeBSD tree. I think the driver
>>> supports your LP PHY device. After cvsup please try to rebuild siba_bwn
>>> and bwn modules.
>>>
>>> Could you please test with it? Please let me know and send me your
>>> full dmesg when you encounters the following problems:
>>>
>>> - if the driver doesn't work or is unstable.
>>> - if it prints debugging or verbose messages.
>>>
>> Great! Thanks for the work!
>>
>> Is it possible to MFC the work back to 8-STABLE at some point?
>>
>
> Of course yes. AFAIK it could be compiled and works without problems on
> 8-STABLE; I checked it. :-)
>
>
I'm trying to run it in STABLE right now. When kldloading if_bwm
(following the given instructions, the other modules are kldloaded) it
complains with :

link_elf_obj: symbol _mtx_assert undefined

looks like it fails in if_bwnvar.h. Culprit is this define :

#define BWN_ASSERT_LOCKED(sc)
mtx_assert(&(sc)->sc_mtx, MA_OWNED)

Do I need witness enabled to run this ? Is there any way to run it in
STABLE or do I need to run CURRENT ?

Regards,

Gus

--
PGP KEY : http://www-entel.upc.edu/gus/gus.asc

John Baldwin

unread,
Mar 2, 2010, 8:01:32 AM3/2/10
to

It sounds like you have INVARIANTS defined when the module was built, but your
kernel does not have INVARIANT_SUPPORT defined.

--
John Baldwin

Miki

unread,
Mar 2, 2010, 2:08:55 PM3/2/10
to
2010/3/1 Weongyo Jeong <weongy...@gmail.com>:

> On Sun, Feb 28, 2010 at 08:45:32PM +0100, Miki wrote:
>> Hi,
>>
>> Thanks for the work !
>>
>> I have some problems here when I try to create a wlan interface :
>> bwn_v4_ucode5: could not load firmware image, error 2
>> bwn0: the fw file(bwn_v4_ucode5) not found
>
> Did you try to UP the interface withload loading bwn_v4_ucode.ko?  If
> yes currently bwn(4) doesn't automatically load firmware module so you
> need to do it by hand.
>
>  # kldload bwn_v4_ucode

OK I have loaded bwn_v4_ucode before if_bwn and it works,
my bad, I should have read the man page more carefully.

>
> The patch for this is ready to commit and it'll be happened soon.
>
>> I have installed bwn-firmware-kmod from ports but the only files I have in
>> /boot/modules are bwn_v4_lp_ucode.ko and bwn_v4_ucode.ko. So I tried to
>> copy bwn_v4_ucode to bwn_v4_ucode5 and it seems to work : wlan0 is
>> created, I can associate to an open Access Point and obtain a DHCP lease.
>> But if I try to do some network IO (browsing the web) the interface hang
>> (I cannot obtain a lease anymore).
>
> I have a exact same device like you have but I didn't encounter this
> issue.
>
> Are there any messages from bwn(4) when you the interface becomes hang?
> One more question, after the interface hang, does the system be hang
> also?

I have no messages in the log (appart bwn0: need multicast update callback).
In fact it's not a hang, it happens only with the AP that permits me
to have a web
access. I have another AP (sitting next to me) and I don't have the
same behavior :
I can have and renew my dhcp lease multiple times and configure the AP with its
web interface. With the "buggy" AP I can have a dhcp lease only once and nothing
more. If I destroy and recreate the wlan interface the same thing happens.
I have no such a problem with if_bwi and this AP.

>
> One thing you can do is that trying the device with PIO mode not DMA
> mode using the following tunable variable:
>
>  hw.bwn.usedma
>
> Its default value is 1 to enable DMA operation so if you set it 0, PIO
> mode would be used and could see the message like below:
>
>  bwn0: PIO
>

> Could you please test with it?
>

Setting hw.bwn.usedma=0 in loader.conf make no differences

by the way, I need to switch from if_bwn to if_bwi to make some test
and post the results here, but I have this error message :
firmware_register: cannot register image bwi_v3_b0g0initvals5, firmware
table full!
is this normal ?

Thanks for your help !

Gustau Pérez

unread,
Mar 2, 2010, 1:57:26 PM3/2/10
to
En/na John Baldwin ha escrit:
That did it. Thank you. After recompiling and rebooting the kernel, I
noticed via dmesg that when kldloading ssb the module complains with :

ssb0: <Broadcom BCM4312 802.11a/b/g Wireless> mem

0xf9ffc000-0xf9ffffff irq 17 at device 0.0 on pci12
ssb0: unsupportted coreid 0x817

When kldloading if_bwn (after bwn_v4_ucode) the machine freezes. I
guess my hard isn't supported yet.

Regards,

Gus

_______________________________________________

Weongyo Jeong

unread,
Mar 3, 2010, 3:28:33 AM3/3/10
to
On Mon, Mar 01, 2010 at 10:32:40AM +0200, Alexandr Rybalko wrote:
> On Sun, 28 Feb 2010 01:52:59 -0800
> Weongyo Jeong <weongy...@gmail.com> wrote:
>
> >> On Sat, Feb 27, 2010 at 01:15:35AM +0200, Alex RAY wrote:
> >> > Hi Weongyo,
> >> >
> >> > Can new siba release operate in systems like in this SVG image?
> >> > System example: CPU BCM5836 + Wi-Fi BCM4318
> >>
> >> Recent changes of siba(4) by myself doesn't change code flow, layout and
> >> doesn't include enhancements if you're an user of SENTRY5 mips CPU (like
> >> BCM5836)
> >>
> >> All I did on recent changes were to put common routines or codes which
> >> could be used for original siba(4). These codes are only used for
> >> bwn(4) driver currently and don't be merged with original siba(4). That
> >> means there are two separated codes in current siba(4) so merging two
> >> into one is a TODO.
> >>
> >> I have no idea current siba(4) supports a system using on CPU BCM5836 +
> >> Wi-Fi BCM4318 but in theory it should work without problems though I
> >> didn't test.
> >>
> >> > And can we compile siba bus code without pci code?
> >>
> >> I think it looks that it could be possible to compile without pci code.
> >> But makes sure that your device doesn't have PCI core.
>
> Can You test your driver without siba_switchcore, I see the device
> have mapping for all cores on SSB?

I see what you mean. siba_core.c which depends on PCI code would be
compiled when it builds on SENTRY5. So it looks currently it needs a
patch to compile siba bus code without PCI code. I'll try to make a
patch.

> > ssb0: <Broadcom BCM4315 802.11b/g Wireless> mem 0xf4000000-0xf4003fff

> Think thre is 4 cores.
> When SSB on nexus, we don`t need core switching, maybe on PCI too.

I think this is a difference between siba(4) and siba_bwn currently and
it's one of TODOs we should solve to merge two codes.

AFAIK approach to access each cores isn't same; it looks siba(4) creates
devices for each cores so it'd not need to switch cores. But siba_bwn
doesn't do it like siba(4) so it needs to switch cores because all are
handled on one device.

regards,
Weongyo Jeong

Alexandr Rybalko

unread,
Mar 3, 2010, 4:10:14 AM3/3/10
to
On Wed, 3 Mar 2010 00:28:33 -0800
Weongyo Jeong <weongy...@gmail.com> wrote:

>> On Mon, Mar 01, 2010 at 10:32:40AM +0200, Alexandr Rybalko wrote:
>> > On Sun, 28 Feb 2010 01:52:59 -0800
>> > Weongyo Jeong <weongy...@gmail.com> wrote:
>> >
>> > Can You test your driver without siba_switchcore, I see the device
>> > have mapping for all cores on SSB?
>>
>> I see what you mean. siba_core.c which depends on PCI code would be
>> compiled when it builds on SENTRY5. So it looks currently it needs a
>> patch to compile siba bus code without PCI code. I'll try to make a
>> patch.

I now trying to make bus independent interface, not done yet.
When finish, I send to You for review and maybe test.

>>
>> > > ssb0: <Broadcom BCM4315 802.11b/g Wireless> mem 0xf4000000-0xf4003fff
>> > Think thre is 4 cores.
>> > When SSB on nexus, we don`t need core switching, maybe on PCI too.
>>
>> I think this is a difference between siba(4) and siba_bwn currently and
>> it's one of TODOs we should solve to merge two codes.
>>
>> AFAIK approach to access each cores isn't same; it looks siba(4) creates
>> devices for each cores so it'd not need to switch cores. But siba_bwn
>> doesn't do it like siba(4) so it needs to switch cores because all are
>> handled on one device.

Look into this line:


ssb0: <Broadcom BCM4315 802.11b/g Wireless> mem 0xf4000000-0xf4003fff

There we see, device have 0x4000 memory window. Each core required 0x1000.
Your code to call required core move PCI window to appropriate 0x1000 block
(if core - second, move to 0xf4001000).
Maybe we can map full window, and then access to required core without core switching.

>>
>> regards,
>> Weongyo Jeong
>>


--
Рыбалко Александр
Консультант D-Link Украина

John Baldwin

unread,
Mar 3, 2010, 7:51:45 AM3/3/10
to
> > Could you please test with it?
> >
>
> Setting hw.bwn.usedma=0 in loader.conf make no differences
>
> by the way, I need to switch from if_bwn to if_bwi to make some test
> and post the results here, but I have this error message :
> firmware_register: cannot register image bwi_v3_b0g0initvals5, firmware
> table full!
> is this normal ?

Yes, both bwi and bwn use a lot of individual firmware images, so loading
both of them probably fills up the static array of firmware table entries.
I think there is a constant in subr_firwmare.c you can increase to make the
table bigger.

--
John Baldwin

Weongyo Jeong

unread,
Mar 3, 2010, 6:53:19 PM3/3/10
to
On Tue, Mar 02, 2010 at 07:57:26PM +0100, Gustau P?rez wrote:
> En/na John Baldwin ha escrit:

It looks you're using old bwn(4) sources. Could you test it with
sources on HEAD? You should use and compile siba_bwn module and bwn
module on HEAD.

regards,
Weongyo Jeong

0 new messages