From patchwork Fri Feb 19 16:36:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zulkifli, Muhammad Husaini" X-Patchwork-Id: 1442367 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dhy0T5kpPz9sBy for ; Sat, 20 Feb 2021 03:37:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6A98486D73; Fri, 19 Feb 2021 16:37:08 +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 jQV1eWYK3QIf; Fri, 19 Feb 2021 16:37:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 992E386FD9; Fri, 19 Feb 2021 16:37:06 +0000 (UTC) X-Original-To: intel-wired-lan@osuosl.org Delivered-To: intel-wired-lan@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 1807E1BF287 for ; Fri, 19 Feb 2021 16:37:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 000B5606FA for ; Fri, 19 Feb 2021 16:37:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GEJ9JeZ69olH for ; Fri, 19 Feb 2021 16:37:04 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id 16DA4606F8; Fri, 19 Feb 2021 16:37:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by smtp3.osuosl.org (Postfix) with ESMTPS id 541DB606F8 for ; Fri, 19 Feb 2021 16:36:55 +0000 (UTC) IronPort-SDR: mWxCu+ZoqNc4s7V/BS6l6I3FSX+IfejH9MijqgWFB5dt5g7PtO6yTkUzZK3bGmgLObJmPdwkUh KyXCcv275rqA== X-IronPort-AV: E=McAfee;i="6000,8403,9900"; a="183949644" X-IronPort-AV: E=Sophos;i="5.81,189,1610438400"; d="scan'208";a="183949644" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 08:36:55 -0800 IronPort-SDR: fc+HSA3LdUFUaIgx90zX91w670syJu6UVzEEBlEkLIdattY6CUuRsgIFssy2nE8EB+PoTiNJvg cAxuaTu6jxzg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,189,1610438400"; d="scan'208";a="581737128" Received: from zulkifl3-ilbpg0.png.intel.com ([10.88.229.114]) by orsmga005.jf.intel.com with ESMTP; 19 Feb 2021 08:36:53 -0800 From: Muhammad Husaini Zulkifli To: intel-wired-lan@osuosl.org Date: Sat, 20 Feb 2021 00:36:47 +0800 Message-Id: <20210219163648.14581-2-muhammad.husaini.zulkifli@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210219163648.14581-1-muhammad.husaini.zulkifli@intel.com> References: <20210219163648.14581-1-muhammad.husaini.zulkifli@intel.com> Subject: [Intel-wired-lan] [PATCH net v1 1/2] igc: Fix Pause Frame Advertising X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: muhammad.husaini.zulkifli@intel.com, mallikarjuna.chilakala@intel.com MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Fix Pause Frame Advertising when getting the advertisement via ethtool. Remove setting the "advertising" bit in link_ksettings during default case when tx and rx are in off state with Auto Negotiatiate off. Below is the original output of advertisement link during tx and rx off: Advertised pause frame use: Symmetric Receive-only Expected output: Advertised pause frame use: No Fixes: 8c5ad0dae93c ("igc: Add ethtool support") Signed-off-by: Muhammad Husaini Zulkifli Reviewed-by: Malli C Acked-by: Sasha Neftin Tested-by: Dvora Fuxbrumer --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index 824a6c454bca..67a4aed45fc2 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1725,9 +1725,7 @@ static int igc_ethtool_get_link_ksettings(struct net_device *netdev, Asym_Pause); break; default: - ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause); - ethtool_link_ksettings_add_link_mode(cmd, advertising, - Asym_Pause); + break; } status = pm_runtime_suspended(&adapter->pdev->dev) ? From patchwork Fri Feb 19 16:36:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zulkifli, Muhammad Husaini" X-Patchwork-Id: 1442369 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dhy0T6kbSz9sRN for ; Sat, 20 Feb 2021 03:37:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 26397870E5; Fri, 19 Feb 2021 16:37:11 +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 kqCC+i76XlBO; Fri, 19 Feb 2021 16:37:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id EBE878714B; Fri, 19 Feb 2021 16:37:08 +0000 (UTC) X-Original-To: intel-wired-lan@osuosl.org Delivered-To: intel-wired-lan@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 054F81BF287 for ; Fri, 19 Feb 2021 16:37:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E563960705 for ; Fri, 19 Feb 2021 16:37:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yNSUWEOSVhS5 for ; Fri, 19 Feb 2021 16:37:05 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id 76BAC60701; Fri, 19 Feb 2021 16:37:05 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by smtp3.osuosl.org (Postfix) with ESMTPS id 89DE66070A for ; Fri, 19 Feb 2021 16:36:57 +0000 (UTC) IronPort-SDR: TvifYO4GMSPelEqG5IQdj45W5aKMyKvh1eWt6oVqN4gntqIbqZ21ZWGAUHnnxzQsAVyyG88lg+ m2uWlj7oIXBQ== X-IronPort-AV: E=McAfee;i="6000,8403,9900"; a="183949654" X-IronPort-AV: E=Sophos;i="5.81,189,1610438400"; d="scan'208";a="183949654" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 08:36:57 -0800 IronPort-SDR: l1vH7CJYZ0uVMiBDxSPB1aQ682IvAyWuu2/msqtLjjKE3hYFNQNz/Hhn6DiNPhoBq3/Rtwzifz x6vokrVFZW9Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,189,1610438400"; d="scan'208";a="581737140" Received: from zulkifl3-ilbpg0.png.intel.com ([10.88.229.114]) by orsmga005.jf.intel.com with ESMTP; 19 Feb 2021 08:36:55 -0800 From: Muhammad Husaini Zulkifli To: intel-wired-lan@osuosl.org Date: Sat, 20 Feb 2021 00:36:48 +0800 Message-Id: <20210219163648.14581-3-muhammad.husaini.zulkifli@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210219163648.14581-1-muhammad.husaini.zulkifli@intel.com> References: <20210219163648.14581-1-muhammad.husaini.zulkifli@intel.com> Subject: [Intel-wired-lan] [PATCH net v1 2/2] igc: Fix Supported Pause Frame Link Setting X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: muhammad.husaini.zulkifli@intel.com, mallikarjuna.chilakala@intel.com MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" The Supported Pause Frame always display "No" eventhough the Advertised pause frame showing the correct setting based on the pause parameters via ethtool. Set bit in link_ksettings to "Supported" for Pause Frame. Before output: Supported pause frame use: No Expected output: Supported pause frame use: Symmetric Fixes: 8c5ad0dae93c ("igc: Add ethtool support") Signed-off-by: Muhammad Husaini Zulkifli Reviewed-by: Malli C Tested-by: Dvora Fuxbrumer Acked-by: Sasha Neftin --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index 67a4aed45fc2..8722294ab90c 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1711,6 +1711,9 @@ static int igc_ethtool_get_link_ksettings(struct net_device *netdev, Autoneg); } + /* Set pause flow control settings */ + ethtool_link_ksettings_add_link_mode(cmd, supported, Pause); + switch (hw->fc.requested_mode) { case igc_fc_full: ethtool_link_ksettings_add_link_mode(cmd, advertising, Pause);