lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 4 Feb 2014 08:50:42 +0100 From: Stefan Sørensen <stefan.sorensen@...ctralink.com> To: mugunthanvnm@...com, davem@...emloft.net, netdev@...r.kernel.org Cc: Stefan Sørensen <stefan.sorensen@...ctralink.com> Subject: [PATCH] net:cpsw: Pass unhandled ioctl's on to generic phy ioctl This patch allows the use of a generic timestamping phy connected to the cpsw if CPTS support is not enabled. Signed-off-by: Stefan Sørensen <stefan.sorensen@...ctralink.com> --- drivers/net/ethernet/ti/cpsw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index bde63e3..a03cfb3 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1486,12 +1486,12 @@ static int cpsw_ndo_ioctl(struct net_device *dev, struct ifreq *req, int cmd) #endif case SIOCGMIIPHY: data->phy_id = priv->slaves[slave_no].phy->addr; - break; - default: - return -ENOTSUPP; + return 0; } - return 0; + if (!priv->slaves[slave_no].phy) + return -EINVAL; + return phy_mii_ioctl(priv->slaves[slave_no].phy, req, cmd); } static void cpsw_ndo_tx_timeout(struct net_device *ndev) -- 1.8.5.3 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists