]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
usb: core: add Status Type definitions
authorFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 2 Nov 2017 08:57:38 +0000 (10:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Nov 2017 14:47:19 +0000 (15:47 +0100)
USB 3.1 added a PTM_STATUS type. Let's add a define for it and
following patches will let usb_get_status() accept the new argument.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/message.c
include/uapi/linux/usb/ch9.h

index 5e8379b42f479febee701e6f760b8705fc3865c7..f35cbfa2b87bd04e9890a321c0ca85e59cc173ad 100644 (file)
@@ -946,8 +946,8 @@ int usb_get_status(struct usb_device *dev, int type, int target, void *data)
                return -ENOMEM;
 
        ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
-               USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, status,
-               sizeof(*status), USB_CTRL_GET_TIMEOUT);
+               USB_REQ_GET_STATUS, USB_DIR_IN | type, USB_STATUS_TYPE_STANDARD,
+               target, status, sizeof(*status), USB_CTRL_GET_TIMEOUT);
 
        if (ret == 2) {
                *(u16 *) data = le16_to_cpu(*status);
index 2a5d63040a0b0c7a713b9dcffa8dfd3cc7ac382f..b2167e89ae6e2226f69161384dbd74c1d64da1f4 100644 (file)
 #define        TEST_PACKET     4
 #define        TEST_FORCE_EN   5
 
+/* Status Type */
+#define USB_STATUS_TYPE_STANDARD       0
+#define USB_STATUS_TYPE_PTM            1
+
 /*
  * New Feature Selectors as added by USB 3.0
  * See USB 3.0 spec Table 9-7