|
@@ -49,6 +49,27 @@ static s32 ixgbe_setup_copper_link_speed_82598(struct ixgbe_hw *hw,
|
|
|
static s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset,
|
|
|
u8 *eeprom_data);
|
|
|
|
|
|
+/**
|
|
|
+ * ixgbe_get_pcie_msix_count_82598 - Gets MSI-X vector count
|
|
|
+ * @hw: pointer to hardware structure
|
|
|
+ *
|
|
|
+ * Read PCIe configuration space, and get the MSI-X vector count from
|
|
|
+ * the capabilities table.
|
|
|
+ **/
|
|
|
+u16 ixgbe_get_pcie_msix_count_82598(struct ixgbe_hw *hw)
|
|
|
+{
|
|
|
+ struct ixgbe_adapter *adapter = hw->back;
|
|
|
+ u16 msix_count;
|
|
|
+ pci_read_config_word(adapter->pdev, IXGBE_PCIE_MSIX_82598_CAPS,
|
|
|
+ &msix_count);
|
|
|
+ msix_count &= IXGBE_PCIE_MSIX_TBL_SZ_MASK;
|
|
|
+
|
|
|
+ /* MSI-X count is zero-based in HW, so increment to give proper value */
|
|
|
+ msix_count++;
|
|
|
+
|
|
|
+ return msix_count;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
*/
|
|
|
static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw)
|
|
@@ -106,6 +127,7 @@ static s32 ixgbe_get_invariants_82598(struct ixgbe_hw *hw)
|
|
|
mac->num_rar_entries = IXGBE_82598_RAR_ENTRIES;
|
|
|
mac->max_rx_queues = IXGBE_82598_MAX_RX_QUEUES;
|
|
|
mac->max_tx_queues = IXGBE_82598_MAX_TX_QUEUES;
|
|
|
+ mac->max_msix_vectors = ixgbe_get_pcie_msix_count_82598(hw);
|
|
|
|
|
|
out:
|
|
|
return ret_val;
|