_URB_CONTROL_FEATURE_REQUEST structure (usb.h)

The _URB_CONTROL_FEATURE_REQUEST structure is used by USB client drivers to set or clear features on a device, interface, or endpoint.

Syntax

struct _URB_CONTROL_FEATURE_REQUEST {
  struct _URB_HEADER   Hdr;
  PVOID                Reserved;
  ULONG                Reserved2;
  ULONG                Reserved3;
  PVOID                Reserved4;
  PMDL                 Reserved5;
  struct _URB          *UrbLink;
  struct _URB_HCD_AREA hca;
  USHORT               Reserved0;
  USHORT               FeatureSelector;
  USHORT               Index;
  USHORT               Reserved1;
};

Members

Hdr

Pointer to a _URB_HEADER structure that specifies the URB header information. Hdr.Function indicates either a set or a clear feature operation, to perform on a device, interface, endpoint or other non-standard component. Hdr.Function must have one of the following values:

Hdr.Length must equal sizeof(_URB_CONTROL_FEATURE_REQUEST).

Reserved

Reserved. Do not use.

Reserved2

Reserved. Do not use.

Reserved3

Reserved. Do not use.

Reserved4

Reserved. Do not use.

Reserved5

Reserved. Do not use.

UrbLink

Reserved. Do not use.

hca

Reserved. Do not use.

Reserved0

Reserved. Do not use.

FeatureSelector

Specifies the USB-defined feature code to be cleared or set. Using a feature code that is invalid, cannot be set, or cannot be cleared will cause the target to stall. The bus driver will copy the value in the FeatureSelector member to the wValue field of the setup packet.

Index

Specifies the device-defined index, returned by a successful configuration request, if the request is for an endpoint or interface. Otherwise, Index must be zero. The bus driver will copy the value in the Index member to the wIndex field of the setup packet.

Reserved1

Reserved. Do not use.

Remarks

Drivers can use the UsbBuildFeatureRequest service routine to format this URB.

The reserved members of this structure must be treated as opaque and are reserved for system use.

When a driver arms a USB device for remote wakeup with an IRP_MN_WAIT_WAKE request, the USB bus driver automatically sets remote wakeup feature on the device. A control feature URB is not necessary.

Likewise, when a driver issues a URB with a function type of URB_FUNCTION_SYNC_RESET_PIPE_AND_CLEAR_STALL to a pipe, the bus driver will automatically clear the pipe's endpoint stall feature. The driver does not have to send a control feature URB to the pipe to clear the endpoint stall.

Requirements

Requirement Value
Header usb.h (include Usb.h)

See also

URB

USB Structures

_URB_HEADER