diff mbox

[U-Boot,RESEND] fastboot: Proper download gadget unregister and clear when cable is missing

Message ID 1427563369-25318-1-git-send-email-contact@paulk.fr
State Accepted
Delegated to: Łukasz Majewski
Headers show

Commit Message

Paul Kocialkowski March 28, 2015, 5:22 p.m. UTC
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 common/cmd_fastboot.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Łukasz Majewski March 30, 2015, 8:06 a.m. UTC | #1
Hi Paul,

> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> ---
>  common/cmd_fastboot.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> index 346ab80..7956a5b 100644
> --- a/common/cmd_fastboot.c
> +++ b/common/cmd_fastboot.c
> @@ -23,6 +23,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag,
> int argc, char *const argv[]) 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;
>  	}
>  

This is just a minor comment - in your future patches please add some
commit message even for this very short patch.

Despite that, 

Acked-by: Lukasz Majewski <l.majewski@samsung.com>

If other (Marek, Tom) don't mind I will take this through -dfu tree.
Paul Kocialkowski March 30, 2015, 1:28 p.m. UTC | #2
Le lundi 30 mars 2015 à 10:06 +0200, Lukasz Majewski a écrit :
> Hi Paul,
> 
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> > ---
> >  common/cmd_fastboot.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> > index 346ab80..7956a5b 100644
> > --- a/common/cmd_fastboot.c
> > +++ b/common/cmd_fastboot.c
> > @@ -23,6 +23,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag,
> > int argc, char *const argv[]) 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;
> >  	}
> >  
> 
> This is just a minor comment - in your future patches please add some
> commit message even for this very short patch.

Understood.

> Despite that, 
> 
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> 
> If other (Marek, Tom) don't mind I will take this through -dfu tree.

Thanks!
Marek Vasut April 2, 2015, 5:11 p.m. UTC | #3
On Monday, March 30, 2015 at 10:06:13 AM, Lukasz Majewski wrote:
> Hi Paul,
> 
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> > ---
> > 
> >  common/cmd_fastboot.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> > index 346ab80..7956a5b 100644
> > --- a/common/cmd_fastboot.c
> > +++ b/common/cmd_fastboot.c
> > @@ -23,6 +23,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag,
> > int argc, char *const argv[]) 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;
> >  	
> >  	}
> 
> This is just a minor comment - in your future patches please add some
> commit message even for this very short patch.
> 
> Despite that,
> 
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> 
> If other (Marek, Tom) don't mind I will take this through -dfu tree.

Please do, thanks!

btw. is this for current or next release ?

Best regards,
Marek Vasut
Łukasz Majewski April 3, 2015, 7:35 a.m. UTC | #4
Hi Marek,

> On Monday, March 30, 2015 at 10:06:13 AM, Lukasz Majewski wrote:
> > Hi Paul,
> > 
> > > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> > > ---
> > > 
> > >  common/cmd_fastboot.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> > > index 346ab80..7956a5b 100644
> > > --- a/common/cmd_fastboot.c
> > > +++ b/common/cmd_fastboot.c
> > > @@ -23,6 +23,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int
> > > flag, int argc, char *const argv[]) 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;
> > >  	
> > >  	}
> > 
> > This is just a minor comment - in your future patches please add
> > some commit message even for this very short patch.
> > 
> > Despite that,
> > 
> > Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> > 
> > If other (Marek, Tom) don't mind I will take this through -dfu tree.
> 
> Please do, thanks!
> 
> btw. is this for current or next release ?
> 
> Best regards,
> Marek Vasut

I thought to add this code in the next merge window, since now we have
-rc5.

The v2015.04 is scheduled for 13.04.
Marek Vasut April 3, 2015, 8:09 a.m. UTC | #5
On Friday, April 03, 2015 at 09:35:00 AM, Lukasz Majewski wrote:
> Hi Marek,
> 
> > On Monday, March 30, 2015 at 10:06:13 AM, Lukasz Majewski wrote:
> > > Hi Paul,
> > > 
> > > > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> > > > ---
> > > > 
> > > >  common/cmd_fastboot.c | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > > 
> > > > diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> > > > index 346ab80..7956a5b 100644
> > > > --- a/common/cmd_fastboot.c
> > > > +++ b/common/cmd_fastboot.c
> > > > @@ -23,6 +23,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int
> > > > flag, int argc, char *const argv[]) 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;
> > > >  	
> > > >  	}
> > > 
> > > This is just a minor comment - in your future patches please add
> > > some commit message even for this very short patch.
> > > 
> > > Despite that,
> > > 
> > > Acked-by: Lukasz Majewski <l.majewski@samsung.com>
> > > 
> > > If other (Marek, Tom) don't mind I will take this through -dfu tree.
> > 
> > Please do, thanks!
> > 
> > btw. is this for current or next release ?
> > 
> > Best regards,
> > Marek Vasut
> 
> I thought to add this code in the next merge window, since now we have
> -rc5.
> 
> The v2015.04 is scheduled for 13.04.

Roger that, thanks!

Best regards,
Marek Vasut
Łukasz Majewski April 8, 2015, 9:01 a.m. UTC | #6
Hi Paul,

> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> ---
>  common/cmd_fastboot.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
> index 346ab80..7956a5b 100644
> --- a/common/cmd_fastboot.c
> +++ b/common/cmd_fastboot.c
> @@ -23,6 +23,8 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag,
> int argc, char *const argv[]) 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;
>  	}
>  

Applied to u-boot-dfu branch.

Thanks!
diff mbox

Patch

diff --git a/common/cmd_fastboot.c b/common/cmd_fastboot.c
index 346ab80..7956a5b 100644
--- a/common/cmd_fastboot.c
+++ b/common/cmd_fastboot.c
@@ -23,6 +23,8 @@  static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 	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;
 	}