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)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:25:21 +0000 (09:25 +0900)
commit17479e68d7904ceb5d7477dd7b17c5add6ceb774
tree42becf48492a30714286a9fd51bdbf6232d4a4a2
parent1509d2e72ccb571127b2ecef814ad099b5075ce6
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