# Updating the BCE Driver



## sqrl (Jan 21, 2010)

I have a Dell R710 server with the now common NIC not recognized issue relating to the broadcom 5709 int.

I have read the using the driver from HEAD works but I am not sure how to use it.

I have tried replacing the drive if_bce.c in /usr/src/sys/dev and recompiling the kernel  but have had no luck.

can anyone help and point out what I am doing wrong.


----------



## sqrl (Aug 8, 2010)

I am still having trouble with this can someone provide assistance?


----------



## OH (Aug 9, 2010)

By the looks of it, this NIC is supported since 7.2 RELEASE. So with the scarce amount of information provided, using that is the best answer I can give you.


----------



## Terry_Kennedy (Aug 9, 2010)

sqrl said:
			
		

> I am still having trouble with this can someone provide assistance?



What does `# pciconf -lv` show for Ethernet devices? Here's a 5708/5722's on one of my systems:


```
(0:6) new-rz3:/sysprog/terry# pciconf -l | grep 14e4
bce0@pci0:8:0:0:        class=0x020000 card=0x164c14e4 chip=0x164c14e4 rev=0x12 hdr=0x00
bge0@pci0:1:0:0:        class=0x020000 card=0x020f1028 chip=0x165a14e4 rev=0x00 hdr=0x00
bge1@pci0:2:0:0:        class=0x020000 card=0x020f1028 chip=0x165a14e4 rev=0x00 hdr=0x00
```

The first one is a genuine Broadcom OEM card (card = chip), while the second 2 are on-board parts on a Dell board, hence the different card value.

Look for the chip ID in /sys/dev/bce/if_bcereg.h. My 8.1 version lists two flavors of 5709, among others:


```
#define BRCM_VENDORID                           0x14E4
#define BRCM_DEVICEID_BCM5706                   0x164A
#define BRCM_DEVICEID_BCM5706S                  0x16AA
#define BRCM_DEVICEID_BCM5708                   0x164C
#define BRCM_DEVICEID_BCM5708S                  0x16AC
#define BRCM_DEVICEID_BCM5709                   0x1639
#define BRCM_DEVICEID_BCM5709S                  0x163A
#define BRCM_DEVICEID_BCM5716                   0x163B
```


----------



## sqrl (Aug 9, 2010)

My System reports this 



```
none3@pci0:2:0:0:       class=0x020000 card=0x7055103c chip=0x163914e4 rev=0x20 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'NetXtreme II BCM5709 Gigabit Ethernet'
    class      = network
    subclass   = ethernet
none4@pci0:2:0:1:       class=0x020000 card=0x7055103c chip=0x163914e4 rev=0x20 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'NetXtreme II BCM5709 Gigabit Ethernet'
    class      = network
    subclass   = ethernet
```

i have never added a driver into BSD before is it just a matter of copying the files into the appropriate directory and recompiling. Others have reported they have HEAD drivers for BCE working on there 7.1 systems


----------



## Terry_Kennedy (Aug 9, 2010)

sqrl said:
			
		

> My System reports this
> 
> 
> 
> ...



So, you have some Broadcom boards where HP has put their own ID values into them. Normally the drivers don't bother too much with the card info as long as the chip info matches what the driver expects.

My next suggestion would be to do a verbose boot to capture what the bce_attach() prints out for debugging info.


----------



## sqrl (Aug 10, 2010)

Thanks Terry, I will give that a go when I can down the server. I have chucked a Pro1000 card in there for the mean time


----------



## yongari@ (Aug 16, 2010)

Please open a new PR and let me know the PR number.
Make sure to include the output of "pciconf -lcbv".


----------



## sqrl (Aug 16, 2010)

Yongari

I am sorry I dont know what a PR is.

pciconf -lcbv returns operation not permitted


----------



## yongari@ (Aug 16, 2010)

See the following URL to file a PR.
http://www.freebsd.org/send-pr.html
And you should be root to run pciconf.


----------



## sqrl (Aug 16, 2010)

Yongari

thanks for the link

I was logged in as root

I can do pciconf -lv or pciconf -lbv but not pciconf -lcbv


----------



## yongari@ (Aug 16, 2010)

Are you really running stock FreeBSD release?
pciconf(8) is available on all FreeBSD releases unless you use some
derivative of FreeBSD. If you're not running stock FreeBSD,
download 8.1-RELEASE livefs CD and try to boot from it. If you still
see unrecognized bce(4) controller on stock 8.1-RELEASE, send the
output of "pciconf -lcvb" on the machine after booting from livefs
CD. If you're using non-stock FreeBSD and 8.1-RELEASE has no
problem to detect the controller, you'd be better to ask questions
to the maintainer of derivative of FreeBSD.
I'm pretty sure all known Broadcom NetXtreme II controllers are
supported in 8.1-RELEASE so it's somewhat weird you see the issue.


----------



## sqrl (Aug 16, 2010)

I am running FreeBSD 7.1 nothing special in the kernel just some added IPFIREWALL options.

everything else is stock.


----------



## yongari@ (Aug 17, 2010)

I see, 7.1-RELEASE may not support the controller as support code was added later. Maybe your path was not set up correctly. Use absolute path to override that("/usr/sbin/pciconf -lcv").
Using bce(4) in 7.3-RELEASE may work on your box but I'm not sure whether it can build without source changes. You may want to upgrade your box to 7.3-RELEASE or 8.1-RELEASE. Both releases should support the controller.


----------

