public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] usb: reload watchdog during ums command
@ 2019-04-18 15:18 Patrick Delaunay
  2019-04-19  6:26 ` Lukasz Majewski
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Delaunay @ 2019-04-18 15:18 UTC (permalink / raw)
  To: u-boot

Reload the watchdog in the mass storage command ums
to avoid reboot during the usb waiting loop
when the host doesn't send any request.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

 cmd/usb_mass_storage.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index 753ae4f..570cf3a 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -14,6 +14,7 @@
 #include <part.h>
 #include <usb.h>
 #include <usb_mass_storage.h>
+#include <watchdog.h>
 
 static int ums_read_sector(struct ums *ums_dev,
 			   ulong start, lbaint_t blkcnt, void *buf)
@@ -226,6 +227,8 @@ static int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
 			rc = CMD_RET_SUCCESS;
 			goto cleanup_register;
 		}
+
+		WATCHDOG_RESET();
 	}
 
 cleanup_register:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] usb: reload watchdog during ums command
  2019-04-18 15:18 [U-Boot] [PATCH] usb: reload watchdog during ums command Patrick Delaunay
@ 2019-04-19  6:26 ` Lukasz Majewski
  0 siblings, 0 replies; 2+ messages in thread
From: Lukasz Majewski @ 2019-04-19  6:26 UTC (permalink / raw)
  To: u-boot

Hi Patrick,

> Reload the watchdog in the mass storage command ums
> to avoid reboot during the usb waiting loop
> when the host doesn't send any request.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
> 
>  cmd/usb_mass_storage.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
> index 753ae4f..570cf3a 100644
> --- a/cmd/usb_mass_storage.c
> +++ b/cmd/usb_mass_storage.c
> @@ -14,6 +14,7 @@
>  #include <part.h>
>  #include <usb.h>
>  #include <usb_mass_storage.h>
> +#include <watchdog.h>
>  
>  static int ums_read_sector(struct ums *ums_dev,
>  			   ulong start, lbaint_t blkcnt, void *buf)
> @@ -226,6 +227,8 @@ static int do_usb_mass_storage(cmd_tbl_t *cmdtp,
> int flag, rc = CMD_RET_SUCCESS;
>  			goto cleanup_register;
>  		}
> +
> +		WATCHDOG_RESET();
>  	}
>  
>  cleanup_register:

Acked-by: Lukasz Majewski <lukma@denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190419/953af714/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-19  6:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-18 15:18 [U-Boot] [PATCH] usb: reload watchdog during ums command Patrick Delaunay
2019-04-19  6:26 ` Lukasz Majewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox