亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? plxinterrupt.c

?? PCI接口產(chǎn)品中橋芯片PLX6000、PLX8000、PLX9000和PLXsrv驅(qū)動(dòng)模塊源碼
?? C
字號(hào):
/*******************************************************************************
 * Copyright (c) 2007 PLX Technology, Inc.
 *
 * PLX Technology Inc. licenses this software under specific terms and
 * conditions.  Use of any of the software or derviatives thereof in any
 * product without a PLX Technology chip is strictly prohibited.
 *
 * PLX Technology, Inc. provides this software AS IS, WITHOUT ANY WARRANTY,
 * EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF
 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  PLX makes no guarantee
 * or representations regarding the use of, or the results of the use of,
 * the software and documentation in terms of correctness, accuracy,
 * reliability, currentness, or otherwise; and you rely on the software,
 * documentation and results solely at your own risk.
 *
 * IN NO EVENT SHALL PLX BE LIABLE FOR ANY LOSS OF USE, LOSS OF BUSINESS,
 * LOSS OF PROFITS, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES
 * OF ANY KIND.  IN NO EVENT SHALL PLX'S TOTAL LIABILITY EXCEED THE SUM
 * PAID TO PLX FOR THE PRODUCT LICENSED HEREUNDER.
 *
 ******************************************************************************/

/******************************************************************************
 *
 * File Name:
 *
 *      PlxInterrupt.c
 *
 * Description:
 *
 *      This file handles interrupts for the PLX device
 *
 * Revision History:
 *
 *      02-01-07 : PLX SDK v5.00
 *
 ******************************************************************************/


#include "PciSupport.h"
#include "PlxChipFn.h"
#include "PlxInterrupt.h"
#include "SupportFunc.h"




/******************************************************************************
 *
 * Function   :  OnInterrupt
 *
 * Description:  The Interrupt Service Routine for the PLX device
 *
 ******************************************************************************/
BOOLEAN
OnInterrupt(
    PKINTERRUPT pInterrupt,
    PVOID       ServiceContext
    )
{
    U32               RegValue;
    U32               RegPciInt;
    U32               InterruptSource;
    DEVICE_EXTENSION *pdx;


    // Get the device extension
    pdx = (DEVICE_EXTENSION *)ServiceContext;

    // Read interrupt status register
    RegPciInt =
        PLX_9000_REG_READ(
            pdx,
            PCI9054_INT_CTRL_STAT
            );

    /****************************************************
     * If the chip is in a low power state, then local
     * register reads are disabled and will always return
     * 0xFFFFFFFF.  If the PLX chip's interrupt is shared
     * with another PCI device, the PXL ISR may continue
     * to be called.  This case is handled to avoid
     * erroneous reporting of an active interrupt.
     ***************************************************/
    if (RegPciInt == 0xFFFFFFFF)
        return FALSE;

    // Check for master PCI interrupt enable
    if ((RegPciInt & (1 << 8)) == 0)
        return FALSE;

    // Verify that an interrupt is truly active

    // Clear the interrupt type flag
    InterruptSource = INTR_TYPE_NONE;

    // Check if PCI Doorbell Interrupt is active and not masked
    if ((RegPciInt & (1 << 13)) && (RegPciInt & (1 << 9)))
    {
        InterruptSource |= INTR_TYPE_DOORBELL;
    }

    // Check if PCI Abort Interrupt is active and not masked
    if ((RegPciInt & (1 << 14)) && (RegPciInt & (1 << 10)))
    {
        InterruptSource |= INTR_TYPE_PCI_ABORT;
    }

    // Check if Local->PCI Interrupt is active and not masked
    if ((RegPciInt & (1 << 15)) && (RegPciInt & (1 << 11)))
    {
        InterruptSource |= INTR_TYPE_LOCAL_1;
    }

    // Check if DMA Channel 0 Interrupt is active and not masked
    if ((RegPciInt & (1 << 21)) && (RegPciInt & (1 << 18)))
    {
        // Verify the DMA interrupt is routed to PCI
        RegValue =
            PLX_9000_REG_READ(
                pdx,
                PCI9054_DMA0_MODE
                );

        if (RegValue & (1 << 17))
        {
            InterruptSource |= INTR_TYPE_DMA_0;
        }
    }

    // Check if DMA Channel 1 Interrupt is active and not masked
    if ((RegPciInt & (1 << 22)) && (RegPciInt & (1 << 19)))
    {
        // Verify the DMA interrupt is routed to PCI
        RegValue =
            PLX_9000_REG_READ(
                pdx,
                PCI9054_DMA1_MODE
                );

        if (RegValue & (1 << 17))
        {
            InterruptSource |= INTR_TYPE_DMA_1;
        }
    }

    // Check if MU Outbound Post interrupt is active
    RegValue =
        PLX_9000_REG_READ(
            pdx,
            PCI9054_OUTPOST_INT_STAT
            );

    if (RegValue & (1 << 3))
    {
        // Check if MU Outbound Post interrupt is not masked
        RegValue =
            PLX_9000_REG_READ(
                pdx,
                PCI9054_OUTPOST_INT_MASK
                );

        if ((RegValue & (1 << 3)) == 0)
        {
            InterruptSource |= INTR_TYPE_OUTBOUND_POST;
        }
    }

    // Return if no interrupts are active
    if (InterruptSource == INTR_TYPE_NONE)
        return FALSE;

    // At this point, the device interrupt is verified

    // Mask the PCI Interrupt
    PLX_9000_REG_WRITE(
        pdx,
        PCI9054_INT_CTRL_STAT,
        RegPciInt & ~(1 << 8)
        );

    //
    // Schedule deferred procedure (DPC) to complete interrupt processing
    //

    KeInsertQueueDpc(
        &(pdx->DpcForIsr),
        (VOID *)(PLX_UINT_PTR)InterruptSource,
        NULL
        );

    return TRUE;
}




/******************************************************************************
 *
 * Function   :  DpcForIsr
 *
 * Description:  This routine will be triggered by the ISR to service an interrupt
 *
 ******************************************************************************/
VOID
DpcForIsr(
    PKDPC pDpc,
    PVOID pContext,
    PVOID pArg1,
    PVOID pArg2
    )
{
    U32                 RegValue;
    PLX_REG_DATA        RegData;
    DEVICE_EXTENSION   *pdx;
    PLX_INTERRUPT_DATA  IntData;


    // Get the device extension
    pdx = (DEVICE_EXTENSION *)pContext;

    // Get interrupt source
    IntData.Source_Ints     = PtrToUlong(pArg1);
    IntData.Source_Doorbell = 0;

    KeAcquireSpinLockAtDpcLevel(
        &(pdx->Lock_HwAccess)
        );

    // Local Interrupt 1
    if (IntData.Source_Ints & INTR_TYPE_LOCAL_1)
    {
        // Setup to synchronize access to Interrupt Control/Status Register
        RegData.pdx         = pdx;
        RegData.offset      = PCI9054_INT_CTRL_STAT;
        RegData.BitsToSet   = 0;
        RegData.BitsToClear = (1 << 11);

        // Mask local interrupt 1 since true source is unknown
        KeSynchronizeExecution(
            pdx->pInterruptObject,
            PlxSynchronizedRegisterModify,
            (VOID *)&RegData
            );
    }

    // Doorbell Interrupt
    if (IntData.Source_Ints & INTR_TYPE_DOORBELL)
    {
        // Get Doorbell register
        RegValue =
            PLX_9000_REG_READ(
                pdx,
                PCI9054_PCI_DOORBELL
                );

        // Clear Doorbell interrupt
        PLX_9000_REG_WRITE(
            pdx,
            PCI9054_PCI_DOORBELL,
            RegValue
            );

        // Save the doorbell value
        IntData.Source_Doorbell = RegValue;
    }

    // PCI Abort interrupt
    if (IntData.Source_Ints & INTR_TYPE_PCI_ABORT)
    {
        // Get the PCI Command register
        PLX_PCI_REG_READ(
            pdx,
            CFG_COMMAND,
            &RegValue
            );

        // Write to back to clear PCI Abort
        PLX_PCI_REG_WRITE(
            pdx,
            CFG_COMMAND,
            RegValue
            );
    }

    // DMA Channel 0 interrupt
    if (IntData.Source_Ints & INTR_TYPE_DMA_0)
    {
        // Get DMA Control/Status
        RegValue =
            PLX_9000_REG_READ(
                pdx,
                PCI9054_DMA_COMMAND_STAT
                );

        // Clear DMA interrupt
        PLX_9000_REG_WRITE(
            pdx,
            PCI9054_DMA_COMMAND_STAT,
            RegValue | (1 << 3)
            );

        RegValue =
            PLX_9000_REG_READ(
                pdx,
                PCI9054_DMA0_MODE
                );

        // Check if SGL is enabled & cleanup
        if (RegValue & (1 << 9))
        {
            PlxSglDmaTransferComplete(
                pdx,
                0
                );
        }
    }

    // DMA Channel 1 interrupt
    if (IntData.Source_Ints & INTR_TYPE_DMA_1)
    {
        // Get DMA Control/Status
        RegValue =
            PLX_9000_REG_READ(
                pdx,
                PCI9054_DMA_COMMAND_STAT
                );

        // Clear DMA interrupt
        PLX_9000_REG_WRITE(
            pdx,
            PCI9054_DMA_COMMAND_STAT,
            RegValue | (1 << 11)
            );

        RegValue =
            PLX_9000_REG_READ(
                pdx,
                PCI9054_DMA1_MODE
                );

        // Check if SGL is enabled & cleanup
        if (RegValue & (1 << 9))
        {
            PlxSglDmaTransferComplete(
                pdx,
                1
                );
        }
    }

    // Outbound post FIFO interrupt
    if (IntData.Source_Ints & INTR_TYPE_OUTBOUND_POST)
    {
        // Mask Outbound Post interrupt
        PLX_9000_REG_WRITE(
            pdx,
            PCI9054_OUTPOST_INT_MASK,
            (1 << 3)
            );
    }

    KeReleaseSpinLockFromDpcLevel(
        &(pdx->Lock_HwAccess)
        );

    // Signal any objects waiting for notification
    PlxSignalNotifications(
        pdx,
        &IntData
        );

    // Re-enable interrupts
    KeSynchronizeExecution(
        pdx->pInterruptObject,
        PlxChipInterruptsEnable,
        pdx
        );
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲日本乱码在线观看| 亚洲欧美国产三级| 欧美视频一区二区在线观看| 精品国产91久久久久久久妲己| 另类中文字幕网| 欧美精品一区二区三区蜜桃视频 | 亚洲欧洲在线观看av| 国产精品久久久久久妇女6080| 国产精品国产三级国产aⅴ原创 | 久久久电影一区二区三区| 91精品国产综合久久精品app| 91精品免费在线| 久久精品亚洲精品国产欧美kt∨| 国产精品传媒入口麻豆| 久久久精品黄色| 偷拍亚洲欧洲综合| 久久久亚洲精品一区二区三区| 成人av影视在线观看| 亚洲精品高清在线| 91精品国产综合久久国产大片| 精品综合免费视频观看| 国产精品热久久久久夜色精品三区| 色天使色偷偷av一区二区| 日精品一区二区| 久久久91精品国产一区二区精品| 色综合天天综合网国产成人综合天 | 日韩电影一二三区| 久久嫩草精品久久久久| 色婷婷精品大在线视频| 极品瑜伽女神91| 一区二区视频免费在线观看| 日韩欧美一区二区在线视频| 99精品欧美一区二区三区小说| 日日嗨av一区二区三区四区| 国产精品久久三区| 日韩午夜av电影| 色综合色狠狠综合色| 黄色成人免费在线| 亚洲成人777| 亚洲欧洲成人av每日更新| 91精品国产色综合久久不卡蜜臀| 92国产精品观看| 国产在线看一区| 日韩在线a电影| 综合欧美亚洲日本| ww亚洲ww在线观看国产| 欧美午夜精品久久久| 成人精品一区二区三区中文字幕| 日韩成人伦理电影在线观看| 亚洲激情图片qvod| 国产三级精品三级在线专区| 6080亚洲精品一区二区| 91电影在线观看| www.亚洲色图| 成人99免费视频| 国产在线精品视频| 免费欧美日韩国产三级电影| 午夜一区二区三区视频| 久久国产精品露脸对白| 欧美福利视频一区| 欧美日韩国产免费一区二区| 久久99国产精品久久99果冻传媒| 亚洲图片欧美一区| 欧美军同video69gay| 精品一区二区日韩| 国产精品网曝门| 欧美视频中文字幕| 国产伦理精品不卡| 亚洲一区二区综合| 久久噜噜亚洲综合| 国产成人免费网站| 国产精品99久久久久久久女警| 免费高清视频精品| 美日韩一区二区三区| 天天影视网天天综合色在线播放 | 欧美日韩日日夜夜| 欧美午夜寂寞影院| 欧美日韩大陆在线| 欧美一区二区三区日韩| 精品裸体舞一区二区三区| 欧美tickling网站挠脚心| 26uuu久久天堂性欧美| 26uuu色噜噜精品一区| 久久精品视频网| 国产片一区二区| √…a在线天堂一区| 亚洲乱码一区二区三区在线观看| 亚洲精品高清在线| 午夜精品在线视频一区| 奇米精品一区二区三区四区 | 亚洲大片免费看| 日韩成人精品在线| 国产精品一区三区| 97精品国产97久久久久久久久久久久| www.亚洲精品| 欧美日韩www| 久久综合色8888| 国产精品全国免费观看高清| 亚洲精品成人少妇| 日韩高清不卡一区| 国产精品一区在线| 91视频一区二区三区| 欧美日韩国产片| 久久久影视传媒| 亚洲欧美国产高清| 热久久久久久久| av在线一区二区| 欧美美女喷水视频| 日本一区免费视频| 亚洲一区二区成人在线观看| 久久成人麻豆午夜电影| www.av精品| 91精品国产91久久综合桃花| 久久九九99视频| 亚洲高清免费视频| 国产精品中文字幕日韩精品| 在线观看日韩一区| 久久综合色8888| 亚洲国产精品久久久男人的天堂| 这里只有精品电影| 中文字幕一区二区三区在线观看| 91久久一区二区| 国产精品女同一区二区三区| 成人一区二区视频| 91麻豆精品91久久久久久清纯| 久久众筹精品私拍模特| 国产精品久久久爽爽爽麻豆色哟哟 | 免费欧美在线视频| 欧美人与性动xxxx| 久久一区二区三区国产精品| 亚洲麻豆国产自偷在线| 韩国理伦片一区二区三区在线播放 | 中文字幕在线播放不卡一区| 五月天一区二区| www.成人网.com| 久久理论电影网| 日韩国产精品久久久久久亚洲| 成人18视频日本| 久久久久久久久久电影| 日本亚洲视频在线| 欧美日韩一区二区三区视频| 亚洲婷婷在线视频| 国产一区二区电影| 精品日韩av一区二区| 日本免费新一区视频| 欧美伊人久久大香线蕉综合69 | 在线观看不卡视频| 国产精品视频你懂的| 国产精品资源在线看| 精品久久久久久久久久久院品网| 日韩经典一区二区| 911精品国产一区二区在线| 亚洲国产精品久久久久婷婷884| 99久久国产免费看| 国产精品天干天干在观线| 国产麻豆一精品一av一免费| 久久午夜老司机| 极品销魂美女一区二区三区| 欧美岛国在线观看| 蜜桃免费网站一区二区三区| 91麻豆精品国产91| 老司机午夜精品| 日韩亚洲欧美在线| 久久电影国产免费久久电影 | 欧美视频三区在线播放| 一区二区在线观看av| 欧美专区日韩专区| 亚洲国产视频直播| 欧美亚洲一区二区在线观看| 一区二区不卡在线播放 | 婷婷夜色潮精品综合在线| 欧美日韩免费在线视频| 亚洲一区二区成人在线观看| 欧美亚洲一区二区在线| 爽好多水快深点欧美视频| 国模大尺度一区二区三区| 亚洲综合色在线| 一区二区三区精密机械公司| 免费在线看成人av| 日韩av不卡在线观看| 激情欧美一区二区| 亚洲电影你懂得| 国产精品美女久久久久aⅴ国产馆| 欧美美女一区二区| aaa欧美日韩| 成人久久18免费网站麻豆 | 亚洲成人精品一区二区| 精品av久久707| 日韩视频123| 国产精品视频一区二区三区不卡| 成人网在线免费视频| 一区二区三区中文在线观看| 91精品欧美福利在线观看| 激情六月婷婷综合| 亚洲男人都懂的| 日韩欧美一二三四区| 成人天堂资源www在线| 亚洲专区一二三| 欧美刺激午夜性久久久久久久| 国产91精品久久久久久久网曝门|