* [PATCH 1/2] usb_hub_power_on: wait for the power to be stable
@ 2012-08-28 15:24 Eric Bénard
2012-08-28 15:24 ` [PATCH 2/2] stringlist: fix division by zero Eric Bénard
2012-08-28 15:30 ` [PATCH 1/2] usb_hub_power_on: wait for the power to be stable Eric Bénard
0 siblings, 2 replies; 4+ messages in thread
From: Eric Bénard @ 2012-08-28 15:24 UTC (permalink / raw)
To: barebox
- the 100ms value is taken from Linux & u-boot
- without this, I don't see peripherals connected to a hub
connected to an i.MX35's host port.
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
drivers/usb/core/usb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index a5075d5..ae3eb88 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -948,7 +948,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
USB_HUB_PRINTF("port %d returns %lX\n", i + 1, dev->status);
}
- mdelay(20);
+ mdelay(100);
}
#define MAX_TRIES 5
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/2] stringlist: fix division by zero
2012-08-28 15:24 [PATCH 1/2] usb_hub_power_on: wait for the power to be stable Eric Bénard
@ 2012-08-28 15:24 ` Eric Bénard
2012-08-29 7:10 ` Sascha Hauer
2012-08-28 15:30 ` [PATCH 1/2] usb_hub_power_on: wait for the power to be stable Eric Bénard
1 sibling, 1 reply; 4+ messages in thread
From: Eric Bénard @ 2012-08-28 15:24 UTC (permalink / raw)
To: barebox
len is checked instead of num so when num is zero, we get a
division by zero a few lines later
Signed-off-by: Eric Bénard <eric@eukrea.com>
---
lib/stringlist.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/stringlist.c b/lib/stringlist.c
index b965aa0..a8af15d 100644
--- a/lib/stringlist.c
+++ b/lib/stringlist.c
@@ -87,8 +87,8 @@ void string_list_print_by_column(struct string_list *sl)
return;
num = 80 / (len + 1);
- if (len == 0)
- len = 1;
+ if (num == 0)
+ num = 1;
i = 0;
list_for_each_entry(entry, &sl->list, list) {
--
1.7.7.6
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] usb_hub_power_on: wait for the power to be stable
2012-08-28 15:24 [PATCH 1/2] usb_hub_power_on: wait for the power to be stable Eric Bénard
2012-08-28 15:24 ` [PATCH 2/2] stringlist: fix division by zero Eric Bénard
@ 2012-08-28 15:30 ` Eric Bénard
1 sibling, 0 replies; 4+ messages in thread
From: Eric Bénard @ 2012-08-28 15:30 UTC (permalink / raw)
To: barebox
Hi Sascha,
Le Tue, 28 Aug 2012 17:24:25 +0200,
Eric Bénard <eric@eukrea.com> a écrit :
> - the 100ms value is taken from Linux & u-boot
and in fact after a few more tests without debug enabled, it seems that
a 200 ms value would be needed to get it working reliable with several
peripherals so please wait for v2 before applying thyis patch.
Thanks,
Eric
> - without this, I don't see peripherals connected to a hub
> connected to an i.MX35's host port.
>
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
> drivers/usb/core/usb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
> index a5075d5..ae3eb88 100644
> --- a/drivers/usb/core/usb.c
> +++ b/drivers/usb/core/usb.c
> @@ -948,7 +948,7 @@ static void usb_hub_power_on(struct usb_hub_device *hub)
> usb_set_port_feature(dev, i + 1, USB_PORT_FEAT_POWER);
> USB_HUB_PRINTF("port %d returns %lX\n", i + 1, dev->status);
> }
> - mdelay(20);
> + mdelay(100);
> }
>
> #define MAX_TRIES 5
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] stringlist: fix division by zero
2012-08-28 15:24 ` [PATCH 2/2] stringlist: fix division by zero Eric Bénard
@ 2012-08-29 7:10 ` Sascha Hauer
0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2012-08-29 7:10 UTC (permalink / raw)
To: Eric Bénard; +Cc: barebox
On Tue, Aug 28, 2012 at 05:24:26PM +0200, Eric Bénard wrote:
> len is checked instead of num so when num is zero, we get a
> division by zero a few lines later
>
> Signed-off-by: Eric Bénard <eric@eukrea.com>
Applied, thanks
Sascha
> ---
> lib/stringlist.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/stringlist.c b/lib/stringlist.c
> index b965aa0..a8af15d 100644
> --- a/lib/stringlist.c
> +++ b/lib/stringlist.c
> @@ -87,8 +87,8 @@ void string_list_print_by_column(struct string_list *sl)
> return;
>
> num = 80 / (len + 1);
> - if (len == 0)
> - len = 1;
> + if (num == 0)
> + num = 1;
>
> i = 0;
> list_for_each_entry(entry, &sl->list, list) {
> --
> 1.7.7.6
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-08-29 7:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-28 15:24 [PATCH 1/2] usb_hub_power_on: wait for the power to be stable Eric Bénard
2012-08-28 15:24 ` [PATCH 2/2] stringlist: fix division by zero Eric Bénard
2012-08-29 7:10 ` Sascha Hauer
2012-08-28 15:30 ` [PATCH 1/2] usb_hub_power_on: wait for the power to be stable Eric Bénard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox