All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bimmy Pujari <bimmy.pujari@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S52-V2 14/15] i40e: Blink LED on 1G BaseT boards
Date: Tue,  8 Nov 2016 13:05:18 -0800	[thread overview]
Message-ID: <1478639119-14656-15-git-send-email-bimmy.pujari@intel.com> (raw)
In-Reply-To: <1478639119-14656-1-git-send-email-bimmy.pujari@intel.com>

From: Henry Tieman <henry.w.tieman@intel.com>

Before this patch "ethtool -p" was not blinking the LEDs on boards
with 1G BaseT PHYs.

This commit identifies 1G BaseT boards as having the LEDs connected
to the MAC. Also, renamed the flag to be more descriptive of usage.
The flag is now I40E_FLAG_PHY_CONTROLS_LEDS.

Signed-off-by: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>
Signed-off-by: Henry Tieman <henry.w.tieman@intel.com>
Change-ID: I4eb741da9780da7849ddf2dc4c0cb27ffa42a801
---
 drivers/net/ethernet/intel/i40e/i40e.h         |  2 +-
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 10 +++++-----
 drivers/net/ethernet/intel/i40e/i40e_main.c    |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 06e3c23..b8f2978 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -356,7 +356,7 @@ struct i40e_pf {
 #define I40E_FLAG_NO_DCB_SUPPORT		BIT_ULL(45)
 #define I40E_FLAG_USE_SET_LLDP_MIB		BIT_ULL(46)
 #define I40E_FLAG_STOP_FW_LLDP			BIT_ULL(47)
-#define I40E_FLAG_HAVE_10GBASET_PHY		BIT_ULL(48)
+#define I40E_FLAG_PHY_CONTROLS_LEDS		BIT_ULL(48)
 #define I40E_FLAG_PF_MAC			BIT_ULL(50)
 #define I40E_FLAG_TRUE_PROMISC_SUPPORT		BIT_ULL(51)
 #define I40E_FLAG_HAVE_CRT_RETIMER		BIT_ULL(52)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 76753e1..6ba0035 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1890,7 +1890,7 @@ static int i40e_set_phys_id(struct net_device *netdev,
 
 	switch (state) {
 	case ETHTOOL_ID_ACTIVE:
-		if (!(pf->flags & I40E_FLAG_HAVE_10GBASET_PHY)) {
+		if (!(pf->flags & I40E_FLAG_PHY_CONTROLS_LEDS)) {
 			pf->led_status = i40e_led_get(hw);
 		} else {
 			i40e_aq_set_phy_debug(hw, I40E_PHY_DEBUG_ALL, NULL);
@@ -1900,20 +1900,20 @@ static int i40e_set_phys_id(struct net_device *netdev,
 		}
 		return blink_freq;
 	case ETHTOOL_ID_ON:
-		if (!(pf->flags & I40E_FLAG_HAVE_10GBASET_PHY))
+		if (!(pf->flags & I40E_FLAG_PHY_CONTROLS_LEDS))
 			i40e_led_set(hw, 0xf, false);
 		else
 			ret = i40e_led_set_phy(hw, true, pf->led_status, 0);
 		break;
 	case ETHTOOL_ID_OFF:
-		if (!(pf->flags & I40E_FLAG_HAVE_10GBASET_PHY))
+		if (!(pf->flags & I40E_FLAG_PHY_CONTROLS_LEDS))
 			i40e_led_set(hw, 0x0, false);
 		else
 			ret = i40e_led_set_phy(hw, false, pf->led_status, 0);
 		break;
 	case ETHTOOL_ID_INACTIVE:
-		if (!(pf->flags & I40E_FLAG_HAVE_10GBASET_PHY)) {
-			i40e_led_set(hw, false, pf->led_status);
+		if (!(pf->flags & I40E_FLAG_PHY_CONTROLS_LEDS)) {
+			i40e_led_set(hw, pf->led_status, false);
 		} else {
 			ret = i40e_led_set_phy(hw, false, pf->led_status,
 					       (pf->phy_led_val |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index eddb14c..8443e8c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -11368,8 +11368,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 						       pf->main_vsi_seid);
 
 	if ((pf->hw.device_id == I40E_DEV_ID_10G_BASE_T) ||
-	    (pf->hw.device_id == I40E_DEV_ID_10G_BASE_T4))
-		pf->flags |= I40E_FLAG_HAVE_10GBASET_PHY;
+		(pf->hw.device_id == I40E_DEV_ID_10G_BASE_T4))
+		pf->flags |= I40E_FLAG_PHY_CONTROLS_LEDS;
 	if (pf->hw.device_id == I40E_DEV_ID_SFP_I_X722)
 		pf->flags |= I40E_FLAG_HAVE_CRT_RETIMER;
 	/* print a string summarizing features */
-- 
2.4.11


  parent reply	other threads:[~2016-11-08 21:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 21:05 [Intel-wired-lan] [next PATCH S52-V2 00/15] i40e/i40evf updates Bimmy Pujari
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 01/15] i40evf: check for msix_entries null dereference Bimmy Pujari
2016-11-16 18:56   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 02/15] i40e: Remove unreachable code Bimmy Pujari
2016-11-16 18:58   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 03/15] i40e: Pass unknown PHY type for unknown PHYs Bimmy Pujari
2016-11-16 19:21   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 04/15] i40evf: protect against NULL msix_entries and q_vectors pointers Bimmy Pujari
2016-11-16 19:24   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 05/15] i40e: Fix for ethtool Supported link modes Bimmy Pujari
2016-11-16 19:27   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 06/15] i40e: set broadcast promiscuous mode for each active VLAN Bimmy Pujari
2016-11-21 21:17   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 07/15] i40e/i40evf: replace for memcpy with single memcpy call in ethtool Bimmy Pujari
2016-11-16 20:34   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 08/15] i40e: change message to only appear when extra debug info is wanted Bimmy Pujari
2016-11-16 20:39   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 09/15] i40e: Driver prints log message on link speed change Bimmy Pujari
2016-11-16 23:51   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 10/15] i40e: simplify txd use count calculation Bimmy Pujari
2016-11-17 18:06   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 11/15] i40e: restore workaround for removing default MAC filter Bimmy Pujari
2016-11-17 18:11   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 12/15] i40e/i40evf: napi_poll must return the work done Bimmy Pujari
2016-11-17 18:27   ` Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 13/15] i40e: remove code to handle dev_addr specially Bimmy Pujari
2016-11-17 18:33   ` Bowers, AndrewX
2016-11-08 21:05 ` Bimmy Pujari [this message]
2016-11-21 20:00   ` [Intel-wired-lan] [next PATCH S52-V2 14/15] i40e: Blink LED on 1G BaseT boards Bowers, AndrewX
2016-11-08 21:05 ` [Intel-wired-lan] [next PATCH S52-V2 15/15] Changed version from 1.6.21 to 1.6.25 Bimmy Pujari
2016-11-17 18:36   ` Bowers, AndrewX

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=1478639119-14656-15-git-send-email-bimmy.pujari@intel.com \
    --to=bimmy.pujari@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.