Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 May 2006 16:40:24 GMT
From:      Yoshiaki Uchikawa <yoshiaki@kt.rim.or.jp>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/96806 : [bge] [patch] Correction of kernel panic with Broadcom chip BCM5714C and other updates
Message-ID:  <200605231640.k4NGeOOi059193@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/96806; it has been noted by GNATS.

From: Yoshiaki Uchikawa <yoshiaki@kt.rim.or.jp>
To: bug-followup@FreeBSD.org, tedm@ipinc.net
Cc:  
Subject: Re: kern/96806 : [bge] [patch] Correction of kernel panic with
 Broadcom chip BCM5714C and other updates
Date: Wed, 24 May 2006 01:38:53 +0900 (JST)

 Hi,
 
 I used kern/96806 patch on IBM e326m.
 But, I have same problem as kern/94863 reported, occcurred.
 
   bge1: discard frame w/o leading ethernet header (len 4294967292 pkt len
  4294967292)
 
   And:
   Fatal trap 12: page fault while in kernel mode
   :
   :
 
 
  It seems there a part of initialization lack with kern/96806
  patch.
  I performed the one-line addition to if_bge.c .
  It seems to operate very well.
 
 --- if_bge.c.orig	Sat Mar  4 18:34:48 2006
 +++ if_bge.c	Fri Jan 14 16:25:09 2005
 @@ -152,16 +152,28 @@
  		"Broadcom BCM5704C Dual Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5704S,
  		"Broadcom BCM5704S Dual Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5704S_2,
 +		"Broadcom BCM5704S v2 Dual Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5705,
  		"Broadcom BCM5705 Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5705K,
  		"Broadcom BCM5705K Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5705F,
 +		"Broadcom BCM5705F Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5705M,
  		"Broadcom BCM5705M Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5705M_ALT,
  		"Broadcom BCM5705M Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5714C,
  		"Broadcom BCM5714C Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5714S,
 +		"Broadcom BCM5714S Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5715,
 +		"Broadcom BCM5715 Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5715S,
 +		"Broadcom BCM5715S Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5720,
 +		"Broadcom BCM5720 Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5721,
  		"Broadcom BCM5721 Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5750,
 @@ -170,10 +182,22 @@
  		"Broadcom BCM5750M Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5751,
  		"Broadcom BCM5751 Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5751F,
 +		"Broadcom BCM5751F Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5751M,
  		"Broadcom BCM5751M Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5752,
  		"Broadcom BCM5752 Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5753F,
 +		"Broadcom BCM5753F Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5753M,
 +		"Broadcom BCM5753M Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5780,
 +		"Broadcom BCM5780 Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5780S,
 +		"Broadcom BCM5780S Gigabit Ethernet" },
 +	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5781,
 +		"Broadcom BCM5781 Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5782,
  		"Broadcom BCM5782 Gigabit Ethernet" },
  	{ BCOM_VENDORID, BCOM_DEVICEID_BCM5788,
 @@ -1048,30 +1072,35 @@
  	/* Set up the PCI DMA control register. */
  	if (sc->bge_pcie) {
  		dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD |
 -		    (0xf << BGE_PCIDMARWCTL_RD_WAT_SHIFT) |
 -		    (0x2 << BGE_PCIDMARWCTL_WR_WAT_SHIFT);
 +		    (0x180000);
  	} else if (pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4) &
  	    BGE_PCISTATE_PCI_BUSMODE) {
  		/* Conventional PCI bus */
 -		dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD |
 -		    (0x7 << BGE_PCIDMARWCTL_RD_WAT_SHIFT) |
 -		    (0x7 << BGE_PCIDMARWCTL_WR_WAT_SHIFT) |
 -		    (0x0F);
 +			if (sc->bge_asicrev == BGE_ASICREV_BCM5705 ||
 +					BGE_ASICREV_BCM5750) {
 +                          dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD |
 +                                (0x3F0000); }
 +         else 
 +			  dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD |
 +				(0x3F000F);
  	} else {
  		/* PCI-X bus */
  		/*
  		 * The 5704 uses a different encoding of read/write
  		 * watermarks.
  		 */
 -		if (sc->bge_asicrev == BGE_ASICREV_BCM5704)
 +		if (sc->bge_asicrev == BGE_ASICREV_BCM5704 || BGE_ASICREV_BCM5703)
  			dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD |
 -			    (0x7 << BGE_PCIDMARWCTL_RD_WAT_SHIFT) |
 -			    (0x3 << BGE_PCIDMARWCTL_WR_WAT_SHIFT);
 -		else
 +			    (0x9F0000);
 +		else if (sc->bge_asicrev == BGE_ASICREV_BCM5780)
 +			dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD |
 +			    (0x144000);
 +		else if (sc->bge_asicrev == BGE_ASICREV_BCM5714)
 +			dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD |
 +			    (0x148000);
 +		else 
  			dma_rw_ctl = BGE_PCI_READ_CMD|BGE_PCI_WRITE_CMD |
 -			    (0x3 << BGE_PCIDMARWCTL_RD_WAT_SHIFT) |
 -			    (0x3 << BGE_PCIDMARWCTL_WR_WAT_SHIFT) |
 -			    (0x0F);
 +			    (0x1B000F);
  
  		/*
  		 * 5703 and 5704 need ONEDMA_AT_ONCE as a workaround
 @@ -2103,7 +2132,8 @@
  	 * on this chip.
  	 */
  	if (sc->bge_asicrev == BGE_ASICREV_BCM5714 || 
 -            sc->bge_asicrev == BGE_ASICREV_BCM5752)
 +            sc->bge_asicrev == BGE_ASICREV_BCM5752 || 
 +            sc->bge_asicrev == BGE_ASICREV_BCM5780)
  		sc->bge_asicrev = BGE_ASICREV_BCM5750;
  
  	/*
 
 --
   yoshiaki@kt.rim.or.jp
   Yoshiaki UCHIKAWA



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605231640.k4NGeOOi059193>