Re: [PATCH 4/4] usb: wusbcore: change WA_SEGS_MAX to a legal value

2013-10-24 Thread Oliver Neukum
On Wed, 2013-10-23 at 14:44 -0500, Thomas Pugliese wrote:
 change WA_SEGS_MAX to a number that is legal according to the WUSB 
 spec.
 
 Signed-off-by: Thomas Pugliese thomas.pugli...@gmail.com

This should go to stable.

Regards
Oliver


--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] usb: wusbcore: change WA_SEGS_MAX to a legal value

2013-10-24 Thread Greg KH
On Thu, Oct 24, 2013 at 10:04:08AM +0200, Oliver Neukum wrote:
 On Wed, 2013-10-23 at 14:44 -0500, Thomas Pugliese wrote:
  change WA_SEGS_MAX to a number that is legal according to the WUSB 
  spec.
  
  Signed-off-by: Thomas Pugliese thomas.pugli...@gmail.com
 
 This should go to stable.

Good catch, I'll do that.

thanks,

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] usb: wusbcore: change WA_SEGS_MAX to a legal value

2013-10-24 Thread Thomas Pugliese


On Thu, 24 Oct 2013, Greg KH wrote:

 On Thu, Oct 24, 2013 at 10:04:08AM +0200, Oliver Neukum wrote:
  On Wed, 2013-10-23 at 14:44 -0500, Thomas Pugliese wrote:
   change WA_SEGS_MAX to a number that is legal according to the WUSB 
   spec.
   
   Signed-off-by: Thomas Pugliese thomas.pugli...@gmail.com
  
  This should go to stable.
 
 Good catch, I'll do that.
 
 thanks,
 
 greg k-h
 

This patch and the other one Oliver commented on will probably not apply 
cleanly to the stable trees due to the changes that have gone into 3.13.  
I will backport them to stable and submit those patches separately.

Thomas
--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 4/4] usb: wusbcore: change WA_SEGS_MAX to a legal value

2013-10-23 Thread Thomas Pugliese
change WA_SEGS_MAX to a number that is legal according to the WUSB 
spec.

Signed-off-by: Thomas Pugliese thomas.pugli...@gmail.com
---
 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 2a69175..0b93161 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.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-usb in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html