Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[etherfabric] Make use of pci_bar_start() 64-bit clean
Driver was storing the result of pci_bar_start() and pci_bar_size() in
an int, rather than an unsigned long.

(Bug was introduced in the vendor's tree in commit eac85cd "Port
etherfabric driver to net_device api".)
  • Loading branch information
Michael Brown committed Dec 12, 2008
1 parent 1941c93 commit 57bbf0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/drivers/net/etherfabric.c
Expand Up @@ -4151,7 +4151,8 @@ efab_probe ( struct pci_device *pci,
{
struct net_device *netdev;
struct efab_nic *efab;
int rc, mmio_start, mmio_len;
unsigned long mmio_start, mmio_len;
int rc;

/* Create the network adapter */
netdev = alloc_etherdev ( sizeof ( struct efab_nic ) );
Expand All @@ -4173,7 +4174,7 @@ efab_probe ( struct pci_device *pci,
mmio_start = pci_bar_start ( pci, PCI_BASE_ADDRESS_2 );
mmio_len = pci_bar_size ( pci, PCI_BASE_ADDRESS_2 );
efab->membase = ioremap ( mmio_start, mmio_len );
EFAB_TRACE ( "BAR of %x bytes at phys %x mapped at %p\n",
EFAB_TRACE ( "BAR of %lx bytes at phys %lx mapped at %p\n",
mmio_len, mmio_start, efab->membase );

/* Enable the PCI device */
Expand Down

0 comments on commit 57bbf0e

Please sign in to comment.