Commit 7b06a690 authored by Jarod Wilson's avatar Jarod Wilson Committed by Jeff Kirsher

igb: improve handling of disconnected adapters

Clean up array_rd32 so that it uses igb_rd32 the same as rd32, per the
suggestion of Alexander Duyck, and use io_addr in more places, so that
we don't have the need to call E1000_REMOVED (which simply looks for a
null hw_addr) nearly as much.
Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
Acked-by: default avatarAlexander Duyck <aduyck@mirantis.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent be06998f
...@@ -386,8 +386,7 @@ do { \ ...@@ -386,8 +386,7 @@ do { \
#define array_wr32(reg, offset, value) \ #define array_wr32(reg, offset, value) \
wr32((reg) + ((offset) << 2), (value)) wr32((reg) + ((offset) << 2), (value))
#define array_rd32(reg, offset) \ #define array_rd32(reg, offset) (igb_rd32(hw, reg + ((offset) << 2)))
(readl(hw->hw_addr + reg + ((offset) << 2)))
/* DMA Coalescing registers */ /* DMA Coalescing registers */
#define E1000_PCIEMISC 0x05BB8 /* PCIE misc config register */ #define E1000_PCIEMISC 0x05BB8 /* PCIE misc config register */
......
...@@ -946,7 +946,6 @@ static void igb_configure_msix(struct igb_adapter *adapter) ...@@ -946,7 +946,6 @@ static void igb_configure_msix(struct igb_adapter *adapter)
static int igb_request_msix(struct igb_adapter *adapter) static int igb_request_msix(struct igb_adapter *adapter)
{ {
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
struct e1000_hw *hw = &adapter->hw;
int i, err = 0, vector = 0, free_vector = 0; int i, err = 0, vector = 0, free_vector = 0;
err = request_irq(adapter->msix_entries[vector].vector, err = request_irq(adapter->msix_entries[vector].vector,
...@@ -959,7 +958,7 @@ static int igb_request_msix(struct igb_adapter *adapter) ...@@ -959,7 +958,7 @@ static int igb_request_msix(struct igb_adapter *adapter)
vector++; vector++;
q_vector->itr_register = hw->hw_addr + E1000_EITR(vector); q_vector->itr_register = adapter->io_addr + E1000_EITR(vector);
if (q_vector->rx.ring && q_vector->tx.ring) if (q_vector->rx.ring && q_vector->tx.ring)
sprintf(q_vector->name, "%s-TxRx-%u", netdev->name, sprintf(q_vector->name, "%s-TxRx-%u", netdev->name,
...@@ -1230,7 +1229,7 @@ static int igb_alloc_q_vector(struct igb_adapter *adapter, ...@@ -1230,7 +1229,7 @@ static int igb_alloc_q_vector(struct igb_adapter *adapter,
q_vector->tx.work_limit = adapter->tx_work_limit; q_vector->tx.work_limit = adapter->tx_work_limit;
/* initialize ITR configuration */ /* initialize ITR configuration */
q_vector->itr_register = adapter->hw.hw_addr + E1000_EITR(0); q_vector->itr_register = adapter->io_addr + E1000_EITR(0);
q_vector->itr_val = IGB_START_ITR; q_vector->itr_val = IGB_START_ITR;
/* initialize pointer to rings */ /* initialize pointer to rings */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment