This is a note to let you know that I've just added the patch titled

    USB: EHCI: fix initialization bug in iso_stream_schedule()

to the 3.18-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     usb-ehci-fix-initialization-bug-in-iso_stream_schedule.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 6d89252a998a695ecb0348fc2d717dc33d90cae9 Mon Sep 17 00:00:00 2001
From: Alan Stern <[email protected]>
Date: Thu, 4 Dec 2014 10:21:56 -0500
Subject: USB: EHCI: fix initialization bug in iso_stream_schedule()

From: Alan Stern <[email protected]>

commit 6d89252a998a695ecb0348fc2d717dc33d90cae9 upstream.

Commit c3ee9b76aa93 (EHCI: improved logic for isochronous scheduling)
introduced the idea of using ehci->last_iso_frame as the origin (or
base) for the circular calculations involved in modifying the
isochronous schedule.  However, the new code it added used
ehci->last_iso_frame before the value was properly initialized.  This
patch rectifies the mistake by moving the initialization lines earlier
in iso_stream_schedule().

This fixes Bugzilla #72891.

Signed-off-by: Alan Stern <[email protected]>
Fixes: c3ee9b76aa93
Reported-by: Joe Bryant <[email protected]>
Tested-by: Joe Bryant <[email protected]>
Tested-by: Martin Long <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/host/ehci-sched.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1581,6 +1581,10 @@ iso_stream_schedule (
        else
                next = (now + 2 + 7) & ~0x07;   /* full frame cache */
 
+       /* If needed, initialize last_iso_frame so that this URB will be seen */
+       if (ehci->isoc_count == 0)
+               ehci->last_iso_frame = now >> 3;
+
        /*
         * Use ehci->last_iso_frame as the base.  There can't be any
         * TDs scheduled for earlier than that.
@@ -1671,10 +1675,6 @@ iso_stream_schedule (
        urb->start_frame = start & (mod - 1);
        if (!stream->highspeed)
                urb->start_frame >>= 3;
-
-       /* Make sure scan_isoc() sees these */
-       if (ehci->isoc_count == 0)
-               ehci->last_iso_frame = now >> 3;
        return status;
 
  fail:


Patches currently in stable-queue which might be from [email protected] 
are

queue-3.18/scsi-fix-regression-in-scsi_send_eh_cmnd.patch
queue-3.18/ohci-add-a-quirk-for-uli-m5237-blocking-on-reset.patch
queue-3.18/usb-ehci-fix-initialization-bug-in-iso_stream_schedule.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to