All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark D Rustad <mark.d.rustad@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH V5 10/11] ixgbe: Add KR backplane support for x550em_a
Date: Fri, 01 Apr 2016 12:18:46 -0700	[thread overview]
Message-ID: <20160401191846.120975.65186.stgit@mdrustad-wks.jf.intel.com> (raw)
In-Reply-To: <20160401191701.120975.34684.stgit@mdrustad-wks.jf.intel.com>

Add support for x550em_a-based KR backplane devices.

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
---
Changes in V3:
- Move mac type check into ixgbe_setup_kr_x550em
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |    2 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    2 ++
 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |   18 ++++++++++++++----
 3 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 41bc816bbe87..0d5893a60e08 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -130,6 +130,8 @@ static const struct pci_device_id ixgbe_pci_tbl[] = {
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_KR), board_X550EM_x},
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_10G_T), board_X550EM_x},
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_SFP), board_X550EM_x},
+	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_KR), board_x550em_a },
+	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_KR_L), board_x550em_a },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SFP_N), board_x550em_a },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SGMII), board_x550em_a },
 	{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_A_SGMII_L), board_x550em_a },
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index d4cff4d7b4fa..af43b0c9c6c4 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -80,6 +80,8 @@
 #define IXGBE_DEV_ID_X550EM_X_SFP	0x15AC
 #define IXGBE_DEV_ID_X550EM_X_10G_T	0x15AD
 #define IXGBE_DEV_ID_X550EM_X_1G_T	0x15AE
+#define IXGBE_DEV_ID_X550EM_A_KR	0x15C2
+#define IXGBE_DEV_ID_X550EM_A_KR_L	0x15C3
 #define IXGBE_DEV_ID_X550EM_A_SFP_N	0x15C4
 #define IXGBE_DEV_ID_X550EM_A_SGMII	0x15C6
 #define IXGBE_DEV_ID_X550EM_A_SGMII_L	0x15C7
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index c59556af77d5..318d4aea779e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -291,6 +291,8 @@ static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw)
 		hw->phy.type = ixgbe_phy_x550em_kx4;
 		break;
 	case IXGBE_DEV_ID_X550EM_X_KR:
+	case IXGBE_DEV_ID_X550EM_A_KR:
+	case IXGBE_DEV_ID_X550EM_A_KR_L:
 		hw->phy.type = ixgbe_phy_x550em_kr;
 		break;
 	case IXGBE_DEV_ID_X550EM_X_1G_T:
@@ -1984,13 +1986,17 @@ static s32 ixgbe_setup_kx4_x550em(struct ixgbe_hw *hw)
 	return status;
 }
 
-/**  ixgbe_setup_kr_x550em - Configure the KR PHY.
- *   @hw: pointer to hardware structure
+/**
+ * ixgbe_setup_kr_x550em - Configure the KR PHY
+ * @hw: pointer to hardware structure
  *
- *   Configures the integrated KR PHY.
+ * Configures the integrated KR PHY for X550EM_x.
  **/
 static s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw)
 {
+	if (hw->mac.type != ixgbe_mac_X550EM_x)
+		return 0;
+
 	return ixgbe_setup_kr_speed_x550em(hw, hw->phy.autoneg_advertised);
 }
 
@@ -2196,7 +2202,9 @@ static s32 ixgbe_setup_fc_x550em(struct ixgbe_hw *hw)
 		return IXGBE_ERR_CONFIG;
 	}
 
-	if (hw->device_id != IXGBE_DEV_ID_X550EM_X_KR)
+	if (hw->device_id != IXGBE_DEV_ID_X550EM_X_KR &&
+	    hw->device_id != IXGBE_DEV_ID_X550EM_A_KR &&
+	    hw->device_id != IXGBE_DEV_ID_X550EM_A_KR_L)
 		return 0;
 
 	rc = hw->mac.ops.read_iosf_sb_reg(hw,
@@ -2437,6 +2445,8 @@ static enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw)
 		/* Fallthrough */
 	case IXGBE_DEV_ID_X550EM_X_KR:
 	case IXGBE_DEV_ID_X550EM_X_KX4:
+	case IXGBE_DEV_ID_X550EM_A_KR:
+	case IXGBE_DEV_ID_X550EM_A_KR_L:
 		media_type = ixgbe_media_type_backplane;
 		break;
 	case IXGBE_DEV_ID_X550EM_X_SFP:


  parent reply	other threads:[~2016-04-01 19:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 19:17 [Intel-wired-lan] [PATCH V5 00/11] ixgbe: Add support for x550em_a MAC Mark D Rustad
2016-04-01 19:17 ` [Intel-wired-lan] [PATCH V5 01/11] ixgbe: Add definitions for x550em_a 10G MAC Mark D Rustad
2016-04-06 16:00   ` Bowers, AndrewX
2016-04-01 19:18 ` [Intel-wired-lan] [PATCH V5 02/11] ixgbe: Use method pointer to access IOSF devices Mark D Rustad
2016-04-04 19:15   ` Bowers, AndrewX
2016-04-06 16:29   ` Bowers, AndrewX
2016-04-01 19:18 ` [Intel-wired-lan] [PATCH V5 03/11] ixgbe: Add support for x550em_a 10G MAC type Mark D Rustad
2016-04-06 16:33   ` Bowers, AndrewX
2016-04-01 19:18 ` [Intel-wired-lan] [PATCH V5 04/11] ixgbe: Use new methods for PHY access Mark D Rustad
2016-04-06 16:37   ` Bowers, AndrewX
2016-04-01 19:18 ` [Intel-wired-lan] [PATCH V5 05/11] ixgbe: Read and set instance id Mark D Rustad
2016-04-06 18:35   ` Bowers, AndrewX
2016-04-01 19:18 ` [Intel-wired-lan] [PATCH V5 06/11] ixgbe: Read and parse NW_MNG_IF_SEL register Mark D Rustad
2016-04-06 18:36   ` Bowers, AndrewX
2016-04-01 19:18 ` [Intel-wired-lan] [PATCH V5 07/11] ixgbe: Introduce function to control MDIO speed Mark D Rustad
2016-04-06 18:36   ` Bowers, AndrewX
2016-04-01 19:18 ` [Intel-wired-lan] [PATCH V5 08/11] ixgbe: Add support for SFPs with retimer Mark D Rustad
2016-04-06 18:38   ` Bowers, AndrewX
2016-04-01 19:18 ` [Intel-wired-lan] [PATCH V5 09/11] ixgbe: Add support for SGMII backplane interface Mark D Rustad
2016-04-01 19:18 ` Mark D Rustad [this message]
2016-04-01 19:18 ` [Intel-wired-lan] [PATCH V5 11/11] ixgbe: Bump version number Mark D Rustad
2016-04-04 22:56   ` 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=20160401191846.120975.65186.stgit@mdrustad-wks.jf.intel.com \
    --to=mark.d.rustad@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.