From patchwork Thu Mar 29 14:51:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serhey Popovych X-Patchwork-Id: 892820 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=osuosl.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="QWP13eSZ"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Bnlm4Xlqz9s1S for ; Fri, 30 Mar 2018 01:52:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2BF4688BEE; Thu, 29 Mar 2018 14:52:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id atBC4FRMDH2Z; Thu, 29 Mar 2018 14:52:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 81BCB88BB3; Thu, 29 Mar 2018 14:52:17 +0000 (UTC) X-Original-To: intel-wired-lan@osuosl.org Delivered-To: intel-wired-lan@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 8B2981C0BD3 for ; Thu, 29 Mar 2018 14:52:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 81A2189AFA for ; Thu, 29 Mar 2018 14:52:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fByIm4iJrWTY for ; Thu, 29 Mar 2018 14:52:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id A729D89AFB for ; Thu, 29 Mar 2018 14:52:14 +0000 (UTC) Received: by mail-lf0-f68.google.com with SMTP id o102-v6so8791880lfg.8 for ; Thu, 29 Mar 2018 07:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=gDPcpfWtXLLBNJJd/r/RY58nfkfDZE/qcjnHfPuUpkg=; b=QWP13eSZLlT862im938JLgDglD8R1Ozd+M9hu5wiYhKlcl38ROSsydObDWoRnelq8K MY3bCs9g0ry9lhkJLU2BHJG6OHSnfuvPNoRoiRyRoZWYecHNxfII3Ek4d3axcKKt6U1K 2LctIfsWz4LAg6z88A2tQ+i4jKdH/UwJG77ddv7Vkl3kyWuaoeGdTrc8SyUeATu7WEAc Z2riIR5TU5T6F3pyhaC9WUXm/dV9XhzSZj3s1lwzVhcRuTiVRilA9HmtUkrxo1f0ehtc rwJMPCbsl8M5zV+DpB62NRHZ8j1YoM7MBaEc55cOK/39JDyiwUEHFypsPVlICOQhjEOu jmGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=gDPcpfWtXLLBNJJd/r/RY58nfkfDZE/qcjnHfPuUpkg=; b=rMi5s+Cz90zK3QvIrClbZ/X8zm6VXK7n2cdIpIaIWx+wBigIHn/UcLRjuhWF63vWA+ /G/Qg4xvj57sOayhLUyE24RbGpu4pOuTgZtiuwP6sTOjIj9mPN0VPm+yZCKogZrGRmI5 U2KJbosYpuxuvAwkC8EG9q2HWG9JpLCCzCsqg5obhf0C2dO4BMHdt+WfYvVhOh5hVAIh WdUBKW4Kskv/KgdNy+KyWCXLba6xngQ2hQ1OiDGDZKnhpPxOLjpTtzLegCvLJ3nWfdbv rhOYN6qq/c+uWngvNaV0kInipSYpioQ+KSORTnXnoSTzBfhFZRj+l9PaByOU8838ymHH +Jwg== X-Gm-Message-State: AElRT7HiUP1N9Zg7T7KhxzvUWDBbHbJyb0QBWxM5f2PddJeINJwZ+lzk 62uwMMjd+Anx3jUhVr+WK1dlqA== X-Google-Smtp-Source: AIpwx4+ZldDEy+0gXFpVC6tm7+cHSibe4B1VKbYdKAX6zCEkSGpIRY8jIm5NP3tH/UPS06FyOJhTeA== X-Received: by 2002:a19:17d4:: with SMTP id 81-v6mr5472587lfx.22.1522335132606; Thu, 29 Mar 2018 07:52:12 -0700 (PDT) Received: from tuxracer.localdomain ([2a01:6d80::195:20:96:53]) by smtp.gmail.com with ESMTPSA id j199-v6sm1186729lfe.53.2018.03.29.07.52.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 07:52:11 -0700 (PDT) From: Serhey Popovych To: intel-wired-lan@osuosl.org Date: Thu, 29 Mar 2018 17:51:36 +0300 Message-Id: <1522335096-11689-1-git-send-email-serhe.popovych@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [Intel-wired-lan] [PATCH next-queue] intel: correct return from set features callback X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" According to comments in 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 --- drivers/net/ethernet/intel/e100.c | 2 +- drivers/net/ethernet/intel/e1000/e1000_main.c | 2 +- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c index 41ad56e..27fa59b 100644 --- a/drivers/net/ethernet/intel/e100.c +++ b/drivers/net/ethernet/intel/e100.c @@ -2821,7 +2821,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 = { diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index d5eb19b..7068b82 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c @@ -846,7 +846,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 = { diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index ec4a975..e4cd14d 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -7007,7 +7007,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 = { diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index c1c0bc3..dbf9294 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -2409,7 +2409,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[], diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index afadba9..3b21eb6 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -9530,7 +9530,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; } /**