Re: [PATCH] Bug 60699 - Stalled state of endpoint will not be cleared

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 13 August 2013 19:27:52 Sergei Shtylyov wrote:
> Hello.
> 
> On 08/13/2013 08:52 PM, Florian Wolter wrote:
> >>> Patch to Fix Problem with not cleared halted endpoint.
> >>> 
> >>> See Bugtracker Bug 60699
> >> 
> >> Hi Florian,
> >> 
> >> You need to send your patch inline, not as an attachment.
> >> 
> >> Thanks,
> >> Sarah Sharp
> > 
> > Hi Sarah,
> > 
> > Sorry now the Patch is in-lined.
> > 
> > Subject: [PATCH] Fix for Bug 60699 (Stalled state of endpoint will not be
> > 
> >   cleared)
> > 
> > Signed-off-by: Florian Wolter <wolly84@xxxxxx>
> > ---
> > 
> >   drivers/usb/host/xhci-ring.c |    8 ++++++--
> >   1 file changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> > index 5b08cd8..c2daaf7 100644
> > --- a/drivers/usb/host/xhci-ring.c
> > +++ b/drivers/usb/host/xhci-ring.c
> > 
> > @@ -847,8 +847,12 @@ remove_finished_td:
> >           /* Otherwise ring the doorbell(s) to restart queued transfers
> >           */ ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
> >       
> >       }
> > 
> > -    ep->stopped_td = NULL;
> > -    ep->stopped_trb = NULL;
> > +
> > +    /* Clear stopped_td and stopped_trb if endpoint is not halted */
> > +    if (!(ep->ep_state & EP_HALTED)) {
> > +        ep->stopped_td = NULL;
> > +        ep->stopped_trb = NULL;
> > +    }
> > 
> >       /*
> >       
> >        * Drop the lock and complete the URBs in the cancelled TD list.
> 
>     All the tabs have been replaced by spaces in your patch. See
> Documentation/email-clients.txt on how to avoid this.
> 
> WBR, Sergei


Subject: [PATCH] Fix for Bug 60699 (Stalled state of endpoint will not be
 cleared)


Signed-off-by: Florian Wolter <wolly84@xxxxxx>
---
 drivers/usb/host/xhci-ring.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 5b08cd8..c2daaf7 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -847,8 +847,12 @@ remove_finished_td:
 		/* Otherwise ring the doorbell(s) to restart queued transfers */
 		ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
 	}
-	ep->stopped_td = NULL;
-	ep->stopped_trb = NULL;
+
+	/* Clear stopped_td and stopped_trb if endpoint is not halted */
+	if (!(ep->ep_state & EP_HALTED)) {
+		ep->stopped_td = NULL;
+		ep->stopped_trb = NULL;
+	}
 
 	/*
 	 * Drop the lock and complete the URBs in the cancelled TD list.
-- 
1.7.10.4

Thanks for the information I hope the are now shown.

Florian

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux