netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net:cpsw: Pass unhandled ioctl's on to generic phy ioctl
@ 2014-02-04  7:50 Stefan Sørensen
  2014-02-04 10:50 ` Ben Hutchings
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Sørensen @ 2014-02-04  7:50 UTC (permalink / raw)
  To: mugunthanvnm, davem, netdev; +Cc: Stefan Sørensen

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@spectralink.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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-02-05 14:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04  7:50 [PATCH] net:cpsw: Pass unhandled ioctl's on to generic phy ioctl Stefan Sørensen
2014-02-04 10:50 ` Ben Hutchings
2014-02-04 15:08   ` Sørensen, Stefan
2014-02-04 21:51     ` Ben Hutchings
2014-02-05  7:12       ` Richard Cochran
2014-02-05 10:23         ` Ben Hutchings
2014-02-05 11:06           ` Christian Riesch
2014-02-05 11:26           ` Richard Cochran
2014-02-05  7:28       ` Sørensen, Stefan
2014-02-05  8:18         ` Mugunthan V N
2014-02-05 10:49           ` Christian Riesch
2014-02-05 14:15             ` Mugunthan V N

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).