Commit Graph

7 Commits (d2ff4fc557a4c5248b2d99b0d48e47a246d994b2)

Author SHA1 Message Date
Felipe Balbi ad1adb89a0 usb: musb: gadget: do not poke with gadget's list_head
struct usb_request's list_head is supposed to be
used only by gadget drivers, but musb is abusing
that. Give struct musb_request its own list_head
and prevent musb from poking into other driver's
business.

Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-02-17 21:11:46 +02:00
Mian Yousaf Kaukab c65bfa62b7 usb: musb: maintain three states for buffer mappings instead of two
If dma buffers are mapped by a higher layer, with a boolean musb_request.mapped
it is still possible to call dma_sync_single_for_device() from
musb_g_giveback(), even if txstate()/rxstate() has called unmap_dma_buffer()
before falling back to pio mode.

Moreover, check for musb_ep->dma is moved within map_dma_buffer() so where
applicable checks for it are removed. And where possible, checks for
is_dma_capable() are merged with buffer map state check.

Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2011-02-01 10:41:30 +02:00
Ming Lei f11d893de4 usb: musb: support ISO high bandwidth for gadget mode
This patch has been tested OK on beagle B5 board and
use usbtest #15 and #16 as testcase.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22 10:21:53 -07:00
Sergei Shtylyov a666e3e609 usb: musb: gadget: restart request on clearing endpoint halt
Commit 46034dca51 (USB: musb_gadget_ep0: stop
abusing musb_gadget_set_halt()) forgot to restart a queued request after
clearing the endpoint halt feature. This results in a couple of USB resets
while enumerating the file-backed storage gadget due to CSW packet not being
sent for the MODE SENSE(10) command.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: stable@kernel.org
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-24 11:05:01 -07:00
Sergei Shtylyov 46034dca51 USB: musb_gadget_ep0: stop abusing musb_gadget_set_halt()
Stop playing with musb->lock and abusing musb_gadget_set_halt() in
the code clearing the endpoint halt feature -- instead, manipulate
the registers directly.

While at it, get rid uf unneeded line breaks and over-indentation in
the code setting the endpoint halt feature.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 11:55:25 -08:00
Sergei Shtylyov 47e9760529 USB: musb_gadget: implement set_wedge() method
Implement the driver's set_wedge() method by adding the 'wedged' flag
to the 'struct musb_ep'.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 11:55:25 -08:00
Felipe Balbi 550a7375fe USB: Add MUSB and TUSB support
This patch adds support for MUSB and TUSB controllers
integrated into omap2430 and davinci. It also adds support
for external tusb6010 controller.

Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-13 17:33:00 -07:00