Page MenuHomeFreeBSD

D28947.diff
No OneTemporary

D28947.diff

diff --git a/sys/dev/virtio/pci/virtio_pci_modern.c b/sys/dev/virtio/pci/virtio_pci_modern.c
--- a/sys/dev/virtio/pci/virtio_pci_modern.c
+++ b/sys/dev/virtio/pci/virtio_pci_modern.c
@@ -1315,13 +1315,15 @@
static uint16_t
vtpci_modern_read_common_2(struct vtpci_modern_softc *sc, bus_size_t off)
{
- return (bus_read_2(&sc->vtpci_common_res_map.vtrm_map, off));
+ return virtio_htog16(true,
+ bus_read_2(&sc->vtpci_common_res_map.vtrm_map, off));
}
static uint32_t
vtpci_modern_read_common_4(struct vtpci_modern_softc *sc, bus_size_t off)
{
- return (bus_read_4(&sc->vtpci_common_res_map.vtrm_map, off));
+ return virtio_htog32(true,
+ bus_read_4(&sc->vtpci_common_res_map.vtrm_map, off));
}
static void
@@ -1335,14 +1337,16 @@
vtpci_modern_write_common_2(struct vtpci_modern_softc *sc, bus_size_t off,
uint16_t val)
{
- bus_write_2(&sc->vtpci_common_res_map.vtrm_map, off, val);
+ bus_write_2(&sc->vtpci_common_res_map.vtrm_map,
+ off, virtio_gtoh16(true, val));
}
static void
vtpci_modern_write_common_4(struct vtpci_modern_softc *sc, bus_size_t off,
uint32_t val)
{
- bus_write_4(&sc->vtpci_common_res_map.vtrm_map, off, val);
+ bus_write_4(&sc->vtpci_common_res_map.vtrm_map,
+ off, virtio_gtoh32(true, val));
}
static void

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 11, 10:33 PM (21 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15758477
Default Alt Text
D28947.diff (1 KB)

Event Timeline