[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTikXbL2arWSYW1aPV02C8dDdHTUG6Q@mail.gmail.com>
Date: Wed, 11 May 2011 21:15:49 +0200
From: Michał Mirosław <mirqus@...il.com>
To: Mahesh Bandewar <maheshb@...gle.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
e1000-devel <e1000-devel@...ts.sourceforge.net>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Tom Herbert <therbert@...gle.com>
Subject: Re: [PATCHv1] e1000e: Allow ethtool to enable/disable loopback.
2011/5/11 Mahesh Bandewar <maheshb@...gle.com>:
> This patch adds e1000_set_features() to handle loopback mode. When loopback
> is enabled, it enables internal-MAC loopback.
Please wait for this driver's conversion to hw_features. One comment
below, though.
[...]
> --- a/drivers/net/e1000e/netdev.c
> +++ b/drivers/net/e1000e/netdev.c
[...]
> +static int e1000_set_features(struct net_device *dev, u32 features)
> +{
> + u32 changed = dev->features ^ features;
> +
> + if ((changed & NETIF_F_LOOPBACK) && netif_running(dev))
> + e1000_set_loopback(dev, features);
> +
> + return 0;
> +}
[...]
If e1000_set_loopback() fails, this should set dev->features to passed
features (but keeping NETIF_F_LOOPBACK unchanged in dev->features) to
keep the state consistent.
Best Regards,
Michał Mirosław
--
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