| To: | James Chapman <jchapman@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: RFC: PHY Abstraction Layer II |
| From: | Andy Fleming <afleming@xxxxxxxxxxxxx> |
| Date: | Mon, 14 Mar 2005 18:41:10 -0600 |
| Cc: | netdev@xxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>, linuxppc-embedded@xxxxxxxxxx, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> |
| In-reply-to: | <4230D1AC.5070506@katalix.com> |
| References: | <1107b64b01fb8e9a6c84359bb56881a6@freescale.com> <1110334456.32556.21.camel@gaston> <20050308194229.41c23707.davem@davemloft.net> <1110340214.32524.32.camel@gaston> <57a429f8eb807987d88b06129861d507@freescale.com> <4230D1AC.5070506@katalix.com> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Hi Andy,
I haven't posted it yet, since it's a large patch (it deletes a lot of code from my driver), but I can give a basic overview of how my driver hooks into this code: 1) The driver connects to the PHY when opened, calling phy_connect, and then clears some bits to declare functionality it doesn't support (my driver, for instance, does not support gigabit in half-duplex mode). 2) The driver implements a function which reads the speed/duplex settings, and modifies the controller registers as appropriate (also bringing the carrier up and down depending on link state). My driver needs to note whether it's gigabit or not (for GMII vs MII mode), and the duplex (to set the MAC full or half). Both of those steps are very straightforward. The PHY layer will invoke the callback whenever the link state changes, so the controller will always be up-to-date. 3) The third step is the part that can make things a little messier. My driver implements a second driver for the MDIO bus, which is connected through its registers. This bus needs to be registered, and the driver also needs to register. Then some code needs to be written to deal with initialization, and takedown. I can send out that patch anytime, if there's demand.
Yeah, I ran in to some of those. I can't remember whether they're in the patch or not, I suspect not. I will have to submit a new patch to cover those (I just changed my code to use your definitions). Andy |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [ANNOUNCE] iproute2-2.6.11-050314, Stephen Hemminger |
|---|---|
| Next by Date: | RE: [ANNOUNCE] Experimental Driver for Neterion/S2io 10GbE Adapters, Alex Aizman |
| Previous by Thread: | Re: RFC: PHY Abstraction Layer II, Benjamin Herrenschmidt |
| Next by Thread: | Re: RFC: PHY Abstraction Layer II, James Chapman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |