|
@@ -270,9 +270,6 @@ static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
|
|
int expected_gts)
|
|
int expected_gts)
|
|
{
|
|
{
|
|
struct ixgbe_hw *hw = &adapter->hw;
|
|
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;
|
|
struct pci_dev *pdev;
|
|
|
|
|
|
/* Some devices are not connected over PCIe and thus do not negotiate
|
|
/* Some devices are not connected over PCIe and thus do not negotiate
|
|
@@ -288,49 +285,7 @@ static void ixgbe_check_minimum_link(struct ixgbe_adapter *adapter,
|
|
else
|
|
else
|
|
pdev = adapter->pdev;
|
|
pdev = adapter->pdev;
|
|
|
|
|
|
- if (pcie_get_minimum_link(pdev, &speed, &width) ||
|
|
|
|
- speed == PCI_SPEED_UNKNOWN || width == PCIE_LNK_WIDTH_UNKNOWN) {
|
|
|
|
- e_dev_warn("Unable to determine PCI Express bandwidth.\n");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- switch (speed) {
|
|
|
|
- case PCIE_SPEED_2_5GT:
|
|
|
|
- /* 8b/10b encoding reduces max throughput by 20% */
|
|
|
|
- max_gts = 2 * width;
|
|
|
|
- break;
|
|
|
|
- case PCIE_SPEED_5_0GT:
|
|
|
|
- /* 8b/10b encoding reduces max throughput by 20% */
|
|
|
|
- max_gts = 4 * width;
|
|
|
|
- break;
|
|
|
|
- case PCIE_SPEED_8_0GT:
|
|
|
|
- /* 128b/130b encoding reduces throughput by less than 2% */
|
|
|
|
- max_gts = 8 * width;
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- e_dev_warn("Unable to determine PCI Express bandwidth.\n");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- e_dev_info("PCI Express bandwidth of %dGT/s available\n",
|
|
|
|
- max_gts);
|
|
|
|
- e_dev_info("(Speed:%s, Width: x%d, Encoding Loss:%s)\n",
|
|
|
|
- (speed == PCIE_SPEED_8_0GT ? "8.0GT/s" :
|
|
|
|
- speed == PCIE_SPEED_5_0GT ? "5.0GT/s" :
|
|
|
|
- speed == PCIE_SPEED_2_5GT ? "2.5GT/s" :
|
|
|
|
- "Unknown"),
|
|
|
|
- width,
|
|
|
|
- (speed == PCIE_SPEED_2_5GT ? "20%" :
|
|
|
|
- speed == PCIE_SPEED_5_0GT ? "20%" :
|
|
|
|
- speed == PCIE_SPEED_8_0GT ? "<2%" :
|
|
|
|
- "Unknown"));
|
|
|
|
-
|
|
|
|
- if (max_gts < expected_gts) {
|
|
|
|
- e_dev_warn("This is not sufficient for optimal performance of this card.\n");
|
|
|
|
- e_dev_warn("For optimal performance, at least %dGT/s of bandwidth is required.\n",
|
|
|
|
- expected_gts);
|
|
|
|
- e_dev_warn("A slot with more lanes and/or higher speed is suggested.\n");
|
|
|
|
- }
|
|
|
|
|
|
+ pcie_print_link_status(pdev);
|
|
}
|
|
}
|
|
|
|
|
|
static void ixgbe_service_event_schedule(struct ixgbe_adapter *adapter)
|
|
static void ixgbe_service_event_schedule(struct ixgbe_adapter *adapter)
|