Module Name: src Committed By: thorpej Date: Sun Mar 8 03:16:20 UTC 2020
Modified Files: src/sys/dev/pci: if_cas.c Log Message: Use BUS_ADDR_{HI,LO}32(). To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/if_cas.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_cas.c diff -u src/sys/dev/pci/if_cas.c:1.41 src/sys/dev/pci/if_cas.c:1.42 --- src/sys/dev/pci/if_cas.c:1.41 Sun Mar 1 05:39:05 2020 +++ src/sys/dev/pci/if_cas.c Sun Mar 8 03:16:20 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: if_cas.c,v 1.41 2020/03/01 05:39:05 thorpej Exp $ */ +/* $NetBSD: if_cas.c,v 1.42 2020/03/08 03:16:20 thorpej Exp $ */ /* $OpenBSD: if_cas.c,v 1.29 2009/11/29 16:19:38 kettenis Exp $ */ /* @@ -44,7 +44,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.41 2020/03/01 05:39:05 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_cas.c,v 1.42 2020/03/08 03:16:20 thorpej Exp $"); #ifndef _MODULE #include "opt_inet.h" @@ -1211,25 +1211,28 @@ cas_init(struct ifnet *ifp) /* step 6 & 7. Program Descriptor Ring Base Addresses */ KASSERT((CAS_CDTXADDR(sc, 0) & 0x1fff) == 0); bus_space_write_4(t, h, CAS_TX_RING_PTR_HI, - (((uint64_t)CAS_CDTXADDR(sc, 0)) >> 32)); - bus_space_write_4(t, h, CAS_TX_RING_PTR_LO, CAS_CDTXADDR(sc, 0)); + BUS_ADDR_HI32(CAS_CDTXADDR(sc, 0))); + bus_space_write_4(t, h, CAS_TX_RING_PTR_LO, + BUS_ADDR_LO32(CAS_CDTXADDR(sc, 0))); KASSERT((CAS_CDRXADDR(sc, 0) & 0x1fff) == 0); bus_space_write_4(t, h, CAS_RX_DRING_PTR_HI, - (((uint64_t)CAS_CDRXADDR(sc, 0)) >> 32)); - bus_space_write_4(t, h, CAS_RX_DRING_PTR_LO, CAS_CDRXADDR(sc, 0)); + BUS_ADDR_HI32(CAS_CDRXADDR(sc, 0))); + bus_space_write_4(t, h, CAS_RX_DRING_PTR_LO, + BUS_ADDR_LO32(CAS_CDRXADDR(sc, 0))); KASSERT((CAS_CDRXCADDR(sc, 0) & 0x1fff) == 0); bus_space_write_4(t, h, CAS_RX_CRING_PTR_HI, - (((uint64_t)CAS_CDRXCADDR(sc, 0)) >> 32)); - bus_space_write_4(t, h, CAS_RX_CRING_PTR_LO, CAS_CDRXCADDR(sc, 0)); + BUS_ADDR_HI32(CAS_CDRXCADDR(sc, 0))); + bus_space_write_4(t, h, CAS_RX_CRING_PTR_LO, + BUS_ADDR_LO32(CAS_CDRXCADDR(sc, 0))); if (CAS_PLUS(sc)) { KASSERT((CAS_CDRXADDR2(sc, 0) & 0x1fff) == 0); bus_space_write_4(t, h, CAS_RX_DRING_PTR_HI2, - (((uint64_t)CAS_CDRXADDR2(sc, 0)) >> 32)); + BUS_ADDR_HI32(CAS_CDRXADDR2(sc, 0))); bus_space_write_4(t, h, CAS_RX_DRING_PTR_LO2, - CAS_CDRXADDR2(sc, 0)); + BUS_ADDR_LO32(CAS_CDRXADDR2(sc, 0))); } /* step 8. Global Configuration & Interrupt Mask */