From owner-freebsd-current@FreeBSD.ORG Tue Sep 5 23:36:24 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 012C016A4DA; Tue, 5 Sep 2006 23:36:24 +0000 (UTC) (envelope-from davidch@broadcom.com) Received: from mms1.broadcom.com (mms1.broadcom.com [216.31.210.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39BE743D49; Tue, 5 Sep 2006 23:36:23 +0000 (GMT) (envelope-from davidch@broadcom.com) Received: from 10.10.64.154 by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.2.0)); Tue, 05 Sep 2006 16:35:44 -0700 X-Server-Uuid: F962EFE0-448C-40EE-8100-87DF498ED0EA Received: by mail-irva-10.broadcom.com (Postfix, from userid 47) id EDC7A2B0; Tue, 5 Sep 2006 16:35:43 -0700 (PDT) Received: from mail-irva-8.broadcom.com (mail-irva-8 [10.10.64.221]) by mail-irva-10.broadcom.com (Postfix) with ESMTP id C7CF92AE; Tue, 5 Sep 2006 16:35:43 -0700 (PDT) Received: from mail-irva-12.broadcom.com (mail-irva-12.broadcom.com [10.10.64.146]) by mail-irva-8.broadcom.com (MOS 3.7.5a-GA) with ESMTP id EEL02490; Tue, 5 Sep 2006 16:35:42 -0700 (PDT) Received: from NT-IRVA-0750.brcm.ad.broadcom.com (nt-irva-0750 [10.8.194.64]) by mail-irva-12.broadcom.com (Postfix) with ESMTP id 8700F69CA5; Tue, 5 Sep 2006 16:35:42 -0700 (PDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Tue, 5 Sep 2006 16:35:41 -0700 Message-ID: <09BFF2FA5EAB4A45B6655E151BBDD90301F1257E@NT-IRVA-0750.brcm.ad.broadcom.com> In-Reply-To: <20060902185124.GB59963@zaphod.nitro.dk> Thread-Topic: bge(4) on BCM 5752 A02 panic due to media autoselect Thread-Index: AcbOwNInBi8+8p1XTq+dcz0hWQVWjQCgPNyg From: "David Christensen" To: "Simon L. Nielsen" X-TMWD-Spam-Summary: SEV=1.1; DFV=A2006090509; IFV=2.0.6,4.0-7; RPD=4.00.0004; RPDID=303030312E30413031303230332E34344645303835392E303031332D412D; ENG=IBF; TS=20060905233545; CAT=NONE; CON=NONE; X-MMS-Spam-Filter-ID: A2006090509_4.00.0004_2.0.6,4.0-7 X-WSS-ID: 68E0D65A3CC4718476-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: LI Xin , freebsd-current@freebsd.org, Oleg Bulyzhin Subject: RE: bge(4) on BCM 5752 A02 panic due to media autoselect X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 23:36:24 -0000 > > Today Simon L. Nielsen (simon@freebsd.org) reported=20 > breakage of bcm5703: > >=20 > > bge0: mem=20 > 0xfe000000-0xfe00ffff irq 27 a > > t device 3.0 on pci2 > > miibus0: on bge0 > > brgphy0: on miibus0 > > brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,=20 > 1000baseTX, 1000baseTX > > -FDX, auto > > bge0: Ethernet address: 00:50:45:00:aa:a2 > > bge1: mem=20 > 0xfe010000-0xfe01ffff irq 27 a > > t device 4.0 on pci2 > > miibus1: on bge1 > > brgphy1: on miibus1 > > brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX,=20 > 1000baseTX, 1000baseTX > > -FDX, auto > > bge1: Ethernet address: 00:50:45:00:aa:a3 > >=20 > > bge0@pci2:3:0: class=3D0x020000 card=3D0x000c14e4=20 > chip=3D0x16a614e4 rev=3D0x02 hdr=3D0x00 > > vendor =3D 'Broadcom Corporation' > > device =3D 'BCM5702X NetXtreme Gigabit Ethernet' > > class =3D network > > subclass =3D ethernet > > bge1@pci2:4:0: class=3D0x020000 card=3D0x000c14e4=20 > chip=3D0x16a614e4 rev=3D0x02 hdr=3D0x00 > > vendor =3D 'Broadcom Corporation' > > device =3D 'BCM5702X NetXtreme Gigabit Ethernet' > > class =3D network > > subclass =3D ethernet The controller reported is not consistent, it is labeled as both a 5702 and 5703 controller in the messages above. It looks like there is an invalid assumption in the routine bge_lookup_rev(). This=20 routine assumes that each chip version will have a unique ASIC ID which is incorrect. Sadly, the 5702 and 5703 share the same ASIC IDs so an additional test for the PCI device ID needs to be added to discriminate between the two. The ASIC IDs for the 5702 are as follows: #define BGE_CHIPID_BCM5702_A0 0x10000000 #define BGE_CHIPID_BCM5702_A1 0x10010000 #define BGE_CHIPID_BCM5702_A2 0x10020000 { BGE_CHIPID_BCM5702_A0, "BCM5702 A0" }, { BGE_CHIPID_BCM5702_A1, "BCM5702 A1" }, { BGE_CHIPID_BCM5702_A2, "BCM5702 A2" } Your controller is actually a BCM5702 based on the PCI device ID. > >=20 > > Driver fails to start with diagnostic: > > bge0: RX CPU self-diagnostics failed! >=20 > As a followup, I tried backing out only the latest bge(4) changes and > now the system (sledge.freebsd.org) works again. Basically the system > responded to ICMP ping, but it seemed all other network trafic didn't > work, at least NFS mounts, NTP etc. failed at boot and ssh to the > system didn't work. >=20 > It now works with: >=20 > $FreeBSD: src/sys/dev/bge/if_bge.c,v 1.140 2006/08/24=20 > 14:41:16 oleg Exp $ > $FreeBSD: src/sys/dev/bge/if_bgereg.h,v 1.52 2006/08/23=20 > 11:32:54 glebius Exp $ >=20 > I can test patches if needed. I tested with a 5702 A1 card and the v1.141 version still worked for me. Are you using a NIC card or is this a LOM? If the latter, what system is the LOM built into? This error message indicates that the controller was unable to read and load firmware from the NVRAM which is usually a real error (unless the system was designed to operate=20 without NVRAM which is generally only a few Sun systems). Dave