OSDN Git Service

USB: omap_udc: workaround dma_free_coherent() bogosity
authorDavid Brownell <david-b@pacbell.net>
Wed, 21 Mar 2007 19:26:32 +0000 (12:26 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Mar 2007 21:17:48 +0000 (14:17 -0700)
commit8a3c1f573c771e60f67ef172d2392d1a28385b4a
tree58e6a29a6c33dc64ff4d41e04d03179114e71d35
parente009f1b202219c62ea7e277adbb953d703dac983
USB: omap_udc: workaround dma_free_coherent() bogosity

Various fixes to omap_udc, noted with some recent testing:

 - Cope with some SMP-induced braindamage in ARM's dma_{alloc,free}_coherent()
   implementation: alloc() can be called with IRQs blocked, but since late
   last year that's no longer true for free().  This resolves really NASTY
   problems with logspamming via WARN_ON(), indicating N-page leaks.

 - Be more correct in handling GET_STATUS request for RECIP_ENDPOINT ... the
   previous code only handled RECIP_INTERFACE, this version should be correct
   except for (sigh) bulk/interrupt endpoints.

 - Provide a better name for the function reporting whether the board has
   vbus sensing wired up.

GET_STATUS requests for endpoint status still acts strangely though, at least
given one flakey host doesn't always ack the first DATA packet, then the packet
that gets retransmitted doesn't have data!

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/omap_udc.c