static int ntb_detach(device_t device) { struct ntb_softc *ntb = DEVICE2SOFTC(device); callout_drain(&ntb->heartbeat_timer); callout_drain(&ntb->lr_timer); ntb_teardown_interrupts(ntb); ntb_unmap_pci_bar(ntb); return (0); }
static int ntb_detach(device_t device) { struct ntb_softc *ntb; ntb = DEVICE2SOFTC(device); callout_drain(&ntb->heartbeat_timer); callout_drain(&ntb->lr_timer); if (ntb->type == NTB_XEON) ntb_teardown_xeon(ntb); ntb_teardown_interrupts(ntb); /* * Redetect total MWs so we unmap properly -- in case we lowered the * maximum to work around Xeon errata. */ ntb_detect_max_mw(ntb); ntb_unmap_pci_bar(ntb); return (0); }