|
@@ -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,
|
|
static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
|
|
int expected_gts)
|
|
int expected_gts)
|
|
{
|
|
{
|
|
|
|
+ struct ixgbe_hw *hw = &adapter->hw;
|
|
int max_gts = 0;
|
|
int max_gts = 0;
|
|
enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
|
|
enum pci_bus_speed speed = PCI_SPEED_UNKNOWN;
|
|
enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
|
|
enum pcie_link_width width = PCIE_LNK_WIDTH_UNKNOWN;
|
|
struct pci_dev *pdev;
|
|
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 */
|
|
/* determine whether to use the parent device */
|
|
if (ixgbe_pcie_from_parent(&adapter->hw))
|
|
if (ixgbe_pcie_from_parent(&adapter->hw))
|
|
pdev = adapter->pdev->bus->parent->self;
|
|
pdev = adapter->pdev->bus->parent->self;
|
|
@@ -8837,9 +8845,10 @@ skip_sriov:
|
|
hw->eeprom.ops.read(hw, 0x2d, &adapter->eeprom_verl);
|
|
hw->eeprom.ops.read(hw, 0x2d, &adapter->eeprom_verl);
|
|
|
|
|
|
/* pick up the PCI bus settings for reporting later */
|
|
/* pick up the PCI bus settings for reporting later */
|
|
- hw->mac.ops.get_bus_info(hw);
|
|
|
|
if (ixgbe_pcie_from_parent(hw))
|
|
if (ixgbe_pcie_from_parent(hw))
|
|
ixgbe_get_parent_bus_info(adapter);
|
|
ixgbe_get_parent_bus_info(adapter);
|
|
|
|
+ else
|
|
|
|
+ hw->mac.ops.get_bus_info(hw);
|
|
|
|
|
|
/* calculate the expected PCIe bandwidth required for optimal
|
|
/* calculate the expected PCIe bandwidth required for optimal
|
|
* performance. Note that some older parts will never have enough
|
|
* performance. Note that some older parts will never have enough
|