Exemplo n.º 1
0
/*
 * We can't enable/disable individual handlers in the INTx case so do
 * the whole bunch even in the msi case.
 */
int
virtio_enable_ints(struct virtio_softc *sc)
{

	/* See if we are using MSI. */
	if (sc->sc_config_offset == VIRTIO_CONFIG_DEVICE_CONFIG_MSI)
		return (virtio_enable_msi(sc));

	ASSERT(sc->sc_config_offset == VIRTIO_CONFIG_DEVICE_CONFIG_NOMSI);

	return (virtio_enable_intx(sc));
}
Exemplo n.º 2
0
/*
 * We can't enable/disable individual handlers in the INTx case so do
 * the whole bunch even in the msi case.
 */
int
virtio_enable_ints(struct virtio_softc *sc)
{

	ASSERT(sc->sc_config_offset == VIRTIO_CONFIG_DEVICE_CONFIG_NOMSIX);

	/* See if we are using MSI. */
	if (sc->sc_int_type == DDI_INTR_TYPE_MSIX ||
	    sc->sc_int_type == DDI_INTR_TYPE_MSI)
		return (virtio_enable_msi(sc));

	ASSERT(sc->sc_int_type == DDI_INTR_TYPE_FIXED);
	return (virtio_enable_intx(sc));
}