netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Mariusz Stachura <mariusz.stachura@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 12/15] i40e: do not enter PHY debug mode while setting LEDs behaviour
Date: Fri,  6 Oct 2017 10:57:24 -0700	[thread overview]
Message-ID: <20171006175727.868-13-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20171006175727.868-1-jeffrey.t.kirsher@intel.com>

From: Mariusz Stachura <mariusz.stachura@intel.com>

Previous implementation of LED set/get functions required to enter
PHY debug mode, in order to prevent access to it from FW and SW at
the same time. Reset of all ports was a unwanted side effect.

Signed-off-by: Mariusz Stachura <mariusz.stachura@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 6203d362438c..de0dfe340494 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2010,7 +2010,9 @@ static int i40e_set_phys_id(struct net_device *netdev,
 		if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) {
 			pf->led_status = i40e_led_get(hw);
 		} else {
-			i40e_aq_set_phy_debug(hw, I40E_PHY_DEBUG_ALL, NULL);
+			if (!(hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE))
+				i40e_aq_set_phy_debug(hw, I40E_PHY_DEBUG_ALL,
+						      NULL);
 			ret = i40e_led_get_phy(hw, &temp_status,
 					       &pf->phy_led_val);
 			pf->led_status = temp_status;
@@ -2035,7 +2037,8 @@ static int i40e_set_phys_id(struct net_device *netdev,
 			ret = i40e_led_set_phy(hw, false, pf->led_status,
 					       (pf->phy_led_val |
 					       I40E_PHY_LED_MODE_ORIG));
-			i40e_aq_set_phy_debug(hw, 0, NULL);
+			if (!(hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE))
+				i40e_aq_set_phy_debug(hw, 0, NULL);
 		}
 		break;
 	default:
-- 
2.14.2

  parent reply	other threads:[~2017-10-06 17:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 17:57 [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-06 Jeff Kirsher
2017-10-06 17:57 ` [net-next 01/15] i40e: fix a typo in i40e_pf documentation Jeff Kirsher
2017-10-06 17:57 ` [net-next 02/15] i40e: add private flag to control source pruning Jeff Kirsher
2017-10-06 17:57 ` [net-next 03/15] i40e/i40evf: spread CPU affinity hints across online CPUs only Jeff Kirsher
2017-10-06 17:57 ` [net-next 04/15] i40e: re-enable PTP L4 capabilities for XL710 if FW >6.0 Jeff Kirsher
2017-10-06 17:57 ` [net-next 05/15] i40e: redfine I40E_PHY_TYPE_MAX Jeff Kirsher
2017-10-06 17:57 ` [net-next 06/15] i40e: fix incorrect register definition Jeff Kirsher
2017-10-06 17:57 ` [net-next 07/15] i40e/i40evf: use DECLARE_BITMAP for state Jeff Kirsher
2017-10-06 17:57 ` [net-next 08/15] i40e: fix merge error Jeff Kirsher
2017-10-06 17:57 ` [net-next 09/15] i40e: Display error message if module does not meet thermal requirements Jeff Kirsher
2017-10-06 17:57 ` [net-next 10/15] i40e: Properly maintain flow director filters list Jeff Kirsher
2017-10-06 17:57 ` [net-next 11/15] i40e: implement split PCI error reset handler Jeff Kirsher
2017-10-06 17:57 ` Jeff Kirsher [this message]
2017-10-06 17:57 ` [net-next 13/15] i40evf: enable support for VF VLAN tag stripping control Jeff Kirsher
2017-10-06 17:57 ` [net-next 14/15] i40e: ignore skb->xmit_more when deciding to set RS bit Jeff Kirsher
2017-10-09  9:07   ` David Laight
2017-10-09 16:28     ` Alexander Duyck
2017-10-09 20:10       ` Keller, Jacob E
2017-10-06 17:57 ` [net-next 15/15] i40e/i40evf: organize and re-number feature flags Jeff Kirsher
2017-10-06 22:41 ` [net-next 00/15][pull request] 40GbE Intel Wired LAN Driver Updates 2017-10-06 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171006175727.868-13-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=mariusz.stachura@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).