예제 #1
0
파일: ntb_hw.c 프로젝트: Alkzndr/freebsd
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);
}
예제 #2
0
파일: ntb_hw.c 프로젝트: Ricky54326/freebsd
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);
}