Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemCore
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Matombo
AndroidSystemCore
Commits
1cb765c8
Commit
1cb765c8
authored
Feb 13, 2018
by
Treehugger Robot
Committed by
Gerrit Code Review
Feb 13, 2018
Browse files
Options
Downloads
Plain Diff
Merge "Remove urb request size maximum."
parents
71fa8125
3be61d38
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libusbhost/usbhost.c
+1
-13
1 addition, 13 deletions
libusbhost/usbhost.c
with
1 addition
and
13 deletions
libusbhost/usbhost.c
+
1
−
13
View file @
1cb765c8
...
...
@@ -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
{
...
...
@@ -664,10 +660,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
;
...
...
@@ -727,10 +719,6 @@ 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
;
do
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment