示例#1
0
文件: if_athn_pci.c 项目: bluhm/sys
int
athn_pci_detach(struct device *self, int flags)
{
	struct athn_pci_softc *psc = (struct athn_pci_softc *)self;
	struct athn_softc *sc = &psc->sc_sc;

	if (psc->sc_ih != NULL) {
		athn_detach(sc);
		pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
	}
	if (psc->sc_mapsize > 0)
		bus_space_unmap(psc->sc_st, psc->sc_sh, psc->sc_mapsize);

	return (0);
}
示例#2
0
Static int
athn_pci_detach(device_t self, int flags)
{
	struct athn_pci_softc *psc = device_private(self);
	struct athn_softc *sc = &psc->psc_sc;

	if (psc->psc_ih != NULL) {
		athn_detach(sc);
		pci_intr_disestablish(psc->psc_pc, psc->psc_ih);
		psc->psc_ih = NULL;
	}
	if (psc->psc_mapsz > 0) {
		bus_space_unmap(psc->psc_iot, psc->psc_ioh, psc->psc_mapsz);
		psc->psc_mapsz = 0;
	}
	return 0;
}
示例#3
0
int
athn_cardbus_detach(struct device *self, int flags)
{
	struct athn_cardbus_softc *csc = (struct athn_cardbus_softc *)self;
	struct athn_softc *sc = &csc->sc_sc;
	cardbus_devfunc_t ct = csc->sc_ct;
	cardbus_chipset_tag_t cc = ct->ct_cc;
	cardbus_function_tag_t cf = ct->ct_cf;

	athn_detach(sc);

	/* Unhook the interrupt handler. */
	if (csc->sc_ih != NULL)
		cardbus_intr_disestablish(cc, cf, csc->sc_ih);

	/* Release bus space and close window. */
	Cardbus_mapreg_unmap(ct, CARDBUS_BASE0_REG, csc->sc_st, csc->sc_sh,
	    csc->sc_mapsize);

	return (0);
}