From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6005 invoked by alias); 26 May 2004 22:11:19 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 5995 invoked from network); 26 May 2004 22:11:17 -0000 Received: from unknown (HELO hermes.chez-thomas.org) (63.225.98.241) by sourceware.org with SMTP; 26 May 2004 22:11:17 -0000 Received: by hermes.chez-thomas.org (Postfix, from userid 2000) id D045D10000B; Wed, 26 May 2004 16:11:15 -0600 (MDT) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by hermes.chez-thomas.org (Postfix) with ESMTP id 5F37E10000A; Wed, 26 May 2004 16:11:12 -0600 (MDT) From: Gary Thomas To: John Newlin Cc: ecos-discuss@sources.redhat.com In-Reply-To: <20040526145728.L37485@shell.rawbw.com> References: <20040519124843.G108@shell.rawbw.com> <1085605648.15478.262.camel@hermes> <1085605810.15478.265.camel@hermes> <20040526142711.B37485@shell.rawbw.com> <1085607010.15478.282.camel@hermes> <20040526145728.L37485@shell.rawbw.com> Content-Type: text/plain Organization: MLB Associates Message-Id: <1085609471.15478.287.camel@hermes> Mime-Version: 1.0 Date: Wed, 26 May 2004 22:38:00 -0000 Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on hermes.chez-thomas.org Subject: Re: [ECOS] devs/eth/phy/current/src/eth_phy.c X-SW-Source: 2004-05/txt/msg00339.txt.bz2 On Wed, 2004-05-26 at 16:08, John Newlin wrote: > > On Wed, 2004-05-26 at 15:28, John Newlin wrote: > > > > On Wed, 2004-05-26 at 15:07, Gary Thomas wrote: > > > > > On Wed, 2004-05-26 at 15:03, John Newlin wrote: > > > > > > I see there looks that there was some attempt at making a generic phy > > > > > > interface, but I don't see that it is used anywhere. Is this a work in > > > > > > progress, or is there an example of this in use in some other code? > > > > > > > > > > It *is* used - look at the rattler and MOAB packages. > > > > > > > > Also, look at the common ethernet drivers they use > > > > devs/eth/powerpc/{fec,fcc,ppc405} > > > > to see how the actual PHY interfaces work. > > > > > > > > > > Thanks Gary! > > > > No problem. Of course, I'm very interested in any feedback you have on > > these interfaces [since, so far, I'm the only one that has used them] > > One comment. _eth_phy_init walks through the 32 possible PHY addresses to > locate the PHY. For a chip with a single MAC interface this is fine. > The chip I am working with has more than 1 MAC, but a single MII > Management interface is used to configure multiple external PHYS. > > Maybe instead, have the driver that is supplying eth_phy_access_t, supply > a valid PHY address, and it would just look at that PHY address for the > PHY. Or it could pass a special value, like -1, to signify that the code > should scan for the PHY. > > Alternatively, if the function pointers supplied in eth_phy_access_t took, > eth_phy_access_t as the first parameters, you could stuff some extra data > at the end of that structure, and the called functions could do the > address check. > > Do you have another suggestion, surely there are other chips that have > multiple MAC interfaces. I thought powerquicc had more than 1 mac. Indeed, but multiple networks does not always imply more than one MII bus or vice-versa. I actually have already solved this by letting the device instance set the PHY address if it knows it (which is normally the case). The changes just haven't made it into the public tree yet. -- Gary Thomas MLB Associates -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss