| To: | Stephen Hemminger <shemminger@xxxxxxxx> |
|---|---|
| Subject: | Re: RFC: PHY Abstraction Layer II |
| From: | Andy Fleming <afleming@xxxxxxxxxxxxx> |
| Date: | Wed, 1 Jun 2005 17:36:54 -0500 |
| Cc: | Netdev <netdev@xxxxxxxxxxx>, Embedded PPC Linux list <linuxppc-embedded@xxxxxxxxxx>, Kumar Gala <kumar.gala@xxxxxxxxxxxxx> |
| In-reply-to: | <20050601144123.2bc11c06@dxpl.pdx.osdl.net> |
| References: | <1107b64b01fb8e9a6c84359bb56881a6@freescale.com> <20050531105939.7486e071@dxpl.pdx.osdl.net> <92F1428A-0B26-428B-8C06-35C7E5B9EEE3@freescale.com> <20050601144123.2bc11c06@dxpl.pdx.osdl.net> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Wed, 1 Jun 2005 15:45:26 -0500 Andy Fleming <afleming@xxxxxxxxxxxxx> wrote: Well, the MII Management bus is, in fact, a bus. When a network driver wants to modify a PHY, it must access that bus. Many ethernet controllers have a 1 to 1 relationship, since a typical NIC is a PCI card with 1 ethernet port (meaning one controller, and one PHY). However, many systems have multiple ethernet controllers attached to one bus, which configures multiple PHYs. Currently, these systems have been relying on luck to prevent multiple accesses to the same bus. This tends to work because all of the PHY support is contained within the ethernet driver, so it is easy for such drivers to ensure that only one PHY transaction is done at a time. This system begins to fall apart, though, when the PHY drivers start operating more independently to react to changing PHY state. It really begins to fall apart if you have multiple drivers trying to access a shared bus. For instance, the 8560 ADS board has 2 gigabit ethernet ports controlled by the gianfar driver, and 2 10/100 ports in the CPM subsystem, controlled by the fcc_enet driver. These two drivers each have an access point for the bus, which use different mechanisms (one is a bit bang interface, and one is register based). Using the new abstraction, it is possible for the FCC driver to use the gianfar driver's bus, thus saving code, and reducing complexity.
It would be quite easy for the network driver to suspend or resume the PHY and bus objects under the new abstraction. However, if eth0 is suspended, should it suspend the whole bus, and all the PHYs on it? By making the MII bus an independent entity, eth0 can be suspended, and it can choose to suspend its PHY, but eth1 can continue to access its PHY over the bus, since those aren't suspended. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Locking model for NAPI drivers, Michael Chan |
|---|---|
| Next by Date: | Re: RFC: PHY Abstraction Layer II, Andy Fleming |
| Previous by Thread: | Re: RFC: PHY Abstraction Layer II, Stephen Hemminger |
| Next by Thread: | Re: RFC: PHY Abstraction Layer II, Glen Turner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |