From 6992f3194fec86a85eeb112bb5a61852493c41e2 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 7 Dec 2018 10:49:29 +0100 Subject: usb: gadget: fastboot: print fastboot messages also to the logs It's nice to also see on the barebox side what is going on with fastboot, so print the messages to the logs also. Signed-off-by: Sascha Hauer --- drivers/usb/gadget/f_fastboot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/usb') diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 067b43ebed..bdf0c807df 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -608,8 +608,11 @@ int fastboot_tx_print(struct f_fastboot *f_fb, enum fastboot_msg_type type, break; case FASTBOOT_MSG_FAIL: f_fb->active = false; + pr_err("%pV\n", &vaf); break; case FASTBOOT_MSG_INFO: + pr_info("%pV\n", &vaf); + break; case FASTBOOT_MSG_DATA: break; } @@ -702,12 +705,12 @@ static void rx_handler_dl_image(struct usb_ep *ep, struct usb_request *req) req->length = EP_BUFFER_SIZE; close(f_fb->download_fd); + printf("\n"); + fastboot_tx_print(f_fb, FASTBOOT_MSG_INFO, "Downloading %d bytes finished", f_fb->download_bytes); fastboot_tx_print(f_fb, FASTBOOT_MSG_OKAY, ""); - - printf("\n"); } req->actual = 0; -- cgit v1.2.3