RE: Hang with DWC3 driver

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

 



> From: Paul Zimmerman
> Sent: Wednesday, February 08, 2012 11:38 AM
> 
> Hi Felipe,
> 
> I'm running into a hang with the mass-storage gadget with later
> versions of the dwc3 driver. I see this with the version from your
> master branch from Feb 1, and also with the latest version from
> today.

I found the problem. If multiple requests are queued, and the next
TRB is the last in the pool, and it's not an isoc EP, the driver
needs to set the LST bit in that TRB and stop queing requests.

Signed-off-by: Paul Zimmerman (paulz@xxxxxxxxxxxx)
---
@@ -893,6 +893,15 @@ static void dwc3_prepare_trbs(struct dwc3_ep *dep, bool starting)
 			if (!trbs_left)
 				last_one = 1;
 
+			/*
+			 * Can't wrap around on a non-isoc EP since there's
+			 * no link trb
+			 */
+			if (!usb_endpoint_xfer_isoc(dep->desc) &&
+					(dep->free_slot & DWC3_TRB_MASK)
+							== DWC3_TRB_MASK)
+				last_one = 1;
+
 			/* Is this the last request? */
 			if (list_is_last(&req->list, &dep->request_list))
 				last_one = 1;
-- 
paul
--
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