diff options
author | Caleb Connolly <caleb.connolly@linaro.org> | 2023-12-12 13:27:47 +0000 |
---|---|---|
committer | Caleb Connolly <caleb.connolly@linaro.org> | 2023-12-12 13:27:47 +0000 |
commit | 6301b4b30229079bfaff8c46a5c2321f64dec3a0 (patch) | |
tree | 3fde8e0f4ced34914bf7915191be5b31e115a189 | |
parent | d99586b6329922d714fc0ee97465b43bb423615a (diff) |
fastboot: add some debug logging
Add logging for fastboot commands for debugging misbehaviour.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
-rw-r--r-- | drivers/fastboot/fb_common.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index 4e9d9b719c..cd4ef721d3 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -51,6 +51,7 @@ void fastboot_response(const char *tag, char *response, FASTBOOT_RESPONSE_LEN - strlen(response) - 1, format, args); va_end(args); + debug("## FASTBOOT: %s\n", response); } } @@ -73,10 +74,11 @@ void fastboot_fail(const char *reason, char *response) */ void fastboot_okay(const char *reason, char *response) { - if (reason) + if (reason) { fastboot_response("OKAY", response, "%s", reason); - else + } else { fastboot_response("OKAY", response, NULL); + } } /** diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 741775a7bc..7fca24a420 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -518,6 +518,7 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req) if (req->actual < req->length) { cmdbuf[req->actual] = '\0'; + debug("## FASTBOOT: %s\n", cmdbuf); cmd = fastboot_handle_command(cmdbuf, response); } else { pr_err("buffer overflow"); |