Re: [PATCH v3 09/32] usb: dwc2: host: reset frame number after suspend

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

 



On 09/29/2015 01:08 PM, Mian Yousaf Kaukab wrote:

From: Gregory Herrero <gregory.herrero@xxxxxxxxx>

Frame number is reset in hardware after exiting hibernation.
Thus, reset frame_number and ensure qh are queued with correct
sched_frame.

Otherwise, qh->sched_frame may be too high compared to
current frame number (which is 0). This can delay addition of qh in
the list of transfers until frame number reaches qh->sched_frame.

Signed-off-by: Gregory Herrero <gregory.herrero@xxxxxxxxx>
Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@xxxxxxxxx>
Tested-by: Robert Baldyga <r.baldyga@xxxxxxxxxxx>
Tested-by: Dinh Nguyen <dinguyen@xxxxxxxxxxxxxxxxxxxxx>
Tested-by: John Youn <johnyoun@xxxxxxxxxxxx>
Acked-by: John Youn <johnyoun@xxxxxxxxxxxx>

[...]

diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c
index 712977f..801bd9d 100644
--- a/drivers/usb/dwc2/hcd_queue.c
+++ b/drivers/usb/dwc2/hcd_queue.c
@@ -583,6 +583,14 @@ int dwc2_hcd_qh_add(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh)
  		/* QH already in a schedule */
  		return 0;

+	if (!dwc2_frame_num_le(qh->sched_frame, hsotg->frame_number) &&
+			!hsotg->frame_number) {
+		dev_dbg(hsotg->dev,
+				"reset frame number counter\n");

   Would the dev_dbg() line indeed exceed 80 columns?

[...]

MBR, Sergei

--
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