Add optional VirtIO device method for post-attach notifications
This is called after the parent device (ie virito_pci) has completed the device attachment/initialization.
This commit is contained in:
parent
f175a1e7f9
commit
a9e07a227e
@ -757,8 +757,10 @@ vtpci_probe_and_attach_child(struct vtpci_softc *sc)
|
||||
vtpci_release_child_resources(sc);
|
||||
/* Reset status for future attempt. */
|
||||
vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_ACK);
|
||||
} else
|
||||
} else {
|
||||
vtpci_set_status(dev, VIRTIO_CONFIG_STATUS_DRIVER_OK);
|
||||
VIRTIO_ATTACH_COMPLETED(child);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -29,6 +29,18 @@
|
||||
|
||||
INTERFACE virtio;
|
||||
|
||||
CODE {
|
||||
static int
|
||||
virtio_default_attach_completed(device_t dev)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
};
|
||||
|
||||
METHOD int attach_completed {
|
||||
device_t dev;
|
||||
} DEFAULT virtio_default_attach_completed;
|
||||
|
||||
CODE {
|
||||
static int
|
||||
virtio_default_config_change(device_t dev)
|
||||
|
Loading…
Reference in New Issue
Block a user