Need help building module for broadcom 5719



  • Hi,

    I have a broadcom 5719 network card and have seen that there is a backport of the driver of the card supports:

    https://github.com/pfsense/pfsense-tools/commit/0733c3f0ed8b70a1e37d7d66e8390a87c133b798

    So i have compiled a loadable module by following this steps:

    1.fork pfSense-Tools

    2.edit the file builder_scripts/patches.RELENG_8_3 and add
    +~sys/dev/bge~from-8-RC/if_bge_c.diff~
    +~sys/dev/bge~from-8-RC/if_bgereg_h.diff~

    3.get the source code

    4. go to /usr/pfSensesrc/src/sys/modules/bge

    5. make

    6. take the module and place it under /boot/module and edit the loader.conf

    So long all goes well, but after i install pfSense from this iso only the wan-interface(bge1) come up.

    When i try a ifconfig bge0 (lan)  up i get

    bge0: firmware handshake timed out, found 0x4b657654

    dmesg | grep bge1

    bge1: <broadcom netxtreme="" gigabit="" ethernet,="" asic="" rev.="" 0x5719001=""> mem 0xd0970000-0xd907ffff,0xd9080000-0xd908ffff,0xd9090000-0xd909ffff irq 52 at device 0.1 on pci8
    bge1: APE FW version: NCSI v1.1.19.0
    miibus1: <mii bus=""> on bge1
    bge1:[FILTER]
    bge1:link state changed to DOWN
    bge1:link state changed to UP</mii></broadcom>
    

    dmesg | grep bge0

    bge0: <broadcom netxtreme="" gigabit="" ethernet,="" asic="" rev.="" 0x5719001=""> mem 0xd0940000-0xd904ffff,0xd9050000-0xd905ffff,0xd9060000-0xd906ffff irq 48 at device 0.0 on pci8
    bge0: APE FW version: NCSI v1.1.19.0
    miibus0: <mii bus=""> on bge0
    bge0:[FILTER]
    bge0:link state changed to DOWN
    bge0: firmware handshake timed out, found 0x4b657654</mii></broadcom>
    

    Thanks in advance

    shikka



  • I saw this patch when I was spec'ing a machine recently with broadcom lans, but my 57780 chips do not need it.  I believe this patch was in the 2.1 branch during development, but was pulled due to problems (in operation, not initializing).

    Can you verify that interrupts are getting through?  Try 'vmstat -i' before and after an ifconfig attempt on bge0, and compare irq 48 count

    Another thing to do would be try to boot an 8.4 FreeBSD release on this machine.  8.4 is the source of this backport.



  • Ok here we are

    vmstat -i before
    irq256: bge0    2          0
    irq257: bge1    642      1

    vmstat -i after
    irq256: bge0    2          0
    irq257: bge1    937      1

    i'am not familiar with this, but for me it seems like there is no interrupt throughput.

    I've tried the snapshot from 2013-04-21 where the patch was active and it worked.



  • Hi,

    I have a new set of patches from stable 8, and i am currently testing them with 5719 and 5720 .
    I will attach them here once the testing is done.

    Thanks.



  • sounds good
    if you need help to test let me know

    Thanks



  • Could you guys please test these ? I am seeing excessive mbuf usage on an R420, maybe i am missing something.

    http://www.4inarow.net/pfsense/bge.zip

    you need to extract the zip under from-8-STABLE directory, and add

    -p1from-8-STABLE/bge/if_bge.c.patch~
    -p1
    from-8-STABLE/bge/if_bgereg.h.patch~
    -p1from-8-STABLE/bge/mii_brgphy.c.patch~
    -p1
    from-8-STABLE/bge/pcireg.h.patch~
    -p1~~from-8-STABLE/bge/pcireg.h.2.patch~

    to patches.RELENG_8_3 file.



  • Hi,

    sorry had some trouble with my build environment.

    The result:

    fresh boot:  16% (4182/25600)
    

    will report after a few tests.

    Thanks

    
    01 Hour 18% (4726/25600)
    ITEM                     SIZE     LIMIT      USED      FREE  REQUESTS  FAILURES
    mbuf_packet:              256,        0,     2048,     1536,   226584,        0
    mbuf:                     256,        0,       12,     1279,   314311,        0
    mbuf_cluster:            2048,    25600,     3585,     1141,    27111,        0
    mbuf_jumbo_page:         4096,    12800,        0,      119,     6973,        0
    mbuf_jumbo_9k:           9216,     6400,        0,        0,        0,        0
    mbuf_jumbo_16k:         16384,     3200,        0,        0,        0,        0
    mbuf_ext_refcnt:            4,        0,        0,        0,        0,        0
    
    
    
    02 Hours: 18% (4726/25600)
    ITEM                     SIZE     LIMIT      USED      FREE  REQUESTS  FAILURES
    mbuf_packet:              256,        0,     2048,     1536,   338428,        0
    mbuf:                     256,        0,       14,     1277,   429467,        0
    mbuf_cluster:            2048,    25600,     3585,     1141,    35477,        0
    mbuf_jumbo_page:         4096,    12800,        0,      119,     8797,        0
    mbuf_jumbo_9k:           9216,     6400,        0,        0,        0,        0
    mbuf_jumbo_16k:         16384,     3200,        0,        0,        0,        0
    mbuf_ext_refcnt:            4,        0,        0,        0,        0,        0
    
    
    
    5hour: 19% (4854/25600)
    mbuf_packet:              256,        0,     2048,     1664,   903442,        0
    mbuf:                     256,        0,       13,     1270,  1163233,        0
    mbuf_cluster:            2048,    25600,     3713,     1141,    75512,        0
    mbuf_jumbo_page:         4096,    12800,        0,      119,    11718,        0
    mbuf_jumbo_9k:           9216,     6400,        0,        0,        0,        0
    mbuf_jumbo_16k:         16384,     3200,        0,        0,        0,        0
    mbuf_ext_refcnt:            4,        0,        0,        0,        0,        0
    
    


  • Are you able to use all of the ports on the card ? On dell R420, I was having DMA timeouts up until patched the kernel to increase the ata request timeout.



  • At the moment I use 3 ports without any DMA timeouts. Can try the 4th port tomorrow, when I have patched one more line.

    4 Ports no problems :-)
    mbuf is constant



  • Perfect. on my local tests, i see about 984Mbps of throughput on a single port wan. And ~1.94 Gbps on 2 ports bridged on the lan side.

    Ok. Is there any possibility to see what were the issues in operation with the previous backport? If we can verify those , i can send a pull request to repo for these patches.



  • Sounds great.

    http://forum.pfsense.org/index.php/topic,63484.0.html

    Unfortunately I have no intel network card  to test.



  • Hello,

    I'm interested to have a pfsense release with BCM5719 working. How can I do since the current release doesn't seems to be compatible ?

    Thanks,
    Regards,



  • Hi,
    sorry for the delay. You can compile a pfsense iso with the diffs from tuyan (http://www.4inarow.net/pfsense/bge.zip). Works for me.



  • Hi,

    Is there a way to upload your compiled iso ? I don't have the environment to recompile the iso and i'm not sure how to do it :-(

    I can provide an FTP or smth if you want…

    Many thanks.





  • Hi Santa Shikka, :)

    Oh many many thanks. I'll try this out asap !

    Regards,



  • Thank you very much for this image.

    Now i can install pfsense on our Dell R320 Servers.

    The only Problem i have, that i cant update to a snapshot version 2.1.1

    I hope the broadcom drivers will be included in another release.

    Kind Regards

    Boris

    PS.: Sorry for the poor English :-)



  • Hi! I'm also having this issue with Broadcom BCM5719/BCM5720. I would like to try shikka's build, but link is broken.

    Could someone please upload it again?  :D
    Thank you!!



  • If you are experimenting, why not try a 2.2 alpha snapshot, and report any problems you have, rather than backporting a driver to 2.1.x?  FreeBSD 10.0 used in pfSense 2.2 should have the newer bge chipsets supported.

    Also, even if someone does have the iso you referenced, a link to a user-compiled iso will not last long in this forum, given the recent crackdowns on pfSense development in the wild.



  • Unfortunatelly I'm stucked on pfSense 2.1 right now.  :-\

    It would be great if someone could at least republish tuyan's patches, since the given link (http://www.4inarow.net/pfsense/bge.zip) is broken…  :P



  • Finally!  :D
    I was able to build BCM5719/BCM5720 drivers (both 32-bit and 64-bit) using pfsense-tools RELENG_2_1 patches, no need for any additional patches. If someone need those drivers, just PM me ;)



  • I know this is off topic. But does this device support inline IPS?

    Also do you know where can I get updated firmware for this device.

    Thanks in advance!


Log in to reply