From: Greg Kroah-Hartman Date: Mon, 15 Jun 2015 23:53:23 +0000 (-0700) Subject: greybus: Merge branch alex into Alexandre X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9df94499c443d59291d247046cf3381ca06c1d36;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git greybus: Merge branch alex into Alexandre This resolves a conflict with es2.c that I fixed up. Signed-off-by: Greg Kroah-Hartman --- 9df94499c443d59291d247046cf3381ca06c1d36 diff --cc drivers/staging/greybus/es2.c index 4e99044c1fbe,450a0162e8ad..274d1d419320 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@@ -278,12 -205,7 +304,8 @@@ static void *message_send(struct greybu size_t buffer_size; int retval; struct urb *urb; + int bulk_ep_set; - buffer = message->buffer; - buffer_size = sizeof(*message->header) + message->payload_size; - /* * The data actually transferred will include an indication * of where the data should be sent. Do one last check of @@@ -299,17 -221,14 +321,16 @@@ if (!urb) return ERR_PTR(-ENOMEM); - /* - * We (ab)use the operation-message header pad bytes to transfer the - * cport id in order to minimise overhead. - */ - put_unaligned_le16(cport_id, message->header->pad); + /* Pack the cport id into the message header */ + gb_message_cport_pack(message->header, cport_id); + + buffer_size = sizeof(*message->header) + message->payload_size; + bulk_ep_set = cport_to_ep(es1, cport_id); usb_fill_bulk_urb(urb, udev, - usb_sndbulkpipe(udev, es1->cport_out_endpoint), + usb_sndbulkpipe(udev, + es1->cport_out[bulk_ep_set].endpoint), - buffer, buffer_size, + message->buffer, buffer_size, cport_out_callback, message); retval = usb_submit_urb(urb, gfp_mask); if (retval) {