* [U-Boot] [PATCH] cmd: usb: run 'usb start' when USB is stopped
@ 2016-09-09 10:20 Jaehoon Chung
2016-09-23 4:15 ` Simon Glass
0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2016-09-09 10:20 UTC (permalink / raw)
To: u-boot
If USB is stopped, just run 'usb start' instead of printing message.
Then user didn't consider whether usb is started or stopped.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
cmd/usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/usb.c b/cmd/usb.c
index 455127c..4970851 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -651,8 +651,8 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 0;
}
if (!usb_started) {
- printf("USB is stopped. Please issue 'usb start' first.\n");
- return 1;
+ printf("USB is stopped. Running 'usb start' first.\n");
+ do_usb_start();
}
if (strncmp(argv[1], "tree", 4) == 0) {
puts("USB device tree:\n");
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] cmd: usb: run 'usb start' when USB is stopped
2016-09-09 10:20 [U-Boot] [PATCH] cmd: usb: run 'usb start' when USB is stopped Jaehoon Chung
@ 2016-09-23 4:15 ` Simon Glass
2016-11-28 5:08 ` Jaehoon Chung
0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2016-09-23 4:15 UTC (permalink / raw)
To: u-boot
+Marek
On 9 September 2016 at 04:20, Jaehoon Chung <jh80.chung@samsung.com> wrote:
> If USB is stopped, just run 'usb start' instead of printing message.
> Then user didn't consider whether usb is started or stopped.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
> cmd/usb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/cmd/usb.c b/cmd/usb.c
> index 455127c..4970851 100644
> --- a/cmd/usb.c
> +++ b/cmd/usb.c
> @@ -651,8 +651,8 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> return 0;
> }
> if (!usb_started) {
> - printf("USB is stopped. Please issue 'usb start' first.\n");
> - return 1;
> + printf("USB is stopped. Running 'usb start' first.\n");
> + do_usb_start();
> }
> if (strncmp(argv[1], "tree", 4) == 0) {
> puts("USB device tree:\n");
> --
> 1.9.1
>
Reviewed-by: Simon Glass <sjg@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] cmd: usb: run 'usb start' when USB is stopped
2016-09-23 4:15 ` Simon Glass
@ 2016-11-28 5:08 ` Jaehoon Chung
2016-11-28 6:54 ` Minkyu Kang
0 siblings, 1 reply; 6+ messages in thread
From: Jaehoon Chung @ 2016-11-28 5:08 UTC (permalink / raw)
To: u-boot
Hi Marek,
On 09/23/2016 01:15 PM, Simon Glass wrote:
> +Marek
>
> On 9 September 2016 at 04:20, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>> If USB is stopped, just run 'usb start' instead of printing message.
>> Then user didn't consider whether usb is started or stopped.
Do you have any other opinion for this? :)
Best Regards,
Jaehoon Chung
>>
>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>> ---
>> cmd/usb.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/cmd/usb.c b/cmd/usb.c
>> index 455127c..4970851 100644
>> --- a/cmd/usb.c
>> +++ b/cmd/usb.c
>> @@ -651,8 +651,8 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>> return 0;
>> }
>> if (!usb_started) {
>> - printf("USB is stopped. Please issue 'usb start' first.\n");
>> - return 1;
>> + printf("USB is stopped. Running 'usb start' first.\n");
>> + do_usb_start();
>> }
>> if (strncmp(argv[1], "tree", 4) == 0) {
>> puts("USB device tree:\n");
>> --
>> 1.9.1
>>
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] cmd: usb: run 'usb start' when USB is stopped
2016-11-28 5:08 ` Jaehoon Chung
@ 2016-11-28 6:54 ` Minkyu Kang
2016-11-28 8:11 ` Hans de Goede
0 siblings, 1 reply; 6+ messages in thread
From: Minkyu Kang @ 2016-11-28 6:54 UTC (permalink / raw)
To: u-boot
Hi Jaehoon,
On 28/11/16 14:08, Jaehoon Chung wrote:
> Hi Marek,
>
> On 09/23/2016 01:15 PM, Simon Glass wrote:
>> +Marek
>>
>> On 9 September 2016 at 04:20, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>>> If USB is stopped, just run 'usb start' instead of printing message.
>>> Then user didn't consider whether usb is started or stopped.
>
> Do you have any other opinion for this? :)
>
> Best Regards,
> Jaehoon Chung
>
>>>
>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>>> ---
>>> cmd/usb.c | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/cmd/usb.c b/cmd/usb.c
>>> index 455127c..4970851 100644
>>> --- a/cmd/usb.c
>>> +++ b/cmd/usb.c
>>> @@ -651,8 +651,8 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>>> return 0;
>>> }
>>> if (!usb_started) {
>>> - printf("USB is stopped. Please issue 'usb start' first.\n");
>>> - return 1;
>>> + printf("USB is stopped. Running 'usb start' first.\n");
>>> + do_usb_start();
>>> }
It seems to ambiguous whether initialization was succeed or not.
Thanks,
Minkyu Kang.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] cmd: usb: run 'usb start' when USB is stopped
2016-11-28 6:54 ` Minkyu Kang
@ 2016-11-28 8:11 ` Hans de Goede
2016-11-28 9:45 ` Jaehoon Chung
0 siblings, 1 reply; 6+ messages in thread
From: Hans de Goede @ 2016-11-28 8:11 UTC (permalink / raw)
To: u-boot
Hi,
On 28-11-16 07:54, Minkyu Kang wrote:
> Hi Jaehoon,
>
> On 28/11/16 14:08, Jaehoon Chung wrote:
>> Hi Marek,
>>
>> On 09/23/2016 01:15 PM, Simon Glass wrote:
>>> +Marek
>>>
>>> On 9 September 2016 at 04:20, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>>>> If USB is stopped, just run 'usb start' instead of printing message.
>>>> Then user didn't consider whether usb is started or stopped.
>>
>> Do you have any other opinion for this? :)
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>>
>>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>>>> ---
>>>> cmd/usb.c | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/cmd/usb.c b/cmd/usb.c
>>>> index 455127c..4970851 100644
>>>> --- a/cmd/usb.c
>>>> +++ b/cmd/usb.c
>>>> @@ -651,8 +651,8 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>>>> return 0;
>>>> }
>>>> if (!usb_started) {
>>>> - printf("USB is stopped. Please issue 'usb start' first.\n");
>>>> - return 1;
>>>> + printf("USB is stopped. Running 'usb start' first.\n");
>>>> + do_usb_start();
>>>> }
>
> It seems to ambiguous whether initialization was succeed or not.
Right at a minimum it should detect that do_usb_start succeeds. E.g.
on an otg port without an otg -> usb-host cable plugged in it will not
succeed.
Regards,
Hans
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH] cmd: usb: run 'usb start' when USB is stopped
2016-11-28 8:11 ` Hans de Goede
@ 2016-11-28 9:45 ` Jaehoon Chung
0 siblings, 0 replies; 6+ messages in thread
From: Jaehoon Chung @ 2016-11-28 9:45 UTC (permalink / raw)
To: u-boot
On 11/28/2016 05:11 PM, Hans de Goede wrote:
> Hi,
>
> On 28-11-16 07:54, Minkyu Kang wrote:
>> Hi Jaehoon,
>>
>> On 28/11/16 14:08, Jaehoon Chung wrote:
>>> Hi Marek,
>>>
>>> On 09/23/2016 01:15 PM, Simon Glass wrote:
>>>> +Marek
>>>>
>>>> On 9 September 2016 at 04:20, Jaehoon Chung <jh80.chung@samsung.com> wrote:
>>>>> If USB is stopped, just run 'usb start' instead of printing message.
>>>>> Then user didn't consider whether usb is started or stopped.
>>>
>>> Do you have any other opinion for this? :)
>>>
>>> Best Regards,
>>> Jaehoon Chung
>>>
>>>>>
>>>>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
>>>>> ---
>>>>> cmd/usb.c | 4 ++--
>>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>>
>>>>> diff --git a/cmd/usb.c b/cmd/usb.c
>>>>> index 455127c..4970851 100644
>>>>> --- a/cmd/usb.c
>>>>> +++ b/cmd/usb.c
>>>>> @@ -651,8 +651,8 @@ static int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
>>>>> return 0;
>>>>> }
>>>>> if (!usb_started) {
>>>>> - printf("USB is stopped. Please issue 'usb start' first.\n");
>>>>> - return 1;
>>>>> + printf("USB is stopped. Running 'usb start' first.\n");
>>>>> + do_usb_start();
>>>>> }
>>
>> It seems to ambiguous whether initialization was succeed or not.
>
> Right at a minimum it should detect that do_usb_start succeeds. E.g.
> on an otg port without an otg -> usb-host cable plugged in it will not
> succeed.
Got it..Then discard this patch. Thanks for pointing out.
Best Regards,
Jaehoon Chung
>
> Regards,
>
> Hans
>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-11-28 9:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-09 10:20 [U-Boot] [PATCH] cmd: usb: run 'usb start' when USB is stopped Jaehoon Chung
2016-09-23 4:15 ` Simon Glass
2016-11-28 5:08 ` Jaehoon Chung
2016-11-28 6:54 ` Minkyu Kang
2016-11-28 8:11 ` Hans de Goede
2016-11-28 9:45 ` Jaehoon Chung
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.