Commit 3e9cb4a1 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: don't assume PAGE_SIZE for URB size

The buffers allocated for CPort URBS are ES1_GBUF_MSG_SIZE bytes.
But usb_fill_bulk_urb() passes PAGE_SIZE as its size.  They happen
to be the same, but the code is wrong, so fix it.
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 34c6507c
...@@ -546,7 +546,8 @@ static int ap_probe(struct usb_interface *interface, ...@@ -546,7 +546,8 @@ static int ap_probe(struct usb_interface *interface,
usb_fill_bulk_urb(urb, udev, usb_fill_bulk_urb(urb, udev,
usb_rcvbulkpipe(udev, es1->cport_in_endpoint), usb_rcvbulkpipe(udev, es1->cport_in_endpoint),
buffer, PAGE_SIZE, cport_in_callback, es1); buffer, ES1_GBUF_MSG_SIZE, cport_in_callback,
es1);
es1->cport_in_urb[i] = urb; es1->cport_in_urb[i] = urb;
es1->cport_in_buffer[i] = buffer; es1->cport_in_buffer[i] = buffer;
retval = usb_submit_urb(urb, GFP_KERNEL); retval = usb_submit_urb(urb, GFP_KERNEL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment