From owner-freebsd-current@FreeBSD.ORG Mon Jan 18 20:28:13 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EB4E1065672 for ; Mon, 18 Jan 2010 20:28:13 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id D2EE18FC14 for ; Mon, 18 Jan 2010 20:28:12 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so721510qwd.7 for ; Mon, 18 Jan 2010 12:28:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=mnwzJ3UOXD54plzrIGiIyxER3YXScvK8svY75V4HqQ4=; b=EfADXXihSXSdVXtYnW4XRNcrcMWxhK9B03LqHblzEQWK9BymYrvlKlz59apCsL4aCx 9Or7o2H4ZQWdOZLwihVhDD0CTbn+z6ara9SPVuT5yLbD3IMY8yYipqsxHFl0hW+7NTKB NyA6LJohOmoO/mGn5Vizv87rLMZ+g3tXpaK8I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=lzujMZXtTb/Iyf4g1c0KIUgKlSlVKSp7xejyox3k4uVv62Uj590u4iQANjo6gWcUrm C73whRJBLuE3S4Af04OpWjqo6N2xpWedh0mMkYQQHUXHZx6fpXQS7OYjTeffFxt3B8xW kfY5rBND5Bh9j2g9zKICLT2xFabSRJ+Cyyd94= Received: by 10.224.71.233 with SMTP id i41mr4736875qaj.89.1263846491930; Mon, 18 Jan 2010 12:28:11 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 23sm5397851qyk.7.2010.01.18.12.28.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 18 Jan 2010 12:28:11 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 18 Jan 2010 12:28:05 -0800 From: Pyun YongHyeon Date: Mon, 18 Jan 2010 12:28:05 -0800 To: Oliver Fromme Message-ID: <20100118202805.GB1336@michelle.cdnetworks.com> References: <201001182014.o0IKEd8A004207@lurza.secnetix.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="QTprm0S8XgL7H0Dt" Content-Disposition: inline In-Reply-To: <201001182014.o0IKEd8A004207@lurza.secnetix.de> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@FreeBSD.ORG Subject: Re: bce(4) on IBM BladeCenter HS22 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jan 2010 20:28:13 -0000 --QTprm0S8XgL7H0Dt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jan 18, 2010 at 09:14:39PM +0100, Oliver Fromme wrote: > Pyun YongHyeon wrote: > > Ok, now let's open new thread for bce(4) issues. > > Ok, it took a little longer because I re-installed one of the > blades with 9-current as of today. > > Again, these are "HS22" blades installed in an IBM BladeCenter. > There are two bce(4) interfaces that don't attach correctly. > The problem seems to be the same as in PRs kern/136417 and > kern/139761 (which are duplicates of each other). > > Here's the excerpt from dmesg (verbose kernel): > > bce0: mem 0x92000000-0x93ffffff irq 30 at device 0.0 on pci16 > bce0: attempting to allocate 1 MSI vectors (16 supported) > msi: routing MSI IRQ 260 to local APIC 0 vector 112 > bce0: using IRQ 260 for MSI > bce0: /usr/src/sys/dev/bce/if_bce.c(1097): No PHY found on child MII bus! > device_attach: bce0 attach returned 6 > bce1: mem 0x94000000-0x95ffffff irq 37 at device 0.1 on pci16 > bce1: attempting to allocate 1 MSI vectors (16 supported) > msi: routing MSI IRQ 260 to local APIC 0 vector 112 > bce1: using IRQ 260 for MSI > bce1: /usr/src/sys/dev/bce/if_bce.c(1097): No PHY found on child MII bus! > device_attach: bce1 attach returned 6 > > Attaching the driver fails, so ifconfig doesn't list anything. > The ports are fiber, i.e. they should appear as 1000baseSX. > > This is what pciconf -lcv says: > > bce0@pci0:16:0:0: class=0x020000 card=0x03701014 chip=0x163a14e4 rev=0x20 hdr=0x00 > vendor = 'Broadcom Corporation' > device = 'NetXtreme II BCM5709S Gigabit Ethernet' > class = network > subclass = ethernet > cap 01[48] = powerspec 3 supports D0 D3 current D0 > cap 03[50] = VPD > cap 05[58] = MSI supports 16 messages, 64 bit > cap 11[a0] = MSI-X supports 9 messages in map 0x10 > cap 10[ac] = PCI-Express 2 endpoint max data 256(512) link x4(x4) > bce1@pci0:16:0:1: class=0x020000 card=0x03701014 chip=0x163a14e4 rev=0x20 hdr=0x00 > vendor = 'Broadcom Corporation' > device = 'NetXtreme II BCM5709S Gigabit Ethernet' > class = network > subclass = ethernet > cap 01[48] = powerspec 3 supports D0 D3 current D0 > cap 03[50] = VPD > cap 05[58] = MSI supports 16 messages, 64 bit > cap 11[a0] = MSI-X supports 9 messages in map 0x10 > cap 10[ac] = PCI-Express 2 endpoint max data 256(512) link x4(x4) > > And the relevant parts from devinfo -rv: > > pcib6 pnpinfo vendor=0x8086 device=0x340e subvendor=0x1014 subdevice=0x340e class=0x060400 at slot=7 function=0 handle=\_SB_.PCI0.ETH1 > pci16 > bce0 pnpinfo vendor=0x14e4 device=0x163a subvendor=0x1014 subdevice=0x0370 class=0x020000 at slot=0 function=0 > I/O memory addresses: > 0x92000000-0x93ffffff > bce1 pnpinfo vendor=0x14e4 device=0x163a subvendor=0x1014 subdevice=0x0370 class=0x020000 at slot=0 function=1 > Interrupt request lines: > 260 > I/O memory addresses: > 0x94000000-0x95ffffff > > If you need more information, or want me to test any patches, > please let me know. > Ok, it seems brgphy(4) does not know the PHY. Let's see what PHY you have. Please apply attached patch and let me know the output of the patch. It will show PHYID1 and PHYID2 value. --QTprm0S8XgL7H0Dt Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="bce.phyid.diff" Index: sys/dev/bce/if_bce.c =================================================================== --- sys/dev/bce/if_bce.c (revision 202586) +++ sys/dev/bce/if_bce.c (working copy) @@ -1095,6 +1095,12 @@ bce_ifmedia_sts)) { BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", __FILE__, __LINE__); +#if 1 + printf("PHYID1: 0x%04x\n", bce_miibus_read_reg(dev, + sc->bce_phy_addr, MII_PHYIDR1)); + printf("PHYID2: 0x%04x\n", bce_miibus_read_reg(dev, + sc->bce_phy_addr, MII_PHYIDR2)); +#endif rc = ENXIO; goto bce_attach_fail; } --QTprm0S8XgL7H0Dt--