On Wed, May 11, 2011 at 12:15 PM, Michał Mirosław <[email protected]> wrote:
> 2011/5/11 Mahesh Bandewar <[email protected]>:
>> 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.
>
This is not intrusive so should not create problems when that happens.

> [...]
>> --- 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.
>
set_features() can return the return code of set_loopback() instead of
0; this way the consistency will be maintained.

Thanks,
--mahesh..

> Best Regards,
> Michał Mirosław
>

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to