From ae35a2416c7c0fd56182f463e298560f16599083 Mon Sep 17 00:00:00 2001 From: Li Jun Date: Fri, 4 Aug 2017 01:24:35 +0800 Subject: [PATCH] MLK-16135 usb: gadget: utp: bulk out req amount divisible by 512 As the code comments say, the bulk out req amount should be divisible by 512, fix this by using set_bulk_out_req_length(). Acked-by: Peter Chen Signed-off-by: Li Jun --- drivers/usb/gadget/function/fsl_updater.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/gadget/function/fsl_updater.c b/drivers/usb/gadget/function/fsl_updater.c index ef6fb33340d9..f2729cf2b839 100644 --- a/drivers/usb/gadget/function/fsl_updater.c +++ b/drivers/usb/gadget/function/fsl_updater.c @@ -309,8 +309,7 @@ static int utp_do_write(struct fsg_dev *fsg, void *data, size_t size) /* amount is always divisible by 512, hence by * the bulk-out maxpacket size */ - bh->outreq->length = bh->bulk_out_intended_length = - amount; + set_bulk_out_req_length(fsg->common, bh, amount); bh->outreq->short_not_ok = 1; start_transfer(fsg, fsg->bulk_out, bh->outreq, &bh->outreq_busy, &bh->state); -- 2.17.1