diff options
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_vr.c | 3 | ||||
-rw-r--r-- | sys/pci/if_vrreg.h | 22 |
2 files changed, 7 insertions, 18 deletions
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c index d657634..d45c850 100644 --- a/sys/pci/if_vr.c +++ b/sys/pci/if_vr.c @@ -689,9 +689,6 @@ vr_attach(dev) goto fail; } - sc->vr_btag = rman_get_bustag(sc->vr_res); - sc->vr_bhandle = rman_get_bushandle(sc->vr_res); - /* Allocate interrupt */ rid = 0; sc->vr_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, diff --git a/sys/pci/if_vrreg.h b/sys/pci/if_vrreg.h index b1baca9..3cd4176 100644 --- a/sys/pci/if_vrreg.h +++ b/sys/pci/if_vrreg.h @@ -455,8 +455,6 @@ struct vr_mii_frame { struct vr_softc { struct ifnet *vr_ifp; /* interface info */ device_t vr_dev; - bus_space_handle_t vr_bhandle; /* bus space handle */ - bus_space_tag_t vr_btag; /* bus space tag */ struct resource *vr_res; struct resource *vr_irq; void *vr_intrhand; @@ -485,19 +483,13 @@ struct vr_softc { /* * register space access macros */ -#define CSR_WRITE_4(sc, reg, val) \ - bus_space_write_4(sc->vr_btag, sc->vr_bhandle, reg, val) -#define CSR_WRITE_2(sc, reg, val) \ - bus_space_write_2(sc->vr_btag, sc->vr_bhandle, reg, val) -#define CSR_WRITE_1(sc, reg, val) \ - bus_space_write_1(sc->vr_btag, sc->vr_bhandle, reg, val) - -#define CSR_READ_4(sc, reg) \ - bus_space_read_4(sc->vr_btag, sc->vr_bhandle, reg) -#define CSR_READ_2(sc, reg) \ - bus_space_read_2(sc->vr_btag, sc->vr_bhandle, reg) -#define CSR_READ_1(sc, reg) \ - bus_space_read_1(sc->vr_btag, sc->vr_bhandle, reg) +#define CSR_WRITE_4(sc, reg, val) bus_write_4(sc->vr_res, reg, val) +#define CSR_WRITE_2(sc, reg, val) bus_write_2(sc->vr_res, reg, val) +#define CSR_WRITE_1(sc, reg, val) bus_write_1(sc->vr_res, reg, val) + +#define CSR_READ_4(sc, reg) bus_read_4(sc->vr_res, reg) +#define CSR_READ_2(sc, reg) bus_read_2(sc->vr_res, reg) +#define CSR_READ_1(sc, reg) bus_read_1(sc->vr_res, reg) #define VR_TIMEOUT 1000 #define ETHER_ALIGN 2 |