Page MenuHomeFreeBSD

D43885.diff
No OneTemporary

D43885.diff

diff --git a/sys/dev/vmd/vmd.h b/sys/dev/vmd/vmd.h
--- a/sys/dev/vmd/vmd.h
+++ b/sys/dev/vmd/vmd.h
@@ -53,8 +53,6 @@
#define VMD_MAX_BAR 3
int vmd_regs_rid[VMD_MAX_BAR];
struct resource *vmd_regs_res[VMD_MAX_BAR];
- bus_space_handle_t vmd_bhandle;
- bus_space_tag_t vmd_btag;
struct vmd_irq *vmd_irq;
LIST_HEAD(,vmd_irq_user) vmd_users;
int vmd_fist_vector;
diff --git a/sys/dev/vmd/vmd.c b/sys/dev/vmd/vmd.c
--- a/sys/dev/vmd/vmd.c
+++ b/sys/dev/vmd/vmd.c
@@ -184,14 +184,11 @@
switch (width) {
case 4:
- return (bus_space_read_4(sc->vmd_btag, sc->vmd_bhandle,
- offset));
+ return (bus_read_4(sc->vmd_regs_res[0], offset));
case 2:
- return (bus_space_read_2(sc->vmd_btag, sc->vmd_bhandle,
- offset));
+ return (bus_read_2(sc->vmd_regs_res[0], offset));
case 1:
- return (bus_space_read_1(sc->vmd_btag, sc->vmd_bhandle,
- offset));
+ return (bus_read_1(sc->vmd_regs_res[0], offset));
default:
__assert_unreachable();
return (0xffffffff);
@@ -213,14 +210,11 @@
switch (width) {
case 4:
- return (bus_space_write_4(sc->vmd_btag, sc->vmd_bhandle,
- offset, val));
+ return (bus_write_4(sc->vmd_regs_res[0], offset, val));
case 2:
- return (bus_space_write_2(sc->vmd_btag, sc->vmd_bhandle,
- offset, val));
+ return (bus_write_2(sc->vmd_regs_res[0], offset, val));
case 1:
- return (bus_space_write_1(sc->vmd_btag, sc->vmd_bhandle,
- offset, val));
+ return (bus_write_1(sc->vmd_regs_res[0], offset, val));
default:
__assert_unreachable();
}
@@ -282,9 +276,6 @@
}
}
- sc->vmd_btag = rman_get_bustag(sc->vmd_regs_res[0]);
- sc->vmd_bhandle = rman_get_bushandle(sc->vmd_regs_res[0]);
-
vid = pci_get_vendor(dev);
did = pci_get_device(dev);
for (t = vmd_devs; t->vmd_name != NULL; t++) {

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 7, 8:38 PM (22 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14520298
Default Alt Text
D43885.diff (1 KB)

Event Timeline