From fb290cdd43463e6be339bfb021aa9a00cdb50ea2 Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 12 Jun 2011 02:19:00 +0000 Subject: davinci_emac: pass ioctls through to phy device. The DaVinci EMAC driver does not implement any ioctls, but still it can pass them through to the phy device. This makes it possible for a phy to offer PHC capabilities. Cc: Anant Gole Cc: Kevin Hilman Signed-off-by: Richard Cochran Signed-off-by: David S. Miller --- drivers/net/davinci_emac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/davinci_emac.c') diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index dcc4a170b0f3..5c2baa4f785a 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -1489,14 +1489,14 @@ static void emac_adjust_link(struct net_device *ndev) */ static int emac_devioctl(struct net_device *ndev, struct ifreq *ifrq, int cmd) { - dev_warn(&ndev->dev, "DaVinci EMAC: ioctl not supported\n"); + struct emac_priv *priv = netdev_priv(ndev); if (!(netif_running(ndev))) return -EINVAL; /* TODO: Add phy read and write and private statistics get feature */ - return -EOPNOTSUPP; + return phy_mii_ioctl(priv->phydev, ifrq, cmd); } static int match_first_device(struct device *dev, void *data) -- cgit v1.2.3 From 1ca9495f851d6d41a118ae064002d51afdfd415b Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 12 Jun 2011 02:19:01 +0000 Subject: davinci_emac: enable transmit time stamping. This patch enables software (and phy device) transmit time stamping for the DaVinci EMAC driver. Tested together with the dp83640 PHY. Cc: Anant Gole Cc: Kevin Hilman Signed-off-by: Richard Cochran Signed-off-by: David S. Miller --- drivers/net/davinci_emac.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/davinci_emac.c') diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 5c2baa4f785a..f5688ff58a40 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -1090,6 +1090,7 @@ static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) dev_err(emac_dev, "DaVinci EMAC: desc submit failed"); goto fail_tx; } + skb_tx_timestamp(skb); return NETDEV_TX_OK; -- cgit v1.2.3 From 5bf0c1913498e55f1bf4c56fef6dacf2feb049bb Mon Sep 17 00:00:00 2001 From: Richard Cochran Date: Sun, 19 Jun 2011 03:31:45 +0000 Subject: davinci_emac: fix race in transmit time stamping. Signed-off-by: Richard Cochran Signed-off-by: David S. Miller --- drivers/net/davinci_emac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net/davinci_emac.c') diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index f5688ff58a40..55c8245b0cdc 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -1083,6 +1083,8 @@ static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) goto fail_tx; } + skb_tx_timestamp(skb); + ret_code = cpdma_chan_submit(priv->txchan, skb, skb->data, skb->len, GFP_KERNEL); if (unlikely(ret_code != 0)) { @@ -1090,7 +1092,6 @@ static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev) dev_err(emac_dev, "DaVinci EMAC: desc submit failed"); goto fail_tx; } - skb_tx_timestamp(skb); return NETDEV_TX_OK; -- cgit v1.2.3 From 95cb3656c09fcf6577138337216c27744ebc91e2 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Fri, 24 Jun 2011 02:40:08 -0700 Subject: net: Remove unneeded version.h includes from drivers/net/ It was pointed out by 'make versioncheck' that some includes of linux/version.h are not needed in drivers/net/. This patch removes them. Signed-off-by: Jesper Juhl Signed-off-by: David S. Miller --- drivers/net/davinci_emac.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/net/davinci_emac.c') diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 55c8245b0cdc..acef7e96c9fd 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3