usb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lock
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Fri, 22 Aug 2014 11:14:00 +0000 (20:14 +0900)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:16:21 +0000 (11:16 +0100)
commitdcad4ff78ae5e6bb3943c947dabc7253d024bb89
treeb214f79630c7809b305ee6d49c2ba7a0e95c8a84
parenta1caa78b0f9fd5429f89d2466e9d17cbba0615f8
usb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lock

This patch protects the mod->irq_bempsts and mod->irq_brdysts by
spin lock in the usbhs_status_get_each_irq() because other functions
will write them during spin lock. Otherwise, the driver will clears
the BRDYSTS and/or BEMPSTS wrongly, and then, the transaction will not
finish.
Also since the driver should use the INTSTS0 and BRDYSTS and BEMPSTS
as the same timing, the patch protects them.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
(cherry picked from commit c4d8199ba1a7aa390b06db23f4532e2c1875aefb)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/usb/renesas_usbhs/mod.c