From alh@teleweb.at  Sun Nov 13 18:35:18 2005
Return-Path: <alh@teleweb.at>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id B38A616A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Nov 2005 18:35:18 +0000 (GMT)
	(envelope-from alh@teleweb.at)
Received: from teleweb.at (chello084113014220.6.12.vie.surfer.at [84.113.14.220])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 502D143D45
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 13 Nov 2005 18:35:17 +0000 (GMT)
	(envelope-from alh@teleweb.at)
Received: from alh by teleweb.at with local (Exim 4.54 (FreeBSD))
	id 1EbMg5-0000Vh-AR
	for FreeBSD-gnats-submit@freebsd.org; Sun, 13 Nov 2005 19:34:09 +0100
Message-Id: <E1EbMg5-0000Vh-AR@teleweb.at>
Date: Sun, 13 Nov 2005 19:34:09 +0100
From: Alexander Hausner <alex@hugo.bmg.gv.at>
Sender: Alexander Hausner <alh@teleweb.at>
Reply-To: Alexander Hausner <alex@hugo.bmg.gv.at> 
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] bge support for BCM5752
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         88940
>Category:       kern
>Synopsis:       [bge] [patch] bge support for BCM5752
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 13 18:40:17 GMT 2005
>Closed-Date:    Fri Nov 25 14:44:35 GMT 2005
>Last-Modified:  Fri Nov 25 14:44:35 GMT 2005
>Originator:     
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD chuck.teleweb.at 6.0-STABLE FreeBSD 6.0-STABLE #6: Sat Nov 12 19:47:53 CET 2005 root@:/usr/src/sys/i386/compile/CHUCK i386


	
>Description:
	Yesterday, I tried to install FreeBSD on an HP dc7600, the onboard
	NIC was not found during installation. After some investigations on 
	the web, I found this onboard NIC should be a Broadcom BCM5752, which
	is not supported by the current bge driver. Hence I wrote a simple patch	for this NIC.
>How-To-Repeat:
	
>Fix:


--- bge.patch begins here ---
diff -r -c bge.orig/if_bge.c bge/if_bge.c
*** bge.orig/if_bge.c	Sun Nov 13 18:50:06 2005
--- bge/if_bge.c	Sun Nov 13 18:57:27 2005
***************
*** 172,177 ****
--- 172,179 ----
  		"Broadcom BCM5751 Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5751M,
  		"Broadcom BCM5751M Gigabit Ethernet" },
+ 	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5752,
+ 		"Broadcom BCM5752 Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5782,
  		"Broadcom BCM5782 Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5788,
***************
*** 2319,2328 ****
  	sc->bge_chiprev = BGE_CHIPREV(sc->bge_chipid);
  
  	/*
! 	 * Treat the 5714 like the 5750 until we have more info
  	 * on this chip.
  	 */
! 	if (sc->bge_asicrev == BGE_ASICREV_BCM5714)
  		sc->bge_asicrev = BGE_ASICREV_BCM5750;
  
  	/*
--- 2321,2331 ----
  	sc->bge_chiprev = BGE_CHIPREV(sc->bge_chipid);
  
  	/*
! 	 * Treat the 5714 and the 5752 like the 5750 until we have more info
  	 * on this chip.
  	 */
! 	if (sc->bge_asicrev == BGE_ASICREV_BCM5714 || 
!             sc->bge_asicrev == BGE_ASICREV_BCM5752)
  		sc->bge_asicrev = BGE_ASICREV_BCM5750;
  
  	/*
Only in bge: if_bge.c~
diff -r -c bge.orig/if_bgereg.h bge/if_bgereg.h
*** bge.orig/if_bgereg.h	Sun Nov 13 18:50:30 2005
--- bge/if_bgereg.h	Sun Nov 13 18:54:59 2005
***************
*** 250,255 ****
--- 250,256 ----
  #define BGE_ASICREV_BCM5705		0x03
  #define BGE_ASICREV_BCM5750		0x04
  #define BGE_ASICREV_BCM5714		0x05
+ #define BGE_ASICREV_BCM5752		0x06
  
  /* chip revisions */
  #define BGE_CHIPREV(x)			((x) >> 24)
***************
*** 1875,1880 ****
--- 1876,1882 ----
  #define BCOM_DEVICEID_BCM5750M		0x167C
  #define BCOM_DEVICEID_BCM5751		0x1677
  #define BCOM_DEVICEID_BCM5751M		0x167D
+ #define BCOM_DEVICEID_BCM5752		0x1600
  #define BCOM_DEVICEID_BCM5782		0x1696
  #define BCOM_DEVICEID_BCM5788		0x169C
  #define BCOM_DEVICEID_BCM5789		0x169D
--- bge.patch ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: glebius 
State-Changed-When: Tue Nov 15 14:42:12 GMT 2005 
State-Changed-Why:  
Committed, thanks! 


Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Tue Nov 15 14:42:12 GMT 2005 
Responsible-Changed-Why:  
Don't forget to MFC. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=88940 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Fri Nov 25 14:44:17 GMT 2005 
State-Changed-Why:  
Merged to RELENG_6 and RELENG_5. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=88940 
>Unformatted:
