diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2013-03-30 11:54:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-30 16:20:48 +0100 |
commit | 24dcade163753259ddcbf77018b1244d7d90ed6b (patch) | |
tree | e500e8008b9a95372a61ffba2f3bb6447e45d8bf /drivers/usb/chipidea | |
parent | usb: chipidea: udc: read status of td only once in hardware_dequeue (diff) | |
download | linux-24dcade163753259ddcbf77018b1244d7d90ed6b.tar.xz linux-24dcade163753259ddcbf77018b1244d7d90ed6b.zip |
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: Felipe Balbi <balbi@ti.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 20a5b79f58f8..0531532a5c8e 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -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 */ |