# (BCM4312) Fatal DMA error



## aimeec1995 (Aug 29, 2017)

]

Some time after connecting wirelessly, or sometimes right away, my wireless will become unusable spewing this message in my tty 
	
	



```
Aug 29 00:42:06 minger-pc kernel: bwn0: Fatal DMA error: 0x400 0 0 0 0 0
Aug 29 00:42:06 minger-pc kernel: bwn0: HW reset: DMA error
Aug 29 00:42:06 minger-pc kernel: bwn0: ucode fw: ucode15
Aug 29 00:42:06 minger-pc kernel: bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)
```

After it happens the device will not function, I can't scan and there;s no link.
I tried destroying and remaking wlan0 `ifconfig wlan0 create wlandev bwn0` service netif restart and dhclient wlan0 

But it just won't connect or even scan unless I reboot.
I have read that it's just because broadcom is shit.. while I believe this, is there any solution?

Using Freebsd 11.1 amd64.
Here is what I load that's related to wireless if it is any help..
/etc/rc.conf

```
wlans_bwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"

[FILE]/boot/loader.conf[/FILE]
[CODE]
if_bwn_load="YES"
bwn_v4_lp_ucode_load="YES"
```
[/CODE]


----------



## SirDice (Aug 29, 2017)

From bwn(4):

```
CAVEATS
     Some LP PHY devices have DMA operation problems that in that case try to
     use PIO mode.
```


```
hw.bwn.usedma
             This tunable enables DMA operations on the hardware.  If the
             value is 0, PIO mode would be used.  The default value is 1.
```


----------



## aimeec1995 (Aug 29, 2017)

SirDice said:


> From bwn(4):
> 
> ```
> CAVEATS
> ...



Sorry for the late reply, I was sleeping.
I will go try this immediately.


----------



## aimeec1995 (Aug 29, 2017)

sysctl says it's read only
going to try putting it in loader.conf


----------



## aimeec1995 (Aug 29, 2017)

So I set that value to 0 in my /boot/loader.conf

unfortunately it rendered my wireless unusable, spewing this ...

from dmesg

```
wlan0: Ethernet address: 00:22:5f:28:b2:53
bwn0: ucode fw: ucode15
bwn0: firmware version (rev 478 patch 104 date 0x8701 time 0x657)
bwn0: incorrect CCK rate 117
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 213
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 30
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 213
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 45
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 30
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 59
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 82
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 51
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 235
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 117
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 59
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 82
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 118
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 118
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 213
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 30
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 213
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 30
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 51
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 89
bwn0: bwn_rxeof: dropped
bwn0: incorrect CCK rate 213
bwn0: bwn_rxeof: dropped
bwn0: incorrect OFDM rate 0
bwn0: bwn_rxeof: dropped
```

I have reverted it for now to be able to post here.


----------



## SirDice (Aug 29, 2017)

I'm a little fuzzy on how to check the firmware versions but make sure net/bwn-firmware-kmod is up to date. If that's up to date you may have some variant of the chipset that needs a little tweaking. In which case I'd probably create a PR for it.


----------

