diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2019-10-01 12:10:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-04 14:36:22 +0200 |
commit | 4d599cd3a097a85a5c68a2c82b9a48cddf9953ec (patch) | |
tree | 1c4c123d079a39d6caa5a7c395800663e0e4b004 /drivers/usb/renesas_usbhs/fifo.h | |
parent | usb: renesas_usbhs: gadget: Do not discard queues in usb_ep_set_{halt,wedge}() (diff) | |
download | linux-4d599cd3a097a85a5c68a2c82b9a48cddf9953ec.tar.xz linux-4d599cd3a097a85a5c68a2c82b9a48cddf9953ec.zip |
usb: renesas_usbhs: gadget: Fix usb_ep_set_{halt,wedge}() behavior
According to usb_ep_set_halt()'s description,
__usbhsg_ep_set_halt_wedge() should return -EAGAIN if the IN endpoint
has any queue or data. Otherwise, this driver is possible to cause
just STALL without sending a short packet data on g_mass_storage driver,
and then a few resetting a device happens on a host side during
a usb enumaration.
Fixes: 2f98382dcdfe ("usb: renesas_usbhs: Add Renesas USBHS Gadget")
Cc: <stable@vger.kernel.org> # v3.0+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/1569924633-322-3-git-send-email-yoshihiro.shimoda.uh@renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/renesas_usbhs/fifo.h')
-rw-r--r-- | drivers/usb/renesas_usbhs/fifo.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.h b/drivers/usb/renesas_usbhs/fifo.h index 88d1816bcda2..c3d3cc35cee0 100644 --- a/drivers/usb/renesas_usbhs/fifo.h +++ b/drivers/usb/renesas_usbhs/fifo.h @@ -97,5 +97,6 @@ void usbhs_pkt_push(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt, void *buf, int len, int zero, int sequence); struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt); void usbhs_pkt_start(struct usbhs_pipe *pipe); +struct usbhs_pkt *__usbhsf_pkt_get(struct usbhs_pipe *pipe); #endif /* RENESAS_USB_FIFO_H */ |