Hi, On Tue, Sep 27, 2011 at 10:52:39PM -0700, Paul Zimmerman wrote: > This makes DWC3_EP_WEDGE do the right thing (I think) > > Signed-off-by: Paul Zimmerman <paulz@xxxxxxxxxxxx> > --- > drivers/usb/dwc3/gadget.c | 6 ++++++ > 1 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c > index 29d9e4a..5283956 100644 > --- a/drivers/usb/dwc3/gadget.c > +++ b/drivers/usb/dwc3/gadget.c > @@ -873,6 +873,9 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value) > struct dwc3 *dwc = dep->dwc; > int number, ret; > > + if (!value && (dep->flags & DWC3_EP_WEDGE)) > + return 0; > + > memset(¶ms, 0x00, sizeof(params)); > > if (dep->number == 1) > @@ -928,6 +931,9 @@ static int dwc3_gadget_ep_set_halt(struct usb_ep *ep, int value) > goto out; > } > > + if (!value && (dep->flags & DWC3_EP_WEDGE)) > + dep->flags &= ~DWC3_EP_WEDGE; wouldn't this be enough ?? diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index b2820aa..79aa093 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -897,7 +897,7 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value) value ? "set" : "clear", dep->name); else - dep->flags &= ~DWC3_EP_STALL; + dep->flags &= ~(DWC3_EP_STALL | DWC3_EP_WEDGE); } return ret; } -- balbi
Attachment:
signature.asc
Description: Digital signature