]> git.baikalelectronics.ru Git - kernel.git/commit
usb: wusbcore: serialize access to the HWA data out endpoint
authorThomas Pugliese <thomas.pugliese@gmail.com>
Mon, 7 Oct 2013 15:53:57 +0000 (10:53 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Oct 2013 12:19:21 +0000 (05:19 -0700)
commit1998cb18aa2e41916a25c16f07f12f62f0732e33
treea1cee61ed77804e87b138621bc77f90cc24db11c
parent55ea3b5761d15eb6093ec890d1d1d1bc62f74a58
usb: wusbcore: serialize access to the HWA data out endpoint

This patch serializes access to the HWA data transfer out (DTO)
endpoint.  This prevents a situation where two transfer requests being
sent concurrently to separate downstream endpoints could interleave
their transfer request and transfer data packets causing data
corruption.  The transfer processing code will now attempt to acquire
the DTO resource before sending a transfer to the HWA.  If it cannot
acquire the resource, the RPIPE that the transfer is assigned to will
be placed on a waiting list.  When the DTO resource is released, the
actor releasing the resource will serivce the RPIPEs that are waiting.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/wusbcore/wa-hc.h
drivers/usb/wusbcore/wa-rpipe.c
drivers/usb/wusbcore/wa-xfer.c