usb: chipidea: need to mask when writting endptflush and endptprime
authorMatthieu CASTET <matthieu.castet@parrot.com>
Wed, 19 Feb 2014 05:46:31 +0000 (13:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2014 20:34:45 +0000 (12:34 -0800)
commit5bf5dbeda2454296f1984adfbfc8e6f5965ac389
treec7464044ff490053cba826f45a804de2f9a8fb64
parent0fd7a820675e9eaa79678c65d6db7dc8f774c90d
usb: chipidea: need to mask when writting endptflush and endptprime

ENDPTFLUSH and ENDPTPRIME registers are set by software and clear
by hardware. There is a bit for each endpoint. When we are setting
a bit for an endpoint we should make sure we do not touch other
endpoint bit. There is a race condition if the hardware clear the
bit between the read and the write in hw_write.

Cc: stable <stable@vger.kernel.org> # 3.11+
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
Tested-by: Michael Grzeschik <mgrzeschik@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/udc.c