From 5c491b5496110e8841202473dbc6c3dbbdccb600 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 20 May 2014 10:37:33 +0200 Subject: [PATCH 03/26] usb: add vendor request defines RH-Author: Gerd Hoffmann Message-id: <1400582257-1744-3-git-send-email-kraxel@redhat.com> Patchwork-id: 58958 O-Subject: [RHEL-6.6 qemu-kvm PATCH 2/6] usb: add vendor request defines Bugzilla: 949547 RH-Acked-by: Laszlo Ersek RH-Acked-by: Paolo Bonzini RH-Acked-by: Dr. David Alan Gilbert (git) Add defines for vendor specific usb control requests. Group defines by Device / Interface / Endpoint while being at it. Signed-off-by: Gerd Hoffmann (cherry picked from commit 2b81ba53887e6f3b5a79ecd2f446f849ed89561f) Conflicts: include/hw/usb.h --- hw/usb.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) Signed-off-by: Miroslav Rezanina --- hw/usb.h | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/usb.h b/hw/usb.h index d080a9c..bfe39fe 100644 --- a/hw/usb.h +++ b/hw/usb.h @@ -91,17 +91,26 @@ #define DeviceRequest ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8) #define DeviceOutRequest ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_DEVICE)<<8) -#define InterfaceRequest \ +#define VendorDeviceRequest ((USB_DIR_IN|USB_TYPE_VENDOR|USB_RECIP_DEVICE)<<8) +#define VendorDeviceOutRequest \ + ((USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_DEVICE)<<8) + +#define InterfaceRequest \ ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) #define InterfaceOutRequest \ ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_INTERFACE)<<8) -#define EndpointRequest ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_ENDPOINT)<<8) -#define EndpointOutRequest \ - ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_ENDPOINT)<<8) #define ClassInterfaceRequest \ ((USB_DIR_IN|USB_TYPE_CLASS|USB_RECIP_INTERFACE)<<8) #define ClassInterfaceOutRequest \ ((USB_DIR_OUT|USB_TYPE_CLASS|USB_RECIP_INTERFACE)<<8) +#define VendorInterfaceRequest \ + ((USB_DIR_IN|USB_TYPE_VENDOR|USB_RECIP_INTERFACE)<<8) +#define VendorInterfaceOutRequest \ + ((USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE)<<8) + +#define EndpointRequest ((USB_DIR_IN|USB_TYPE_STANDARD|USB_RECIP_ENDPOINT)<<8) +#define EndpointOutRequest \ + ((USB_DIR_OUT|USB_TYPE_STANDARD|USB_RECIP_ENDPOINT)<<8) #define USB_REQ_GET_STATUS 0x00 #define USB_REQ_CLEAR_FEATURE 0x01 -- 1.7.1