]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
intel: correct return from set features callback
authorSerhey Popovych <serhe.popovych@gmail.com>
Thu, 29 Mar 2018 14:51:36 +0000 (17:51 +0300)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 19 Mar 2019 21:18:49 +0000 (14:18 -0700)
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>
drivers/net/ethernet/intel/e100.c
drivers/net/ethernet/intel/e1000/e1000_main.c
drivers/net/ethernet/intel/e1000e/netdev.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 0fd268070fb4a3344735526f1bb299a80d62fb9b..a65d5a9ba7db37eb3485adca499e88e5f4684268 100644 (file)
@@ -2797,7 +2797,7 @@ static int e100_set_features(struct net_device *netdev,
 
        netdev->features = features;
        e100_exec_cb(nic, NULL, e100_configure);
-       return 0;
+       return 1;
 }
 
 static const struct net_device_ops e100_netdev_ops = {
index 8fe9af0e2ab779b4da67b10d11f6b1004db2fdff..a7c76732849fd13f7fe827dce6115caa4da3d4b5 100644 (file)
@@ -820,7 +820,7 @@ static int e1000_set_features(struct net_device *netdev,
        else
                e1000_reset(adapter);
 
-       return 0;
+       return 1;
 }
 
 static const struct net_device_ops e1000_netdev_ops = {
index 7acc61e4f6456ea86269a47d0a6da6533dbcb3b6..ae68d5685c10b82aa3dbfb0910a883ccec3f6f0f 100644 (file)
@@ -7003,7 +7003,7 @@ static int e1000_set_features(struct net_device *netdev,
        else
                e1000e_reset(adapter);
 
-       return 0;
+       return 1;
 }
 
 static const struct net_device_ops e1000e_netdev_ops = {
index 69b230c53fed537464ba79b0be3ede75ab13f1da..45f3c19d063aefd526bc22b750afd2aff40e3256 100644 (file)
@@ -2480,7 +2480,7 @@ static int igb_set_features(struct net_device *netdev,
        else
                igb_reset(adapter);
 
-       return 0;
+       return 1;
 }
 
 static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
index e100054a3765e2f16c4aba9f3af8411c9dcdca4a..76aeed845a739952ad8f1fdad46c05e1078c7e52 100644 (file)
@@ -9796,7 +9796,7 @@ static int ixgbe_set_features(struct net_device *netdev,
                            NETIF_F_HW_VLAN_CTAG_FILTER))
                ixgbe_set_rx_mode(netdev);
 
-       return 0;
+       return 1;
 }
 
 /**