From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rwcrmhc14.comcast.net (rwcrmhc14.comcast.net [216.148.227.154]) by ozlabs.org (Postfix) with ESMTP id C7CD967B6B for ; Tue, 25 Jul 2006 14:10:18 +1000 (EST) Message-ID: <44C59875.4000309@dlasys.net> Date: Tue, 25 Jul 2006 00:05:09 -0400 From: "David H. Lynch Jr." MIME-Version: 1.0 To: Vitaly Bordug Subject: Re: PHY Howto ? References: <44BFC2EF.5020305@dlasys.net> <20060720220136.29326857@vitb.ru.mvista.com> In-Reply-To: <20060720220136.29326857@vitb.ru.mvista.com> Content-Type: multipart/alternative; boundary="------------070103010502070109020002" Cc: linuxppc-embedded@ozlabs.org Reply-To: dhlii@comcast.net List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. --------------070103010502070109020002 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Vitaly Bordug wrote: > On Thu, 20 Jul 2006 13:52:47 -0400 > "David H. Lynch Jr." wrote: > > >> If I am writing a network MAC driver, for hardware that has a phy >> that is already supported, if I provide the appropriate mdio_read() and >> mdio_write() calls to access the phy registers, and setup my config to >> include phylib and drivers for my specific phy, what else do I have to >> take care of with respect to the phy within my driver ? >> >> Are there some resources, howto's, examples, ... demonstrating >> how to use phylib ? >> > There is pretty good writeup in Documentation about your concern, find it at > Documentation/networking/phy.txt . Live example is obviously drivers/net/gianfar* > > > Thanks that proved useful. I am already using gianfar as a reference - but it is not a NIC I am familiar with. And I still have some questions: What is the distinction/interaction between phylib and MII support ? Are they independent ways of doing something similar ? Or do they work together. To get MII working I need to provide/populate an mii_if_info structure and supply register read/write routines. Since communicating with the PHY is MAC dependent shouldn't I need to do the same for PHYLIB ? As I understand it although PHY's are similar, and the same PHY may be used on different NIC's Communications to the PHY typically go through the NIC. So my Network driver has to provide routines to read/write the registers of the PHY, which phylib and the phy driver then use. -- Dave Lynch DLA Systems Software Development: Embedded Linux 717.627.3770 dhlii@dlasys.net http://www.dlasys.net fax: 1.253.369.9244 Cell: 1.717.587.7774 Over 25 years' experience in platforms, languages, and technologies too numerous to list. "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." Albert Einstein --------------070103010502070109020002 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Vitaly Bordug wrote:
On Thu, 20 Jul 2006 13:52:47 -0400
"David H. Lynch Jr." <dhlii@dlasys.net> wrote:

  
 If I am writing a network MAC driver, for hardware that has a phy
that is already supported, if I provide the appropriate mdio_read() and
mdio_write() calls to access the phy registers, and setup my config to
include phylib and drivers for my specific phy,  what else do I have to
take care of with respect to the phy within my driver ?
	
	Are there some resources, howto's, examples, ... demonstrating 
how to use phylib ?
    
There is pretty good writeup in Documentation about your concern, find it at 
Documentation/networking/phy.txt . Live example is obviously drivers/net/gianfar*


  
    Thanks that proved useful. I am already using gianfar as a reference - but it is not a NIC I am familiar with.
    And I still have some questions:

          What is the distinction/interaction between phylib and MII support ?
   
          Are they independent ways of doing something similar ? Or do they work together.

          To get MII working I need to provide/populate  an mii_if_info structure and supply register read/write routines.
   
          Since communicating with the PHY is MAC dependent shouldn't I need to do the same for PHYLIB ?

  
         
   
          


          As I understand it although PHY's are similar, and the same PHY may be used on different NIC's
          Communications to the PHY typically go through the NIC.
          So my Network driver has to provide routines to read/write the registers of the PHY, which phylib and the phy driver then use.

      

   


-- 
Dave Lynch 					  	    DLA Systems
Software Development:  				         Embedded Linux
717.627.3770 	       dhlii@dlasys.net 	  http://www.dlasys.net
fax: 1.253.369.9244 			           Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.

"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
--------------070103010502070109020002--