X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=drivers%2Fusb%2Fgadget%2Ff_mass_storage.c;h=f30b4f812e6d4b8495e8b08fc0c59bb84e9ce851;hb=6549d5c30e3bd88244ac5c0ca187cead62ff4f8a;hp=e045957d07238862f23c80cd7e90845ae14e8447;hpb=790af815436bc6a93e4c581840be2419897f23b1;p=karo-tx-uboot.git diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index e045957d07..f30b4f812e 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c @@ -244,6 +244,7 @@ #include #include #include +#include #include #include @@ -671,7 +672,7 @@ static int sleep_thread(struct fsg_common *common) if (common->thread_wakeup_needed) break; - if (++i == 50000) { + if (++i == 20000) { busy_indicator(); i = 0; k++; @@ -682,6 +683,8 @@ static int sleep_thread(struct fsg_common *common) if (ctrlc()) return -EPIPE; + WATCHDOG_RESET(); + /* Check cable connection */ if (!g_dnl_board_usb_cable_connected()) return -EIO; @@ -689,7 +692,7 @@ static int sleep_thread(struct fsg_common *common) k = 0; } - usb_gadget_handle_interrupts(); + usb_gadget_handle_interrupts(0); } common->thread_wakeup_needed = 0; return rc; @@ -973,7 +976,7 @@ static int do_write(struct fsg_common *common) /* If an error occurred, report it and its position */ if (nwritten < amount) { - printf("nwritten:%d amount:%d\n", nwritten, + printf("nwritten:%zd amount:%u\n", nwritten, amount); curlun->sense_data = SS_WRITE_ERROR; curlun->info_valid = 1;