summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhey Popovych <serhe.popovych@gmail.com>2018-03-29 10:51:36 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2019-03-19 17:18:49 -0400
commitb0ddfe2bb2bd80b1090d5bf42bb65243b76d3b97 (patch)
tree6e490599d6b3e29b1f85331441b98a0be734e8ea
parent310974faccda080a5e0388d79cf6190d6aa0f1fa (diff)
intel: correct return from set features callback
According to comments in <linux/netdevice.h> we should return either >0 or -errno from ->ndo_set_features() if changing dev->features by itself. Return 1 in such places to notify netdev_update_features() about applied changes in dev->features. Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/e100.c2
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_main.c2
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c2
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index 0fd268070fb4..a65d5a9ba7db 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -2797,7 +2797,7 @@ static int e100_set_features(struct net_device *netdev,
2797 2797
2798 netdev->features = features; 2798 netdev->features = features;
2799 e100_exec_cb(nic, NULL, e100_configure); 2799 e100_exec_cb(nic, NULL, e100_configure);
2800 return 0; 2800 return 1;
2801} 2801}
2802 2802
2803static const struct net_device_ops e100_netdev_ops = { 2803static const struct net_device_ops e100_netdev_ops = {
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 8fe9af0e2ab7..a7c76732849f 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -820,7 +820,7 @@ static int e1000_set_features(struct net_device *netdev,
820 else 820 else
821 e1000_reset(adapter); 821 e1000_reset(adapter);
822 822
823 return 0; 823 return 1;
824} 824}
825 825
826static const struct net_device_ops e1000_netdev_ops = { 826static const struct net_device_ops e1000_netdev_ops = {
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 7acc61e4f645..ae68d5685c10 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7003,7 +7003,7 @@ static int e1000_set_features(struct net_device *netdev,
7003 else 7003 else
7004 e1000e_reset(adapter); 7004 e1000e_reset(adapter);
7005 7005
7006 return 0; 7006 return 1;
7007} 7007}
7008 7008
7009static const struct net_device_ops e1000e_netdev_ops = { 7009static const struct net_device_ops e1000e_netdev_ops = {
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 69b230c53fed..45f3c19d063a 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2480,7 +2480,7 @@ static int igb_set_features(struct net_device *netdev,
2480 else 2480 else
2481 igb_reset(adapter); 2481 igb_reset(adapter);
2482 2482
2483 return 0; 2483 return 1;
2484} 2484}
2485 2485
2486static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], 2486static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index e100054a3765..76aeed845a73 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -9796,7 +9796,7 @@ static int ixgbe_set_features(struct net_device *netdev,
9796 NETIF_F_HW_VLAN_CTAG_FILTER)) 9796 NETIF_F_HW_VLAN_CTAG_FILTER))
9797 ixgbe_set_rx_mode(netdev); 9797 ixgbe_set_rx_mode(netdev);
9798 9798
9799 return 0; 9799 return 1;
9800} 9800}
9801 9801
9802/** 9802/**