Re: [RFC PATCH 15/17] phy_device: Add "port" and "transciever" fields

From: Kyle Moffett
Date: Fri Oct 21 2011 - 03:13:15 EST


On Thu, Oct 20, 2011 at 19:27, Ben Hutchings <bhutchings@xxxxxxxxxxxxxx> wrote:
> On Thu, 2011-10-20 at 17:00 -0400, Kyle Moffett wrote:
>> Some PHYs have multiple software-selectable inputs and outputs,
>> including RGMII, SGMII, SerDes, etc. ÂNew fields are added to the
>> "struct phy_device" for "port" and "transciever" to allow "ethtool" to
>> switch outputs at runtime. ÂThe defaults for the new fields are
>> identical to the hardcoded values used previously.
>>
>> This should make no functional changes to the PHY layer behavior, but
>> it will allow later PHY/ethernet drivers to override those fields.
>>
>> Signed-off-by: Kyle Moffett <Kyle.D.Moffett@xxxxxxxxxx>
>> ---
>> Âdrivers/net/phy/phy.c    Â|  Â4 ++--
>> Âdrivers/net/phy/phy_device.c | Â Â2 ++
>> Âinclude/linux/phy.h     Â|  Â4 ++++
>> Â3 files changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
>> index c378f91..5f72055 100644
>> --- a/drivers/net/phy/phy.c
>> +++ b/drivers/net/phy/phy.c
>> @@ -290,9 +290,9 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd)
>>
>> Â Â Â ethtool_cmd_speed_set(cmd, phydev->speed);
>> Â Â Â cmd->duplex = phydev->duplex;
>> - Â Â cmd->port = PORT_MII;
>> + Â Â cmd->port = phydev->port;
>> Â Â Â cmd->phy_address = phydev->addr;
>> - Â Â cmd->transceiver = XCVR_EXTERNAL;
>> + Â Â cmd->transceiver = phydev->transciever;
>
> 'transceiver' is spelt thus.

Oh shoot!

That's what I get for trying to do a last-minute patch edit before
sending the email; thanks for pointing it out!

Cheers,
Kyle Moffett

--
Curious about my work on the Debian powerpcspe port?
I'm keeping a blog here: http://pureperl.blogspot.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/