Skip to contentSkip to conversation

ixgbe: add new bus type for intergrated I/O interface (IOSF)

PATCH New Donald C Skidmore 4 participants 6 messages Jun 18, 2015 – Aug 6, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: add new bus type for intergrated I/O interface (IOSF)

With this patch we add support for a new bus type ixgbe_bus_type_internal. X550em devices use IOSF and not PCIe bus so this new type is to accommodate them.

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   11 ++++++++++-
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    1 +
 drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |    1 +
 3 files changed, 12 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +10 -1
index 5f1b06a..dd53abd 100644
@@ -246,11 +246,19 @@ static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)
 static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
 				     int expected_gts)
 {
+	struct ixgbe_hw *hw = &adapter->hw;
 	int max_gts = 0;
 	enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
 	enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
 	struct pci_dev *pdev;
 
+	/* Some devices are not connected over PCIe and thus do not negotiate
+	 * speed. These devices do not have valid bus info, and thus any report
+	 * we generate may not be correct.
+	 */
+	if (hw->bus.type == ixgbe_bus_type_internal)
+		return;
+
 	/* determine whether to use the parent device */
 	if (ixgbe_pcie_from_parent(&adapter->hw))
 		pdev = adapter->pdev->bus->parent->self;
@@ -8844,9 +8852,10 @@ skip_sriov:
 	hw->eeprom.ops.read(hw, 0x2d, &adapter->eeprom_verl);
 
 	/* pick up the PCI bus settings for reporting later */
-	hw->mac.ops.get_bus_info(hw);
 	if (ixgbe_pcie_from_parent(hw))
 		ixgbe_get_parent_bus_info(adapter);
+	else
+		 hw->mac.ops.get_bus_info(hw);
 
 	/* calculate the expected PCIe bandwidth required for optimal
 	 * performance. Note that some older parts will never have enough
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +1 -0
index 19271e5..37df15f 100644
@@ -3067,6 +3067,7 @@ enum ixgbe_bus_type {
 	ixgbe_bus_type_pci,
 	ixgbe_bus_type_pcix,
 	ixgbe_bus_type_pci_express,
+	ixgbe_bus_type_internal,
 	ixgbe_bus_type_reserved
 };
 
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c +1 -0
index 50e0b05..9257dbc 100644
@@ -619,6 +619,7 @@ static s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw)
   **/
 static s32 ixgbe_get_bus_info_X550em(struct ixgbe_hw *hw)
 {
+	hw->bus.type  = ixgbe_bus_type_internal;
 	hw->bus.width = ixgbe_bus_width_unknown;
 	hw->bus.speed = ixgbe_bus_speed_unknown;
 
#1 lore raw

PATCH 1/1 ixgbe: add new bus type for intergrated I/O interface (IOSF)

Quoted 52 lines · Donald C Skidmore

With this patch we add support for a new bus type ixgbe_bus_type_internal. X550em devices use IOSF and not PCIe bus so this new type is to accommodate them.

---
  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   11 ++++++++++-
  drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    1 +
  drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |    1 +
  3 files changed, 12 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +10 -1
index 5f1b06a..dd53abd 100644
@@ -246,11 +246,19 @@ static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)
  static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
  				     int expected_gts)
  {
+	struct ixgbe_hw *hw = &adapter->hw;
  	int max_gts = 0;
  	enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
  	enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
  	struct pci_dev *pdev;
 
+	/* Some devices are not connected over PCIe and thus do not negotiate
+	 * speed. These devices do not have valid bus info, and thus any report
+	 * we generate may not be correct.
+	 */
+	if (hw->bus.type == ixgbe_bus_type_internal)
+		return;
+
  	/* determine whether to use the parent device */
  	if (ixgbe_pcie_from_parent(&adapter->hw))
  		pdev = adapter->pdev->bus->parent->self;
@@ -8844,9 +8852,10 @@ skip_sriov:
  	hw->eeprom.ops.read(hw, 0x2d, &adapter->eeprom_verl);
 
  	/* pick up the PCI bus settings for reporting later */
-	hw->mac.ops.get_bus_info(hw);
  	if (ixgbe_pcie_from_parent(hw))
  		ixgbe_get_parent_bus_info(adapter);
+	else
+		 hw->mac.ops.get_bus_info(hw);
 
  	/* calculate the expected PCIe bandwidth required for optimal
  	 * performance. Note that some older parts will never have enough
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +0 -0
index 19271e5..37df15f 100644

drivers/net/ethernet/intel/ixgbe/ixgbe_type.h enum ixgbe_bus_type { · line 3073

Quoted 7 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +1 -0
@@ -3067,6 +3067,7 @@ enum ixgbe_bus_type {
  	ixgbe_bus_type_pci,
  	ixgbe_bus_type_pcix,
  	ixgbe_bus_type_pci_express,
+	ixgbe_bus_type_internal,
  	ixgbe_bus_type_reserved
  };
 

Are there really any parts that are listed as using a pci or pcix type? If not you could probably drop those types from the enum since they don't add any value.

#2 lore raw

PATCH 1/1 ixgbe: add new bus type for intergrated I/O interface (IOSF)

Quoted 72 lines

-----Original Message-----
From: Alexander Duyck [mailto:alexander.h.duyck at redhat.com]
Sent: Thursday, June 18, 2015 12:45 PM
To: Skidmore, Donald C; intel-wired-lan at lists.osuosl.org
Subject: Re: [Intel-wired-lan] [net-next PATCH] ixgbe: add new bus type for intergrated I/O interface (IOSF)

Quoted 1 line · Donald C Skidmore

With this patch we add support for a new bus type

ixgbe_bus_type_internal.

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct

Quoted 16 lines

X550em devices use IOSF and not PCIe bus so this new type is to accommodate them.

---
  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   11 ++++++++++-
  drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    1 +
  drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |    1 +
  3 files changed, 12 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +0 -0
index 5f1b06a..dd53abd 100644
@@ -246,11 +246,19 @@ static inline bool ixgbe_pcie_from_parent(struct

ixgbe_hw *hw)

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)

Quoted 10 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -0
  static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
  				     int expected_gts)
  {
+	struct ixgbe_hw *hw = &adapter->hw;
  	int max_gts = 0;
  	enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
  	enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
  	struct pci_dev *pdev;
 
+	/* Some devices are not connected over PCIe and thus do not

negotiate

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct · line 256

Quoted 1 line
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 -0
+	 * speed. These devices do not have valid bus info, and thus any

report

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)

Quoted 8 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +5 -0
+	 * we generate may not be correct.
+	 */
+	if (hw->bus.type == ixgbe_bus_type_internal)
+		return;
+
  	/* determine whether to use the parent device */
  	if (ixgbe_pcie_from_parent(&adapter->hw))
  		pdev = adapter->pdev->bus->parent->self; @@ -8844,9

+8852,10 @@

Quoted 21 lines

skip_sriov:
hw->eeprom.ops.read(hw, 0x2d, &adapter->eeprom_verl);

/* pick up the PCI bus settings for reporting later */

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -1
-	hw->mac.ops.get_bus_info(hw);
  	if (ixgbe_pcie_from_parent(hw))
  		ixgbe_get_parent_bus_info(adapter);
+	else
+		 hw->mac.ops.get_bus_info(hw);
 
  	/* calculate the expected PCIe bandwidth required for optimal
  	 * performance. Note that some older parts will never have enough
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +0 -0
index 19271e5..37df15f 100644
@@ -3067,6 +3067,7 @@ enum ixgbe_bus_type {
  	ixgbe_bus_type_pci,
  	ixgbe_bus_type_pcix,
  	ixgbe_bus_type_pci_express,
Quoted 8 lines

drivers/net/ethernet/intel/ixgbe/ixgbe_type.h enum ixgbe_bus_type { · line 3073

Quoted 4 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +1 -0
+	ixgbe_bus_type_internal,
  	ixgbe_bus_type_reserved
  };
 

Are there really any parts that are listed as using a pci or pcix type? If not you could probably drop those types from the enum since they don't add any value.

I really like that idea. :) Still wouldn't that be worth of its own patch, even though it would be really small patch?

Thanks,
-Don

#3 lore raw

PATCH 1/1 ixgbe: add new bus type for intergrated I/O interface (IOSF)

Quoted 78 lines · Donald C
Quoted 70 lines

-----Original Message-----
From: Alexander Duyck [mailto:alexander.h.duyck at redhat.com]
Sent: Thursday, June 18, 2015 12:45 PM
To: Skidmore, Donald C; intel-wired-lan at lists.osuosl.org
Subject: Re: [Intel-wired-lan] [net-next PATCH] ixgbe: add new bus type for intergrated I/O interface (IOSF)

Quoted 1 line · Donald C Skidmore

With this patch we add support for a new bus type

ixgbe_bus_type_internal.

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct

Quoted 16 lines

X550em devices use IOSF and not PCIe bus so this new type is to accommodate them.

---
   drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   11 ++++++++++-
   drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    1 +
   drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |    1 +
   3 files changed, 12 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +0 -0
index 5f1b06a..dd53abd 100644
@@ -246,11 +246,19 @@ static inline bool ixgbe_pcie_from_parent(struct

ixgbe_hw *hw)

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)

Quoted 10 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -0
   static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
   				     int expected_gts)
   {
+	struct ixgbe_hw *hw = &adapter->hw;
   	int max_gts = 0;
   	enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
   	enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
   	struct pci_dev *pdev;
 
+	/* Some devices are not connected over PCIe and thus do not

negotiate

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct · line 256

Quoted 1 line
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 -0
+	 * speed. These devices do not have valid bus info, and thus any

report

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)

Quoted 8 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +5 -0
+	 * we generate may not be correct.
+	 */
+	if (hw->bus.type == ixgbe_bus_type_internal)
+		return;
+
   	/* determine whether to use the parent device */
   	if (ixgbe_pcie_from_parent(&adapter->hw))
   		pdev = adapter->pdev->bus->parent->self; @@ -8844,9

+8852,10 @@

Quoted 20 lines

skip_sriov:

   	hw->eeprom.ops.read(hw, 0x2d, &adapter->eeprom_verl);

   	/* pick up the PCI bus settings for reporting later */
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -1
-	hw->mac.ops.get_bus_info(hw);
   	if (ixgbe_pcie_from_parent(hw))
   		ixgbe_get_parent_bus_info(adapter);
+	else
+		 hw->mac.ops.get_bus_info(hw);
 
   	/* calculate the expected PCIe bandwidth required for optimal
   	 * performance. Note that some older parts will never have enough
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +0 -0
index 19271e5..37df15f 100644
@@ -3067,6 +3067,7 @@ enum ixgbe_bus_type {
   	ixgbe_bus_type_pci,
   	ixgbe_bus_type_pcix,
Quoted 8 lines

drivers/net/ethernet/intel/ixgbe/ixgbe_type.h enum ixgbe_bus_type { · line 3073

Quoted 5 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +1 -0
   	ixgbe_bus_type_pci_express,
+	ixgbe_bus_type_internal,
   	ixgbe_bus_type_reserved
   };
 

Are there really any parts that are listed as using a pci or pcix type? If not you could probably drop those types from the enum since they don't add any value.

Quoted 4 lines

I really like that idea. :) Still wouldn't that be worth of its own patch, even though it would be really small patch?

Thanks,
-Don

Yeah, probably doesn't need to block this one, but is something that should probably be done as a clean-up eventually.

- Alex

#4 lore raw

PATCH 1/1 ixgbe: add new bus type for intergrated I/O interface (IOSF)

Quoted 92 lines

-----Original Message-----
From: Alexander Duyck [mailto:alexander.duyck at gmail.com]
Sent: Thursday, June 18, 2015 1:03 PM
To: Skidmore, Donald C; Alexander Duyck; intel-wired-lan at lists.osuosl.org
Subject: Re: [Intel-wired-lan] [net-next PATCH] ixgbe: add new bus type for intergrated I/O interface (IOSF)

Quoted 79 lines · Donald C
Quoted 71 lines

-----Original Message-----
From: Alexander Duyck [mailto:alexander.h.duyck at redhat.com]
Sent: Thursday, June 18, 2015 12:45 PM
To: Skidmore, Donald C; intel-wired-lan at lists.osuosl.org
Subject: Re: [Intel-wired-lan] [net-next PATCH] ixgbe: add new bus type for intergrated I/O interface (IOSF)

Quoted 1 line · Donald C Skidmore

With this patch we add support for a new bus type

ixgbe_bus_type_internal.

Quoted 16 lines

X550em devices use IOSF and not PCIe bus so this new type is to accommodate them.

---
   drivers/net/ethernet/intel/ixgbe/ixgbe_main.c |   11 ++++++++++-
   drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    1 +
   drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c |    1 +
   3 files changed, 12 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +0 -0
index 5f1b06a..dd53abd 100644
@@ -246,11 +246,19 @@ static inline bool
Quoted 1 line

ixgbe_pcie_from_parent(struct

ixgbe_hw *hw)

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)

Quoted 10 lines

static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
int expected_gts)
{

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -0
+	struct ixgbe_hw *hw = &adapter->hw;
   	int max_gts = 0;
   	enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
   	enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
   	struct pci_dev *pdev;
 
+	/* Some devices are not connected over PCIe and thus do not

negotiate

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Quoted 1 line
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +1 -0
+	 * speed. These devices do not have valid bus info, and thus any

report

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c static inline bool ixgbe_pcie_from_parent(struct ixgbe_hw *hw)

Quoted 8 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +5 -0
+	 * we generate may not be correct.
+	 */
+	if (hw->bus.type == ixgbe_bus_type_internal)
+		return;
+
   	/* determine whether to use the parent device */
   	if (ixgbe_pcie_from_parent(&adapter->hw))
   		pdev = adapter->pdev->bus->parent->self; @@ -8844,9

+8852,10 @@

Quoted 20 lines

skip_sriov:

   	hw->eeprom.ops.read(hw, 0x2d, &adapter->eeprom_verl);

   	/* pick up the PCI bus settings for reporting later */
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +2 -1
-	hw->mac.ops.get_bus_info(hw);
   	if (ixgbe_pcie_from_parent(hw))
   		ixgbe_get_parent_bus_info(adapter);
+	else
+		 hw->mac.ops.get_bus_info(hw);
 
   	/* calculate the expected PCIe bandwidth required for optimal
   	 * performance. Note that some older parts will never have

enough diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 19271e5..37df15f 100644

drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +0 -0
@@ -3067,6 +3067,7 @@ enum ixgbe_bus_type {
   	ixgbe_bus_type_pci,
   	ixgbe_bus_type_pcix,
Quoted 8 lines

drivers/net/ethernet/intel/ixgbe/ixgbe_type.h enum ixgbe_bus_type { · line 3073

Quoted 5 lines
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +1 -0
   	ixgbe_bus_type_pci_express,
+	ixgbe_bus_type_internal,
   	ixgbe_bus_type_reserved
   };
 

Are there really any parts that are listed as using a pci or pcix type? If not you could probably drop those types from the enum since they don't add any value.

Quoted 1 line

I really like that idea. :) Still wouldn't that be worth of its own patch, even

though it would be really small patch?

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

Thanks,
-Don

Yeah, probably doesn't need to block this one, but is something that should probably be done as a clean-up eventually.

- Alex

I'll whip out a quick patch today.

Thanks for the review.
-Don

#5 lore raw

PATCH 1/1 ixgbe: add new bus type for intergrated I/O interface (IOSF)

In reply to Donald C Skidmore
Quoted 10 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Donald C Skidmore
Sent: Thursday, June 18, 2015 10:24 AM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [net-next PATCH] ixgbe: add new bus type for intergrated I/O interface (IOSF)

Quoted 5 lines

With this patch we add support for a new bus type ixgbe_bus_type_internal. X550em devices use IOSF and not PCIe bus so this new type is to accommodate them.