mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 06:04:23 +08:00
net/core: revert "net: fix __netdev_update_features return.." and add comment
This reverts commit 00ee592717
("net: fix __netdev_update_features return
on ndo_set_features failure")
and adds a comment explaining why it's okay to return a value other than
0 upon error. Some drivers might actually change flags and return an
error so it's better to fire a spurious notification rather than miss
these.
CC: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a3a116e04c
commit
17b85d29e8
@ -6436,7 +6436,10 @@ int __netdev_update_features(struct net_device *dev)
|
|||||||
netdev_err(dev,
|
netdev_err(dev,
|
||||||
"set_features() failed (%d); wanted %pNF, left %pNF\n",
|
"set_features() failed (%d); wanted %pNF, left %pNF\n",
|
||||||
err, &features, &dev->features);
|
err, &features, &dev->features);
|
||||||
return 0;
|
/* return non-0 since some features might have changed and
|
||||||
|
* it's better to fire a spurious notification than miss it
|
||||||
|
*/
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sync_lower:
|
sync_lower:
|
||||||
|
Loading…
Reference in New Issue
Block a user