本文整理汇总了C++中pci_intr_disestablish函数的典型用法代码示例。如果您正苦于以下问题:C++ pci_intr_disestablish函数的具体用法?C++ pci_intr_disestablish怎么用?C++ pci_intr_disestablish使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pci_intr_disestablish函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: coram_detach
static int
coram_detach(device_t self, int flags)
{
struct coram_softc *sc = device_private(self);
struct coram_iic_softc *cic;
unsigned int i;
int error;
error = coram_mpeg_detach(sc, flags);
if (error)
return error;
if (sc->sc_tuner)
mt2131_close(sc->sc_tuner);
if (sc->sc_demod)
cx24227_close(sc->sc_demod);
for (i = 0; i < I2C_NUM; i++) {
cic = &sc->sc_iic[i];
if (cic->cic_i2cdev)
config_detach(cic->cic_i2cdev, flags);
mutex_destroy(&cic->cic_busmutex);
}
pmf_device_deregister(self);
if (sc->sc_mems)
bus_space_unmap(sc->sc_memt, sc->sc_memh, sc->sc_mems);
if (sc->sc_ih)
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
return 0;
}
示例2: xhci_pci_detach
static int
xhci_pci_detach(device_t self, int flags)
{
struct xhci_pci_softc * const psc = device_private(self);
struct xhci_softc * const sc = &psc->sc_xhci;
int rv;
rv = xhci_detach(sc, flags);
if (rv)
return rv;
pmf_device_deregister(self);
xhci_shutdown(self, flags);
if (sc->sc_ios) {
#if 0
/* Disable interrupts, so we don't get any spurious ones. */
bus_space_write_4(sc->sc_iot, sc->sc_ioh,
OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTRS);
#endif
}
if (sc->sc_ih != NULL) {
pci_intr_disestablish(psc->sc_pc, sc->sc_ih);
sc->sc_ih = NULL;
}
if (sc->sc_ios) {
bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
sc->sc_ios = 0;
}
return 0;
}
示例3: hdaudio_pci_detach
static int
hdaudio_pci_detach(device_t self, int flags)
{
struct hdaudio_pci_softc *sc = device_private(self);
pcireg_t csr;
hdaudio_detach(&sc->sc_hdaudio, flags);
if (sc->sc_ih != NULL) {
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
sc->sc_ih = NULL;
}
if (sc->sc_hdaudio.sc_memvalid == true) {
bus_space_unmap(sc->sc_hdaudio.sc_memt,
sc->sc_hdaudio.sc_memh,
sc->sc_hdaudio.sc_memsize);
sc->sc_hdaudio.sc_memvalid = false;
}
/* Disable busmastering and MMIO access */
csr = pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_COMMAND_STATUS_REG);
csr &= ~(PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_BACKTOBACK_ENABLE);
pci_conf_write(sc->sc_pc, sc->sc_tag, PCI_COMMAND_STATUS_REG, csr);
pmf_device_deregister(self);
return 0;
}
示例4: sili_pci_detach
int
sili_pci_detach(struct device *self, int flags)
{
struct sili_pci_softc *psc = (struct sili_pci_softc *)self;
struct sili_softc *sc = &psc->psc_sili;
int rv;
rv = sili_detach(sc, flags);
if (rv != 0)
return (rv);
if (psc->psc_ih != NULL) {
pci_intr_disestablish(psc->psc_pc, psc->psc_ih);
psc->psc_ih = NULL;
}
if (sc->sc_ios_port != 0) {
bus_space_unmap(sc->sc_iot_port, sc->sc_ioh_port,
sc->sc_ios_port);
sc->sc_ios_port = 0;
}
if (sc->sc_ios_global != 0) {
bus_space_unmap(sc->sc_iot_global, sc->sc_ioh_global,
sc->sc_ios_global);
sc->sc_ios_global = 0;
}
return (0);
}
示例5: ohci_pci_detach
static int
ohci_pci_detach(device_t self, int flags)
{
struct ohci_pci_softc *sc = device_private(self);
int rv;
rv = ohci_detach(&sc->sc, flags);
if (rv)
return rv;
pmf_device_deregister(self);
ohci_shutdown(self, flags);
if (sc->sc.sc_size) {
/* Disable interrupts, so we don't get any spurious ones. */
bus_space_write_4(sc->sc.iot, sc->sc.ioh,
OHCI_INTERRUPT_DISABLE, OHCI_ALL_INTRS);
}
if (sc->sc_ih != NULL) {
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
sc->sc_ih = NULL;
}
if (sc->sc.sc_size) {
bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size);
sc->sc.sc_size = 0;
}
#if NEHCI > 0
usb_pci_rem(&sc->sc_pci);
#endif
return 0;
}
示例6: wi_pci_disable
static void
wi_pci_disable(struct wi_softc *sc)
{
struct wi_pci_softc *psc = (struct wi_pci_softc *)sc;
pci_intr_disestablish(psc->psc_pc, sc->sc_ih);
}
示例7: auich_detach
static int
auich_detach(device_t self, int flags)
{
struct auich_softc *sc = device_private(self);
/* audio */
if (sc->sc_audiodev != NULL)
config_detach(sc->sc_audiodev, flags);
/* sysctl */
sysctl_teardown(&sc->sc_log);
mutex_enter(&sc->sc_lock);
/* audio_encoding_set */
auconv_delete_encodings(sc->sc_encodings);
auconv_delete_encodings(sc->sc_spdif_encodings);
/* ac97 */
if (sc->codec_if != NULL)
sc->codec_if->vtbl->detach(sc->codec_if);
mutex_exit(&sc->sc_lock);
mutex_destroy(&sc->sc_lock);
mutex_destroy(&sc->sc_intr_lock);
/* PCI */
if (sc->sc_ih != NULL)
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
if (sc->mix_size != 0)
bus_space_unmap(sc->iot, sc->mix_ioh, sc->mix_size);
if (sc->aud_size != 0)
bus_space_unmap(sc->iot, sc->aud_ioh, sc->aud_size);
return 0;
}
示例8: uhci_pci_detach
static int
uhci_pci_detach(device_t self, int flags)
{
struct uhci_pci_softc *sc = device_private(self);
int rv;
if (sc->sc_initialized & SC_INIT_UHCI) {
rv = uhci_detach(&sc->sc, flags);
if (rv)
return (rv);
}
if (sc->sc_initialized & SC_INIT_PMF)
pmf_device_deregister(self);
/* disable interrupts and acknowledge any pending */
bus_space_write_2(sc->sc.iot, sc->sc.ioh, UHCI_INTR, 0);
bus_space_write_2(sc->sc.iot, sc->sc.ioh, UHCI_STS,
bus_space_read_2(sc->sc.iot, sc->sc.ioh, UHCI_STS));
if (sc->sc_ih != NULL) {
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
sc->sc_ih = NULL;
}
if (sc->sc.sc_size) {
bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size);
sc->sc.sc_size = 0;
}
#if NEHCI > 0
usb_pci_rem(&sc->sc_pci);
#endif
return (0);
}
示例9: ohci_pci_attach_deferred
void
ohci_pci_attach_deferred(struct device *self)
{
struct ohci_pci_softc *sc = (struct ohci_pci_softc *)self;
usbd_status r;
int s;
s = splusb();
sc->sc.sc_bus.dying = 0;
r = ohci_init(&sc->sc);
if (r != USBD_NORMAL_COMPLETION) {
printf("%s: init failed, error=%d\n",
sc->sc.sc_bus.bdev.dv_xname, r);
bus_space_unmap(sc->sc.iot, sc->sc.ioh, sc->sc.sc_size);
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
splx(s);
return;
}
splx(s);
/* Attach usb device. */
sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus,
usbctlprint);
}
示例10: re_pci_detach
int
re_pci_detach(struct device *self, int flags)
{
struct re_pci_softc *psc = (struct re_pci_softc *)self;
struct rl_softc *sc = &psc->sc_rl;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
/* Remove timeout handler */
timeout_del(&sc->timer_handle);
/* Detach PHY */
if (LIST_FIRST(&sc->sc_mii.mii_phys) != NULL)
mii_detach(&sc->sc_mii, MII_PHY_ANY, MII_OFFSET_ANY);
/* Delete media stuff */
ifmedia_delete_instance(&sc->sc_mii.mii_media, IFM_INST_ANY);
ether_ifdetach(ifp);
if_detach(ifp);
/* Disable interrupts */
if (psc->sc_ih != NULL)
pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
/* Free pci resources */
bus_space_unmap(sc->rl_btag, sc->rl_bhandle, psc->sc_iosize);
return (0);
}
示例11: vte_detach
int
vte_detach(struct device *self, int flags)
{
struct vte_softc *sc = (struct vte_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
int s;
s = splnet();
vte_stop(sc);
splx(s);
mii_detach(&sc->sc_miibus, MII_PHY_ANY, MII_OFFSET_ANY);
/* Delete all remaining media. */
ifmedia_delete_instance(&sc->sc_miibus.mii_media, IFM_INST_ANY);
ether_ifdetach(ifp);
if_detach(ifp);
vte_dma_free(sc);
if (sc->sc_irq_handle != NULL) {
pci_intr_disestablish(sc->sc_pct, sc->sc_irq_handle);
sc->sc_irq_handle = NULL;
}
return (0);
}
示例12: ppbdetach
int
ppbdetach(struct device *self, int flags)
{
struct ppb_softc *sc = (struct ppb_softc *)self;
char *name;
int rv;
if (sc->sc_intrhand)
pci_intr_disestablish(sc->sc_pc, sc->sc_intrhand);
rv = config_detach_children(self, flags);
if (sc->sc_ioex) {
name = sc->sc_ioex->ex_name;
extent_destroy(sc->sc_ioex);
free(name, M_DEVBUF);
}
if (sc->sc_memex) {
name = sc->sc_memex->ex_name;
extent_destroy(sc->sc_memex);
free(name, M_DEVBUF);
}
if (sc->sc_pmemex) {
name = sc->sc_pmemex->ex_name;
extent_destroy(sc->sc_pmemex);
free(name, M_DEVBUF);
}
return (rv);
}
示例13: rtw_pci_disable
void
rtw_pci_disable(struct rtw_softc *sc)
{
struct rtw_pci_softc *psc = (void *)sc;
/* Unhook the interrupt handler. */
pci_intr_disestablish(psc->psc_pc, psc->psc_intrcookie);
psc->psc_intrcookie = NULL;
}
示例14: mfi_pci_attach
void
mfi_pci_attach(struct device *parent, struct device *self, void *aux)
{
struct mfi_softc *sc = (struct mfi_softc *)self;
struct pci_attach_args *pa = aux;
const struct mfi_pci_device *mpd;
pci_intr_handle_t ih;
bus_size_t size;
pcireg_t reg;
int regbar;
mpd = mfi_pci_find_device(pa);
if (mpd == NULL) {
printf(": can't find matching pci device\n");
return;
}
if (mpd->mpd_iop == MFI_IOP_GEN2 || mpd->mpd_iop == MFI_IOP_SKINNY)
regbar = MFI_BAR_GEN2;
else
regbar = MFI_BAR;
reg = pci_mapreg_type(pa->pa_pc, pa->pa_tag, regbar);
if (pci_mapreg_map(pa, regbar, reg, 0,
&sc->sc_iot, &sc->sc_ioh, NULL, &size, MFI_PCI_MEMSIZE)) {
printf(": can't map controller pci space\n");
return;
}
sc->sc_dmat = pa->pa_dmat;
if (pci_intr_map(pa, &ih) != 0) {
printf(": can't map interrupt\n");
goto unmap;
}
printf(": %s\n", pci_intr_string(pa->pa_pc, ih));
sc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_BIO, mfi_intr, sc,
sc->sc_dev.dv_xname);
if (!sc->sc_ih) {
printf("%s: can't establish interrupt\n", DEVNAME(sc));
goto unmap;
}
if (mfi_attach(sc, mpd->mpd_iop)) {
printf("%s: can't attach\n", DEVNAME(sc));
goto unintr;
}
return;
unintr:
pci_intr_disestablish(pa->pa_pc, sc->sc_ih);
sc->sc_ih = NULL;
unmap:
bus_space_unmap(sc->sc_iot, sc->sc_ioh, size);
}
示例15: malo_pci_detach
int
malo_pci_detach(device_t self, int flags)
{
struct malo_pci_softc *psc = device_private(self);
struct malo_softc *sc = &psc->sc_malo;
malo_detach(sc);
pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
return (0);
}