Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: core: add Status Type definitions

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>

authored by

Felipe Balbi and committed by
Greg Kroah-Hartman
6f27f4f9 e79bfcb7

+6 -2
+2 -2
drivers/usb/core/message.c
··· 946 946 return -ENOMEM; 947 947 948 948 ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), 949 - USB_REQ_GET_STATUS, USB_DIR_IN | type, 0, target, status, 950 - sizeof(*status), USB_CTRL_GET_TIMEOUT); 949 + USB_REQ_GET_STATUS, USB_DIR_IN | type, USB_STATUS_TYPE_STANDARD, 950 + target, status, sizeof(*status), USB_CTRL_GET_TIMEOUT); 951 951 952 952 if (ret == 2) { 953 953 *(u16 *) data = le16_to_cpu(*status);
+4
include/uapi/linux/usb/ch9.h
··· 143 143 #define TEST_PACKET 4 144 144 #define TEST_FORCE_EN 5 145 145 146 + /* Status Type */ 147 + #define USB_STATUS_TYPE_STANDARD 0 148 + #define USB_STATUS_TYPE_PTM 1 149 + 146 150 /* 147 151 * New Feature Selectors as added by USB 3.0 148 152 * See USB 3.0 spec Table 9-7