All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Jarod Wilson <jarod@redhat.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 16/17] igb: improve handling of disconnected adapters
Date: Sun, 13 Dec 2015 00:31:29 -0800	[thread overview]
Message-ID: <1449995490-17020-17-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1449995490-17020-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Jarod Wilson <jarod@redhat.com>

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: Jarod Wilson <jarod@redhat.com>
Acked-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/e1000_regs.h | 3 +--
 drivers/net/ethernet/intel/igb/igb_main.c   | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/e1000_regs.h b/drivers/net/ethernet/intel/igb/e1000_regs.h
index 0fdcd4d..21d9d02 100644
--- a/drivers/net/ethernet/intel/igb/e1000_regs.h
+++ b/drivers/net/ethernet/intel/igb/e1000_regs.h
@@ -386,8 +386,7 @@ do { \
 #define array_wr32(reg, offset, value) \
 	wr32((reg) + ((offset) << 2), (value))
 
-#define array_rd32(reg, offset) \
-	(readl(hw->hw_addr + reg + ((offset) << 2)))
+#define array_rd32(reg, offset) (igb_rd32(hw, reg + ((offset) << 2)))
 
 /* DMA Coalescing registers */
 #define E1000_PCIEMISC	0x05BB8 /* PCIE misc config register */
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index fa3b4cb..7afde45 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -946,7 +946,6 @@ static void igb_configure_msix(struct igb_adapter *adapter)
 static int igb_request_msix(struct igb_adapter *adapter)
 {
 	struct net_device *netdev = adapter->netdev;
-	struct e1000_hw *hw = &adapter->hw;
 	int i, err = 0, vector = 0, free_vector = 0;
 
 	err = request_irq(adapter->msix_entries[vector].vector,
@@ -959,7 +958,7 @@ static int igb_request_msix(struct igb_adapter *adapter)
 
 		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)
 			sprintf(q_vector->name, "%s-TxRx-%u", netdev->name,
@@ -1230,7 +1229,7 @@ static int igb_alloc_q_vector(struct igb_adapter *adapter,
 	q_vector->tx.work_limit = adapter->tx_work_limit;
 
 	/* 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;
 
 	/* initialize pointer to rings */
-- 
2.5.0

  parent reply	other threads:[~2015-12-13  8:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13  8:31 [net-next 00/17][pull request] 1GbE Intel Wired LAN Driver Updates 2015-12-12 Jeff Kirsher
2015-12-13  8:31 ` [net-next 01/17] e1000: make eeprom read/write scheduler friendly Jeff Kirsher
2015-12-13  8:31 ` [net-next 02/17] igb: add 88E1543 initialization code Jeff Kirsher
2015-12-13  8:31 ` [net-next 03/17] e1000: fix data race between tx_ring->next_to_clean Jeff Kirsher
2015-12-13  8:31 ` [net-next 04/17] igb: don't unmap NULL hw_addr Jeff Kirsher
2015-12-13  8:31 ` [net-next 05/17] e1000: Remove checkpatch coding style errors Jeff Kirsher
2015-12-13  8:31 ` [net-next 06/17] igb: use the correct i210 register for EEMNGCTL Jeff Kirsher
2015-12-13  8:31 ` [net-next 07/17] e1000: clean up the checking logic Jeff Kirsher
2015-12-13  8:31 ` [net-next 08/17] e1000: fix a typo in the comment Jeff Kirsher
2015-12-13  8:31 ` [net-next 09/17] e1000e: clean up the local variable Jeff Kirsher
2015-12-13  8:31 ` [net-next 10/17] e1000: fix kernel-doc argument being missing Jeff Kirsher
2015-12-13  8:31 ` [net-next 11/17] e1000: get rid of duplicate exit path Jeff Kirsher
2015-12-13  8:31 ` [net-next 12/17] e1000: Elementary checkpatch warnings and checks removed Jeff Kirsher
2015-12-13  8:31 ` [net-next 13/17] e1000e: fix division by zero on jumbo MTUs Jeff Kirsher
2015-12-13  8:31 ` [net-next 14/17] e1000e: Increase timeout of polling bit RSPCIPHY Jeff Kirsher
2015-12-13  8:31 ` [net-next 15/17] igb: fix NULL derefs due to skipped SR-IOV enabling Jeff Kirsher
2015-12-13  8:31 ` Jeff Kirsher [this message]
2015-12-13  8:31 ` [net-next 17/17] e1000e: initial support for i219-LM (3) Jeff Kirsher
2015-12-13 22:11 ` [net-next 00/17][pull request] 1GbE Intel Wired LAN Driver Updates 2015-12-12 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1449995490-17020-17-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jarod@redhat.com \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.