本文整理汇总了C++中pci_intr_disestablish函数的典型用法代码示例。如果您正苦于以下问题:C++ pci_intr_disestablish函数的具体用法?C++ pci_intr_disestablish怎么用?C++ pci_intr_disestablish使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了pci_intr_disestablish函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:31,代码来源:coram.c
示例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;
}
开发者ID:ryoon,项目名称:netbsd-xhci,代码行数:34,代码来源:xhci_pci.c
示例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;
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:28,代码来源:hdaudio_pci.c
示例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);
}
开发者ID:SylvestreG,项目名称:bitrig,代码行数:28,代码来源:sili_pci.c
示例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;
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:33,代码来源:ohci_pci.c
示例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);
}
开发者ID:NetBsdDriverProxy,项目名称:NetBsdDriverProxy,代码行数:7,代码来源:if_wi_pci.c
示例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;
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:35,代码来源:auich.c
示例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);
}
开发者ID:yazshel,项目名称:netbsd-kernel,代码行数:33,代码来源:uhci_pci.c
示例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);
}
开发者ID:appleorange1,项目名称:bitrig,代码行数:26,代码来源:ohci_pci.c
示例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);
}
开发者ID:sofuture,项目名称:bitrig,代码行数:28,代码来源:if_re_pci.c
示例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);
}
开发者ID:orumin,项目名称:openbsd-efivars,代码行数:27,代码来源:if_vte.c
示例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);
}
开发者ID:sofuture,项目名称:bitrig,代码行数:32,代码来源:ppb.c
示例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;
}
开发者ID:orumin,项目名称:openbsd-efivars,代码行数:9,代码来源:if_rtw_pci.c
示例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);
}
开发者ID:SylvestreG,项目名称:bitrig,代码行数:56,代码来源:mfi_pci.c
示例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);
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:11,代码来源:if_malo_pci.c
示例16: ral_pci_detach
int
ral_pci_detach(device_t self, int flags)
{
struct ral_pci_softc *psc = device_private(self);
struct rt2560_softc *sc = &psc->sc_sc;
(*psc->sc_opns->detach)(sc);
pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
return 0;
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:11,代码来源:if_ral_pci.c
示例17: atw_pci_suspend
static bool
atw_pci_suspend(device_t self, const pmf_qual_t *qual)
{
struct atw_pci_softc *psc = device_private(self);
/* Unhook the interrupt handler. */
pci_intr_disestablish(psc->psc_pc, psc->psc_intrcookie);
psc->psc_intrcookie = NULL;
return atw_suspend(self, qual);
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:11,代码来源:if_atw_pci.c
示例18: bwi_pci_detach
int
bwi_pci_detach(struct device *self, int flags)
{
struct bwi_pci_softc *psc = (struct bwi_pci_softc *)self;
struct bwi_softc *sc = &psc->psc_bwi;
bwi_detach(sc);
pci_intr_disestablish(psc->psc_pc, psc->psc_ih);
return (0);
}
开发者ID:SylvestreG,项目名称:bitrig,代码行数:11,代码来源:if_bwi_pci.c
示例19: dc_pci_detach
int
dc_pci_detach(struct device *self, int flags)
{
struct dc_pci_softc *psc = (void *)self;
struct dc_softc *sc = &psc->psc_softc;
if (sc->sc_ih != NULL)
pci_intr_disestablish(psc->psc_pc, sc->sc_ih);
dc_detach(sc);
bus_space_unmap(sc->dc_btag, sc->dc_bhandle, psc->psc_mapsize);
return (0);
}
开发者ID:appleorange1,项目名称:bitrig,代码行数:13,代码来源:if_dc_pci.c
示例20: rtsx_pci_detach
static int
rtsx_pci_detach(device_t self, int flags)
{
struct rtsx_pci_softc *sc = device_private(self);
int rv;
rv = rtsx_detach(&sc->sc, flags);
if (rv)
return rv;
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
return 0;
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:14,代码来源:rtsx_pci.c
注:本文中的pci_intr_disestablish函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论