[Top] [All Lists]

Re: [PATCH] MII bus API for PHY devices

To: Jason McMullan <jason.mcmullan@xxxxxxxxxxx>
Subject: Re: [PATCH] MII bus API for PHY devices
From: Andy Fleming <afleming@xxxxxxxxxxxxx>
Date: Thu, 18 Nov 2004 13:50:59 -0600
Cc: "<netdev@xxxxxxxxxxx>" <netdev@xxxxxxxxxxx>, "<linux-kernel@xxxxxxxxxxxxxxx>" <linux-kernel@xxxxxxxxxxxxxxx>
In-reply-to: <1100806489.14467.47.camel@jmcmullan>
References: <069B6F33-341C-11D9-9652-000393DBC2E8@xxxxxxxxxxxxx> <9B0D9272-398A-11D9-96F6-000393C30512@xxxxxxxxxxxxx> <1100806489.14467.47.camel@jmcmullan>
Sender: netdev-bounce@xxxxxxxxxxx

On Nov 18, 2004, at 13:34, Jason McMullan wrote:
3) How should we bind ethernet drivers to PHY drivers?

A PHY 'platform_data' struct like:

struct phy_device_data {
        struct {
                const char *name;
                int id;
        } ethernet_platform_device_parent;
        int     phy_id;

So you would have each PHY know the controller to which it's attached? I would have thought the other way around... Hm. I will definitely have to read up on my driver model stuff

Oh, and a 4th side-issue:
Should each PHY have its own file?

Actually, each PHY should have it's own device directory, like every
other device. Eventually, PHYs should have /dev/phy* entries, where
user-space can read/write PHY registers.

I think you misunderstood. Are you talking about sysfs? I was talking about actual source files. i.e. should there be dm9161.c, m88e1101.c, cis8201.c, etc.

Also, do we need user-space to read/write PHY registers. ethtool has this capability, I believe, and the interfaces there are settled.

Andy Fleming

<Prev in Thread] Current Thread [Next in Thread>