Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vmware/vmci/vmci.c
Show First 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | vmci_detach(device_t dev) | ||||
vmci_qp_guest_endpoints_exit(); | vmci_qp_guest_endpoints_exit(); | ||||
vmci_util_exit(); | vmci_util_exit(); | ||||
vmci_dismantle_interrupts(sc); | vmci_dismantle_interrupts(sc); | ||||
vmci_components_cleanup(); | vmci_components_cleanup(); | ||||
if mtx_initialized(&sc->vmci_spinlock) { | |||||
taskqueue_drain(taskqueue_thread, &sc->vmci_delayed_work_task); | taskqueue_drain(taskqueue_thread, &sc->vmci_delayed_work_task); | ||||
mtx_destroy(&sc->vmci_delayed_work_lock); | mtx_destroy(&sc->vmci_delayed_work_lock); | ||||
} | |||||
if (sc->vmci_res0 != NULL) | if (sc->vmci_res0 != NULL) | ||||
bus_space_write_4(sc->vmci_iot0, sc->vmci_ioh0, | bus_space_write_4(sc->vmci_iot0, sc->vmci_ioh0, | ||||
VMCI_CONTROL_ADDR, VMCI_CONTROL_RESET); | VMCI_CONTROL_ADDR, VMCI_CONTROL_RESET); | ||||
if (sc->vmci_notifications_bitmap.dma_vaddr != NULL) | if (sc->vmci_notifications_bitmap.dma_vaddr != NULL) | ||||
vmci_dma_free(&sc->vmci_notifications_bitmap); | vmci_dma_free(&sc->vmci_notifications_bitmap); | ||||
vmci_unmap_bars(sc); | vmci_unmap_bars(sc); | ||||
if mtx_initialized(&sc->vmci_spinlock) | |||||
mtx_destroy(&sc->vmci_spinlock); | mtx_destroy(&sc->vmci_spinlock); | ||||
pci_disable_busmaster(dev); | pci_disable_busmaster(dev); | ||||
return (0); | return (0); | ||||
} | } | ||||
/* | /* | ||||
*------------------------------------------------------------------------------ | *------------------------------------------------------------------------------ | ||||
▲ Show 20 Lines • Show All 921 Lines • Show Last 20 Lines |