ifconfig bce0 report: bce0: flags=8847<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=3b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU> inet 172.0.0.199 netmask 0xffffff00 broadcast 172.0.0.255 ether 00:1a:64:33:29:c7 media: Ethernet autoselect (none) status: no carrier Try to set #ifconfig bce0 media 1000baseSX mediaopt full-duplex bce0: flags=8847<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=3b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU> inet 172.0.0.199 netmask 0xffffff00 broadcast 172.0.0.255 ether 00:1a:64:33:29:c7 media: Ethernet 1000baseSX <full-duplex> (none) status: no carrier --- #pciconf -lv bce1@pci6:0:0: class=0x020000 .... rev=0x12 NetXtreme II BCM5708S Gigabit Ethernet ... BCM5715 Broadcom dual gigabit, pci bridge #dmesg|grep bce bce0: <Broadcom NetXtreme II BCM5708 1000Base-SX (B2)> ... bce0: ASIC (0x057081021); Rev (B2); .. How-To-Repeat: Install freebsd 6.3-prerelease on Intel SBXD132 (or IBM HS21 may be too) blade with Broadcom NetXtreme II BMC5708S B2
State Changed From-To: open->analyzed I have a patch for this but it needs tidying up before it gets put in to the tree. Essentially the problem here is a conjunction between some strangeness on Broadcom's part and mishandling of same by brgphy. The PHY in use here uses non-standard registers to indicate link state. brgphy will query them, but it waits for the standard registers to indicate state first, which appears to be the wrong thing to do. Commenting out some lines in brgphy (those to do with the brgphy_status_exit goto label) bandaids the problem but I'd like to tidy up the logic a bit more.
Responsible Changed From-To: freebsd-bugs->benno I have a patch for brgphy that fixes this but it needs work before it goes in to the tree. This problem results fro the conjunction of some oddness in Broadcom's silicon and mishandling of said oddness by brgphy. The PHY on these parts uses non-standard registers to report link status but brgphy waits until the standard registers come ready before testing them which appears to be a bad idea. Commenting out the "goto brgphy_status_exit;" line in brgphy cuts around the problem but I'd like to fix the actual logic.
Dear Friends, I am facing the same problem here. The facilities I am using is 1) IBM BladeCenter Chassis http://www-03.ibm.com/systems/bladecenter/chassis/bladechassis/ 2) HS21 server http://www-03.ibm.com/systems/bladecenter/hs21/index.html 3) Nortel layer2 switch installed in the chassis and as the bce0 connected by HS21 http://www-03.ibm.com/systems/bladecenter/switch/switch_ethernet_overview.html 4) Nortel layer7 switch installed in the chassis and as the bce1 connected by HS21 http://www-03.ibm.com/systems/bladecenter/switch/switch_ethernet_overview.html After installing FreeBSD 6.3BETA or 7.0BETA on the HS21 server, the first network interface (bce0) which connects to the Nortel layer2 switch works normally, and the speed tested by FTP can up to 40MB/s. However, the second network interface (bce1) which connects to the Nortel layer 7 switch always shows "no carrier" when using ifconfig. This is the exact the same situation as PR 118238. After applying the patch suggested, by commenting out the brgphy_status_exit in brgphy.c, status of bce1 became "active". Unfortunately, using FTP to test the speed of the interface only reached around 400KB/s. So we think that the the patch to comment brgphy_status_exit out is only a partial solution that solves the "no carrier" problem but the performance issue still remains open. We appreciate for your effort very much and wish to see the solution soon. Sincerely, Jason Chang
Dear Friends, For my previous report, it seems that bce will negotiate to half-duplex mode when connect to Nortel Layer 7 switch. After changing to full-duplex mode manually, it works normally! Thanks very much for everyone's help! Sincerely, Jason Chang
I needed to install a IBM HS21 blade, met this problem, and cooked up a patch based on benno's (very much appreciated), the only difference is that it tests for the BCM5708S card, before skipping "goto label_that_only_calls_return();", which should make it safer to include in the tree (?). I would very much like to see this in a upcoming release, as it would ease the administration of our strictly GENERIC HS20/HS21 environment. As a side-note for people installing HS21 blades, if you are getting errors of the kind: mpt0: QUEUE FULL EVENT: Bus 0x00 Target 0x01 Depth 65 set tags to "Depth -1", ie: /sbin/camcontrol tags 0:0:0 -N 64 I will happily continue to kill SLES in favour of FreeBSD on our HS21's in the time forward :-)
> I needed to install a IBM HS21 blade, met this problem, and cooked up > a patch based on benno's (very much appreciated), > the only difference is that it tests for the BCM5708S card, before > skipping "goto label_that_only_calls_return();", which should make it > safer to include in the tree (?). > > I would very much like to see this in a upcoming release, as it would > ease the administration of our strictly GENERIC HS20/HS21 environment. I'm travelling for another week and I'll look at the patch when I get back to the office. Are you using forced speeds? The real fix is that I need to implement proper support for forced link speeds. Dave
Hello, It seems that this bug is still open, and the solution is not yet in the tree. I'll check the patch and see if it works. Can someone please commit it if it proves to work fine, or are there more test cases needed? Best regards, Cristi -- Ing. Cristi MÄgheruÈan, System/Network Engineer Technical University of Cluj-Napoca, Romania http://cc.utcluj.ro +40264 401247
Responsible Changed From-To: benno->freebsd-net Reassign this to freebsd-net, to try to get it some attention before 8.0.
This bug still exist in FreeBSD 8.0-RELEASE #0: Tue Nov 24 17:24:49 UTC 2009 root@:/usr/obj/usr/src/sys/GENERIC amd64
Author: sobomax Date: Wed Mar 10 05:19:14 2010 New Revision: 204941 URL: http://svn.freebsd.org/changeset/base/204941 Log: Provide workaround for the ages old bug affecting certain BCM5708S chip revision often found in the blades and resulting in interfaces not sensing carrier signal. Looking at all problem reports it appears that it only affects some very specific silicon revision (ASIC (0x57081021); Rev (B2)) and version of the PHY that supports 1000baseSX-FDX media only. Therefore, narrow the scope of workaround to combination of that revision and media type. Given that the first report on this issue is dated back to 2007, there is not much hope that this issue will ever be properly resolved. Among affected systems are IBM HS21, Intel SBXD132 and HP BL460c. PR: 118238, 122551, 140970 MFC after: 1 month Modified: head/sys/dev/mii/brgphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Wed Mar 10 05:06:47 2010 (r204940) +++ head/sys/dev/mii/brgphy.c Wed Mar 10 05:19:14 2010 (r204941) @@ -66,14 +66,17 @@ __FBSDID("$FreeBSD$"); static int brgphy_probe(device_t); static int brgphy_attach(device_t); +#define BCM5708S_BAD_CHIPID 0x57081021 + struct brgphy_softc { struct mii_softc mii_sc; int mii_oui; int mii_model; int mii_rev; int serdes_flags; /* Keeps track of the serdes type used */ -#define BRGPHY_5706S 0x0001 -#define BRGPHY_5708S 0x0002 +#define BRGPHY_5706S 0x0001 +#define BRGPHY_5708S 0x0002 +#define BRGPHY_NOANWAIT 0x0004 int bce_phy_flags; /* PHY flags transferred from the MAC driver */ }; @@ -291,6 +294,19 @@ brgphy_attach(device_t dev) if (bce_sc && (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, sc->mii_inst), 0); printf("2500baseSX-FDX, "); + } else if ((bsc->serdes_flags & BRGPHY_5708S) && bce_sc && + (bce_sc->bce_chipid == BCM5708S_BAD_CHIPID)) { + /* + * There appears to be certain silicon revision + * usually used in blades that is having issues with + * this driver wating for the auto-negotiation to + * complete. This happens with a specific chip id + * only and when the 1000baseSX-FDX is the only + * mode. Workaround this issue since it's unlikely + * to be ever addressed. + */ + printf("auto-neg workaround, "); + bsc->serdes_flags |= BRGPHY_NOANWAIT; } } @@ -544,7 +560,8 @@ brgphy_status(struct mii_softc *sc) /* Autoneg is still in progress. */ if ((bmcr & BRGPHY_BMCR_AUTOEN) && - (bmsr & BRGPHY_BMSR_ACOMP) == 0) { + (bmsr & BRGPHY_BMSR_ACOMP) == 0 && + (bsc->serdes_flags & BRGPHY_NOANWAIT) == 0) { /* Erg, still trying, I guess... */ mii->mii_media_active |= IFM_NONE; goto brgphy_status_exit; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Author: sobomax Date: Thu Mar 25 23:38:10 2010 New Revision: 205657 URL: http://svn.freebsd.org/changeset/base/205657 Log: MFC: workaround no-carrier issue on IBM HS21. PR: 118238 Modified: stable/8/sys/dev/mii/brgphy.c Directory Properties: stable/8/sys/dev/mii/ (props changed) Modified: stable/8/sys/dev/mii/brgphy.c ============================================================================== --- stable/8/sys/dev/mii/brgphy.c Thu Mar 25 22:41:01 2010 (r205656) +++ stable/8/sys/dev/mii/brgphy.c Thu Mar 25 23:38:10 2010 (r205657) @@ -72,8 +72,9 @@ struct brgphy_softc { int mii_model; int mii_rev; int serdes_flags; /* Keeps track of the serdes type used */ -#define BRGPHY_5706S 0x0001 -#define BRGPHY_5708S 0x0002 +#define BRGPHY_5706S 0x0001 +#define BRGPHY_5708S 0x0002 +#define BRGPHY_NOANWAIT 0x0004 int bce_phy_flags; /* PHY flags transferred from the MAC driver */ }; @@ -142,6 +143,23 @@ static const struct mii_phydesc brgphys[ MII_PHY_END }; +#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21" +#define HS21_BCM_CHIPID 0x57081021 + +static int +detect_hs21(struct bce_softc *bce_sc) +{ + char *sysenv; + + if (bce_sc->bce_chipid != HS21_BCM_CHIPID) + return (0); + sysenv = getenv("smbios.system.product"); + if (sysenv == NULL) + return (0); + if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0) + return (0); + return (1); +} /* Search for our PHY in the list of known PHYs */ static int @@ -291,6 +309,19 @@ brgphy_attach(device_t dev) if (bce_sc && (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, sc->mii_inst), 0); printf("2500baseSX-FDX, "); + } else if ((bsc->serdes_flags & BRGPHY_5708S) && bce_sc && + (detect_hs21(bce_sc) != 0)) { + /* + * There appears to be certain silicon revision + * in IBM HS21 blades that is having issues with + * this driver wating for the auto-negotiation to + * complete. This happens with a specific chip id + * only and when the 1000baseSX-FDX is the only + * mode. Workaround this issue since it's unlikely + * to be ever addressed. + */ + printf("auto-neg workaround, "); + bsc->serdes_flags |= BRGPHY_NOANWAIT; } } @@ -544,7 +575,8 @@ brgphy_status(struct mii_softc *sc) /* Autoneg is still in progress. */ if ((bmcr & BRGPHY_BMCR_AUTOEN) && - (bmsr & BRGPHY_BMSR_ACOMP) == 0) { + (bmsr & BRGPHY_BMSR_ACOMP) == 0 && + (bsc->serdes_flags & BRGPHY_NOANWAIT) == 0) { /* Erg, still trying, I guess... */ mii->mii_media_active |= IFM_NONE; goto brgphy_status_exit; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Author: sobomax Date: Fri Mar 26 00:05:42 2010 New Revision: 205658 URL: http://svn.freebsd.org/changeset/base/205658 Log: MFC: workaround no-carrier issue on IBM HS21. PR: 118238 Modified: stable/7/sys/dev/mii/brgphy.c Directory Properties: stable/7/sys/dev/mii/ (props changed) Modified: stable/7/sys/dev/mii/brgphy.c ============================================================================== --- stable/7/sys/dev/mii/brgphy.c Thu Mar 25 23:38:10 2010 (r205657) +++ stable/7/sys/dev/mii/brgphy.c Fri Mar 26 00:05:42 2010 (r205658) @@ -72,8 +72,9 @@ struct brgphy_softc { int mii_model; int mii_rev; int serdes_flags; /* Keeps track of the serdes type used */ -#define BRGPHY_5706S 0x0001 -#define BRGPHY_5708S 0x0002 +#define BRGPHY_5706S 0x0001 +#define BRGPHY_5708S 0x0002 +#define BRGPHY_NOANWAIT 0x0004 int bce_phy_flags; /* PHY flags transferred from the MAC driver */ }; @@ -142,6 +143,23 @@ static const struct mii_phydesc brgphys[ MII_PHY_END }; +#define HS21_PRODUCT_ID "IBM eServer BladeCenter HS21" +#define HS21_BCM_CHIPID 0x57081021 + +static int +detect_hs21(struct bce_softc *bce_sc) +{ + char *sysenv; + + if (bce_sc->bce_chipid != HS21_BCM_CHIPID) + return (0); + sysenv = getenv("smbios.system.product"); + if (sysenv == NULL) + return (0); + if (strncmp(sysenv, HS21_PRODUCT_ID, strlen(HS21_PRODUCT_ID)) != 0) + return (0); + return (1); +} /* Search for our PHY in the list of known PHYs */ static int @@ -291,6 +309,19 @@ brgphy_attach(device_t dev) if (bce_sc && (bce_sc->bce_phy_flags & BCE_PHY_2_5G_CAPABLE_FLAG)) { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_2500_SX, IFM_FDX, sc->mii_inst), 0); printf("2500baseSX-FDX, "); + } else if ((bsc->serdes_flags & BRGPHY_5708S) && bce_sc && + (detect_hs21(bce_sc) != 0)) { + /* + * There appears to be certain silicon revision + * in IBM HS21 blades that is having issues with + * this driver wating for the auto-negotiation to + * complete. This happens with a specific chip id + * only and when the 1000baseSX-FDX is the only + * mode. Workaround this issue since it's unlikely + * to be ever addressed. + */ + printf("auto-neg workaround, "); + bsc->serdes_flags |= BRGPHY_NOANWAIT; } } @@ -532,7 +563,8 @@ brgphy_status(struct mii_softc *sc) /* Autoneg is still in progress. */ if ((bmcr & BRGPHY_BMCR_AUTOEN) && - (bmsr & BRGPHY_BMSR_ACOMP) == 0) { + (bmsr & BRGPHY_BMSR_ACOMP) == 0 && + (bsc->serdes_flags & BRGPHY_NOANWAIT) == 0) { /* Erg, still trying, I guess... */ mii->mii_media_active |= IFM_NONE; goto brgphy_status_exit; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Responsible Changed From-To: freebsd-net->yongar
Responsible Changed From-To: yongar->yongari Over to expert.
State Changed From-To: analyzed->feedback Is it still issue on FreeBSD 8.1-RELEASE? There was a attempt to fix the issue(r204941) and it was included to 8.1-RELEASE. If you still see the same issue please let me know. I have other patch to try.
State Changed From-To: feedback->closed Submitter confirms recent FreeBSD release works without problems. Thanks for reporting and testing.
I am having this same issue on FreeBSD 10.1 on an IBM blade. It seems my HS21 blade has a slightly different Broadcom chip. The chip id is different on my blade so the work around in this patch doesn't work for me. Changing HS21_BCM_CHIPID to 0x57081011 fixes the issue for me but would of course break it for others. # diff -c brgphy.c.orig brgphy.c 162c162 < #define HS21_BCM_CHIPID 0x57081021 --- > #define HS21_BCM_CHIPID 0x57081011 bce0: ASIC (0x57081011); Rev (B1); Bus (PCI-X, 64-bit, 133MHz); B/C (3.4.4); Bufs (RX:2;TX:2;PG:8); Flags (SPLT|MSI) smbios.system.product="IBM eServer BladeCenter HS21 -[8853PAU]-"
Created attachment 155828 [details] HS21 detection improvement Could you try attached patch?
(In reply to Pyun YongHyeon from comment #18) I had to modify the patch. It was looking for kern_getenv and my file had getenv so the patch wouldn't apply. Otherwise it looks good. Kernel is built and I have network access :) bce0: <QLogic NetXtreme II BCM5708 1000Base-SX (B1)> mem 0xda000000-0xdbffffff irq 17 at device 0.0 on pci4 miibus0: <MII bus> on bce0 brgphy0: <BCM5708S 1000/2500baseSX PHY> PHY 2 on miibus0 brgphy0: 1000baseSX-FDX, auto-neg workaround, auto bce0: Ethernet address: 00:14:5e:d0:56:9c bce0: ASIC (0x57081011); Rev (B1); Bus (PCI-X, 64-bit, 133MHz); B/C (3.4.4); Bufs (RX:2;TX:2;PG:8); Flags (SPLT|MSI) bce0: bce_pulse(): Warning: bootcode thinks driver is absent! (bc_state = 0x00000006) bce0: Gigabit link up!
A commit references this bug: Author: yongari Date: Thu Apr 23 01:39:28 UTC 2015 New revision: 281877 URL: https://svnweb.freebsd.org/changeset/base/281877 Log: Add another variant of BCM5708S controller to IBM HS21 workaround list. PR: 118238 MFC after: 2 weeks Changes: head/sys/dev/mii/brgphy.c
Committed in r281877. Will MFC after 2 weeks. Thanks for testing!
A commit references this bug: Author: yongari Date: Thu May 14 05:10:43 UTC 2015 New revision: 282878 URL: https://svnweb.freebsd.org/changeset/base/282878 Log: MFC r281877: Add another variant of BCM5708S controller to IBM HS21 workaround list. PR: 118238 Changes: _U stable/10/ stable/10/sys/dev/mii/brgphy.c
A commit references this bug: Author: yongari Date: Thu May 14 05:19:30 UTC 2015 New revision: 282879 URL: https://svnweb.freebsd.org/changeset/base/282879 Log: MFC r281877: Add another variant of BCM5708S controller to IBM HS21 workaround list. PR: 118238 Changes: _U stable/9/sys/ stable/9/sys/dev/mii/brgphy.c