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

    usb: wusbcore: change WA_SEGS_MAX to a legal value

to the 3.4-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-wusbcore-change-wa_segs_max-to-a-legal-value.patch
and it can be found in the queue-3.4 subdirectory.

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


>From 4a6c6bb2be9c0c7bf82089b29afa178f2e53fd8e Mon Sep 17 00:00:00 2001
From: Thomas Pugliese <[email protected]>
Date: Wed, 23 Oct 2013 14:44:29 -0500
Subject: usb: wusbcore: change WA_SEGS_MAX to a legal value

From: Thomas Pugliese <[email protected]>

commit f74b75e7f920c700636cccca669c7d16d12e9202 upstream.

change WA_SEGS_MAX to a number that is legal according to the WUSB
spec.

Signed-off-by: Thomas Pugliese <[email protected]>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <[email protected]>
Cc: Yang Yingliang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/usb/wusbcore/wa-xfer.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/usb/wusbcore/wa-xfer.c
+++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -90,7 +90,8 @@
 #include "wusbhc.h"
 
 enum {
-       WA_SEGS_MAX = 255,
+       /* [WUSB] section 8.3.3 allocates 7 bits for the segment index. */
+       WA_SEGS_MAX = 128,
 };
 
 enum wa_seg_status {
@@ -444,7 +445,7 @@ static ssize_t __wa_xfer_setup_sizes(str
        xfer->seg_size = (xfer->seg_size / maxpktsize) * maxpktsize;
        xfer->segs = (urb->transfer_buffer_length + xfer->seg_size - 1)
                / xfer->seg_size;
-       if (xfer->segs >= WA_SEGS_MAX) {
+       if (xfer->segs > WA_SEGS_MAX) {
                dev_err(dev, "BUG? ops, number of segments %d bigger than %d\n",
                        (int)(urb->transfer_buffer_length / xfer->seg_size),
                        WA_SEGS_MAX);


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

queue-3.4/usb-wusbcore-change-wa_segs_max-to-a-legal-value.patch
queue-3.4/usb-wusbcore-set-the-rpipe-wmaxpacketsize-value-correctly.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