diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2013-05-22 21:11:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-28 01:42:50 -0400 |
commit | 4284b6a535a9aab33e5f3c37929143508dd2ee60 (patch) | |
tree | 8535656632c49ece1d66d97c9e591d07f3eaff13 /drivers/net/phy/phy_device.c | |
parent | 7ec872114251b618adf5a2688de0ca00de63635d (diff) |
phy: allow drivers to flag a PHY device as internal
libphy currently always reports a PHY as an external transceiver from
the ethtool output. This is inaccurate, because some drivers should be
able to tell that a PHY device is an internal transceiver of an Ethernet
MAC. Add a new flag (PHY_IS_INTERNAL) which can be set by PHY drivers
just like other flags, and a corresponding helper: phy_is_internal()
which can be used by networking drivers to query if a given
PHY device is internal.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r-- | drivers/net/phy/phy_device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index b55aa33a5b8b..74630e94fa3b 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -1017,6 +1017,9 @@ static int phy_probe(struct device *dev) | |||
1017 | phy_interrupt_is_valid(phydev)) | 1017 | phy_interrupt_is_valid(phydev)) |
1018 | phydev->irq = PHY_POLL; | 1018 | phydev->irq = PHY_POLL; |
1019 | 1019 | ||
1020 | if (phydrv->flags & PHY_IS_INTERNAL) | ||
1021 | phydev->is_internal = true; | ||
1022 | |||
1020 | mutex_lock(&phydev->lock); | 1023 | mutex_lock(&phydev->lock); |
1021 | 1024 | ||
1022 | /* Start out supporting everything. Eventually, | 1025 | /* Start out supporting everything. Eventually, |