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 my usb git tree which can be found at
    git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-next branch.

The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)

The patch will also be merged in the next major kernel release
during the merge window.

If you have any questions about this process, please let me know.


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

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

Signed-off-by: Thomas Pugliese <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 drivers/usb/wusbcore/wa-xfer.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c
index 090ac308..ed5abe87 100644
--- a/drivers/usb/wusbcore/wa-xfer.c
+++ b/drivers/usb/wusbcore/wa-xfer.c
@@ -91,7 +91,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 {
@@ -588,7 +589,7 @@ static ssize_t __wa_xfer_setup_sizes(struct wa_xfer *xfer,
                        xfer->segs = 1;
        }
 
-       if (xfer->segs >= WA_SEGS_MAX) {
+       if (xfer->segs > WA_SEGS_MAX) {
                dev_err(dev, "BUG? oops, number of segments %zu bigger than 
%d\n",
                        (urb->transfer_buffer_length/xfer->seg_size),
                        WA_SEGS_MAX);
-- 
1.8.4.3.gca3854a


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