All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] sunxi:  SATA link timeout fix
@ 2017-11-05 13:41 Werner Böllmann
  2017-11-07 12:13 ` Jagan Teki
  0 siblings, 1 reply; 10+ messages in thread
From: Werner Böllmann @ 2017-11-05 13:41 UTC (permalink / raw)
  To: u-boot

After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
I tracked this down to this patch.

http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.

After adding the "mdelay(500);" line that was lost in the path the error is gone.

Thank you.

Werner


diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 70e0143..b38941f 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -216,6 +216,8 @@ int board_init(void)
        satapwr_pin = sunxi_name_to_gpio(CONFIG_SATAPWR);
        gpio_request(satapwr_pin, "satapwr");
        gpio_direction_output(satapwr_pin, 1);
+       /* Give attached sata device time to power-up to avoid link timeouts */
+       mdelay(500);
 #endif
 #ifdef CONFIG_MACPWR
        macpwr_pin = sunxi_name_to_gpio(CONFIG_MACPWR);

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

* [U-Boot] sunxi: SATA link timeout fix
  2017-11-05 13:41 [U-Boot] sunxi: SATA link timeout fix Werner Böllmann
@ 2017-11-07 12:13 ` Jagan Teki
  2017-11-08 11:32   ` Jagan Teki
  0 siblings, 1 reply; 10+ messages in thread
From: Jagan Teki @ 2017-11-07 12:13 UTC (permalink / raw)
  To: u-boot

On Sun, Nov 5, 2017 at 7:11 PM, Werner Böllmann
<Werner.Boellmann@fh-dortmund.de> wrote:
> After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
> I tracked this down to this patch.
>
> http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.

Look like mdelay missing while moving to board file.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [U-Boot] sunxi: SATA link timeout fix
  2017-11-07 12:13 ` Jagan Teki
@ 2017-11-08 11:32   ` Jagan Teki
  2017-11-08 12:05     ` Peter Robinson
  0 siblings, 1 reply; 10+ messages in thread
From: Jagan Teki @ 2017-11-08 11:32 UTC (permalink / raw)
  To: u-boot

On Tue, Nov 7, 2017 at 5:43 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> On Sun, Nov 5, 2017 at 7:11 PM, Werner Böllmann
> <Werner.Boellmann@fh-dortmund.de> wrote:
>> After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
>> I tracked this down to this patch.
>>
>> http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.
>
> Look like mdelay missing while moving to board file.

Can someone test this?

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [U-Boot] sunxi: SATA link timeout fix
  2017-11-08 11:32   ` Jagan Teki
@ 2017-11-08 12:05     ` Peter Robinson
  2017-11-09  9:18       ` Jagan Teki
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Robinson @ 2017-11-08 12:05 UTC (permalink / raw)
  To: u-boot

On Wed, Nov 8, 2017 at 11:32 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> On Tue, Nov 7, 2017 at 5:43 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>> On Sun, Nov 5, 2017 at 7:11 PM, Werner Böllmann
>> <Werner.Boellmann@fh-dortmund.de> wrote:
>>> After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
>>> I tracked this down to this patch.
>>>
>>> http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.
>>
>> Look like mdelay missing while moving to board file.
>
> Can someone test this?

I boot my Cubietruck off a SATA drive without issues with any of those
intervening releases but it's a SSD so there would be no spin up time
compared to spinning rust, I don't have a spare spinning disk to test
it with though.

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

* [U-Boot] sunxi: SATA link timeout fix
  2017-11-08 12:05     ` Peter Robinson
@ 2017-11-09  9:18       ` Jagan Teki
  2017-11-09  9:36         ` Maxime Ripard
  0 siblings, 1 reply; 10+ messages in thread
From: Jagan Teki @ 2017-11-09  9:18 UTC (permalink / raw)
  To: u-boot

On Wed, Nov 8, 2017 at 5:35 PM, Peter Robinson <pbrobinson@gmail.com> wrote:
> On Wed, Nov 8, 2017 at 11:32 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>> On Tue, Nov 7, 2017 at 5:43 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>>> On Sun, Nov 5, 2017 at 7:11 PM, Werner Böllmann
>>> <Werner.Boellmann@fh-dortmund.de> wrote:
>>>> After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
>>>> I tracked this down to this patch.
>>>>
>>>> http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.
>>>
>>> Look like mdelay missing while moving to board file.
>>
>> Can someone test this?
>
> I boot my Cubietruck off a SATA drive without issues with any of those
> intervening releases but it's a SSD so there would be no spin up time
> compared to spinning rust, I don't have a spare spinning disk to test
> it with though.

So w/o the mdelay work for you?

-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [U-Boot] sunxi: SATA link timeout fix
  2017-11-09  9:18       ` Jagan Teki
@ 2017-11-09  9:36         ` Maxime Ripard
  2017-11-09 11:42           ` Jagan Teki
  0 siblings, 1 reply; 10+ messages in thread
From: Maxime Ripard @ 2017-11-09  9:36 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 09, 2017 at 02:48:18PM +0530, Jagan Teki wrote:
> On Wed, Nov 8, 2017 at 5:35 PM, Peter Robinson <pbrobinson@gmail.com> wrote:
> > On Wed, Nov 8, 2017 at 11:32 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> >> On Tue, Nov 7, 2017 at 5:43 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> >>> On Sun, Nov 5, 2017 at 7:11 PM, Werner Böllmann
> >>> <Werner.Boellmann@fh-dortmund.de> wrote:
> >>>> After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
> >>>> I tracked this down to this patch.
> >>>>
> >>>> http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.
> >>>
> >>> Look like mdelay missing while moving to board file.
> >>
> >> Can someone test this?
> >
> > I boot my Cubietruck off a SATA drive without issues with any of those
> > intervening releases but it's a SSD so there would be no spin up time
> > compared to spinning rust, I don't have a spare spinning disk to test
> > it with though.
> 
> So w/o the mdelay work for you?

I guess the point of this patch was that you need to have the delay,
but the time between the two function calls might cover it, and
apparently in some case doesn't.

So whether it works in one particular case is entirely moot.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171109/dfd55f98/attachment.sig>

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

* [U-Boot] sunxi: SATA link timeout fix
  2017-11-09  9:36         ` Maxime Ripard
@ 2017-11-09 11:42           ` Jagan Teki
  2017-11-09 12:06             ` Maxime Ripard
  0 siblings, 1 reply; 10+ messages in thread
From: Jagan Teki @ 2017-11-09 11:42 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 9, 2017 at 3:06 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Thu, Nov 09, 2017 at 02:48:18PM +0530, Jagan Teki wrote:
>> On Wed, Nov 8, 2017 at 5:35 PM, Peter Robinson <pbrobinson@gmail.com> wrote:
>> > On Wed, Nov 8, 2017 at 11:32 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>> >> On Tue, Nov 7, 2017 at 5:43 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>> >>> On Sun, Nov 5, 2017 at 7:11 PM, Werner Böllmann
>> >>> <Werner.Boellmann@fh-dortmund.de> wrote:
>> >>>> After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
>> >>>> I tracked this down to this patch.
>> >>>>
>> >>>> http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.
>> >>>
>> >>> Look like mdelay missing while moving to board file.
>> >>
>> >> Can someone test this?
>> >
>> > I boot my Cubietruck off a SATA drive without issues with any of those
>> > intervening releases but it's a SSD so there would be no spin up time
>> > compared to spinning rust, I don't have a spare spinning disk to test
>> > it with though.
>>
>> So w/o the mdelay work for you?
>
> I guess the point of this patch was that you need to have the delay,
> but the time between the two function calls might cover it, and
> apparently in some case doesn't.
>
> So whether it works in one particular case is entirely moot.

Then, better some more debugging needed in this case.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [U-Boot] sunxi: SATA link timeout fix
  2017-11-09 11:42           ` Jagan Teki
@ 2017-11-09 12:06             ` Maxime Ripard
  2017-11-09 12:26               ` Jagan Teki
  0 siblings, 1 reply; 10+ messages in thread
From: Maxime Ripard @ 2017-11-09 12:06 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 09, 2017 at 05:12:08PM +0530, Jagan Teki wrote:
> On Thu, Nov 9, 2017 at 3:06 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Thu, Nov 09, 2017 at 02:48:18PM +0530, Jagan Teki wrote:
> >> On Wed, Nov 8, 2017 at 5:35 PM, Peter Robinson <pbrobinson@gmail.com> wrote:
> >> > On Wed, Nov 8, 2017 at 11:32 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> >> >> On Tue, Nov 7, 2017 at 5:43 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> >> >>> On Sun, Nov 5, 2017 at 7:11 PM, Werner Böllmann
> >> >>> <Werner.Boellmann@fh-dortmund.de> wrote:
> >> >>>> After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
> >> >>>> I tracked this down to this patch.
> >> >>>>
> >> >>>> http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.
> >> >>>
> >> >>> Look like mdelay missing while moving to board file.
> >> >>
> >> >> Can someone test this?
> >> >
> >> > I boot my Cubietruck off a SATA drive without issues with any of those
> >> > intervening releases but it's a SSD so there would be no spin up time
> >> > compared to spinning rust, I don't have a spare spinning disk to test
> >> > it with though.
> >>
> >> So w/o the mdelay work for you?
> >
> > I guess the point of this patch was that you need to have the delay,
> > but the time between the two function calls might cover it, and
> > apparently in some case doesn't.
> >
> > So whether it works in one particular case is entirely moot.
> 
> Then, better some more debugging needed in this case.

I'm not sure why that is needed, if we need the delay, we should add
it explicitly, just like this patch does.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171109/a89c087c/attachment.sig>

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

* [U-Boot] sunxi: SATA link timeout fix
  2017-11-09 12:06             ` Maxime Ripard
@ 2017-11-09 12:26               ` Jagan Teki
  2017-11-10 13:55                 ` Jagan Teki
  0 siblings, 1 reply; 10+ messages in thread
From: Jagan Teki @ 2017-11-09 12:26 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 9, 2017 at 5:36 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Thu, Nov 09, 2017 at 05:12:08PM +0530, Jagan Teki wrote:
>> On Thu, Nov 9, 2017 at 3:06 PM, Maxime Ripard
>> <maxime.ripard@free-electrons.com> wrote:
>> > On Thu, Nov 09, 2017 at 02:48:18PM +0530, Jagan Teki wrote:
>> >> On Wed, Nov 8, 2017 at 5:35 PM, Peter Robinson <pbrobinson@gmail.com> wrote:
>> >> > On Wed, Nov 8, 2017 at 11:32 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>> >> >> On Tue, Nov 7, 2017 at 5:43 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>> >> >>> On Sun, Nov 5, 2017 at 7:11 PM, Werner Böllmann
>> >> >>> <Werner.Boellmann@fh-dortmund.de> wrote:
>> >> >>>> After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
>> >> >>>> I tracked this down to this patch.
>> >> >>>>
>> >> >>>> http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.
>> >> >>>
>> >> >>> Look like mdelay missing while moving to board file.
>> >> >>
>> >> >> Can someone test this?
>> >> >
>> >> > I boot my Cubietruck off a SATA drive without issues with any of those
>> >> > intervening releases but it's a SSD so there would be no spin up time
>> >> > compared to spinning rust, I don't have a spare spinning disk to test
>> >> > it with though.
>> >>
>> >> So w/o the mdelay work for you?
>> >
>> > I guess the point of this patch was that you need to have the delay,
>> > but the time between the two function calls might cover it, and
>> > apparently in some case doesn't.
>> >
>> > So whether it works in one particular case is entirely moot.
>>
>> Then, better some more debugging needed in this case.
>
> I'm not sure why that is needed, if we need the delay, we should add
> it explicitly, just like this patch does.

Since it works on particular case, can't we verify non-working area?
adding delay is hard for me but look like this patch needed.

thanks!
-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

* [U-Boot] sunxi: SATA link timeout fix
  2017-11-09 12:26               ` Jagan Teki
@ 2017-11-10 13:55                 ` Jagan Teki
  0 siblings, 0 replies; 10+ messages in thread
From: Jagan Teki @ 2017-11-10 13:55 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 9, 2017 at 5:56 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> On Thu, Nov 9, 2017 at 5:36 PM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
>> On Thu, Nov 09, 2017 at 05:12:08PM +0530, Jagan Teki wrote:
>>> On Thu, Nov 9, 2017 at 3:06 PM, Maxime Ripard
>>> <maxime.ripard@free-electrons.com> wrote:
>>> > On Thu, Nov 09, 2017 at 02:48:18PM +0530, Jagan Teki wrote:
>>> >> On Wed, Nov 8, 2017 at 5:35 PM, Peter Robinson <pbrobinson@gmail.com> wrote:
>>> >> > On Wed, Nov 8, 2017 at 11:32 AM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>>> >> >> On Tue, Nov 7, 2017 at 5:43 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
>>> >> >>> On Sun, Nov 5, 2017 at 7:11 PM, Werner Böllmann
>>> >> >>> <Werner.Boellmann@fh-dortmund.de> wrote:
>>> >> >>>> After updating u-boot from v2016.01 to 2017.09 i got a "SATA link 0 timeout." on my Cubietruck board.
>>> >> >>>> I tracked this down to this patch.
>>> >> >>>>
>>> >> >>>> http://git.denx.de/?p=u-boot.git;a=commitdiff_plain;h=9fbb0c3aa49f4604b0342cb527a6bd099f92eaeb.
>>> >> >>>
>>> >> >>> Look like mdelay missing while moving to board file.
>>> >> >>
>>> >> >> Can someone test this?
>>> >> >
>>> >> > I boot my Cubietruck off a SATA drive without issues with any of those
>>> >> > intervening releases but it's a SSD so there would be no spin up time
>>> >> > compared to spinning rust, I don't have a spare spinning disk to test
>>> >> > it with though.
>>> >>
>>> >> So w/o the mdelay work for you?
>>> >
>>> > I guess the point of this patch was that you need to have the delay,
>>> > but the time between the two function calls might cover it, and
>>> > apparently in some case doesn't.
>>> >
>>> > So whether it works in one particular case is entirely moot.
>>>
>>> Then, better some more debugging needed in this case.
>>
>> I'm not sure why that is needed, if we need the delay, we should add
>> it explicitly, just like this patch does.
>
> Since it works on particular case, can't we verify non-working area?
> adding delay is hard for me but look like this patch needed.

Updated commit message and Applied on u-boot-sunxi/master

-- 
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.

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

end of thread, other threads:[~2017-11-10 13:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-05 13:41 [U-Boot] sunxi: SATA link timeout fix Werner Böllmann
2017-11-07 12:13 ` Jagan Teki
2017-11-08 11:32   ` Jagan Teki
2017-11-08 12:05     ` Peter Robinson
2017-11-09  9:18       ` Jagan Teki
2017-11-09  9:36         ` Maxime Ripard
2017-11-09 11:42           ` Jagan Teki
2017-11-09 12:06             ` Maxime Ripard
2017-11-09 12:26               ` Jagan Teki
2017-11-10 13:55                 ` Jagan Teki

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.