diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-05-29 20:26:55 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-05-29 20:26:55 +0000 |
commit | 9e7bb2be6faed4e7da5805774a3f10b85c00ee2e (patch) | |
tree | 3ea953698762b7ae6f8aefe9a7107d3815ade537 /sys/dev/pci | |
parent | 6b31d06b47182585172d9af84cbbc8552edfeaca (diff) |
Do not cast a bus_addr_t back in to a pointer as these types may not be
compatible; plus this makes a computation clearer. ok damien@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_wpi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c index f34ed132a95..cb01b69d85d 100644 --- a/sys/dev/pci/if_wpi.c +++ b/sys/dev/pci/if_wpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wpi.c,v 1.13 2006/05/25 09:26:58 damien Exp $ */ +/* $OpenBSD: if_wpi.c,v 1.14 2006/05/29 20:26:54 miod Exp $ */ /*- * Copyright (c) 2006 @@ -2380,8 +2380,8 @@ wpi_init(struct ifnet *ifp) /* init Rx ring */ wpi_mem_lock(sc); WPI_WRITE(sc, WPI_RX_BASE, sc->rxq.desc_dma.paddr); - WPI_WRITE(sc, WPI_RX_RIDX_PTR, - (uint32_t)&((struct wpi_shared *)sc->shared_dma.paddr)->next); + WPI_WRITE(sc, WPI_RX_RIDX_PTR, sc->shared_dma.paddr + + offsetof(struct wpi_shared, next)); WPI_WRITE(sc, WPI_RX_WIDX, (WPI_RX_RING_COUNT - 1) & ~7); WPI_WRITE(sc, WPI_RX_CONFIG, 0xa9601010); wpi_mem_unlock(sc); |