From owner-freebsd-net@FreeBSD.ORG Fri Feb 13 18:20:03 2009 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FA43106564A for ; Fri, 13 Feb 2009 18:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 1D02D8FC0C for ; Fri, 13 Feb 2009 18:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n1DIK24j011294 for ; Fri, 13 Feb 2009 18:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n1DIK23S011293; Fri, 13 Feb 2009 18:20:02 GMT (envelope-from gnats) Date: Fri, 13 Feb 2009 18:20:02 GMT Message-Id: <200902131820.n1DIK23S011293@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Katsushi Kobayashi Cc: Subject: Re: kern/122551: [bge] Broadcom 5715S no carrier on HP BL460c blade using 6.3-RELEASE X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Katsushi Kobayashi List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 18:20:03 -0000 The following reply was made to PR kern/122551; it has been noted by GNATS. From: Katsushi Kobayashi 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: at device 0.0 on pci2 pci3: on pcib2 bge0: mem 0xfdff0000-0xfdffffff,0xfdfe0000-0xfdfeffff irq 16 at device 4.0 on pci3 miibus0: on bge0 brgphy0: 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: mem 0xfdfd0000-0xfdfdffff,0xfdfc0000-0xfdfcffff irq 17 at device 4.1 on pci3 miibus1: on bge1 brgphy1: 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--