X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fcmd_fastboot.c;h=d52ccfb3100eb8450af627c269202b57e7d35071;hb=cbea103e903ae3b567c5c49d8d26f51e54f9e0ca;hp=b72f4f310d83debe00e201c824a71e5018afcd90;hpb=b4a0b4006fe4d6542899abf402c0569b11aa18e2;p=karo-tx-uboot.git diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c index b72f4f310d..d52ccfb310 100644 --- a/common/cmd_fastboot.c +++ b/common/cmd_fastboot.c @@ -20,12 +20,20 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) if (ret) return ret; + if (!g_dnl_board_usb_cable_connected()) { + puts("\rUSB cable not detected.\n" \ + "Command exit.\n"); + g_dnl_unregister(); + g_dnl_clear_detach(); + return CMD_RET_FAILURE; + } + while (1) { if (g_dnl_detach()) break; if (ctrlc()) break; - usb_gadget_handle_interrupts(); + usb_gadget_handle_interrupts(0); } g_dnl_unregister();