From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 61C9E458CD; Mon, 2 Sep 2024 11:56:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E75BF40678; Mon, 2 Sep 2024 11:55:29 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by mails.dpdk.org (Postfix) with ESMTP id D714C4065C for ; Mon, 2 Sep 2024 11:55:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725270909; x=1756806909; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VCttFhZVpy+0brUd0Lw/I2sr2Ro47R9O9skSKAcPuXk=; b=OwASZpjQQZngaaGH0qzyOMZb+vhpqx+4khPT1nwN81FaGovgPpIV4YiQ BqCI5YQ2LdWHWrD7dIFiANber0TC1npJuMnIKRowgqOtbb1aFU8JoukmY OwmQzDmLVWuQUNYJhq6jje+zYrqgiQ1O7G14ZY6E4xb6mZIgVf4QaAohZ 9RuZAZuAa6agP8ap93T1/6ZF7SjZABqn0izp9YquNX+5sC7HEiainERO+ lpLq6Swh1MzfqFXOVolpj3IVngHTyI/0ORUe86YKgzkLj0czGj/dRzCvW NDbZb97PsAe9OJ3X0k6N0cYOW2E0GK2ypphiGKenhlyV/g6jRbT32K/aF w==; X-CSE-ConnectionGUID: IjHz4FcuQAKGkEmls5yOow== X-CSE-MsgGUID: msUHq51WRGC+t9XQtyGZeQ== X-IronPort-AV: E=McAfee;i="6700,10204,11182"; a="26747209" X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="26747209" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2024 02:55:08 -0700 X-CSE-ConnectionGUID: aFw3pk84Rw+ulB2iTnCvrA== X-CSE-MsgGUID: 1NojplMmQcO6od5pilVhdw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,195,1719903600"; d="scan'208";a="64597914" Received: from silpixa00401119.ir.intel.com ([10.55.129.167]) by fmviesa009.fm.intel.com with ESMTP; 02 Sep 2024 02:55:07 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: bruce.richardson@intel.com Subject: [PATCH v1 11/30] net/i40e/base: fix not blinking X722 with x557 PHY Date: Mon, 2 Sep 2024 10:54:23 +0100 Message-ID: <116d81b31e0ab9c245269d29f6d39c117aedf23c.1725270827.git.anatoly.burakov@intel.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Eryk Rybak On x722 with x557 PHY LEDs do not blink under certain circumstances, because the function was attempting to avoid triggering LED activity when it detected that LED was already active. Fix it to just always trigger LED blinking regardless of the LED state. Signed-off-by: Eryk Rybak Signed-off-by: Anatoly Burakov --- drivers/net/i40e/base/i40e_common.c | 32 ----------------------------- 1 file changed, 32 deletions(-) diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index be27cc9d0b..80500697ed 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -1548,7 +1548,6 @@ static u32 i40e_led_is_mine(struct i40e_hw *hw, int idx) **/ u32 i40e_led_get(struct i40e_hw *hw) { - u32 current_mode = 0; u32 mode = 0; int i; @@ -1561,21 +1560,6 @@ u32 i40e_led_get(struct i40e_hw *hw) if (!gpio_val) continue; - /* ignore gpio LED src mode entries related to the activity - * LEDs - */ - current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) - >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); - switch (current_mode) { - case I40E_COMBINED_ACTIVITY: - case I40E_FILTER_ACTIVITY: - case I40E_MAC_ACTIVITY: - case I40E_LINK_ACTIVITY: - continue; - default: - break; - } - mode = (gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT; break; @@ -1595,7 +1579,6 @@ u32 i40e_led_get(struct i40e_hw *hw) **/ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink) { - u32 current_mode = 0; int i; if (mode & ~I40E_LED_MODE_VALID) { @@ -1612,21 +1595,6 @@ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink) if (!gpio_val) continue; - /* ignore gpio LED src mode entries related to the activity - * LEDs - */ - current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) - >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); - switch (current_mode) { - case I40E_COMBINED_ACTIVITY: - case I40E_FILTER_ACTIVITY: - case I40E_MAC_ACTIVITY: - case I40E_LINK_ACTIVITY: - continue; - default: - break; - } - if (I40E_IS_X710TL_DEVICE(hw->device_id)) { u32 pin_func = 0; -- 2.43.5