提交 24dcade1 编写于 作者: M Michael Grzeschik 提交者: Greg Kroah-Hartman

usb: chipidea: udc: don't truncate requests to single tds

It is not safe to truncate requests to the maximum possible size the
controller can handle with one td and to keep working. That patch fixes
that with proper error handling instead.
Reported-by: NFelipe Balbi <balbi@ti.com>
Signed-off-by: NMichael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: NAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 9e506438
......@@ -1158,9 +1158,9 @@ static int ep_queue(struct usb_ep *ep, struct usb_request *req,
}
if (req->length > 4 * CI13XXX_PAGE_SIZE) {
req->length = 4 * CI13XXX_PAGE_SIZE;
retval = -EMSGSIZE;
dev_warn(mEp->ci->dev, "request length truncated\n");
dev_err(mEp->ci->dev, "request bigger than one td\n");
goto done;
}
/* push request */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册