Bug 209758 - Broadcom 5717 C not working
Summary: Broadcom 5717 C not working
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.3-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-26 04:33 UTC by Giuliano
Modified: 2016-06-13 03:04 UTC (History)
5 users (show)

See Also:


Attachments
pciconf output (21.71 KB, text/plain)
2016-05-26 11:11 UTC, Giuliano
no flags Details
5717C patch (2.09 KB, patch)
2016-05-26 14:26 UTC, Sepherosa Ziehau
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Giuliano 2016-05-26 04:33:40 UTC
Dear Sir,

I have tried to install FreeBSD 10.3 at HP Proliant ML110 Gen9 and the NIC driver does not work. The NIC is a Broadcom 5717 C. The driver is not attached during boot and the ifconfig returns only loopback interface.

I have tried install Debian and tg3 driver Works. Also, DragonFlyBSD Works with if_bnx driver.

Best regards,
Giuliano Sperandio
Comment 1 Enji Cooper freebsd_committer freebsd_triage 2016-05-26 05:06:37 UTC
(In reply to Giuliano from comment #0)

if_bnx [1] seems to correspond with the if_bge [2] driver based on the driver description in the respective manpages.

Could you please attach your pciconf -lv output for the machine from DragonflyBSD?

1. https://www.dragonflybsd.org/cgi/web-man?command=if_bnx&section=ANY
2. https://www.freebsd.org/cgi/man.cgi?query=if_bge&apropos=0&sektion=0&manpath=FreeBSD+10.3-RELEASE+and+Ports&arch=default&format=html
Comment 2 Giuliano 2016-05-26 11:11:38 UTC
Created attachment 170672 [details]
pciconf output
Comment 3 Giuliano 2016-05-26 11:16:05 UTC
(In reply to Ngie Cooper from comment #1)
Dear Ngie Cooper,

I have attached the output pciconf at file pciconf.out.txt.

DragonFlyBSD has also a if_bge driver. I cannot understand the difference between if_bge and if_bnx, they seem to be quite similar.

https://www.dragonflybsd.org/cgi/web-man?command=if_bge&section=ANY(In reply to Ngie Cooper from comment #1)
Comment 4 Giuliano 2016-05-26 13:15:04 UTC
Actually, I have tried first to install FreeNAS 9.10. As the system doesn't works, I started to look for why it is not working.

As I could retrieve, the source code of DragonFly BSD includes the 5717 C NIC at if_bnx. The FreeBSD if_bge source code includes only 5717 A and 5717 B NICs. The 'C' version is missing.
Comment 5 Sepherosa Ziehau 2016-05-26 14:26:11 UTC
Created attachment 170681 [details]
5717C patch
Comment 6 Sepherosa Ziehau 2016-05-26 14:26:43 UTC
Heh, it was added a long time ago.

And as for why bnx(4) in DragonflyBSD, its mainly because the bnx(4) support 4 RX rings on all chips, and 4 TX rings on 5717C/5719/5720, and well of course multi-vector MSI-X support.  Adding these stuffs to bge(4) caused too much trouble for me back to 2013, bge(4) is already too complex.

I have attached the patch for FreeBSD bge(4) to take over 5717C, please test.
Comment 7 Giuliano 2016-05-26 20:26:28 UTC
Dear Sepherosa,

I wish to thank you very much for your help. I'm sorry my ignorance but I have looked for how to compile this patch and I did not found. Is it possible to return the necessary commands to do this? (or a link with instructions)

Best regards,
Giuliano
Comment 8 Enji Cooper freebsd_committer freebsd_triage 2016-05-26 20:32:37 UTC
(In reply to Giuliano from comment #7)

cd /usr/src
fetch -o - https://bz-attachments.freebsd.org/attachment.cgi?id=170681 | patch -p1
Comment 9 Giuliano 2016-05-26 20:52:52 UTC
Dear Ngie,

I have triple checked typing to be sure it is not my mistake. There is a error: fetch: No match. Hmm... I can't seem to find a patch in there anywhere.

Best regards,
Giuliano
Comment 10 Enji Cooper freebsd_committer freebsd_triage 2016-05-26 21:22:41 UTC
(In reply to Giuliano from comment #9)

The command I provided is for use with FreeBSD.
Comment 11 Stephen Hurd freebsd_committer freebsd_triage 2016-05-27 08:03:32 UTC
(In reply to Giuliano from comment #9)

Add single-quotes around the URL or escape the question mark:

cd /usr/src
fetch -o - 'https://bz-attachments.freebsd.org/attachment.cgi?id=170681' | patch -p1
Comment 12 Giuliano 2016-05-27 10:23:22 UTC
(In reply to Stephen Hurd from comment #11)
Dear Stephen,

single-quote makes fetch command works. But the patch command ask for 'File to patch:' and I have no idea what to type. Is it possible to have a new module to execute kldload?

Best regards,
Giuliano
Comment 13 Giuliano 2016-05-27 21:15:05 UTC
(In reply to Giuliano from comment #12)
SOLVED.

What I did:
- I follow the steps showed in the link below (until the Step 3).
https://github.com/freenas/freenas-build/wiki/FreeNAS-9.10---10-%E2%80%94-Setting-up-a-FreeNAS-build-environment

- Add the patch in the attachments
cd /usr/src
fetch -o - https://bz-attachments.freebsd.org/attachment.cgi?id=170681 | patch -p1

- Do the remaining steps 4 and 5.

I wish to thank Ngie Cooper, Sepherosa and Stephen -- otherwise I could not solve this problem.

Best regards,
Giuliano Sperandio
Comment 14 commit-hook freebsd_committer freebsd_triage 2016-05-30 06:49:27 UTC
A commit references this bug:

Author: sephe
Date: Mon May 30 06:49:02 UTC 2016
New revision: 300985
URL: https://svnweb.freebsd.org/changeset/base/300985

Log:
  bge: Support 5717 C0, which is almost same as 5720 A0

  PR:		209758
  Obtained from:	DragonFlyBSD d79f5d8f5fe94cd6769207b2901422977d502bc0
  MFC after:	1 week

Changes:
  head/sys/dev/bge/if_bge.c
  head/sys/dev/bge/if_bgereg.h
Comment 15 commit-hook freebsd_committer freebsd_triage 2016-06-13 03:04:01 UTC
A commit references this bug:

Author: sephe
Date: Mon Jun 13 03:03:09 UTC 2016
New revision: 301848
URL: https://svnweb.freebsd.org/changeset/base/301848

Log:
  MFC 300985, 301103

  r300985
  bge: Support 5717 C0, which is almost same as 5720 A0

  PR:         209758
  Obtained from:      DragonFlyBSD d79f5d8f5fe94cd6769207b2901422977d502bc0
  MFC after:  1 week

  ============

  r301103
  bge: Force chipid to 5720 A0 for 5717 C0 in an early place

  Discussed with:     yongari
  MFC after:  1 week
  Sponsored by:       Microsoft OSTC

Changes:
_U  stable/10/
  stable/10/sys/dev/bge/if_bge.c
  stable/10/sys/dev/bge/if_bgereg.h