Skip to content

Commit

Permalink
USB: wusbcore: fix control-pipe directions
Browse files Browse the repository at this point in the history
Fix incorrect pipe directions in control requests (which has been
silently fixed up by USB core).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed May 27, 2014
1 parent 0943d8e commit df3ce23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/wusbcore/wa-rpipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ void rpipe_ep_disable(struct wahc *wa, struct usb_host_endpoint *ep)
u16 index = le16_to_cpu(rpipe->descr.wRPipeIndex);

usb_control_msg(
wa->usb_dev, usb_rcvctrlpipe(wa->usb_dev, 0),
wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0),
USB_REQ_RPIPE_ABORT,
USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE,
0, index, NULL, 0, USB_CTRL_SET_TIMEOUT);
Expand All @@ -545,7 +545,7 @@ void rpipe_clear_feature_stalled(struct wahc *wa, struct usb_host_endpoint *ep)
u16 index = le16_to_cpu(rpipe->descr.wRPipeIndex);

usb_control_msg(
wa->usb_dev, usb_rcvctrlpipe(wa->usb_dev, 0),
wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0),
USB_REQ_CLEAR_FEATURE,
USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_RPIPE,
RPIPE_STALL, index, NULL, 0, USB_CTRL_SET_TIMEOUT);
Expand Down

0 comments on commit df3ce23

Please sign in to comment.