Skip to content

Commit

Permalink
sfc: Use resource_size_t for PCI bus address
Browse files Browse the repository at this point in the history
This should make the driver work on 32-bit systems with 64-bit PCI support.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Ben Hutchings authored and Jeff Garzik committed May 22, 2008
1 parent 184be0c commit 086ea35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions drivers/net/sfc/efx.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,15 +778,16 @@ static int efx_init_io(struct efx_nic *efx)
efx->membase = ioremap_nocache(efx->membase_phys,
efx->type->mem_map_size);
if (!efx->membase) {
EFX_ERR(efx, "could not map memory BAR %d at %lx+%x\n",
efx->type->mem_bar, efx->membase_phys,
EFX_ERR(efx, "could not map memory BAR %d at %llx+%x\n",
efx->type->mem_bar,
(unsigned long long)efx->membase_phys,
efx->type->mem_map_size);
rc = -ENOMEM;
goto fail4;
}
EFX_LOG(efx, "memory BAR %u at %lx+%x (virtual %p)\n",
efx->type->mem_bar, efx->membase_phys, efx->type->mem_map_size,
efx->membase);
EFX_LOG(efx, "memory BAR %u at %llx+%x (virtual %p)\n",
efx->type->mem_bar, (unsigned long long)efx->membase_phys,
efx->type->mem_map_size, efx->membase);

return 0;

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/sfc/net_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ struct efx_nic {
struct workqueue_struct *workqueue;
struct work_struct reset_work;
struct delayed_work monitor_work;
unsigned long membase_phys;
resource_size_t membase_phys;
void __iomem *membase;
spinlock_t biu_lock;
enum efx_int_mode interrupt_mode;
Expand Down

0 comments on commit 086ea35

Please sign in to comment.