sync with OpenBSD -current
This commit is contained in:
parent
84a7643638
commit
bf0d2e284c
48 changed files with 439 additions and 307 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: virtio_mmio.c,v 1.14 2024/08/20 07:04:29 sf Exp $ */
|
||||
/* $OpenBSD: virtio_mmio.c,v 1.16 2024/08/27 19:01:11 sf Exp $ */
|
||||
/* $NetBSD: virtio.c,v 1.3 2011/11/02 23:05:52 njoly Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -133,7 +133,7 @@ const struct cfattach virtio_mmio_fdt_ca = {
|
|||
NULL
|
||||
};
|
||||
|
||||
struct virtio_ops virtio_mmio_ops = {
|
||||
const struct virtio_ops virtio_mmio_ops = {
|
||||
virtio_mmio_kick,
|
||||
virtio_mmio_read_device_config_1,
|
||||
virtio_mmio_read_device_config_2,
|
||||
|
@ -241,6 +241,7 @@ virtio_mmio_attach(struct device *parent, struct device *self, void *aux)
|
|||
struct virtio_mmio_softc *sc = (struct virtio_mmio_softc *)self;
|
||||
struct virtio_softc *vsc = &sc->sc_sc;
|
||||
uint32_t id, magic;
|
||||
struct virtio_attach_args va = { 0 };
|
||||
|
||||
if (faa->fa_nreg < 1) {
|
||||
printf(": no register data\n");
|
||||
|
@ -289,10 +290,10 @@ virtio_mmio_attach(struct device *parent, struct device *self, void *aux)
|
|||
virtio_mmio_set_status(vsc, VIRTIO_CONFIG_DEVICE_STATUS_ACK);
|
||||
virtio_mmio_set_status(vsc, VIRTIO_CONFIG_DEVICE_STATUS_DRIVER);
|
||||
|
||||
/* XXX: use softc as aux... */
|
||||
vsc->sc_childdevid = id;
|
||||
va.va_devid = id;
|
||||
va.va_nintr = 1;
|
||||
vsc->sc_child = NULL;
|
||||
config_found(self, sc, NULL);
|
||||
config_found(self, &va, NULL);
|
||||
if (vsc->sc_child == NULL) {
|
||||
printf("%s: no matching child driver; not configured\n",
|
||||
vsc->sc_dev.dv_xname);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue