Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2009 18:20:02 GMT
From:      Katsushi Kobayashi <ikob@ni.aist.go.jp>
To:        freebsd-net@FreeBSD.org
Subject:   Re: kern/122551: [bge] Broadcom 5715S no carrier on HP BL460c blade using 6.3-RELEASE
Message-ID:  <200902131820.n1DIK23S011293@freefall.freebsd.org>

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

From: Katsushi Kobayashi <ikob@ni.aist.go.jp>
To: bug-followup@FreeBSD.org,
 greg@laaco.net
Cc:  
Subject: Re: kern/122551: [bge] Broadcom 5715S no carrier on HP BL460c blade using 6.3-RELEASE
Date: Sat, 14 Feb 2009 02:54:39 +0900

 --Apple-Mail-6-689925422
 Content-Type: text/plain;
 	charset=US-ASCII;
 	format=flowed;
 	delsp=yes
 Content-Transfer-Encoding: 7bit
 
 Hi,
 
 We have tried FreeBSD 7.1 on our new HP blade server as BL260c G5
 accommodating GbE i/f with Broafcom 5715S chipset. Unfortunately,
 the network interface did not come UP as the similar situation with  
 PR122551.
 We resolved the trouble with the attached patch. Our device attach  
 messages
 and PCI info are also attached.
 
 I hope this patch will help you.
 
 pciconf -lv
 pcib1@pci0:0:2:0:	class=0x060400 card=0x00000000 chip=0x65e28086  
 rev=0x90 hdr=0x01
      vendor     = 'Intel Corporation'
      device     = '(??) PCIe x4 Port 2'
      class      = bridge
      subclass   = PCI-PCI
 pcib3@pci0:0:3:0:	class=0x060400 card=0x00000000 chip=0x65e38086  
 rev=0x90 hdr=0x01
      vendor     = 'Intel Corporation'
      device     = '(??) PCIe x4 Port 3'
      class      = bridge
      subclass   = PCI-PCI
 pcib4@pci0:0:4:0:	class=0x060400 card=0x00000000 chip=0x65e48086  
 rev=0x90 hdr=0x01
      vendor     = 'Intel Corporation'
      device     = '(??) PCIe x4 Port 4'
      class      = bridge
      subclass   = PCI-PCI
 pcib5@pci0:0:5:0:	class=0x060400 card=0x00000000 chip=0x65e58086  
 rev=0x90 hdr=0x01
      vendor     = 'Intel Corporation'
      device     = '(??) PCIe x4 Port 5'
      class      = bridge
      subclass   = PCI-PCI
 pcib6@pci0:0:6:0:	class=0x060400 card=0x00000000 chip=0x65f98086  
 rev=0x90 hdr=0x01
      vendor     = 'Intel Corporation'
      device     = '(??) PCIe x8 Port 6-7'
      class      = bridge
      subclass   = PCI-PCI
 pcib7@pci0:0:7:0:	class=0x060400 card=0x00000000 chip=0x65e78086  
 rev=0x90 hdr=0x01
      vendor     = 'Intel Corporation'
      device     = '(??) PCIe x4 Port 7'
      class      = bridge
      subclass   = PCI-PCI
 pcib8@pci0:0:30:0:	class=0x060401 card=0x31fe103c chip=0x244e8086  
 rev=0x92 hdr=0x01
      vendor     = 'Intel Corporation'
      device     = '82801 Family (ICH2/3/4/4/5/5/6/7/8/9,63xxESB) Hub  
 Interface to PCI Bridge'
      class      = bridge
      subclass   = PCI-PCI
 pcib2@pci0:2:0:0:	class=0x060400 card=0x00000000 chip=0x01031166  
 rev=0xb5 hdr=0x01
      vendor     = 'ServerWorks (Was: Reliance Computer Corp)'
      device     = 'BCM5715 Broadcom dual gigabit, pci bridge'
      class      = bridge
      subclass   = PCI-PCI
 bge0@pci0:3:4:0:	class=0x020000 card=0x703c103c chip=0x167914e4  
 rev=0xa3 hdr=0x00
      vendor     = 'Broadcom Corporation'
      device     = 'NetXtreme 5715S Gigabit Ethernet'
      class      = network
      subclass   = ethernet
 bge1@pci0:3:4:1:	class=0x020000 card=0x703c103c chip=0x167914e4  
 rev=0xa3 hdr=0x00
      vendor     = 'Broadcom Corporation'
      device     = 'NetXtreme 5715S Gigabit Ethernet'
      class      = network
      subclass   = ethernet
 
 pcib2: <ACPI PCI-PCI bridge> at device 0.0 on pci2
 pci3: <ACPI PCI bus> on pcib2
 bge0: <HP NC326i Dual Port PCI-E Gigabit Adapter, ASIC rev. 0x9003>  
 mem 0xfdff0000-0xfdffffff,0xfdfe0000-0xfdfeffff irq 16 at device 4.0  
 on pci3
 miibus0: <MII bus> on bge0
 brgphy0: <BCM5714 10/100/1000baseTX PHY> PHY 1 on miibus0
 brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,  
 1000baseT-FDX, auto
 bge0: Ethernet address: 00:22:64:04:53:ca
 bge0: [ITHREAD]
 bge1: <HP NC326i Dual Port PCI-E Gigabit Adapter, ASIC rev. 0x9003>  
 mem 0xfdfd0000-0xfdfdffff,0xfdfc0000-0xfdfcffff irq 17 at device 4.1  
 on pci3
 miibus1: <MII bus> on bge1
 brgphy1: <BCM5714 10/100/1000baseTX PHY> PHY 1 on miibus1
 brgphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT,  
 1000baseT-FDX, auto
 bge1: Ethernet address: 00:22:64:04:53:cb
 bge1: [ITHREAD]
 
 
 ----
 Katsushi Kobayashi
 
 
 --Apple-Mail-6-689925422
 Content-Disposition: attachment;
 	filename=diff.txt
 Content-Type: text/plain;
 	x-unix-mode=0644;
 	name="diff.txt"
 Content-Transfer-Encoding: 7bit
 
 Index: sys/dev/bge/if_bgereg.h
 ===================================================================
 --- sys/dev/bge/if_bgereg.h	(revision 1)
 +++ sys/dev/bge/if_bgereg.h	(working copy)
 @@ -2533,6 +2533,9 @@
  #define	BGE_FLAG_JUMBO		0x00000002
  #define	BGE_FLAG_WIRESPEED	0x00000004
  #define	BGE_FLAG_EADDR		0x00000008
 +
 +#define	BGE_FLAG_MIISERDES	0x00000010
 +
  #define	BGE_FLAG_MSI		0x00000100
  #define	BGE_FLAG_PCIX		0x00000200
  #define	BGE_FLAG_PCIE		0x00000400
 Index: sys/dev/bge/if_bge.c
 ===================================================================
 --- sys/dev/bge/if_bge.c	(revision 1)
 +++ sys/dev/bge/if_bge.c	(working copy)
 @@ -838,8 +838,11 @@
  	mii = device_get_softc(sc->bge_miibus);
  
  	BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_PORTMODE);
 -	if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T)
 +	if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T ||
 +                (sc->bge_flags & BGE_FLAG_MIISERDES))
 +	{
  		BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_GMII);
 +	}
  	else
  		BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_MII);
  
 @@ -1719,8 +1722,8 @@
  	    BGE_MACMODE_RXDMA_ENB | BGE_MACMODE_RX_STATS_CLEAR |
  	    BGE_MACMODE_TX_STATS_CLEAR | BGE_MACMODE_RX_STATS_ENB |
  	    BGE_MACMODE_TX_STATS_ENB | BGE_MACMODE_FRMHDR_DMA_ENB |
 -	    ((sc->bge_flags & BGE_FLAG_TBI) ?
 -	    BGE_PORTMODE_TBI : BGE_PORTMODE_MII));
 +            ((sc->bge_flags & BGE_FLAG_TBI) ?
 +            BGE_PORTMODE_TBI : (sc->bge_flags & BGE_FLAG_MIISERDES ) ? BGE_PORTMODE_GMII : BGE_PORTMODE_MII));
  
  	/* Set misc. local control, enable interrupts on attentions */
  	CSR_WRITE_4(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN);
 @@ -2654,7 +2657,13 @@
  	}
  
  	if ((hwcfg & BGE_HWCFG_MEDIA) == BGE_MEDIA_FIBER)
 -		sc->bge_flags |= BGE_FLAG_TBI;
 +        {
 +                if(sc->bge_flags & BGE_FLAG_5714_FAMILY){
 +                        sc->bge_flags |= BGE_FLAG_MIISERDES;
 +                } else {
 +                        sc->bge_flags |= BGE_FLAG_TBI;
 +                }
 +        }
  
  	/* The SysKonnect SK-9D41 is a 1000baseSX card. */
  	if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == SK_SUBSYSID_9D41)
 @@ -3267,6 +3276,7 @@
  	if (cmd == POLL_AND_CHECK_STATUS)
  		if ((sc->bge_asicrev == BGE_ASICREV_BCM5700 &&
  		    sc->bge_chipid != BGE_CHIPID_BCM5700_B2) ||
 +			(sc->bge_flags & BGE_FLAG_MIISERDES) ||
  		    sc->bge_link_evt || (sc->bge_flags & BGE_FLAG_TBI))
  			bge_link_upd(sc);
  
 Index: sys/dev/mii/brgphy.c
 ===================================================================
 --- sys/dev/mii/brgphy.c	(revision 1)
 +++ sys/dev/mii/brgphy.c	(working copy)
 @@ -540,10 +540,21 @@
  				mii->mii_media_active |= IFM_NONE; break;
  			}
  		}
 +		 else if(bmsr & BRGPHY_BMSR_LINK){
 +			mii->mii_media_status |= IFM_ACTIVE;
 +		}
  	} else {
  		/* If serdes link is up, get the negotiated speed/duplex. */
  		if (bmsr & BRGPHY_BMSR_LINK) {
  			mii->mii_media_status |= IFM_ACTIVE;
 +			/* If autoneg enabled, read negotiated duplex settings */
 +			if (bmcr & BRGPHY_BMCR_AUTOEN) {
 +				val = PHY_READ(sc, BRGPHY_SERDES_ANAR) & PHY_READ(sc, BRGPHY_SERDES_ANLPAR);
 +				if (val & BRGPHY_SERDES_ANAR_FDX)
 +					mii->mii_media_active |= IFM_FDX;
 +				else
 +					mii->mii_media_active |= IFM_HDX;
 +			}
  		}
  
  		/* Check the link speed/duplex based on the PHY type. */
 @@ -619,6 +630,7 @@
  		/* Pause capability advertisement (pause capable & asymmetric) */
  		PHY_WRITE(sc, BRGPHY_MII_ANAR,
  	    	BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA |
 +		ANAR_X_FD | ANAR_X_HD | ANAR_FC | 0x0800 |
  	    	BRGPHY_ANAR_ASP | BRGPHY_ANAR_PC);
  	} else {
  		PHY_WRITE(sc, BRGPHY_SERDES_ANAR, BRGPHY_SERDES_ANAR_FDX |
 
 --Apple-Mail-6-689925422
 Content-Type: text/plain;
 	charset=US-ASCII;
 	format=flowed
 Content-Transfer-Encoding: 7bit
 
 
 
 
 --Apple-Mail-6-689925422--



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