android_kernel_oneplus_msm8998/drivers/usb/renesas_usbhs
Yoshihiro Shimoda 59bc6b85d6 usb: renesas_usbhs: fix clearing the {BRDY,BEMP}STS condition
commit 519d8bd4b5d3d82c413eac5bb42b106bb4b9ec15 upstream.

The previous driver is possible to stop the transfer wrongly.
For example:
 1) An interrupt happens, but not BRDY interruption.
 2) Read INTSTS0. And than state->intsts0 is not set to BRDY.
 3) BRDY is set to 1 here.
 4) Read BRDYSTS.
 5) Clear the BRDYSTS. And then. the BRDY is cleared wrongly.

Remarks:
 - The INTSTS0.BRDY is read only.
  - If any bits of BRDYSTS are set to 1, the BRDY is set to 1.
  - If BRDYSTS is 0, the BRDY is set to 0.

So, this patch adds condition to avoid such situation. (And about
NRDYSTS, this is not used for now. But, avoiding any side effects,
this patch doesn't touch it.)

Fixes: d5c6a1e024 ("usb: renesas_usbhs: fixup interrupt status clear method")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-24 10:07:39 +02:00
..
common.c usb: renesas_usbhs: Add support for R-Car H3 2015-09-30 11:21:11 -05:00
common.h usb: renesas_usbhs: add support for USB-DMAC 2015-03-13 10:41:19 -05:00
fifo.c usb: renesas_usbhs: Use dmac only if the pipe type is bulk 2016-09-07 08:32:39 +02:00
fifo.h usb: renesas_usbhs: tidyup usbhs_for_each_dfifo macro 2015-04-27 15:48:33 -05:00
Kconfig usb: renesas: fix extcon dependency 2015-02-23 09:14:33 -06:00
Makefile
mod.c usb: renesas_usbhs: fix clearing the {BRDY,BEMP}STS condition 2016-09-24 10:07:39 +02:00
mod.h
mod_gadget.c usb: renesas_usbhs: gadget: fix return value check in usbhs_mod_gadget_probe() 2016-09-07 08:32:43 +02:00
mod_host.c renesas_usbhs: mod_host: use USB_DT_HUB 2015-04-03 19:03:16 +02:00
pipe.c usb: renesas_usbhs: add support for USB-DMAC 2015-03-13 10:41:19 -05:00
pipe.h usb: renesas_usbhs: add support for USB-DMAC 2015-03-13 10:41:19 -05:00
rcar2.c usb: renesas_usbhs: Remove unneeded #include <linux/platform_data/gpio-rcar.h> 2015-10-20 16:03:36 +02:00
rcar2.h