提交 f74b75e7 编写于 作者: T Thomas Pugliese 提交者: Greg Kroah-Hartman

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: NThomas Pugliese <thomas.pugliese@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f07ddb9e
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册