diff mbox

[U-Boot,3/3] e1000: remove unnecessary clearing of SWSM.SWSM_SMBI

Message ID 1432054880-20922-4-git-send-email-tharvey@gateworks.com
State Accepted
Delegated to: Joe Hershberger
Headers show

Commit Message

Tim Harvey May 19, 2015, 5:01 p.m. UTC
remove unnecessary clearing of SWSM.SWSM_SMBI when obtaining the SW
semaphore. This was introduced in 951860634fdb557bbb58e0f99215391bc0c29779
while adding i210 support and should be now resolved by releasing the
semaphore when no longer needed.

Cc: Marcel Ziswiler <marcel@ziswiler.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Aneesh Bansal <aneesh.bansal@freescale.com>
Cc: Naveen Burmi <NaveenBurmi@freescale.com>
Cc: Po Liu <po.liu@freescale.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Alison Wang <alison.wang@freescale.com>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
Cc: Shengzhou Liu  <Shengzhou.Liu@freescale.com>
Cc: York Sun <yorksun@freescale.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 drivers/net/e1000.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Bin Meng May 20, 2015, 10:07 a.m. UTC | #1
On Wed, May 20, 2015 at 1:01 AM, Tim Harvey <tharvey@gateworks.com> wrote:
> remove unnecessary clearing of SWSM.SWSM_SMBI when obtaining the SW
> semaphore. This was introduced in 951860634fdb557bbb58e0f99215391bc0c29779
> while adding i210 support and should be now resolved by releasing the
> semaphore when no longer needed.
>
> Cc: Marcel Ziswiler <marcel@ziswiler.com>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Aneesh Bansal <aneesh.bansal@freescale.com>
> Cc: Naveen Burmi <NaveenBurmi@freescale.com>
> Cc: Po Liu <po.liu@freescale.com>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Alison Wang <alison.wang@freescale.com>
> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
> Cc: Shengzhou Liu  <Shengzhou.Liu@freescale.com>
> Cc: York Sun <yorksun@freescale.com>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
>  drivers/net/e1000.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
> index f960024..a78ffc4 100644
> --- a/drivers/net/e1000.c
> +++ b/drivers/net/e1000.c
> @@ -996,10 +996,6 @@ e1000_get_software_semaphore(struct e1000_hw *hw)
>
>         DEBUGFUNC();
>
> -               swsm = E1000_READ_REG(hw, SWSM);
> -               swsm &= ~E1000_SWSM_SMBI;
> -               E1000_WRITE_REG(hw, SWSM, swsm);
> -
>         if (hw->mac_type != e1000_80003es2lan)
>                 return E1000_SUCCESS;
>
> --

Tested on QEMU v2.3.0

Tested-by: Bin Meng <bmeng.cn@gmail.com>
Marcel Ziswiler May 20, 2015, 11:27 a.m. UTC | #2
On Tue, 2015-05-19 at 10:01 -0700, Tim Harvey wrote:
> remove unnecessary clearing of SWSM.SWSM_SMBI when obtaining the SW
> semaphore. This was introduced in 951860634fdb557bbb58e0f99215391bc0c29779
> while adding i210 support and should be now resolved by releasing the
> semaphore when no longer needed.
> 
> Cc: Marcel Ziswiler <marcel@ziswiler.com>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Aneesh Bansal <aneesh.bansal@freescale.com>
> Cc: Naveen Burmi <NaveenBurmi@freescale.com>
> Cc: Po Liu <po.liu@freescale.com>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Alison Wang <alison.wang@freescale.com>
> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
> Cc: Shengzhou Liu  <Shengzhou.Liu@freescale.com>
> Cc: York Sun <yorksun@freescale.com>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
>  drivers/net/e1000.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
> index f960024..a78ffc4 100644
> --- a/drivers/net/e1000.c
> +++ b/drivers/net/e1000.c
> @@ -996,10 +996,6 @@ e1000_get_software_semaphore(struct e1000_hw *hw)
>  
>  	DEBUGFUNC();
>  
> -		swsm = E1000_READ_REG(hw, SWSM);
> -		swsm &= ~E1000_SWSM_SMBI;
> -		E1000_WRITE_REG(hw, SWSM, swsm);
> -
>  	if (hw->mac_type != e1000_80003es2lan)
>  		return E1000_SUCCESS;
>  

Tested on Apalis T30 1GB V1.1A with properly fused i211
Tested on Apalis T30 2GB V1.1A with iNVM fused i210
Tested on Apalis T30 1GB V1.0A with tools only aka non fused i211
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---
BTW: Still fails on Apalis T30 2GB V1.0E with tools only aka non fused
i210 as follows:
e1000: e1000#0: ERROR: Hardware Initialization Failed
In our downstream production U-Boot we temporarily hacked this as
follows for now:
http://git.toradex.com/cgit/u-boot-toradex.git/commit/?h=2015.04-toradex&id=2d8ea651b6da79047b6fa729863d25b5eb9e15d7
Joe Hershberger Aug. 12, 2015, 7:32 p.m. UTC | #3
Hi Tim,

On Tue, May 19, 2015 at 12:01 PM, Tim Harvey <tharvey@gateworks.com> wrote:
> remove unnecessary clearing of SWSM.SWSM_SMBI when obtaining the SW
> semaphore. This was introduced in 951860634fdb557bbb58e0f99215391bc0c29779
> while adding i210 support and should be now resolved by releasing the
> semaphore when no longer needed.
>
> Cc: Marcel Ziswiler <marcel@ziswiler.com>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Aneesh Bansal <aneesh.bansal@freescale.com>
> Cc: Naveen Burmi <NaveenBurmi@freescale.com>
> Cc: Po Liu <po.liu@freescale.com>
> Cc: Bin Meng <bmeng.cn@gmail.com>
> Cc: Alison Wang <alison.wang@freescale.com>
> Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
> Cc: Shengzhou Liu  <Shengzhou.Liu@freescale.com>
> Cc: York Sun <yorksun@freescale.com>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>

Applied to u-boot-net, thanks!
-Joe
diff mbox

Patch

diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c
index f960024..a78ffc4 100644
--- a/drivers/net/e1000.c
+++ b/drivers/net/e1000.c
@@ -996,10 +996,6 @@  e1000_get_software_semaphore(struct e1000_hw *hw)
 
 	DEBUGFUNC();
 
-		swsm = E1000_READ_REG(hw, SWSM);
-		swsm &= ~E1000_SWSM_SMBI;
-		E1000_WRITE_REG(hw, SWSM, swsm);
-
 	if (hw->mac_type != e1000_80003es2lan)
 		return E1000_SUCCESS;