linux-mips
[Top] [All Lists]

Re: [PATCH 1/3 net-next] bcm63xx_enet: implement reset autoneg ethtool c

To: Florian Fainelli <florian@openwrt.org>
Subject: Re: [PATCH 1/3 net-next] bcm63xx_enet: implement reset autoneg ethtool callback
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date: Wed, 05 Jun 2013 01:49:42 +0400
Cc: davem@davemloft.net, ralf@linux-mips.org, blogic@openwrt.org, linux-mips@linux-mips.org, cernekee@gmail.com, mbizon@freebox.fr, jogo@openwrt.org
In-reply-to: <1370382094-17821-2-git-send-email-florian@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Organization: Cogent Embedded
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1370382094-17821-1-git-send-email-florian@openwrt.org> <1370382094-17821-2-git-send-email-florian@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
Hello.

On 06/05/2013 01:41 AM, Florian Fainelli wrote:

   Why are you not posting to netdev@vger.kernel.org?

From: Maxime Bizon <mbizon@freebox.fr>

Implement the rset_nway ethtool callback which uses libphy generic
autonegotiation restart function.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
---
  drivers/net/ethernet/broadcom/bcm63xx_enet.c |   15 +++++++++++++++
  1 file changed, 15 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c 
b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index e46466c..bc1a994 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1328,6 +1328,20 @@ static void bcm_enet_get_ethtool_stats(struct net_device 
*netdev,
        mutex_unlock(&priv->mib_update_lock);
  }
+static int bcm_enet_nway_reset(struct net_device *dev)
+{
+       struct bcm_enet_priv *priv;
+
+       priv = netdev_priv(dev);

    Strange, why not do it in the initializer?

WBR, Sergei


<Prev in Thread] Current Thread [Next in Thread>