Patchwork [U-Boot,15/25] SPEAr: Enable autoneg for ethernet

login
register
mail settings
Submitter Amit Virdi
Date March 7, 2012, 12:04 p.m.
Message ID <1331121854-20494-16-git-send-email-amit.virdi@st.com>
Download mbox | patch
Permalink /patch/145229/
State Superseded
Delegated to: Stefan Roese
Headers show

Comments

Amit Virdi - March 7, 2012, 12:04 p.m.
From: Shiraz Hashim <shiraz.hashim@st.com>

The linux-2.6.37 base port has few problems with nfs boot. The boot
fails while getting timeout on attempting to mount root file system.
This helps the ethernet to bring up faster in linux boot thus avoiding
the time out.
Besides, it was reported that few phys on SPEAr board are failing in
certain network conditions which is avoided by enabling autonegotiation.
See issue #115943 in global bug tracker.

Reported-by: Deepak Sikri <deepak.sikri@st.com>
Reported-by: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
---
 include/configs/spear-common.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Stefan Roese - March 7, 2012, 2:18 p.m.
On Wednesday 07 March 2012 13:04:04 Amit Virdi wrote:
> From: Shiraz Hashim <shiraz.hashim@st.com>
> 
> The linux-2.6.37 base port has few problems with nfs boot. The boot
> fails while getting timeout on attempting to mount root file system.
> This helps the ethernet to bring up faster in linux boot thus avoiding
> the time out.
> Besides, it was reported that few phys on SPEAr board are failing in
> certain network conditions which is avoided by enabling autonegotiation.
> See issue #115943 in global bug tracker.

Hmmm. This sounds like a problem in the Linux network/PHY code then. Which 
needs to get fixed there instead of changing something here in U-Boot. Please 
think about situations where the ethernet driver is not called at all in U-
Boot (booting from NOR/NAND). With my changes to defer the ethernet probing to 
the first usage.

One more comment below.

> Reported-by: Deepak Sikri <deepak.sikri@st.com>
> Reported-by: Armando Visconti <armando.visconti@st.com>
> Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
> Signed-off-by: Amit Virdi <amit.virdi@st.com>
> ---
>  include/configs/spear-common.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/include/configs/spear-common.h
> b/include/configs/spear-common.h index 5b6ef72..26642f1 100644
> --- a/include/configs/spear-common.h
> +++ b/include/configs/spear-common.h
> @@ -35,6 +35,7 @@
>  #define CONFIG_DW0_PHY				1
>  #define CONFIG_NET_MULTI
>  #define CONFIG_PHY_RESET_DELAY			(10000)		/* 
in usec */
> +#define CONFIG_DW_AUTONEG			1

Please don't add the "1" here.

>  #endif
> 
>  /* USBD driver configuration */
Amit Virdi - March 27, 2012, 9:02 a.m.
Stefan,

On 3/7/2012 7:48 PM, Stefan Roese wrote:
> On Wednesday 07 March 2012 13:04:04 Amit Virdi wrote:
>> From: Shiraz Hashim<shiraz.hashim@st.com>
>>
>> The linux-2.6.37 base port has few problems with nfs boot. The boot
>> fails while getting timeout on attempting to mount root file system.
>> This helps the ethernet to bring up faster in linux boot thus avoiding
>> the time out.
>> Besides, it was reported that few phys on SPEAr board are failing in
>> certain network conditions which is avoided by enabling autonegotiation.
>> See issue #115943 in global bug tracker.
>
> Hmmm. This sounds like a problem in the Linux network/PHY code then. Which
> needs to get fixed there instead of changing something here in U-Boot. Please

Probably, this is the problem with phys used in some boards.

> think about situations where the ethernet driver is not called at all in U-
> Boot (booting from NOR/NAND). With my changes to defer the ethernet probing to
> the first usage.
>

Keeping your changes, we can still move ahead with autoneg ON. I can 
think of two solutions for this -

Solution 1:
  - Use fix configuration for all SPEAr boards except the one on which 
the problem has been reported. In that case we can ON autoneg.

Solution 2:
  - Enable autoneg for all SPEAr and specify a larger delay parameter if 
rootfs has to be mounted from nfs. This would ensure that timeout won't 
happen.

I would prefer solution 2. What's your opinion?

> One more comment below.
>
>> Reported-by: Deepak Sikri<deepak.sikri@st.com>
>> Reported-by: Armando Visconti<armando.visconti@st.com>
>> Signed-off-by: Shiraz Hashim<shiraz.hashim@st.com>
>> Signed-off-by: Amit Virdi<amit.virdi@st.com>
>> ---
>>   include/configs/spear-common.h |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/configs/spear-common.h
>> b/include/configs/spear-common.h index 5b6ef72..26642f1 100644
>> --- a/include/configs/spear-common.h
>> +++ b/include/configs/spear-common.h
>> @@ -35,6 +35,7 @@
>>   #define CONFIG_DW0_PHY				1
>>   #define CONFIG_NET_MULTI
>>   #define CONFIG_PHY_RESET_DELAY			(10000)		/*
> in usec */
>> +#define CONFIG_DW_AUTONEG			1
>
> Please don't add the "1" here.
>

Ok.

Thanks
Amit Virdi
Stefan Roese - March 27, 2012, 9:20 a.m.
Amit,

On Tuesday 27 March 2012 11:02:08 Amit Virdi wrote:
> >> The linux-2.6.37 base port has few problems with nfs boot. The boot
> >> fails while getting timeout on attempting to mount root file system.
> >> This helps the ethernet to bring up faster in linux boot thus avoiding
> >> the time out.
> >> Besides, it was reported that few phys on SPEAr board are failing in
> >> certain network conditions which is avoided by enabling autonegotiation.
> >> See issue #115943 in global bug tracker.
> > 
> > Hmmm. This sounds like a problem in the Linux network/PHY code then.
> > Which needs to get fixed there instead of changing something here in
> > U-Boot. Please
> 
> Probably, this is the problem with phys used in some boards.
> 
> > think about situations where the ethernet driver is not called at all in
> > U- Boot (booting from NOR/NAND). With my changes to defer the ethernet
> > probing to the first usage.
> 
> Keeping your changes, we can still move ahead with autoneg ON. I can
> think of two solutions for this -
> 
> Solution 1:
>   - Use fix configuration for all SPEAr boards except the one on which
> the problem has been reported. In that case we can ON autoneg.

No, please don't.
 
> Solution 2:
>   - Enable autoneg for all SPEAr and specify a larger delay parameter if
> rootfs has to be mounted from nfs. This would ensure that timeout won't
> happen.
>
> I would prefer solution 2. What's your opinion?

I have no problem with enabling autoneg on all boards. My only concern was the 
error description in the commit log. This seemed to indicate some error in the 
Linux ethernet driver. As it relies on the ethernet setup done by the 
bootloader.

But again, I have generally no objection to enable autoneg for the SPEAr 
boards.

Best regards,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de
Amit Virdi - March 27, 2012, 9:24 a.m.
Hi Stefan,

>> Solution 2:
>>    - Enable autoneg for all SPEAr and specify a larger delay parameter if
>> rootfs has to be mounted from nfs. This would ensure that timeout won't
>> happen.
>>
>> I would prefer solution 2. What's your opinion?
>
> I have no problem with enabling autoneg on all boards. My only concern was the
> error description in the commit log. This seemed to indicate some error in the
> Linux ethernet driver. As it relies on the ethernet setup done by the
> bootloader.
>

The error description is misleading. I would reword the same.

> But again, I have generally no objection to enable autoneg for the SPEAr
> boards.
>

Ok, thanks.

Best Regards
Amit Virdi

Patch

diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
index 5b6ef72..26642f1 100644
--- a/include/configs/spear-common.h
+++ b/include/configs/spear-common.h
@@ -35,6 +35,7 @@ 
 #define CONFIG_DW0_PHY				1
 #define CONFIG_NET_MULTI
 #define CONFIG_PHY_RESET_DELAY			(10000)		/* in usec */
+#define CONFIG_DW_AUTONEG			1
 #endif
 
 /* USBD driver configuration */