diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-11-18 22:51:51 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 11:55:25 -0800 |
commit | 47e9760529a9823be59d879f726acdc7e2fcbe11 (patch) | |
tree | d9c5d1ac662e0bd54c0b3a0fd40639ddcf4b177d /drivers/usb/musb/musb_gadget_ep0.c | |
parent | 196f1b7a387546f425df2f1fad26772e3d513aea (diff) | |
download | op-kernel-dev-47e9760529a9823be59d879f726acdc7e2fcbe11.zip op-kernel-dev-47e9760529a9823be59d879f726acdc7e2fcbe11.tar.gz |
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>
Diffstat (limited to 'drivers/usb/musb/musb_gadget_ep0.c')
-rw-r--r-- | drivers/usb/musb/musb_gadget_ep0.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/musb/musb_gadget_ep0.c b/drivers/usb/musb/musb_gadget_ep0.c index 1c44b97..c63aff1 100644 --- a/drivers/usb/musb/musb_gadget_ep0.c +++ b/drivers/usb/musb/musb_gadget_ep0.c @@ -273,6 +273,11 @@ __acquires(musb->lock) if (!musb_ep->desc) break; + handled = 1; + /* Ignore request if endpoint is wedged */ + if (musb_ep->wedged) + break; + /* REVISIT do it directly, no locking games */ spin_unlock(&musb->lock); musb_gadget_set_halt(&musb_ep->end_point, 0); @@ -280,7 +285,6 @@ __acquires(musb->lock) /* select ep0 again */ musb_ep_select(mbase, 0); - handled = 1; } break; default: /* class, vendor, etc ... delegate */ |