Browse Source

[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".)
tags/v0.9.7
Michael Brown 15 years ago
parent
commit
57bbf0ec98
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/drivers/net/etherfabric.c

+ 3
- 2
src/drivers/net/etherfabric.c View File

@@ -4151,7 +4151,8 @@ efab_probe ( struct pci_device *pci,
4151 4151
 {
4152 4152
 	struct net_device *netdev;
4153 4153
 	struct efab_nic *efab;
4154
-	int rc, mmio_start, mmio_len;
4154
+	unsigned long mmio_start, mmio_len;
4155
+	int rc;
4155 4156
 
4156 4157
 	/* Create the network adapter */
4157 4158
 	netdev = alloc_etherdev ( sizeof ( struct efab_nic ) );
@@ -4173,7 +4174,7 @@ efab_probe ( struct pci_device *pci,
4173 4174
 	mmio_start = pci_bar_start ( pci, PCI_BASE_ADDRESS_2 );
4174 4175
 	mmio_len = pci_bar_size ( pci, PCI_BASE_ADDRESS_2 );
4175 4176
 	efab->membase = ioremap ( mmio_start, mmio_len );
4176
-	EFAB_TRACE ( "BAR of %x bytes at phys %x mapped at %p\n",
4177
+	EFAB_TRACE ( "BAR of %lx bytes at phys %lx mapped at %p\n",
4177 4178
 		     mmio_len, mmio_start, efab->membase );
4178 4179
 
4179 4180
 	/* Enable the PCI device */

Loading…
Cancel
Save