Commit b313c409 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wineusb.sys: Add support for URB_FUNCTION_VENDOR_DEVICE.

parent ca5f7fe4
......@@ -362,6 +362,7 @@ static void LIBUSB_CALL transfer_cb(struct libusb_transfer *transfer)
break;
}
case URB_FUNCTION_VENDOR_DEVICE:
case URB_FUNCTION_VENDOR_INTERFACE:
{
struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST *req = &urb->UrbControlVendorClassRequest;
......@@ -539,10 +540,11 @@ static NTSTATUS usb_submit_urb(void *args)
return STATUS_SUCCESS;
}
case URB_FUNCTION_VENDOR_DEVICE:
case URB_FUNCTION_VENDOR_INTERFACE:
{
struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST *req = &urb->UrbControlVendorClassRequest;
uint8_t req_type = LIBUSB_REQUEST_TYPE_VENDOR | LIBUSB_RECIPIENT_INTERFACE;
uint8_t req_type = LIBUSB_REQUEST_TYPE_VENDOR;
struct transfer_ctx *transfer_ctx;
unsigned char *buffer;
......@@ -551,6 +553,11 @@ static NTSTATUS usb_submit_urb(void *args)
transfer_ctx->irp = irp;
transfer_ctx->transfer_buffer = params->transfer_buffer;
if (urb->UrbHeader.Function == URB_FUNCTION_VENDOR_DEVICE)
req_type |= LIBUSB_RECIPIENT_DEVICE;
else
req_type |= LIBUSB_RECIPIENT_INTERFACE;
if (req->TransferFlags & USBD_TRANSFER_DIRECTION_IN)
req_type |= LIBUSB_ENDPOINT_IN;
if (req->TransferFlags & ~USBD_TRANSFER_DIRECTION_IN)
......
......@@ -556,6 +556,7 @@ static NTSTATUS usb_submit_urb(struct usb_device *device, IRP *irp)
case URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
case URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE:
case URB_FUNCTION_SELECT_CONFIGURATION:
case URB_FUNCTION_VENDOR_DEVICE:
case URB_FUNCTION_VENDOR_INTERFACE:
{
struct usb_submit_urb_params params =
......@@ -586,6 +587,7 @@ static NTSTATUS usb_submit_urb(struct usb_device *device, IRP *irp)
break;
}
case URB_FUNCTION_VENDOR_DEVICE:
case URB_FUNCTION_VENDOR_INTERFACE:
{
struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST *req = &urb->UrbControlVendorClassRequest;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment