netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Aaron Sierra <asierra@xes-inc.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 09/12] igb: Support ports mapped in 64-bit PCI space
Date: Tue, 10 Dec 2013 02:22:38 -0800	[thread overview]
Message-ID: <1386670961-20392-10-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1386670961-20392-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Aaron Sierra <asierra@xes-inc.com>

This patch resolves an issue with 64-bit PCI addresses being truncated
because the return values of pci_resource_start() and pci_resource_end()
were being cast to unsigned long.

Signed-off-by: Aaron Sierra <asierra@xes-inc.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/igb_main.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 6da479b..ed129f1 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2022,7 +2022,6 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	s32 ret_val;
 	static int global_quad_port_a; /* global quad port a indication */
 	const struct e1000_info *ei = igb_info_tbl[ent->driver_data];
-	unsigned long mmio_start, mmio_len;
 	int err, pci_using_dac;
 	u8 part_str[E1000_PBANUM_LENGTH];
 
@@ -2079,11 +2078,8 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	hw->back = adapter;
 	adapter->msg_enable = netif_msg_init(debug, DEFAULT_MSG_ENABLE);
 
-	mmio_start = pci_resource_start(pdev, 0);
-	mmio_len = pci_resource_len(pdev, 0);
-
 	err = -EIO;
-	hw->hw_addr = ioremap(mmio_start, mmio_len);
+	hw->hw_addr = pci_iomap(pdev, 0, 0);
 	if (!hw->hw_addr)
 		goto err_ioremap;
 
@@ -2093,8 +2089,8 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1);
 
-	netdev->mem_start = mmio_start;
-	netdev->mem_end = mmio_start + mmio_len;
+	netdev->mem_start = pci_resource_start(pdev, 0);
+	netdev->mem_end = pci_resource_end(pdev, 0);
 
 	/* PCI config space info */
 	hw->vendor_id = pdev->vendor;
-- 
1.8.3.1

  parent reply	other threads:[~2013-12-10 10:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 10:22 [net-next 00/12][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-12-10 10:22 ` [net-next 01/12] i40e: restrict diag test messages Jeff Kirsher
2013-12-10 10:22 ` [net-next 02/12] i40e: loopback info and set loopback fix Jeff Kirsher
2013-12-10 10:22 ` [net-next 03/12] i40e: complain about out-of-range descriptor request Jeff Kirsher
2013-12-10 10:22 ` [net-next 04/12] i40e: remove and fix confusing define name Jeff Kirsher
2013-12-10 10:22 ` [net-next 05/12] i40e: Bump version number Jeff Kirsher
2013-12-10 10:22 ` [net-next 06/12] ixgbevf: update Kconfig description Jeff Kirsher
2013-12-10 10:22 ` [net-next 07/12] ixgbe: Focus config of head, tail ntc, and ntu all into a single function Jeff Kirsher
2013-12-10 10:22 ` [net-next 08/12] igb: Add media switching feature for i354 PHY's Jeff Kirsher
2013-12-10 10:22 ` Jeff Kirsher [this message]
2013-12-10 10:22 ` [net-next 10/12] igb: Add new feature Media Auto Sense for 82580 devices only Jeff Kirsher
2013-12-10 10:22 ` [net-next 11/12] igb: Convert to use devm_hwmon_device_register_with_groups Jeff Kirsher
2013-12-10 10:22 ` [net-next 12/12] igb: Start temperature sensor attribute index with 1 Jeff Kirsher
2013-12-11  2:30 ` [net-next 00/12][pull request] Intel Wired LAN Driver Updates 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=1386670961-20392-10-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=asierra@xes-inc.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).