mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-10 08:38:25 +00:00
net: phy: expose phydev->has_fixups to sysfs
Expose the PHY device has_fixups boolean as a sysfs property to help troubleshooting PHY configurations. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b0ae009f3d
commit
8bed1285b9
2 changed files with 20 additions and 0 deletions
|
@ -17,3 +17,13 @@ Description:
|
||||||
Ethernet driver during bus enumeration, encoded in string.
|
Ethernet driver during bus enumeration, encoded in string.
|
||||||
This interface mode is used to configure the Ethernet MAC with the
|
This interface mode is used to configure the Ethernet MAC with the
|
||||||
appropriate mode for its data lines to the PHY hardware.
|
appropriate mode for its data lines to the PHY hardware.
|
||||||
|
|
||||||
|
What: /sys/bus/mdio_bus/devices/.../phy_has_fixups
|
||||||
|
Date: February 2014
|
||||||
|
KernelVersion: 3.15
|
||||||
|
Contact: netdev@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
This attribute contains the boolean value whether a given PHY
|
||||||
|
device has had any "fixup" workaround running on it, encoded as
|
||||||
|
a boolean. This information is provided to help troubleshooting
|
||||||
|
PHY configurations.
|
||||||
|
|
|
@ -441,9 +441,19 @@ phy_interface_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||||
}
|
}
|
||||||
static DEVICE_ATTR_RO(phy_interface);
|
static DEVICE_ATTR_RO(phy_interface);
|
||||||
|
|
||||||
|
static ssize_t
|
||||||
|
phy_has_fixups_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||||
|
{
|
||||||
|
struct phy_device *phydev = to_phy_device(dev);
|
||||||
|
|
||||||
|
return sprintf(buf, "%d\n", phydev->has_fixups);
|
||||||
|
}
|
||||||
|
static DEVICE_ATTR_RO(phy_has_fixups);
|
||||||
|
|
||||||
static struct attribute *mdio_dev_attrs[] = {
|
static struct attribute *mdio_dev_attrs[] = {
|
||||||
&dev_attr_phy_id.attr,
|
&dev_attr_phy_id.attr,
|
||||||
&dev_attr_phy_interface.attr,
|
&dev_attr_phy_interface.attr,
|
||||||
|
&dev_attr_phy_has_fixups.attr,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
ATTRIBUTE_GROUPS(mdio_dev);
|
ATTRIBUTE_GROUPS(mdio_dev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue