mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
b619f40aec
commit
49a4385d69
2 changed files with 15 additions and 1 deletions
|
|
@ -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 a new issue