EVT_UCX_USBDEVICE_DISABLE - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ucxusbdevice.h

EVT_UCX_USBDEVICE_DISABLE EvtUcxUsbdeviceDisable;

VOID EvtUcxUsbdeviceDisable(
  [in] UCXCONTROLLER UcxController,
  [in] WDFREQUEST Request
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-ucxusbdevice-evt_ucx_usbdevice_disable)

EVT_UCX_USBDEVICE_DISABLE callback function

Description

The client driver's implementation that UCX calls to release controller resources associated with the device and its default endpoint.

Parameters

UcxController [in]

A handle to the UCX controller that the client driver received in a previous call to the UcxControllerCreate method.

Request [in]

A structure of type USBDEVICE_DISABLE.

Remarks

The UCX client driver registers this callback function with the USB host controller extension (UCX) by calling the UcxUsbDeviceCreate method.

When the client driver has released controller resources, it completes the WDFREQUEST. After completion, the only callback function that UCX calls referencing this USB device is EVT_UCX_USBDEVICE_ENABLE.

While the device is disabled, UCX does not schedule transfers for it.

To transition the device to the desired state, the host controller driver communicates with the hardware to complete the request.

The client driver returns completion status in Request. The driver can complete the WDFREQUEST asynchronously.

Examples

VOID
UsbDevice_EvtUcxUsbDeviceDisable(
    UCXCONTROLLER      UcxController,
    WDFREQUEST         Request
)

{
    UNREFERENCED_PARAMETER(UcxController);

    DbgTrace(TL_INFO, UsbDevice, "UsbDevice_EvtUcxUsbDeviceDisable");

    WDF_REQUEST_PARAMETERS_INIT(&wdfRequestParams);
    WdfRequestGetParameters(WdfRequest, &wdfRequestParams);
    usbDeviceDisable = (PUSBDEVICE_DISABLE)wdfRequestParams.Parameters.Others.Arg1;
    ...

    WdfRequestComplete(Request, STATUS_SUCCESS);
}

See also

UcxUsbDeviceCreate