summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/et/if_et.c11
-rw-r--r--sys/dev/et/if_etreg.h2
2 files changed, 3 insertions, 10 deletions
diff --git a/sys/dev/et/if_et.c b/sys/dev/et/if_et.c
index 6c1df0e..660d35f 100644
--- a/sys/dev/et/if_et.c
+++ b/sys/dev/et/if_et.c
@@ -250,9 +250,9 @@ et_attach(device_t dev)
/*
* Allocate IO memory
*/
- sc->sc_mem_rid = ET_PCIR_BAR;
+ sc->sc_mem_rid = PCIR_BAR(0);
sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
- &sc->sc_mem_rid, RF_ACTIVE);
+ &sc->sc_mem_rid, RF_ACTIVE);
if (sc->sc_mem_res == NULL) {
device_printf(dev, "can't allocate IO memory\n");
return (ENXIO);
@@ -722,12 +722,7 @@ et_bus_config(struct et_softc *sc)
/*
* Set max read request size to 2048 bytes
*/
- val = pci_read_config(sc->dev,
- sc->sc_expcap + PCIR_EXPRESS_DEVICE_CTL, 2);
- val &= ~PCIM_EXP_CTL_MAX_READ_REQUEST;
- val |= ET_PCIV_DEVICE_CTRL_RRSZ_2K;
- pci_write_config(sc->dev,
- sc->sc_expcap + PCIR_EXPRESS_DEVICE_CTL, val, 2);
+ pci_set_max_read_req(sc->dev, 2048);
return (0);
}
diff --git a/sys/dev/et/if_etreg.h b/sys/dev/et/if_etreg.h
index 6767e53..138bf83 100644
--- a/sys/dev/et/if_etreg.h
+++ b/sys/dev/et/if_etreg.h
@@ -53,8 +53,6 @@
* ET_PCIV_REPLAY_TIMER_{128,256} are from
* PCI EXPRESS BASE SPECIFICATION, REV. 1.0a, Table 3-4
*/
-#define ET_PCIR_BAR PCIR_BAR(0)
-
#define ET_PCIR_DEVICE_CAPS 0x4C
#define ET_PCIM_DEVICE_CAPS_MAX_PLSZ 0x7 /* Max playload size */
#define ET_PCIV_DEVICE_CAPS_PLSZ_128 0x0
OpenPOWER on IntegriCloud