From 9e74f978829f465b54a7fc189d306490399c816b Mon Sep 17 00:00:00 2001 From: Luo Ji Date: Wed, 22 Nov 2017 13:26:54 +0800 Subject: [PATCH] Use fastboot_tx_write_more() to send multiple packets fastboot_tx_write_more() is designed to send multiple packets to fastboot host in u-boot, make related changes. Change-Id: Ic856eb87b89cab2d0c2222a0c48d0bc75567a559 Signed-off-by: Luo Ji --- drivers/usb/gadget/f_fastboot.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 53dd2d62cb..9eb7fb646a 100755 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -2635,12 +2635,12 @@ static void cb_upload(struct usb_ep *ep, struct usb_request *req) printf("Will upload %d bytes.\n", download_bytes); snprintf(response, FASTBOOT_RESPONSE_LEN, "DATA%08x", download_bytes); - fastboot_tx_write_str(response); + fastboot_tx_write_more(response); fastboot_tx_write((const char *)(interface.transfer_buffer), download_bytes); snprintf(response,FASTBOOT_RESPONSE_LEN, "OKAY"); - fastboot_tx_write_str(response); + fastboot_tx_write_more(response); } static void cb_download(struct usb_ep *ep, struct usb_request *req) { @@ -2811,10 +2811,10 @@ static void cb_flashing(struct usb_ep *ep, struct usb_request *req) } else if (!strncmp(cmd + len - 18, "get_unlock_ability", 18)) { result = fastboot_lock_enable(); if (result == FASTBOOT_UL_ENABLE) { - fastboot_tx_write_str("INFO1"); + fastboot_tx_write_more("INFO1"); strcpy(response, "OKAY"); } else if (result == FASTBOOT_UL_DISABLE) { - fastboot_tx_write_str("INFO0"); + fastboot_tx_write_more("INFO0"); strcpy(response, "OKAY"); } else { printf("flashing get_unlock_ability fail!\n"); @@ -2824,7 +2824,7 @@ static void cb_flashing(struct usb_ep *ep, struct usb_request *req) printf("Unknown flashing command:%s\n", cmd); strcpy(response, "FAIL command not defined"); } - fastboot_tx_write_str(response); + fastboot_tx_write_more(response); } #endif -- 2.17.1