Date: Wed, 27 Dec 2006 23:04:09 GMT From: Mike Hibler<mike@flux.utah.edu> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/107257: [bge] unrecognized Broadcom PHY causes panic from bge driver Message-ID: <200612272304.kBRN486A052465@www.freebsd.org> Resent-Message-ID: <200612272310.kBRNABtS095954@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 107257 >Category: kern >Synopsis: [bge] unrecognized Broadcom PHY causes panic from bge driver >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Dec 27 23:10:11 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Mike Hibler >Release: FreeBSD 7.0-CURRENT >Organization: University of Utah, Flux research group >Environment: FreeBSD node.newimage-ii.emulab-ops.emulab.net 7.0-CURRENT FreeBSD 7.0-CURRENT #8: Wed Dec 27 13:20:11 MST 2006 root@pc194.oddball.emulab-ops.emulab.net:/mnt/obj/usr/src/sys/TESTBED i386 >Description: Booting FreeBSD current on a Dell PowerEdge SC440 with a builtin Broadcom 5754 NIC causes a panic when dhclient runs: ---- Emulab looking for control net among: bge0 fxp0 ... fxp0: link state changed to UP panic: invalid ife->ifm_data (0xa) in mii_phy_setmedia cpuid = 1 KDB: enter: panic [thread pid 182 tid 100089 ] Stopped at kdb_enter+0x2b: nop db> bt Tracing pid 182 tid 100089 td 0xc513fbd0 kdb_enter(c071d290) at kdb_enter+0x2b panic(c070a3a2,a,974f42d3,18,95e1f439,...) at panic+0x127 mii_phy_setmedia(c4dc1740) at mii_phy_setmedia+0x83 ukphy_service(c4dc1740,c4dc4140,2) at ukphy_service+0xfd mii_mediachg(c4dc4140,8803,c4dc4140,c4dc8400,c4dcb000,...) at mii_mediachg+0x27 bge_stop(c4dcb000,c4dcb000,c4dcb008,0,e7877904,...) at bge_stop+0x58b bge_init_locked(c4dcb000,c4dcb008,0,c0707af3,dee,...) at bge_init_locked+0x36 bge_init(c4dcb000) at bge_init+0x23 ether_ioctl(c4dc8400,8020690c,c4eab400,0,1,...) at ether_ioctl+0x64 bge_ioctl(c4dc8400,8020690c,c4eab400,0,20000,...) at bge_ioctl+0x262 in6_ifinit(c4dc8400,c4eab400,e7877aa0,1,2,...) at in6_ifinit+0x8c in6_update_ifa(c4dc8400,e7877a90,0,1) at in6_update_ifa+0x4de in6_ifattach_linklocal(c4dc8400,0) at in6_ifattach_linklocal+0xf7 in6_ifattach(c4dc8400,0,0,0,e7877b74,...) at in6_ifattach+0xc3 in6_if_up(c4dc8400,c4dc8400,80206910,c505e800,0,...) at in6_if_up+0x4b if_route(c4dc8400,1,0,e7877bcc,c05d4048,...) at if_route+0x69 if_up(c4dc8400) at if_up+0xf ifhwioctl(80206910,c4dc8400,c505e800,c513fbd0) at ifhwioctl+0x2f8 ifioctl(c51423e4,80206910,c505e800,c513fbd0,0,...) at ifioctl+0x101 soo_ioctl(c50906c0,80206910,c505e800,c4ce3a80,c513fbd0) at soo_ioctl+0x2db kern_ioctl(c513fbd0,4,80206910,c505e800) at kern_ioctl+0x296 ioctl(c513fbd0,e7877d00) at ioctl+0xf1 syscall(e7877d38) at syscall+0x256 Xint0x80_syscall() at Xint0x80_syscall+0x20 --- syscall (0, FreeBSD ELF32, nosys), eip = 0x2, esp = 0x247, ebp = 0x1 --- ---- Boot time messages reveal that the PHY is not recognized by the Broadcom code: ---- bge0: <Broadcom NetXtreme Gigabit Ethernet Controller, ASIC rev. 0xb002> mem 0xe fcf0000-0xefcfffff irq 17 at device 0.0 on pci4 miibus0: <MII bus> on bge0 ukphy0: <Generic IEEE 802.3u media interface> on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FD X, auto bge0: Ethernet address: 00:13:72:2f:2a:2d ---- Is it necessary that it be specifically recognized? Apparently, see below. This is possibly related to kern/105005, but there are deeper problems with this NIC and the 6.x driver. >How-To-Repeat: Try to run dhclient on an SC440! >Fix: Add ID(s) for the PHY (from OpenBSD) and no panic and the interface works fine. Diff: ---- cvs diff: Diffing . Index: brgphy.c =================================================================== RCS file: /share/freebsd/CVS/src/sys/dev/mii/brgphy.c,v retrieving revision 1.52 diff -u -r1.52 brgphy.c --- brgphy.c 20 Dec 2006 00:34:12 -0000 1.52 +++ brgphy.c 27 Dec 2006 18:41:21 -0000 @@ -112,6 +112,7 @@ MII_PHY_DESC(xxBROADCOM, BCM5752), MII_PHY_DESC(xxBROADCOM, BCM5754), MII_PHY_DESC(xxBROADCOM, BCM5780), + MII_PHY_DESC(xxBROADCOM2, BCM5787), MII_PHY_END }; Index: miidevs =================================================================== RCS file: /share/freebsd/CVS/src/sys/dev/mii/miidevs,v retrieving revision 1.37 diff -u -r1.37 miidevs --- miidevs 11 Dec 2006 10:42:04 -0000 1.37 +++ miidevs 27 Dec 2006 18:42:13 -0000 @@ -93,6 +93,7 @@ /* Don't know what's going on here. */ oui xxDAVICOM 0x006040 Davicom Semiconductor +oui xxBROADCOM2 0x0050ef Broadcom Corporation /* This is the OUI of the gigE PHY in the RealTek 8169S/8110S chips */ oui xxREALTEK 0x000732 @@ -131,6 +132,7 @@ model xxBROADCOM BCM5780 0x0035 BCM5780 10/100/1000baseTX PHY model xxBROADCOM BCM5706C 0x0015 BCM5706C 10/100/1000baseTX PHY model xxBROADCOM BCM5708C 0x0036 BCM5708C 10/100/1000baseTX PHY +model xxBROADCOM2 BCM5787 0x000e BCM5787 10/100/1000baseT PHY /* Cicada Semiconductor PHYs (now owned by Vitesse?) */ model CICADA CS8201 0x0001 Cicada CS8201 10/100/1000TX PHY >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612272304.kBRN486A052465>