diff options
author | Jerry Zhang <zhangjerry@google.com> | 2018-02-13 09:02:38 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-02-13 09:02:38 +0000 |
commit | 7163045f7d068a2cc04458a9fc4a357fd8e14223 (patch) | |
tree | 818ad85d81f4b24837aae6740a1d27831bc04062 /libusbhost | |
parent | 2502e43b11ccbae15d90b737a69ad65f791815d5 (diff) | |
parent | a306a3b18f02c332565800c72f6de9d6d48851cd (diff) | |
download | core-7163045f7d068a2cc04458a9fc4a357fd8e14223.tar.gz |
Merge "Remove urb request size maximum." am: 1cb765c867 am: 1ab6e9d018
am: a306a3b18f
Change-Id: I635cb3547e72e0c6a8084d7b3ff2c9cbae1b2525
Diffstat (limited to 'libusbhost')
-rw-r--r-- | libusbhost/usbhost.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/libusbhost/usbhost.c b/libusbhost/usbhost.c index 07d60e912..415488fc0 100644 --- a/libusbhost/usbhost.c +++ b/libusbhost/usbhost.c @@ -64,10 +64,6 @@ // Some devices fail to send string descriptors if we attempt reading > 255 bytes #define MAX_STRING_DESCRIPTOR_LENGTH 255 -// From drivers/usb/core/devio.c -// I don't know why this isn't in a kernel header -#define MAX_USBFS_BUFFER_SIZE 16384 - #define MAX_USBFS_WD_COUNT 10 struct usb_host_context { @@ -675,10 +671,6 @@ int usb_device_bulk_transfer(struct usb_device *device, { struct usbdevfs_bulktransfer ctrl; - // need to limit request size to avoid EINVAL - if (length > MAX_USBFS_BUFFER_SIZE) - length = MAX_USBFS_BUFFER_SIZE; - memset(&ctrl, 0, sizeof(ctrl)); ctrl.ep = endpoint; ctrl.len = length; @@ -738,11 +730,7 @@ int usb_request_queue(struct usb_request *req) urb->status = -1; urb->buffer = req->buffer; - // need to limit request size to avoid EINVAL - if (req->buffer_length > MAX_USBFS_BUFFER_SIZE) - urb->buffer_length = MAX_USBFS_BUFFER_SIZE; - else - urb->buffer_length = req->buffer_length; + urb->buffer_length = req->buffer_length; do { res = ioctl(req->dev->fd, USBDEVFS_SUBMITURB, urb); |