# bge added support for Broadcom BCM5761,BCM5784,BCM5785



## nccs (Aug 6, 2009)

I need help to test a patch I adapted from openbsd to add support from bsm5761,bcm5784,bcm5785 gigabyte lan 8.0-CURRENT

link to patch information.

http://nccs.christian.net/bge_bcm5784_patch.htm

thanks


----------



## lgfang (Aug 9, 2009)

*works for me*

I just csup standard-supfile and rebuild kernel with your patch. The NIC works fine so far. 

What info you want and how shall I get it?

Thank you.


----------



## lgfang (Aug 9, 2009)

```
xuan# pciconf -lv | grep -A8 -i broadcom
    vendor     = 'Broadcom Corporation'
    device     = 'NetLink (BCM5784M)'
    class      = network
    subclass   = ethernet
```


----------



## tepung (Aug 10, 2009)

*great job nccs!*

thanks your patches 

now i've manage to use my BCM 5761 with my FreeBSD 7.2 box 

thanks thanks ..


```
dns2# pciconf -lv | grep -A8 -i broadcom
    vendor     = 'Broadcom Corporation'
    class      = network
    subclass   = ethernet


dns2# dmesg | grep bge
bge0: <Broadcom NetXtreme Gigabit Ethernet Controller, unknown ASIC rev. 0xf100> mem 0xf0200000-0xf020ffff,0xf0210000-0xf021ffff irq 17 at device 0.0 on pci48
miibus0: <MII bus> on bge0
bge0: Ethernet address: 00:10:18:4b:24:27
bge0: [ITHREAD]
```


----------



## terminus (Aug 22, 2009)

Thank you for this patch - it works for me without problems on 8.0-BETA2! I hope it will be included in FreeBSD code soon.


```
bge0@pci0:3:0:0:        class=0x020000 card=0x02071025 chip=0x169814e4 rev=0x10 hdr=0x00
    vendor     = 'Broadcom Corporation'
    device     = 'NetLink (BCM5784M)'
    class      = network
    subclass   = ethernet
    bar   [10] = type Memory, range 64, base 0xfc200000, size 65536, enabled
    cap 01[48] = powerspec 3  supports D0 D3  current D0
    cap 03[40] = VPD
    cap 09[60] = vendor (length 108)
    cap 05[50] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 10[cc] = PCI-Express 2 endpoint max data 128(256) link x1(x1)
```


----------



## pi@ (Aug 27, 2009)

Thank you for the patch. It works for me using 7.2-REL

```
bge0@pci0:3:0:0:        class=0x020000 card=0x11651734 chip=0x169814e4 rev=0x10 hdr=0x00
    vendor     = 'Broadcom Corporation'
    class      = network
    subclass   = ethernet
```


----------



## Kingedgar (Oct 9, 2009)

Dumb question, but how do you apply these patches.

Drivers are still not in 8.0RC1, and doing patch < patchbge the patch utility does not find searches, therefore won't patch the file. What gives?


----------



## dennylin93 (Oct 10, 2009)

Try `# cd /usr/src/sys/dev && patch < /path/to/patch`.


----------



## terminus (Oct 12, 2009)

Looks like this patch already have been commited to HEAD 
http://lists.freebsd.org/pipermail/svn-src-head/2009-October/010867.html


----------



## freebeasty (Nov 12, 2009)

Hi there,

I use FreeBSD 7.2. I applied the patches of Christian.

But after a reboot with the new compiled kernel it seems that nothing changed.

Is there anything else to configure ?

What about the module ? I have to execute manually the kldload command ?

What about the kernel configuration file ?

Do I have to change this file after applying the patches ?

It's a dell studio 1555 with BCM5784M nic chipset.

Thanks in advance,

Raphael


----------



## terminus (Nov 13, 2009)

Just apply patch:


```
cd /usr/src/sys/dev/bge
patch < /root/install/patchbge.patch
cd /usr/src/sys/dev/mii
patch < /root/install/patchmii.patch
```

and rebuild && install you new kernel.
Kernel should have bge. (bge is in GENERIC by default)

```
device          bge             # Broadcom BCM570xx Gigabit Ethernet
```

reboot and you should see bge0 in ifconfig.

Nothing more.


----------



## freebeasty (Nov 17, 2009)

Hi Terminus,

many thanks for your fast answer.

I tried to patch and compile the kernel a second time. Now it's working :-D

I assume, that I executed one of the patches within a wrong directory the first time.

Thanks again,

Raphael


----------



## brd@ (Nov 17, 2009)

nccs,

Have you submitted a PR with this patch attached? If so, what is the PR number? If not, please do so and tell us the PR number.


P.S. You misspelled the word Broadcom on your webpage.


----------



## brd@ (Nov 17, 2009)

Looks like that support is already in -HEAD. See the following links for more information:

http://markmail.org/thread/gvl6r3mtbnkepav5
http://svn.freebsd.org/viewvc/base/head/sys/dev/bge/if_bge.c?view=diff&r1=197831&r2=197832

You should email Pyun and see else you can help with and ask him about the missing support for 5748 in his patch. Maybe he ran into an issue with that controller or something.


----------



## dennky (Dec 7, 2009)

FreeBSD 8.0-RELEASE don't recognizes BCM5784M. Is still necessary to patch 


```
cd /usr/src/sys/dev/bge
patch < /root/install/patchbge.patch
cd /usr/src/sys/dev/mii
patch < /root/install/patchmii.patch
```

and build new kernel or or is there another way ?

On `pciconf -lv | grep -A8 -i broadcom` i have

```
vendor      = 'Broadcom Corporation'
device      = 'Netlink (BCM5784M)'
class       = network
subclass    =ethernet
```


----------



## dennky (Dec 8, 2009)

Solved. Working with patch on FreeBSD 8.0-RELEASE. Thanks...


----------



## Kingedgar (Mar 16, 2010)

I don't believe this thread is "solved". Sure it works with this patch, but support is still not in 8.0 yet. Has anyone submitted a PR?


----------



## Kingedgar (Mar 17, 2010)

PR submitted.

http://www.freebsd.org/cgi/query-pr.cgi?pr=144826


----------

