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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? isopwr.c

?? S3C2410X平臺下的USB驅動程序
?? C
?? 第 1 頁 / 共 3 頁
字號:

        // We do nothing special here, just let the PDO handle it
        IoCopyCurrentIrpStackLocationToNext(Irp);
        PoStartNextPowerIrp(Irp);
        ntStatus = PoCallDriver(deviceExtension->TopOfStackDeviceObject,
                                Irp);


        IsoUsb_DecrementIoCount(DeviceObject);

        break; /* IRP_MN_QUERY_POWER */

    default:

        ISOUSB_KdPrint( DBGLVL_MEDIUM,("IsoUsb_ProcessPowerIrp() UNKNOWN POWER MESSAGE (%x)\n", irpStack->MinorFunction));

        //
        // All unhandled power messages are passed on to the PDO
        //

        IoCopyCurrentIrpStackLocationToNext(Irp);
        PoStartNextPowerIrp(Irp);
        ntStatus = PoCallDriver(deviceExtension->TopOfStackDeviceObject, Irp);

        IsoUsb_DecrementIoCount(DeviceObject);

    } /* irpStack->MinorFunction */

    ISOUSB_KdPrint( DBGLVL_MEDIUM,  ( "Exit IsoUsb_ProcessPowerIrp()  ntStatus = 0x%x\n", ntStatus ) );
    return ntStatus;
}


NTSTATUS
IsoUsb_PoRequestCompletion(
    IN PDEVICE_OBJECT       DeviceObject,
    IN UCHAR                MinorFunction,
    IN POWER_STATE          PowerState,
    IN PVOID                Context,
    IN PIO_STATUS_BLOCK     IoStatus
    )
/*++

Routine Description:

	This is the completion routine set in a call to PoRequestPowerIrp()
	that was made in IsoUsb_ProcessPowerIrp() in response to receiving
    an IRP_MN_SET_POWER of type 'SystemPowerState' when the device was
	not in a compatible device power state. In this case, a pointer to
	the IRP_MN_SET_POWER Irp is saved into the FDO device extension 
	(deviceExtension->PowerIrp), and then a call must be
	made to PoRequestPowerIrp() to put the device into a proper power state,
	and this routine is set as the completion routine.

    We decrement our pending io count and pass the saved IRP_MN_SET_POWER Irp
	on to the next driver

Arguments:

    DeviceObject - Pointer to the device object for the class device.
        Note that we must get our own device object from the Context

    Context - Driver defined context, in this case our own functional device object ( FDO )

Return Value:

    The function value is the final status from the operation.

--*/
{
    PIRP irp;
    PDEVICE_EXTENSION deviceExtension;
    PDEVICE_OBJECT deviceObject = Context;
    NTSTATUS ntStatus;

    deviceExtension = deviceObject->DeviceExtension;

	// Get the Irp we saved for later processing in IsoUsb_ProcessPowerIrp()
	// when we decided to request the Power Irp that this routine 
	// is the completion routine for.
    irp = deviceExtension->PowerIrp;

	// We will return the status set by the PDO for the power request we're completing
    ntStatus = IoStatus->Status;

    ISOUSB_KdPrint( DBGLVL_HIGH,("Enter IsoUsb_PoRequestCompletion()\n"));

    // we should not be in the midst of handling a self-generated power irp
    ISOUSB_ASSERT( !deviceExtension->SelfPowerIrp );

    // we must pass down to the next driver in the stack
    IoCopyCurrentIrpStackLocationToNext(irp);

    // Calling PoStartNextPowerIrp() indicates that the driver is finished
    // with the previous power IRP, if any, and is ready to handle the next power IRP.
    // It must be called for every power IRP.Although power IRPs are completed only once,
    // typically by the lowest-level driver for a device, PoStartNextPowerIrp must be called
    // for every stack location. Drivers must call PoStartNextPowerIrp while the current IRP
    // stack location points to the current driver. Therefore, this routine must be called
    // before IoCompleteRequest, IoSkipCurrentStackLocation, and PoCallDriver.

    PoStartNextPowerIrp(irp);

    // PoCallDriver is used to pass any power IRPs to the PDO instead of IoCallDriver.
    // When passing a power IRP down to a lower-level driver, the caller should use
    // IoSkipCurrentIrpStackLocation or IoCopyCurrentIrpStackLocationToNext to copy the IRP to
    // the next stack location, then call PoCallDriver. Use IoCopyCurrentIrpStackLocationToNext
    // if processing the IRP requires setting a completion routine, or IoSkipCurrentStackLocation
    // if no completion routine is needed.

    PoCallDriver(deviceExtension->TopOfStackDeviceObject,
                 irp);

    IsoUsb_DecrementIoCount(deviceObject);

    ISOUSB_KdPrint( DBGLVL_MEDIUM,("IsoUsb_PoRequestCompletion() Exit IRP_MN_SET_POWER\n"));

    deviceExtension->PowerIrp = NULL;

    return ntStatus;
}




NTSTATUS
IsoUsb_PowerIrp_Complete(
    IN PDEVICE_OBJECT NullDeviceObject,
    IN PIRP Irp,
    IN PVOID Context
    )
/*++

Routine Description:

    This routine is called when An IRP_MN_SET_POWER of type 'DevicePowerState'
    has been received by IsoUsb_ProcessPowerIrp(), and that routine has  determined
        1) the request is for full powerup ( to PowerDeviceD0 ), and
        2) We are not already in that state
    A call is then made to PoRequestPowerIrp() with this routine set as the completion routine.


Arguments:

    DeviceObject - Pointer to the device object for the class device.

    Irp - Irp completed.

    Context - Driver defined context.

Return Value:

    The function value is the final status from the operation.

--*/
{
    NTSTATUS ntStatus = STATUS_SUCCESS;
    PDEVICE_OBJECT deviceObject;
    PIO_STACK_LOCATION irpStack;
    PDEVICE_EXTENSION deviceExtension;

    ISOUSB_KdPrint( DBGLVL_HIGH,("enter IsoUsb_PowerIrp_Complete\n"));

    deviceObject = (PDEVICE_OBJECT) Context;

    deviceExtension = (PDEVICE_EXTENSION) deviceObject->DeviceExtension;

    //  If the lower driver returned PENDING, mark our stack location as pending also.
    if (Irp->PendingReturned) {
        IoMarkIrpPending(Irp);
    }

    irpStack = IoGetCurrentIrpStackLocation (Irp);

    // We can assert that we're a  device powerup-to D0 request,
    // because that was the only type of request we set a completion routine
    // for in the first place
    ISOUSB_ASSERT(irpStack->MajorFunction == IRP_MJ_POWER);
    ISOUSB_ASSERT(irpStack->MinorFunction == IRP_MN_SET_POWER);
    ISOUSB_ASSERT(irpStack->Parameters.Power.Type==DevicePowerState);
    ISOUSB_ASSERT(irpStack->Parameters.Power.State.DeviceState==PowerDeviceD0);

    // Now that we know we've let the lower drivers do what was needed to power up,
    //  we can set our device extension flags accordingly
    deviceExtension->CurrentDevicePowerState = PowerDeviceD0;

    Irp->IoStatus.Status = ntStatus;

    IsoUsb_DecrementIoCount(deviceObject);

    ISOUSB_KdPrint( DBGLVL_MEDIUM,("exit IsoUsb_PowerIrp_Complete Exit IRP_MN_SET_POWER D0 complete\n"));
    return ntStatus;
}



NTSTATUS
IsoUsb_SelfSuspendOrActivate(
    IN PDEVICE_OBJECT DeviceObject,
    IN BOOLEAN fSuspend
    )
/*++

Routine Description:

        Called on IsoUsb_PnPAddDevice() to power down until needed (i.e., till a pipe is actually opened).
        Called on IsoUsb_Create() to power up device to D0 before opening 1st pipe.
        Called on IsoUsb_Close() to power down device if this is the last pipe.

Arguments:

    DeviceObject - Pointer to the device object

    fSuspend; TRUE to Suspend, FALSE to acivate.


Return Value:

    If the operation is not attemtped, SUCCESS is returned.
    If the operation is attemtped, the value is the final status from the operation.

--*/
{
    NTSTATUS ntStatus = STATUS_SUCCESS;

    POWER_STATE PowerState;
    PDEVICE_EXTENSION deviceExtension;


    deviceExtension = DeviceObject->DeviceExtension;
    ISOUSB_KdPrint( DBGLVL_MAXIMUM,("Enter IsoUsb_SelfSuspendOrActivate(),fSuspend = %d\n", fSuspend));


	// Can't accept request if:
    //  1) device is removed, 
    //  2) has never been started, 
    //  3) is stopped,
    //  4) has a remove request pending,
    //  5) has a stop device pending
    if ( !IsoUsb_CanAcceptIoRequests( DeviceObject ) ) {
        ntStatus = STATUS_DELETE_PENDING;
        
		ISOUSB_KdPrint( DBGLVL_MEDIUM,("ABORTING IsoUsb_SelfSuspendOrActivate()\n"));
        return ntStatus;
    }
  

    // don't do anything if any System-generated Device Pnp irps are pending
    if ( NULL != deviceExtension->PowerIrp ) {
        ISOUSB_KdPrint( DBGLVL_MAXIMUM,("Exit IsoUsb_SelfSuspendOrActivate(),refusing on pending deviceExtension->PowerIrp 0x%x\n", deviceExtension->PowerIrp));
        return ntStatus;
    }

    // don't do anything if any self-generated Device Pnp irps are pending
    if ( deviceExtension->SelfPowerIrp ) {
        ISOUSB_KdPrint( DBGLVL_MAXIMUM,("Exit IsoUsb_SelfSuspendOrActivate(),refusing on pending deviceExtension->SelfPowerIrp\n" ));
        return ntStatus;
    }

    // don't auto-suspend if any pipes are open
    if ( fSuspend && ( 0 != deviceExtension->OpenPipeCount ) ) {
        ISOUSB_KdPrint( DBGLVL_MAXIMUM,("Exit IsoUsb_SelfSuspendOrActivate(),refusing to self-suspend on OpenPipeCount %d\n", deviceExtension->OpenPipeCount));
        return ntStatus;
    }

    // don't auto-activate if no pipes are open
    if ( !fSuspend && ( 0 == deviceExtension->OpenPipeCount ) ) {
        ISOUSB_KdPrint( DBGLVL_MAXIMUM,("Exit IsoUsb_SelfSuspendOrActivate(),refusing to self-activate, no pipes open\n"));
        return ntStatus;
    }

    // dont do anything if registry CurrentControlSet\Services\IsoUsb\Parameters\PowerDownLevel
    //  has been set to  zero, PowerDeviceD0 ( 1 ), or a bogus high value
    if ( ( deviceExtension->PowerDownLevel == PowerDeviceD0 ) || 
         ( deviceExtension->PowerDownLevel == PowerDeviceUnspecified)  ||
         ( deviceExtension->PowerDownLevel >= PowerDeviceMaximum ) ) {
        ISOUSB_KdPrint( DBGLVL_MAXIMUM,("Exit IsoUsb_SelfSuspendOrActivate(), refusing on deviceExtension->PowerDownLevel == %d\n", deviceExtension->PowerDownLevel));
        return ntStatus;
    }

    if ( fSuspend )
        PowerState.DeviceState = deviceExtension->PowerDownLevel;
    else
        PowerState.DeviceState = PowerDeviceD0;  // power up all the way; we're probably just about to do some IO

    ntStatus = IsoUsb_SelfRequestPowerIrp( DeviceObject, PowerState );

    ISOUSB_KdPrint( DBGLVL_MAXIMUM,("IsoUsb_SelfSuspendOrActivate() status 0x%x on setting dev state %s\n", ntStatus, ISOUSB_StringForDevState(PowerState.DeviceState ) ));

    return ntStatus;

}


NTSTATUS
IsoUsb_SelfRequestPowerIrp(
    IN PDEVICE_OBJECT DeviceObject,
    IN POWER_STATE PowerState
    )
/*++

Routine Description:

    This routine is called by IsoUsb_SelfSuspendOrActivate() to
    actually make the system request for a powerdown/up to PowerState.
    It first checks to see if we are already in Powerstate and immediately
    returns  SUCCESS with no further processing if so


Arguments:

    DeviceObject - Pointer to the device object

    PowerState. power state requested, e.g PowerDeviceD0.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品自拍偷拍动漫精品| 欧美日韩久久不卡| 亚洲电影欧美电影有声小说| 精品免费一区二区三区| 91污在线观看| 国产精品自拍在线| 性做久久久久久| 国产精品久久毛片av大全日韩| 欧美精品乱人伦久久久久久| 不卡免费追剧大全电视剧网站| 日日摸夜夜添夜夜添亚洲女人| 中文字幕在线观看一区| 欧美成人免费网站| 欧美视频一区在线| 99热99精品| 国产mv日韩mv欧美| 久久99精品国产麻豆不卡| 一区二区在线免费观看| 中文字幕乱码亚洲精品一区| 精品久久久久久最新网址| 欧美日韩免费高清一区色橹橹 | 久久电影网电视剧免费观看| 亚洲精品自拍动漫在线| 中文久久乱码一区二区| 26uuu久久综合| 日韩精品一区二区三区在线 | 欧美成人国产一区二区| 欧美日韩亚洲国产综合| 91蜜桃传媒精品久久久一区二区| 国产mv日韩mv欧美| 精品视频1区2区| 91国偷自产一区二区开放时间| 国产精品18久久久| 国产精品白丝jk黑袜喷水| 另类成人小视频在线| 奇米一区二区三区| 美女爽到高潮91| 久久精品国产精品青草| 免播放器亚洲一区| 久久成人免费网| 久久机这里只有精品| 日本伊人色综合网| 天堂午夜影视日韩欧美一区二区| 亚洲国产综合色| 亚洲第一综合色| 五月婷婷激情综合| 蜜臀va亚洲va欧美va天堂 | 中文字幕第一区二区| 国产日产欧美一区| 国产日产欧美精品一区二区三区| 国产欧美一区二区精品秋霞影院| 久久久久久久免费视频了| 26uuu色噜噜精品一区二区| 精品国产电影一区二区| 国产欧美一区二区精品性色超碰| 国产日韩av一区| 亚洲欧美综合网| 一区二区三区不卡在线观看| 一区二区三区不卡在线观看| 亚洲国产乱码最新视频| 午夜不卡av免费| 麻豆国产欧美日韩综合精品二区| 久久国产精品区| 成人高清视频在线| 在线免费观看日本一区| 欧美视频日韩视频| 精品国产一区二区亚洲人成毛片 | 7777精品伊人久久久大香线蕉经典版下载| 欧美日韩精品免费观看视频 | 337p亚洲精品色噜噜狠狠| 欧美一级黄色大片| 久久久九九九九| 亚洲精品视频免费看| 视频一区二区三区入口| 国产麻豆精品视频| 91丨国产丨九色丨pron| 欧美电影一区二区三区| 精品国产三级电影在线观看| 国产精品第四页| 丝袜诱惑制服诱惑色一区在线观看| 经典三级一区二区| 色婷婷精品大在线视频| 亚洲精品国久久99热| 青青草伊人久久| 成人av网址在线| 欧美福利视频一区| www欧美成人18+| 一级特黄大欧美久久久| 国内精品久久久久影院薰衣草| 色呦呦日韩精品| 日韩精品一区在线| 亚洲精品精品亚洲| 国产毛片一区二区| 欧美精品v国产精品v日韩精品| 欧美国产综合色视频| 五月天国产精品| www.欧美日韩国产在线| 精品国产乱码久久| 亚洲综合激情另类小说区| 国产成人精品一区二区三区网站观看 | 中文字幕一区二区三区在线观看 | 国产一区二区三区观看| 一本久久综合亚洲鲁鲁五月天| 欧美va在线播放| 一区二区成人在线视频| 成人激情视频网站| 精品久久久久一区| 日韩1区2区日韩1区2区| 99re这里只有精品视频首页| 2020国产精品自拍| 日韩av午夜在线观看| 色8久久精品久久久久久蜜| 久久精品免视看| 蜜臀av性久久久久蜜臀aⅴ| 欧美三级三级三级爽爽爽| 亚洲国产精品二十页| 国产在线一区观看| 日韩欧美国产一二三区| 亚洲妇女屁股眼交7| 色综合久久久久网| 中文字幕一区二区三区不卡在线| 国产成人综合在线播放| 精品伦理精品一区| 久久精品二区亚洲w码| 欧美一区二区三区四区高清| 亚洲高清视频在线| 在线视频中文字幕一区二区| 亚洲视频免费看| 成人av在线播放网址| 国产欧美一区二区精品仙草咪 | 秋霞电影网一区二区| 欧美日韩1区2区| 亚洲电影在线播放| 欧美性猛交xxxx乱大交退制版| 一区二区三区四区激情| 欧洲一区二区三区免费视频| 一区二区三区在线视频免费| 91小视频在线| 亚洲一区在线观看免费| 91福利社在线观看| 亚洲h在线观看| 欧美另类videos死尸| 午夜影院在线观看欧美| 欧美日韩mp4| 水蜜桃久久夜色精品一区的特点 | 91在线免费视频观看| 国产精品视频观看| 一本一道久久a久久精品综合蜜臀| 亚洲欧洲精品天堂一级| 99久久国产综合色|国产精品| 亚洲欧美影音先锋| 色噜噜狠狠色综合中国| 亚洲二区在线视频| 欧美一区二区在线观看| 激情图片小说一区| 国产精品女主播av| 欧美色综合影院| 另类小说图片综合网| 国产日产精品1区| 色综合久久99| 日本女人一区二区三区| 久久久另类综合| 91在线无精精品入口| 亚洲成a人片综合在线| 精品久久久久久亚洲综合网| 成人综合在线网站| 亚洲成人一区二区| 久久久久青草大香线综合精品| 成人黄色av电影| 亚洲国产精品精华液网站| 精品国产欧美一区二区| 福利电影一区二区| 亚洲国产综合在线| 国产清纯白嫩初高生在线观看91| 一本一道综合狠狠老| 久久99久久久久| 自拍偷拍亚洲激情| 日韩免费一区二区| 91视频免费观看| 奇米影视一区二区三区小说| 国产精品九色蝌蚪自拍| 91麻豆精品国产无毒不卡在线观看 | 日韩精品中文字幕在线一区| youjizz国产精品| 日韩成人一级片| 国产精品福利一区二区三区| 7777精品久久久大香线蕉| 不卡电影一区二区三区| 奇米综合一区二区三区精品视频| 国产精品三级电影| 亚洲国产欧美另类丝袜| 精品国产一区二区亚洲人成毛片 | 中文一区在线播放| 欧美猛男gaygay网站| 成人黄页毛片网站| 大尺度一区二区| 久久综合九色欧美综合狠狠| 欧洲精品一区二区| 国产成人在线影院 | 国内精品伊人久久久久av影院 |