From owner-freebsd-current@FreeBSD.ORG Tue Jan 19 18:15:24 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 F0E67106566C for ; Tue, 19 Jan 2010 18:15:24 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id A15588FC15 for ; Tue, 19 Jan 2010 18:15:24 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 5so952450qwd.7 for ; Tue, 19 Jan 2010 10:15:23 -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=UFThy//xpuHRSFNUGElwefLPuhbVbQ68LJXYQCkfVeI=; b=MUBWDvpTwfBOwJ1DKj23VrHtOdjKk4IPxkaFTc2XtJ9UMKOEwPUTxL+diu5lsiEwpD N3hvpzr2kwSm2uyfQtokSZwKKVC3BijvSmpdJbRsom+VrRtbOh7IQVYxFhnq+P59M3wD 1uwJzTWYqD2R8K8fHTV7gFkbYkQD/HNnBxvGQ= 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=S0ycuHDw9NIYNXaDIuVwH+gdVCHYt8QYD2MKsC5XC0i3Z5d5LIdhhrnKWu6j5vPxbq 13EcesJe9Bewi+hC5ajlv1GzXG8zkEuAr0JoGwreXtdTQdo8sDIAoO0VlKu6YNcBCmsF T+7BklxU9e4Ix3lmT9xehpC0W9nskldtuyARc= Received: by 10.229.106.156 with SMTP id x28mr2290139qco.44.1263924923690; Tue, 19 Jan 2010 10:15:23 -0800 (PST) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 22sm6259580qyk.2.2010.01.19.10.15.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 19 Jan 2010 10:15:21 -0800 (PST) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 19 Jan 2010 10:15:18 -0800 From: Pyun YongHyeon Date: Tue, 19 Jan 2010 10:15:18 -0800 To: Oliver Fromme Message-ID: <20100119181518.GA6201@michelle.cdnetworks.com> References: <20100118202805.GB1336@michelle.cdnetworks.com> <201001191311.o0JDBnT0045509@lurza.secnetix.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <201001191311.o0JDBnT0045509@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: Tue, 19 Jan 2010 18:15:25 -0000 --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jan 19, 2010 at 02:11:49PM +0100, Oliver Fromme wrote: > Ok, I've got more information. Maybe this is helpful. > I enabled BCE_DEBUG and set bce_debug = BCE_INSANE_PHY. > At first I got a compile error and had to apply this patch: > > --- src/sys/dev/bce/if_bce.c.orig 2009-10-21 14:47:09.000000000 +0200 > +++ src/sys/dev/bce/if_bce.c 2010-01-19 13:13:36.000000000 +0100 > @@ -10038,9 +10045,9 @@ > BCE_PRINTF("0x%08X - (0x%06X) state\n", > val, BCE_BC_STATE); > > - val = bce_shmem_rd(sc, BCE_BC_CONDITION); > + val = bce_shmem_rd(sc, BCE_BC_STATE_CONDITION); > BCE_PRINTF("0x%08X - (0x%06X) condition\n", > - val, BCE_BC_CONDITION); > + val, BCE_BC_STATE_CONDITION); > > val = bce_shmem_rd(sc, BCE_BC_STATE_DEBUG_CMD); > BCE_PRINTF("0x%08X - (0x%06X) debug_cmd\n", > > Then I got this output during boot: > > 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: bce_get_media(enter) > bce0: Using PHY address 2. > bce0: bce_get_media(exit) > bce0: bce_dma_alloc(): status_block_paddr = 0xCE36480 > bce0: bce_dma_alloc(): stats_block_paddr = 0xCE21800 > bce0: bce_dma_alloc(): ctx_paddr[0] = 0xCE77000 > bce0: bce_dma_alloc(): ctx_paddr[1] = 0xCE37000 > bce0: bce_dma_alloc(): tx_bd_chain_paddr[0] = 0x7D9F8000 > bce0: bce_dma_alloc(): tx_bd_chain_paddr[1] = 0x7D9F9000 > bce0: bce_dma_alloc(): rx_bd_chain_paddr[0] = 0x7D9FA000 > bce0: bce_dma_alloc(): rx_bd_chain_paddr[1] = 0x7D9FB000 > bce0: bce_dma_alloc(): Creating rx_mbuf_tag (max size = 0x2400 max segments = 1, max segment size = 0x2400) > bce0: Invalid PHY address 0 for PHY read! > bce0: Invalid PHY address 1 for PHY read! > bce0: bce_miibus_read_reg(): phy = 2, reg = 0x0001 (BMSR ), val = 0x0 > bce0: Invalid PHY address 3 for PHY read! > bce0: Invalid PHY address 4 for PHY read! > bce0: Invalid PHY address 5 for PHY read! > bce0: Invalid PHY address 6 for PHY read! > bce0: Invalid PHY address 7 for PHY read! > bce0: Invalid PHY address 8 for PHY read! > bce0: Invalid PHY address 9 for PHY read! > bce0: Invalid PHY address 10 for PHY read! > bce0: Invalid PHY address 11 for PHY read! > bce0: Invalid PHY address 12 for PHY read! > bce0: Invalid PHY address 13 for PHY read! > bce0: Invalid PHY address 14 for PHY read! > bce0: Invalid PHY address 15 for PHY read! > bce0: Invalid PHY address 16 for PHY read! > bce0: Invalid PHY address 17 for PHY read! > bce0: Invalid PHY address 18 for PHY read! > bce0: Invalid PHY address 19 for PHY read! > bce0: Invalid PHY address 20 for PHY read! > bce0: Invalid PHY address 21 for PHY read! > bce0: Invalid PHY address 22 for PHY read! > bce0: Invalid PHY address 23 for PHY read! > bce0: Invalid PHY address 24 for PHY read! > bce0: Invalid PHY address 25 for PHY read! > bce0: Invalid PHY address 26 for PHY read! > bce0: Invalid PHY address 27 for PHY read! > bce0: Invalid PHY address 28 for PHY read! > bce0: Invalid PHY address 29 for PHY read! > bce0: Invalid PHY address 30 for PHY read! > bce0: Invalid PHY address 31 for PHY read! > bce0: /usr/src/sys/dev/bce/if_bce.c(1098): No PHY found on child MII bus! > bce0: bce_miibus_read_reg(): phy = 2, reg = 0x0002, val = 0x0000 > PHYID1: 0x0000 > bce0: bce_miibus_read_reg(): phy = 2, reg = 0x0003, val = 0x0000 > PHYID2: 0x0000 > device_attach: bce0 attach returned 6 Thanks for the detailed information. I vaguely guess bce(4) used wrong PHY address for controller. How about attached patch? The patch just reset the PHY address to 1, it's not correct way to set it but just wants to know whether brgphy(4) is attached to the PHY. --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bce.phyid.diff2" Index: sys/dev/bce/if_bce.c =================================================================== --- sys/dev/bce/if_bce.c (revision 202586) +++ sys/dev/bce/if_bce.c (working copy) @@ -1091,6 +1091,9 @@ ifp->if_baudrate = IF_Mbps(1000); /* Check for an MII child bus by probing the PHY. */ +#if 1 + sc->bce_phy_addr = 1; +#endif if (mii_phy_probe(dev, &sc->bce_miibus, bce_ifmedia_upd, bce_ifmedia_sts)) { BCE_PRINTF("%s(%d): No PHY found on child MII bus!\n", --0OAP2g/MAC+5xKAE--