From owner-freebsd-net@FreeBSD.ORG Wed Oct 15 01:47:58 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5310C106568F for ; Wed, 15 Oct 2008 01:47:58 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: from mail-gx0-f16.google.com (mail-gx0-f16.google.com [209.85.217.16]) by mx1.freebsd.org (Postfix) with ESMTP id E871A8FC26 for ; Wed, 15 Oct 2008 01:47:57 +0000 (UTC) (envelope-from sepherosa@gmail.com) Received: by gxk9 with SMTP id 9so5272284gxk.19 for ; Tue, 14 Oct 2008 18:47:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=z0Zd3M79KJjPv1D9U/xRu39aN/UO5aKf63ZO8AvVVs0=; b=RyFx5/KlHnUkwTLP/wLlSFLn5TC9U3AxtgiE5ZFbtxTG6AtpDWMnry8JTDBGf8G4PX MfDKsrdfkdyJvdXjetNwxrxr7R87HiO0ST5w/iFSOFQ+B8KfiKf8Oi55B1isujFZmBDI me/zqLcjjCVbEGetit4si2SbIGMuyjelgjiHg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=XoR1qwVuPpzLEB5vyTmKu64Nk6nYIzFI6BGpGS4XTKOY/EKRcnq/CneFqjUBczinVd U5K5RH0pA8GDU0aCmdhi4pnrWyUyeWix2z9IfLK/PKiaLy2M8pyHJA4obzkvRMJOyi8S jEMZUJ/WkyFA5g9VeLG4eoTjuFbbehcSDEmdA= Received: by 10.150.220.19 with SMTP id s19mr884579ybg.101.1224035276802; Tue, 14 Oct 2008 18:47:56 -0700 (PDT) Received: by 10.150.191.3 with HTTP; Tue, 14 Oct 2008 18:47:56 -0700 (PDT) Message-ID: Date: Wed, 15 Oct 2008 09:47:56 +0800 From: "Sepherosa Ziehau" To: "Bruce M. Simpson" In-Reply-To: <48F067EF.7010901@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48EBB3D6.600@incunabulum.net> <48F067EF.7010901@FreeBSD.org> Cc: "freebsd-net@freebsd.org" Subject: Re: How to support an Ethernet PHY without ID registers? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Oct 2008 01:47:58 -0000 On Sat, Oct 11, 2008 at 4:46 PM, Bruce M. Simpson wrote: > Sepherosa Ziehau wrote: >> >> Are you sure you could read from BMSR? Return invalid value from BMSR >> is the usual cause of miibus attaching/probing failure. For ID1/ID2 >> reading, you could just fake some values in npe(4)'s miibus_readreg >> implementation. >> > > Thanks for the tip (from you and Pyun). I had to spoof the BMSR read to get > npe(4) to attach just to begin with. For whatever reason the chip doesn't > seem to respond on any of the PHY IDs which the Linux folk are using (5 and > 4 for npe0 (-B) and npe1 (-C) respectively). > > I noticed the ucLinux folk needed a similar patch to force driver attach > under Linux w/the IXP: > http://mailman.uclinux.org/pipermail/uclinux-dev/2005-March/031419.html > > The switch pretty much disappears after npe(4) attaches, I don't see any > activity lights or link lights at that point. This seems to happen after any > mii register access. > > If I frob things to allow rlswitch to attach, by using hints and hacking > if_npe.c, I can get dumps of the PHY register space, but it's all ones, > suggesting that it failed at xScale register level -- that would suggest the > PHY IDs are *wrong*, or something else isn't right. > > Pyun also suggested trying to manually take the PHYs out of power-down mode. > I tried that with a code snippet I sent him, but still no dice. I can't even > be sure that the PHYs are being addressed right. Realtek's 8211[BC] PHY has a "page selector" register (0x1f), BMSR and other GMII standard registers are in page0. Does the PHY you are working with has something like the "page selector"? Best Regards, sephe -- Live Free or Die