OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1aed417
)
usb: dwc3: ep0: make sure wValue is 0 on GetStatus()
author
Felipe Balbi
<felipe.balbi@linux.intel.com>
Thu, 8 Jun 2017 10:16:18 +0000
(13:16 +0300)
committer
Felipe Balbi
<felipe.balbi@linux.intel.com>
Tue, 13 Jun 2017 10:21:05 +0000
(13:21 +0300)
We don't (yet) support PTM_STATUS messages so let's not reply to them
erroneously.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc3/ep0.c
patch
|
blob
|
history
diff --git
a/drivers/usb/dwc3/ep0.c
b/drivers/usb/dwc3/ep0.c
index
8cfce84
..
827e376
100644
(file)
--- a/
drivers/usb/dwc3/ep0.c
+++ b/
drivers/usb/dwc3/ep0.c
@@
-319,10
+319,16
@@
static int dwc3_ep0_handle_status(struct dwc3 *dwc,
{
struct dwc3_ep *dep;
u32 recip;
+ u32 value;
u32 reg;
u16 usb_status = 0;
__le16 *response_pkt;
+ /* We don't support PTM_STATUS */
+ value = le16_to_cpu(ctrl->wValue);
+ if (value != 0)
+ return -EINVAL;
+
recip = ctrl->bRequestType & USB_RECIP_MASK;
switch (recip) {
case USB_RECIP_DEVICE: