提交 69396dcf 编写于 作者: D David Brownell 提交者: Greg Kroah-Hartman

[PATCH] USB: gadget zero and dma-coherent buffers

This makes sure that the correct length is reported when freeing
a dma-coherent buffer; some platforms complain if that's wrong.
It also makes two parameters readonly in sysfs, as they're not
safe to change while tests are running.
Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c02c4bb2
...@@ -165,8 +165,8 @@ static unsigned buflen = 4096; ...@@ -165,8 +165,8 @@ static unsigned buflen = 4096;
static unsigned qlen = 32; static unsigned qlen = 32;
static unsigned pattern = 0; static unsigned pattern = 0;
module_param (buflen, uint, S_IRUGO|S_IWUSR); module_param (buflen, uint, S_IRUGO);
module_param (qlen, uint, S_IRUGO|S_IWUSR); module_param (qlen, uint, S_IRUGO);
module_param (pattern, uint, S_IRUGO|S_IWUSR); module_param (pattern, uint, S_IRUGO|S_IWUSR);
/* /*
...@@ -1127,8 +1127,10 @@ zero_unbind (struct usb_gadget *gadget) ...@@ -1127,8 +1127,10 @@ zero_unbind (struct usb_gadget *gadget)
DBG (dev, "unbind\n"); DBG (dev, "unbind\n");
/* we've already been disconnected ... no i/o is active */ /* we've already been disconnected ... no i/o is active */
if (dev->req) if (dev->req) {
dev->req->length = USB_BUFSIZ;
free_ep_req (gadget->ep0, dev->req); free_ep_req (gadget->ep0, dev->req);
}
del_timer_sync (&dev->resume); del_timer_sync (&dev->resume);
kfree (dev); kfree (dev);
set_gadget_data (gadget, NULL); set_gadget_data (gadget, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册