mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 06:50:43 -04:00
enetc: add ioctl() support for PHY-related ops
If there is an attached PHY try to handle the requested ioctl with its handler, which allows the userspace to access PHY registers, for example. This will make mii-diag and similar tools work. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
630d4e75dd
commit
a613bafec5
@@ -1599,7 +1599,10 @@ int enetc_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
|
||||
if (cmd == SIOCGHWTSTAMP)
|
||||
return enetc_hwtstamp_get(ndev, rq);
|
||||
#endif
|
||||
return -EINVAL;
|
||||
|
||||
if (!ndev->phydev)
|
||||
return -EINVAL;
|
||||
return phy_mii_ioctl(ndev->phydev, rq, cmd);
|
||||
}
|
||||
|
||||
int enetc_alloc_msix(struct enetc_ndev_priv *priv)
|
||||
|
||||
Reference in New Issue
Block a user