Page MenuHomeFreeBSD

D53030.diff
No OneTemporary

D53030.diff

diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -963,8 +963,6 @@
struct resource *regs_res;
int msix_rid;
struct resource *msix_res;
- bus_space_handle_t bh;
- bus_space_tag_t bt;
bus_size_t mmio_len;
int udbs_rid;
struct resource *udbs_res;
@@ -1276,7 +1274,7 @@
{
if (hw_off_limits(sc))
MPASS(curthread == sc->reset_thread);
- return bus_space_read_4(sc->bt, sc->bh, reg);
+ return bus_read_4(sc->regs_res, reg);
}
static inline void
@@ -1284,7 +1282,7 @@
{
if (hw_off_limits(sc))
MPASS(curthread == sc->reset_thread);
- bus_space_write_4(sc->bt, sc->bh, reg, val);
+ bus_write_4(sc->regs_res, reg, val);
}
static inline uint64_t
@@ -1293,10 +1291,10 @@
if (hw_off_limits(sc))
MPASS(curthread == sc->reset_thread);
#ifdef __LP64__
- return bus_space_read_8(sc->bt, sc->bh, reg);
+ return bus_read_8(sc->regs_res, reg);
#else
- return (uint64_t)bus_space_read_4(sc->bt, sc->bh, reg) +
- ((uint64_t)bus_space_read_4(sc->bt, sc->bh, reg + 4) << 32);
+ return (uint64_t)bus_read_4(sc->regs_res, reg) +
+ ((uint64_t)bus_read_4(sc->regs_res, reg + 4) << 32);
#endif
}
@@ -1307,10 +1305,10 @@
if (hw_off_limits(sc))
MPASS(curthread == sc->reset_thread);
#ifdef __LP64__
- bus_space_write_8(sc->bt, sc->bh, reg, val);
+ bus_write_8(sc->regs_res, reg, val);
#else
- bus_space_write_4(sc->bt, sc->bh, reg, val);
- bus_space_write_4(sc->bt, sc->bh, reg + 4, val>> 32);
+ bus_write_4(sc->regs_res, reg, val);
+ bus_write_4(sc->regs_res, reg + 4, val>> 32);
#endif
}
diff --git a/sys/dev/cxgbe/t4_iov.c b/sys/dev/cxgbe/t4_iov.c
--- a/sys/dev/cxgbe/t4_iov.c
+++ b/sys/dev/cxgbe/t4_iov.c
@@ -54,8 +54,6 @@
int pf;
int regs_rid;
struct resource *regs_res;
- bus_space_handle_t bh;
- bus_space_tag_t bt;
};
struct {
@@ -147,7 +145,7 @@
t4iov_read_reg(struct t4iov_softc *sc, uint32_t reg)
{
- return bus_space_read_4(sc->bt, sc->bh, reg);
+ return bus_read_4(sc->regs_res, reg);
}
static int t4iov_attach_child(device_t dev);
@@ -249,8 +247,6 @@
device_printf(dev, "cannot map registers.\n");
return (ENXIO);
}
- sc->bt = rman_get_bustag(sc->regs_res);
- sc->bh = rman_get_bushandle(sc->regs_res);
pl_rev = t4iov_read_reg(sc, A_PL_REV);
whoami = t4iov_read_reg(sc, A_PL_WHOAMI);
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -2660,8 +2660,8 @@
{
/* This is a t4_write_reg without the hw_off_limits check. */
MPASS(sc->error_flags & HW_OFF_LIMITS);
- bus_space_write_4(sc->bt, sc->bh, A_PL_RST,
- F_PIORSTMODE | F_PIORST | F_AUTOPCIEPAUSE);
+ bus_write_4(sc->regs_res, A_PL_RST,
+ F_PIORSTMODE | F_PIORST | F_AUTOPCIEPAUSE);
pause("pl_rst", 1 * hz); /* Wait 1s for reset */
return (0);
}
@@ -3997,8 +3997,6 @@
device_printf(sc->dev, "cannot map registers.\n");
return (ENXIO);
}
- sc->bt = rman_get_bustag(sc->regs_res);
- sc->bh = rman_get_bushandle(sc->regs_res);
sc->mmio_len = rman_get_size(sc->regs_res);
setbit(&sc->doorbells, DOORBELL_KDB);

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 23, 10:14 PM (12 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27890057
Default Alt Text
D53030.diff (3 KB)

Event Timeline