Skip to content

Commit

Permalink
usb: dwc3: ep0: make sure wValue is 0 on GetStatus()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi committed Jun 13, 2017
1 parent 1aed417 commit 9b0a1f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/usb/dwc3/ep0.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9b0a1f9

Please sign in to comment.