* [dpdk-dev] [PATCH 00/34] update e1000 base driver
@ 2015-10-14 6:34 Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 01/34] e1000/base: update readme and copyright Wenzhuo Lu
` (36 more replies)
0 siblings, 37 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Short summary:
*update readme and copyright
*add new devices
*fix issue with link flap on 82579
*fix issue with jumbo frame CRC failures in client
*redundant PHY power down for i210
*add return value to the functions of setting receive address register
*add defaults for i210 TX/RX PBSIZE
*remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset
*add evaluation of e1000_nvm_read return value
*change invariant return to not use variables
*add return value handler when check manage mode
*add return value handler for ESB2 controller init and reset
*add support for inverted format ETrackId
*add EEARBC_I210 for i210
*apply paranoia to macro arguments
*add flags to set eee advertisement modes
*prevent ulp flow if cable connected
*fix TIPG value for non 10 half duplex mode
*add return value for resume workaround
*fix link detect flow
*cleanup NAHUM6LP_HW tags
*add bit for disable packetbuffer read
*K1 flow fixes
*remove FIXME comment
*set correct value of beacon duration
*disable extension header parsing for IPv6
*fix for i354 88E1112 PHY using AutoMedia Detect
*increase timeout of polling bit RSPCIPHY in check_reset_block
*implement 88E1543 PHY initialization
*use the correct i210 register for EEMNGCTL
*move the print to the right position
*synchronization of MAC-PHY interface only on non- ME systems
*fix to enable both ulp and EEE in Sx state
Wenzhuo Lu (34):
e1000/base: update readme and copyright
e1000/base: add new devices
e1000/base: fix issue with link flap on 82579
e1000/base: fix issue with jumbo frame CRC failures in client
e1000/base: redundant PHY power down for i210
e1000/base: add return value to the functions of setting receive
address register
e1000/base: add defaults for i210 TX/RX PBSIZE
e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after
commencing HW reset
e1000/base: add evaluation of e1000_nvm_read return value
e1000/base: change invariant return to not use variables
e1000/base: add return value handler when check manage mode
e1000/base: add return value handler for ESB2 controller init and
reset
e1000/base: add support for inverted format ETrackId
e1000/base: add EEARBC_I210 for i210
e1000/base: apply paranoia to macro arguments
e1000/base: add flags to set eee advertisement modes
e1000/base: prevent ulp flow if cable connected
e1000/base: fix TIPG value for non 10 half duplex mode
e1000/base: add return value for resume workaround
e1000/base: fix link detect flow
e1000/base: cleanup NAHUM6LP_HW tags
e1000/base: add bit for disable packetbuffer read
e1000/base: K1 flow fixes
e1000/base: remove FIXME comment
e1000/base: set correct value of beacon duration
e1000/base: disable extension header parsing for IPv6
e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect
e1000/base: increase timeout of polling bit RSPCIPHY in
check_reset_block
e1000/base: implement 88E1543 PHY initialization
e1000/base: use the correct i210 register for EEMNGCTL
e1000/base: move the print to the right position
e1000/base: synchronization of MAC-PHY interface only on non- ME
systems
e1000/base: fix to enable both ulp and EEE in Sx state
e1000/base: some minor change
drivers/net/e1000/base/README | 4 +-
drivers/net/e1000/base/e1000_80003es2lan.c | 33 ++--
drivers/net/e1000/base/e1000_80003es2lan.h | 2 +-
drivers/net/e1000/base/e1000_82540.c | 2 +-
drivers/net/e1000/base/e1000_82541.c | 2 +-
drivers/net/e1000/base/e1000_82541.h | 2 +-
drivers/net/e1000/base/e1000_82542.c | 8 +-
drivers/net/e1000/base/e1000_82543.c | 2 +-
drivers/net/e1000/base/e1000_82543.h | 2 +-
drivers/net/e1000/base/e1000_82571.c | 8 +-
drivers/net/e1000/base/e1000_82571.h | 2 +-
drivers/net/e1000/base/e1000_82575.c | 205 +++++++++++++++++++----
drivers/net/e1000/base/e1000_82575.h | 7 +-
drivers/net/e1000/base/e1000_api.c | 12 +-
drivers/net/e1000/base/e1000_api.h | 20 +--
drivers/net/e1000/base/e1000_defines.h | 8 +-
drivers/net/e1000/base/e1000_hw.h | 16 +-
drivers/net/e1000/base/e1000_i210.c | 49 +++++-
drivers/net/e1000/base/e1000_i210.h | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 252 ++++++++++++++++++++---------
drivers/net/e1000/base/e1000_ich8lan.h | 43 ++---
drivers/net/e1000/base/e1000_mac.c | 14 +-
drivers/net/e1000/base/e1000_mac.h | 4 +-
drivers/net/e1000/base/e1000_manage.c | 7 +-
drivers/net/e1000/base/e1000_manage.h | 2 +-
drivers/net/e1000/base/e1000_mbx.c | 2 +-
drivers/net/e1000/base/e1000_mbx.h | 2 +-
drivers/net/e1000/base/e1000_nvm.c | 11 +-
drivers/net/e1000/base/e1000_nvm.h | 2 +-
drivers/net/e1000/base/e1000_osdep.h | 1 -
drivers/net/e1000/base/e1000_phy.c | 21 +--
drivers/net/e1000/base/e1000_phy.h | 10 +-
drivers/net/e1000/base/e1000_regs.h | 13 +-
drivers/net/e1000/base/e1000_vf.c | 8 +-
drivers/net/e1000/base/e1000_vf.h | 4 +-
35 files changed, 554 insertions(+), 228 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 01/34] e1000/base: update readme and copyright
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 02/34] e1000/base: add new devices Wenzhuo Lu
` (35 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/README | 4 ++--
drivers/net/e1000/base/e1000_80003es2lan.c | 2 +-
drivers/net/e1000/base/e1000_80003es2lan.h | 2 +-
drivers/net/e1000/base/e1000_82540.c | 2 +-
drivers/net/e1000/base/e1000_82541.c | 2 +-
drivers/net/e1000/base/e1000_82541.h | 2 +-
drivers/net/e1000/base/e1000_82542.c | 2 +-
drivers/net/e1000/base/e1000_82543.c | 2 +-
drivers/net/e1000/base/e1000_82543.h | 2 +-
drivers/net/e1000/base/e1000_82571.c | 2 +-
drivers/net/e1000/base/e1000_82571.h | 2 +-
drivers/net/e1000/base/e1000_82575.c | 2 +-
drivers/net/e1000/base/e1000_82575.h | 2 +-
drivers/net/e1000/base/e1000_api.c | 2 +-
drivers/net/e1000/base/e1000_api.h | 2 +-
drivers/net/e1000/base/e1000_defines.h | 2 +-
drivers/net/e1000/base/e1000_hw.h | 2 +-
drivers/net/e1000/base/e1000_i210.c | 2 +-
drivers/net/e1000/base/e1000_i210.h | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
drivers/net/e1000/base/e1000_ich8lan.h | 2 +-
drivers/net/e1000/base/e1000_mac.c | 2 +-
drivers/net/e1000/base/e1000_mac.h | 2 +-
drivers/net/e1000/base/e1000_manage.c | 2 +-
drivers/net/e1000/base/e1000_manage.h | 2 +-
drivers/net/e1000/base/e1000_mbx.c | 2 +-
drivers/net/e1000/base/e1000_mbx.h | 2 +-
drivers/net/e1000/base/e1000_nvm.c | 2 +-
drivers/net/e1000/base/e1000_nvm.h | 2 +-
drivers/net/e1000/base/e1000_phy.c | 2 +-
drivers/net/e1000/base/e1000_phy.h | 2 +-
drivers/net/e1000/base/e1000_regs.h | 2 +-
drivers/net/e1000/base/e1000_vf.c | 2 +-
drivers/net/e1000/base/e1000_vf.h | 2 +-
34 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/net/e1000/base/README b/drivers/net/e1000/base/README
index 59275b6..8d48135 100644
--- a/drivers/net/e1000/base/README
+++ b/drivers/net/e1000/base/README
@@ -1,7 +1,7 @@
..
BSD LICENSE
- Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This directory contains source code of FreeBSD em & igb drivers of version
-cid-shared-code.2014.04.21 released by LAD. The sub-directory of lad/
+cid-shared-code.2015.10.09 released by ND. The sub-directory of base/
contains the original source package.
Updating the driver
diff --git a/drivers/net/e1000/base/e1000_80003es2lan.c b/drivers/net/e1000/base/e1000_80003es2lan.c
index 72692d9..b79496b 100644
--- a/drivers/net/e1000/base/e1000_80003es2lan.c
+++ b/drivers/net/e1000/base/e1000_80003es2lan.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_80003es2lan.h b/drivers/net/e1000/base/e1000_80003es2lan.h
index f5fe967..93ec19b 100644
--- a/drivers/net/e1000/base/e1000_80003es2lan.h
+++ b/drivers/net/e1000/base/e1000_80003es2lan.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82540.c b/drivers/net/e1000/base/e1000_82540.c
index fc1fa94..7de7b7b 100644
--- a/drivers/net/e1000/base/e1000_82540.c
+++ b/drivers/net/e1000/base/e1000_82540.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82541.c b/drivers/net/e1000/base/e1000_82541.c
index 952aea2..9cdb91c 100644
--- a/drivers/net/e1000/base/e1000_82541.c
+++ b/drivers/net/e1000/base/e1000_82541.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82541.h b/drivers/net/e1000/base/e1000_82541.h
index 0f50f55..e0bee7c 100644
--- a/drivers/net/e1000/base/e1000_82541.h
+++ b/drivers/net/e1000/base/e1000_82541.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82542.c b/drivers/net/e1000/base/e1000_82542.c
index afea469..a538cba 100644
--- a/drivers/net/e1000/base/e1000_82542.c
+++ b/drivers/net/e1000/base/e1000_82542.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82543.c b/drivers/net/e1000/base/e1000_82543.c
index 36335ba..fc96199 100644
--- a/drivers/net/e1000/base/e1000_82543.c
+++ b/drivers/net/e1000/base/e1000_82543.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82543.h b/drivers/net/e1000/base/e1000_82543.h
index 51056db..4eb3f62 100644
--- a/drivers/net/e1000/base/e1000_82543.h
+++ b/drivers/net/e1000/base/e1000_82543.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82571.c b/drivers/net/e1000/base/e1000_82571.c
index 8ae1cb1..5e0e43c 100644
--- a/drivers/net/e1000/base/e1000_82571.c
+++ b/drivers/net/e1000/base/e1000_82571.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82571.h b/drivers/net/e1000/base/e1000_82571.h
index bdf6446..c8037b6 100644
--- a/drivers/net/e1000/base/e1000_82571.h
+++ b/drivers/net/e1000/base/e1000_82571.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 25fa672..3dc8066 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82575.h b/drivers/net/e1000/base/e1000_82575.h
index 09b7bf2..0c8a464 100644
--- a/drivers/net/e1000/base/e1000_82575.h
+++ b/drivers/net/e1000/base/e1000_82575.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c
index a064565..bfddb79 100644
--- a/drivers/net/e1000/base/e1000_api.c
+++ b/drivers/net/e1000/base/e1000_api.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_api.h b/drivers/net/e1000/base/e1000_api.h
index 02b16da..53a641c 100644
--- a/drivers/net/e1000/base/e1000_api.h
+++ b/drivers/net/e1000/base/e1000_api.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 278c507..605e26e 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index 4dd92a3..b0e7a61 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index 1f5600d..842e9d4 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_i210.h b/drivers/net/e1000/base/e1000_i210.h
index f2bd43b..1a6f1dd 100644
--- a/drivers/net/e1000/base/e1000_i210.h
+++ b/drivers/net/e1000/base/e1000_i210.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 3b1627b..f98d54e 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index 8c5e9c3..e9b73df 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mac.c b/drivers/net/e1000/base/e1000_mac.c
index c8ec049..5c107c6 100644
--- a/drivers/net/e1000/base/e1000_mac.c
+++ b/drivers/net/e1000/base/e1000_mac.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mac.h b/drivers/net/e1000/base/e1000_mac.h
index 5a7ce4a..b5d0940 100644
--- a/drivers/net/e1000/base/e1000_mac.h
+++ b/drivers/net/e1000/base/e1000_mac.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_manage.c b/drivers/net/e1000/base/e1000_manage.c
index 30db892..ac4c08a 100644
--- a/drivers/net/e1000/base/e1000_manage.c
+++ b/drivers/net/e1000/base/e1000_manage.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_manage.h b/drivers/net/e1000/base/e1000_manage.h
index e6f92c0..25be115 100644
--- a/drivers/net/e1000/base/e1000_manage.h
+++ b/drivers/net/e1000/base/e1000_manage.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mbx.c b/drivers/net/e1000/base/e1000_mbx.c
index 7ec4c56..6daf16b 100644
--- a/drivers/net/e1000/base/e1000_mbx.c
+++ b/drivers/net/e1000/base/e1000_mbx.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mbx.h b/drivers/net/e1000/base/e1000_mbx.h
index e9524fc..563dcb9 100644
--- a/drivers/net/e1000/base/e1000_mbx.h
+++ b/drivers/net/e1000/base/e1000_mbx.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c
index 8be437a..966a34c 100644
--- a/drivers/net/e1000/base/e1000_nvm.c
+++ b/drivers/net/e1000/base/e1000_nvm.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_nvm.h b/drivers/net/e1000/base/e1000_nvm.h
index dee1f62..c400dc3 100644
--- a/drivers/net/e1000/base/e1000_nvm.h
+++ b/drivers/net/e1000/base/e1000_nvm.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index e214f17..7620ecf 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index 73a9b1f..b30b36e 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index bde2a08..8999b5b 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_vf.c b/drivers/net/e1000/base/e1000_vf.c
index 778561e..3a47d35 100644
--- a/drivers/net/e1000/base/e1000_vf.c
+++ b/drivers/net/e1000/base/e1000_vf.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_vf.h b/drivers/net/e1000/base/e1000_vf.h
index 6d5bd99..7218212 100644
--- a/drivers/net/e1000/base/e1000_vf.h
+++ b/drivers/net/e1000/base/e1000_vf.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 02/34] e1000/base: add new devices
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 01/34] e1000/base: update readme and copyright Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 16:00 ` Stephen Hemminger
2015-10-14 6:34 ` [dpdk-dev] [PATCH 03/34] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
` (34 subsequent siblings)
36 siblings, 1 reply; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Add some new i218 devices.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_api.c | 4 ++++
drivers/net/e1000/base/e1000_defines.h | 2 ++
drivers/net/e1000/base/e1000_hw.h | 4 ++++
drivers/net/e1000/base/e1000_ich8lan.c | 18 ++++++++++++++----
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c
index bfddb79..5ec0ad1 100644
--- a/drivers/net/e1000/base/e1000_api.c
+++ b/drivers/net/e1000/base/e1000_api.c
@@ -292,6 +292,10 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_PCH_LPT_I217_V:
case E1000_DEV_ID_PCH_LPTLP_I218_LM:
case E1000_DEV_ID_PCH_LPTLP_I218_V:
+ case E1000_DEV_ID_PCH_I218_LM2:
+ case E1000_DEV_ID_PCH_I218_V2:
+ case E1000_DEV_ID_PCH_I218_LM3:
+ case E1000_DEV_ID_PCH_I218_V3:
mac->type = e1000_pch_lpt;
break;
case E1000_DEV_ID_82575EB_COPPER:
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 605e26e..71bd2e0 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -197,6 +197,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */
#define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */
#define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min thresh size */
+#define E1000_RCTL_RDMTS_HEX 0x00010000
#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */
#define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */
#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */
@@ -1467,6 +1468,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_RXPBS_SIZE_I210_MASK 0x0000003F /* Rx packet buffer size */
#define E1000_TXPB0S_SIZE_I210_MASK 0x0000003F /* Tx packet buffer 0 size */
+
/* Proxy Filter Control */
#define E1000_PROXYFC_D0 0x00000001 /* Enable offload in D0 */
#define E1000_PROXYFC_EX 0x00000004 /* Directed exact proxy */
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index b0e7a61..154b9e5 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -132,6 +132,10 @@ struct e1000_hw;
#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B
#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A
#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559
+#define E1000_DEV_ID_PCH_I218_LM2 0x15A0
+#define E1000_DEV_ID_PCH_I218_V2 0x15A1
+#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 /* Wildcat Point PCH */
+#define E1000_DEV_ID_PCH_I218_V3 0x15A3 /* Wildcat Point PCH */
#define E1000_DEV_ID_82576 0x10C9
#define E1000_DEV_ID_82576_FIBER 0x10E6
#define E1000_DEV_ID_82576_SERDES 0x10E7
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index f98d54e..6d998df 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -62,6 +62,10 @@ POSSIBILITY OF SUCH DAMAGE.
* Ethernet Connection I217-V
* Ethernet Connection I218-V
* Ethernet Connection I218-LM
+ * Ethernet Connection (2) I218-LM
+ * Ethernet Connection (2) I218-V
+ * Ethernet Connection (3) I218-LM
+ * Ethernet Connection (3) I218-V
*/
#include "e1000_api.h"
@@ -1052,19 +1056,19 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
if ((hw->mac.type < e1000_pch_lpt) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_LM) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_V) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_LM2) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_V2) ||
(hw->dev_spec.ich8lan.ulp_state == e1000_ulp_state_on))
return 0;
if (!to_sx) {
int i = 0;
-
/* Poll up to 5 seconds for Cable Disconnected indication */
while (!(E1000_READ_REG(hw, E1000_FEXT) &
E1000_FEXT_PHY_CABLE_DISCONNECTED)) {
/* Bail if link is re-acquired */
if (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)
return -E1000_ERR_PHY;
-
if (i++ == 100)
break;
@@ -1197,6 +1201,8 @@ s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
if ((hw->mac.type < e1000_pch_lpt) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_LM) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_V) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_LM2) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_V2) ||
(hw->dev_spec.ich8lan.ulp_state == e1000_ulp_state_off))
return 0;
@@ -1452,7 +1458,9 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
/* Work-around I218 hang issue */
if ((hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
- (hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V)) {
+ (hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_LM3) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_V3)) {
ret_val = e1000_k1_workaround_lpt_lp(hw, link);
if (ret_val)
return ret_val;
@@ -4794,7 +4802,9 @@ void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw)
u16 phy_reg, device_id = hw->device_id;
if ((device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
- (device_id == E1000_DEV_ID_PCH_LPTLP_I218_V)) {
+ (device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||
+ (device_id == E1000_DEV_ID_PCH_I218_LM3) ||
+ (device_id == E1000_DEV_ID_PCH_I218_V3)) {
u32 fextnvm6 = E1000_READ_REG(hw, E1000_FEXTNVM6);
E1000_WRITE_REG(hw, E1000_FEXTNVM6,
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 03/34] e1000/base: fix issue with link flap on 82579
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 01/34] e1000/base: update readme and copyright Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 02/34] e1000/base: add new devices Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 04/34] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
` (33 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Several customers have reported a link flap issue on 82579. The symptoms
are random and intermittent link losses when 82579 is connected to specific
switches. Issue has been root caused as interoperability problem between
the NIC and at least some Broadcom PHYs in the Energy Efficient Ethernet
wake mechanism.
To fix the issue, we are disabling the Phase Locked Loop shutdown in 100M
Low Power Idle. This solution will cause an increase of power in 100M EEE
link. It may cost additional 28mW in this specific mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 11 +++++++++++
drivers/net/e1000/base/e1000_ich8lan.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 6d998df..f23d810 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -935,6 +935,17 @@ s32 e1000_set_eee_pchlan(struct e1000_hw *hw)
}
}
+ if (hw->phy.type == e1000_phy_82579) {
+ ret_val = e1000_read_emi_reg_locked(hw, I82579_LPI_PLL_SHUT,
+ &data);
+ if (ret_val)
+ goto release;
+
+ data &= ~I82579_LPI_100_PLL_SHUT;
+ ret_val = e1000_write_emi_reg_locked(hw, I82579_LPI_PLL_SHUT,
+ data);
+ }
+
/* R/Clr IEEE MMD 3.1 bits 11:10 - Tx/Rx LPI Received */
ret_val = e1000_read_emi_reg_locked(hw, pcs_status, &data);
if (ret_val)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index e9b73df..c690d9e 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -262,12 +262,14 @@ POSSIBILITY OF SUCH DAMAGE.
#define I82577_MSE_THRESHOLD 0x0887 /* 82577 Mean Square Error Threshold */
#define I82579_MSE_LINK_DOWN 0x2411 /* MSE count before dropping link */
#define I82579_RX_CONFIG 0x3412 /* Receive configuration */
+#define I82579_LPI_PLL_SHUT 0x4412 /* LPI PLL Shut Enable */
#define I82579_EEE_PCS_STATUS 0x182E /* IEEE MMD Register 3.1 >> 8 */
#define I82579_EEE_CAPABILITY 0x0410 /* IEEE MMD Register 3.20 */
#define I82579_EEE_ADVERTISEMENT 0x040E /* IEEE MMD Register 7.60 */
#define I82579_EEE_LP_ABILITY 0x040F /* IEEE MMD Register 7.61 */
#define I82579_EEE_100_SUPPORTED (1 << 1) /* 100BaseTx EEE */
#define I82579_EEE_1000_SUPPORTED (1 << 2) /* 1000BaseTx EEE */
+#define I82579_LPI_100_PLL_SHUT (1 << 2) /* 100M LPI PLL Shut Enabled */
#define I217_EEE_PCS_STATUS 0x9401 /* IEEE MMD Register 3.1 */
#define I217_EEE_CAPABILITY 0x8000 /* IEEE MMD Register 3.20 */
#define I217_EEE_ADVERTISEMENT 0x8001 /* IEEE MMD Register 7.60 */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 04/34] e1000/base: fix issue with jumbo frame CRC failures in client
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (2 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 03/34] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 05/34] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
` (32 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
This is a patch to change the value of register 776.20[11:2] for jumbo
mode from 0x1A to 0x1F. This is to enlarge the gap between read and
write pointers in the TX Fifo.
And replace the magic number with a macro by the way.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_defines.h | 1 +
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 71bd2e0..79a88bb 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -468,6 +468,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define ETHERNET_FCS_SIZE 4
#define MAX_JUMBO_FRAME_SIZE 0x3F00
+#define E1000_TX_PTR_GAP 0x1F
/* Extended Configuration Control and Size */
#define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP 0x00000020
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index f23d810..cc6e033 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -2601,7 +2601,7 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
return ret_val;
hw->phy.ops.read_reg(hw, PHY_REG(776, 20), &data);
data &= ~(0x3FF << 2);
- data |= (0x1A << 2);
+ data |= (E1000_TX_PTR_GAP << 2);
ret_val = hw->phy.ops.write_reg(hw, PHY_REG(776, 20), data);
if (ret_val)
return ret_val;
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 05/34] e1000/base: redundant PHY power down for i210
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (3 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 04/34] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 06/34] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
` (31 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
The wrong bit is being used in PHYREG16 for PHY power down. In addition,
the use of PHYREG 16 is unnecessary if bit 11 of PHYREG 0 is used.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_phy.c | 15 ---------------
drivers/net/e1000/base/e1000_phy.h | 1 -
2 files changed, 16 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index 7620ecf..6bbb379 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -3498,16 +3498,10 @@ STATIC s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
void e1000_power_up_phy_copper(struct e1000_hw *hw)
{
u16 mii_reg = 0;
- u16 power_reg = 0;
/* The PHY will retain its settings across a power down/up cycle */
hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);
mii_reg &= ~MII_CR_POWER_DOWN;
- if (hw->phy.type == e1000_phy_i210) {
- hw->phy.ops.read_reg(hw, GS40G_COPPER_SPEC, &power_reg);
- power_reg &= ~GS40G_CS_POWER_DOWN;
- hw->phy.ops.write_reg(hw, GS40G_COPPER_SPEC, power_reg);
- }
hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);
}
@@ -3522,17 +3516,10 @@ void e1000_power_up_phy_copper(struct e1000_hw *hw)
void e1000_power_down_phy_copper(struct e1000_hw *hw)
{
u16 mii_reg = 0;
- u16 power_reg = 0;
/* The PHY will retain its settings across a power down/up cycle */
hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);
mii_reg |= MII_CR_POWER_DOWN;
- /* i210 Phy requires an additional bit for power up/down */
- if (hw->phy.type == e1000_phy_i210) {
- hw->phy.ops.read_reg(hw, GS40G_COPPER_SPEC, &power_reg);
- power_reg |= GS40G_CS_POWER_DOWN;
- hw->phy.ops.write_reg(hw, GS40G_COPPER_SPEC, power_reg);
- }
hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);
msec_delay(1);
}
@@ -3563,7 +3550,6 @@ STATIC s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data,
if (ret_val)
return ret_val;
}
-
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
@@ -3673,7 +3659,6 @@ STATIC s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data,
if (ret_val)
return ret_val;
}
-
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index b30b36e..2b78af0 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -143,7 +143,6 @@ bool e1000_is_mphy_ready(struct e1000_hw *hw);
#define GS40G_MAC_LB 0x4140
#define GS40G_MAC_SPEED_1G 0X0006
#define GS40G_COPPER_SPEC 0x0010
-#define GS40G_CS_POWER_DOWN 0x0002
/* BM/HV Specific Registers */
#define BM_PORT_CTRL_PAGE 769
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 06/34] e1000/base: add return value to the functions of setting receive address register
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (4 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 05/34] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 07/34] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
` (30 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Previously, the rar_set functions were of type void, and when they failed
to program an address register they would, at most, put a message into
the log and end. The fact that they failed to program an address into a
address register, if checked for, should be captured and passed back to
the caller so that the drivers can deal with the situation (or not) as
they deem best.
Drivers can ignore or use the return value. No change to base drivers
is mandated by this change unless a driver wants to handle the failure
to program an address register (e.g. evaluate the return value).
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82542.c | 6 ++++--
drivers/net/e1000/base/e1000_api.c | 6 ++++--
drivers/net/e1000/base/e1000_api.h | 2 +-
drivers/net/e1000/base/e1000_hw.h | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 18 ++++++++++--------
drivers/net/e1000/base/e1000_mac.c | 12 +++++++-----
drivers/net/e1000/base/e1000_mac.h | 2 +-
drivers/net/e1000/base/e1000_vf.c | 6 ++++--
drivers/net/e1000/base/e1000_vf.h | 2 +-
9 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82542.c b/drivers/net/e1000/base/e1000_82542.c
index a538cba..4f1183a 100644
--- a/drivers/net/e1000/base/e1000_82542.c
+++ b/drivers/net/e1000/base/e1000_82542.c
@@ -46,7 +46,7 @@ STATIC s32 e1000_init_hw_82542(struct e1000_hw *hw);
STATIC s32 e1000_setup_link_82542(struct e1000_hw *hw);
STATIC s32 e1000_led_on_82542(struct e1000_hw *hw);
STATIC s32 e1000_led_off_82542(struct e1000_hw *hw);
-STATIC void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index);
STATIC void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw);
STATIC s32 e1000_read_mac_addr_82542(struct e1000_hw *hw);
@@ -410,7 +410,7 @@ STATIC s32 e1000_led_off_82542(struct e1000_hw *hw)
* Sets the receive address array register at index to the address passed
* in by addr.
**/
-STATIC void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
@@ -431,6 +431,8 @@ STATIC void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_REG_ARRAY(hw, E1000_RA, (index << 1), rar_low);
E1000_WRITE_REG_ARRAY(hw, E1000_RA, ((index << 1) + 1), rar_high);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c
index 5ec0ad1..bbfcae8 100644
--- a/drivers/net/e1000/base/e1000_api.c
+++ b/drivers/net/e1000/base/e1000_api.c
@@ -831,10 +831,12 @@ void e1000_config_collision_dist(struct e1000_hw *hw)
*
* Sets a Receive Address Register (RAR) to the specified address.
**/
-void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)
+int e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)
{
if (hw->mac.ops.rar_set)
- hw->mac.ops.rar_set(hw, addr, index);
+ return hw->mac.ops.rar_set(hw, addr, index);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_api.h b/drivers/net/e1000/base/e1000_api.h
index 53a641c..563d0ca 100644
--- a/drivers/net/e1000/base/e1000_api.h
+++ b/drivers/net/e1000/base/e1000_api.h
@@ -68,7 +68,7 @@ s32 e1000_setup_link(struct e1000_hw *hw);
s32 e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed, u16 *duplex);
s32 e1000_disable_pcie_master(struct e1000_hw *hw);
void e1000_config_collision_dist(struct e1000_hw *hw);
-void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
+int e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr);
void e1000_update_mc_addr_list(struct e1000_hw *hw, u8 *mc_addr_list,
u32 mc_addr_count);
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index 154b9e5..f06be0c 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -699,7 +699,7 @@ struct e1000_mac_operations {
s32 (*setup_led)(struct e1000_hw *);
void (*write_vfta)(struct e1000_hw *, u32, u32);
void (*config_collision_dist)(struct e1000_hw *);
- void (*rar_set)(struct e1000_hw *, u8*, u32);
+ int (*rar_set)(struct e1000_hw *, u8*, u32);
s32 (*read_mac_addr)(struct e1000_hw *);
s32 (*validate_mdi_setting)(struct e1000_hw *);
s32 (*acquire_swfw_sync)(struct e1000_hw *, u16);
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index cc6e033..228d4c5 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -77,8 +77,8 @@ STATIC s32 e1000_acquire_nvm_ich8lan(struct e1000_hw *hw);
STATIC void e1000_release_nvm_ich8lan(struct e1000_hw *hw);
STATIC bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw);
STATIC bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw);
-STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
-STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
STATIC s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw);
#ifndef NO_NON_BLOCKING_PHY_MTA_UPDATE_SUPPORT
STATIC void e1000_update_mc_addr_list_pch2lan(struct e1000_hw *hw,
@@ -1750,7 +1750,7 @@ STATIC bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw)
* contain the MAC address but RAR[1-6] are reserved for manageability (ME).
* Use SHRA[0-3] in place of those reserved for ME.
**/
-STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
@@ -1774,7 +1774,7 @@ STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_FLUSH(hw);
E1000_WRITE_REG(hw, E1000_RAH(index), rar_high);
E1000_WRITE_FLUSH(hw);
- return;
+ return E1000_SUCCESS;
}
/* RAR[1-6] are owned by manageability. Skip those and program the
@@ -1797,7 +1797,7 @@ STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
/* verify the register updates */
if ((E1000_READ_REG(hw, E1000_SHRAL(index - 1)) == rar_low) &&
(E1000_READ_REG(hw, E1000_SHRAH(index - 1)) == rar_high))
- return;
+ return E1000_SUCCESS;
DEBUGOUT2("SHRA[%d] might be locked by ME - FWSM=0x%8.8x\n",
(index - 1), E1000_READ_REG(hw, E1000_FWSM));
@@ -1805,6 +1805,7 @@ STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
out:
DEBUGOUT1("Failed to write receive address at index %d\n", index);
+ return -E1000_ERR_CONFIG;
}
/**
@@ -1818,7 +1819,7 @@ out:
* contain the MAC address. SHRA[0-10] are the shared receive address
* registers that are shared between the Host and manageability engine (ME).
**/
-STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
u32 wlock_mac;
@@ -1842,7 +1843,7 @@ STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_FLUSH(hw);
E1000_WRITE_REG(hw, E1000_RAH(index), rar_high);
E1000_WRITE_FLUSH(hw);
- return;
+ return E1000_SUCCESS;
}
/* The manageability engine (ME) can lock certain SHRAR registers that
@@ -1877,12 +1878,13 @@ STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
/* verify the register updates */
if ((E1000_READ_REG(hw, E1000_SHRAL_PCH_LPT(index - 1)) == rar_low) &&
(E1000_READ_REG(hw, E1000_SHRAH_PCH_LPT(index - 1)) == rar_high))
- return;
+ return E1000_SUCCESS;
}
}
out:
DEBUGOUT1("Failed to write receive address at index %d\n", index);
+ return -E1000_ERR_CONFIG;
}
#ifndef NO_NON_BLOCKING_PHY_MTA_UPDATE_SUPPORT
diff --git a/drivers/net/e1000/base/e1000_mac.c b/drivers/net/e1000/base/e1000_mac.c
index 5c107c6..a0f3a99 100644
--- a/drivers/net/e1000/base/e1000_mac.c
+++ b/drivers/net/e1000/base/e1000_mac.c
@@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
STATIC s32 e1000_validate_mdi_setting_generic(struct e1000_hw *hw);
STATIC void e1000_set_lan_id_multi_port_pcie(struct e1000_hw *hw);
STATIC void e1000_config_collision_dist_generic(struct e1000_hw *hw);
-STATIC void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
/**
* e1000_init_mac_ops_generic - Initialize MAC function pointers
@@ -149,15 +149,15 @@ void e1000_null_write_vfta(struct e1000_hw E1000_UNUSEDARG *hw,
}
/**
- * e1000_null_rar_set - No-op function, return void
+ * e1000_null_rar_set - No-op function, return 0
* @hw: pointer to the HW structure
**/
-void e1000_null_rar_set(struct e1000_hw E1000_UNUSEDARG *hw,
+int e1000_null_rar_set(struct e1000_hw E1000_UNUSEDARG *hw,
u8 E1000_UNUSEDARG *h, u32 E1000_UNUSEDARG a)
{
DEBUGFUNC("e1000_null_rar_set");
UNREFERENCED_3PARAMETER(hw, h, a);
- return;
+ return E1000_SUCCESS;
}
/**
@@ -469,7 +469,7 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw)
* Sets the receive address array register at index to the address passed
* in by addr.
**/
-STATIC void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
@@ -495,6 +495,8 @@ STATIC void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_FLUSH(hw);
E1000_WRITE_REG(hw, E1000_RAH(index), rar_high);
E1000_WRITE_FLUSH(hw);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_mac.h b/drivers/net/e1000/base/e1000_mac.h
index b5d0940..96a260c 100644
--- a/drivers/net/e1000/base/e1000_mac.h
+++ b/drivers/net/e1000/base/e1000_mac.h
@@ -44,7 +44,7 @@ s32 e1000_null_link_info(struct e1000_hw *hw, u16 *s, u16 *d);
bool e1000_null_mng_mode(struct e1000_hw *hw);
void e1000_null_update_mc(struct e1000_hw *hw, u8 *h, u32 a);
void e1000_null_write_vfta(struct e1000_hw *hw, u32 a, u32 b);
-void e1000_null_rar_set(struct e1000_hw *hw, u8 *h, u32 a);
+int e1000_null_rar_set(struct e1000_hw *hw, u8 *h, u32 a);
s32 e1000_blink_led_generic(struct e1000_hw *hw);
s32 e1000_check_for_copper_link_generic(struct e1000_hw *hw);
s32 e1000_check_for_fiber_link_generic(struct e1000_hw *hw);
diff --git a/drivers/net/e1000/base/e1000_vf.c b/drivers/net/e1000/base/e1000_vf.c
index 3a47d35..7845b48 100644
--- a/drivers/net/e1000/base/e1000_vf.c
+++ b/drivers/net/e1000/base/e1000_vf.c
@@ -48,7 +48,7 @@ STATIC s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
STATIC s32 e1000_init_hw_vf(struct e1000_hw *hw);
STATIC s32 e1000_reset_hw_vf(struct e1000_hw *hw);
STATIC void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, u8 *, u32);
-STATIC void e1000_rar_set_vf(struct e1000_hw *, u8 *, u32);
+STATIC int e1000_rar_set_vf(struct e1000_hw *, u8 *, u32);
STATIC s32 e1000_read_mac_addr_vf(struct e1000_hw *);
/**
@@ -322,7 +322,7 @@ STATIC s32 e1000_init_hw_vf(struct e1000_hw *hw)
* @addr: pointer to the receive address
* @index receive address array register
**/
-STATIC void e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
+STATIC int e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
u32 E1000_UNUSEDARG index)
{
struct e1000_mbx_info *mbx = &hw->mbx;
@@ -345,6 +345,8 @@ STATIC void e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
if (!ret_val &&
(msgbuf[0] == (E1000_VF_SET_MAC_ADDR | E1000_VT_MSGTYPE_NACK)))
e1000_read_mac_addr_vf(hw);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_vf.h b/drivers/net/e1000/base/e1000_vf.h
index 7218212..d6216de 100644
--- a/drivers/net/e1000/base/e1000_vf.h
+++ b/drivers/net/e1000/base/e1000_vf.h
@@ -207,7 +207,7 @@ struct e1000_mac_operations {
s32 (*init_hw)(struct e1000_hw *);
s32 (*setup_link)(struct e1000_hw *);
void (*write_vfta)(struct e1000_hw *, u32, u32);
- void (*rar_set)(struct e1000_hw *, u8*, u32);
+ int (*rar_set)(struct e1000_hw *, u8*, u32);
s32 (*read_mac_addr)(struct e1000_hw *);
};
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 07/34] e1000/base: add defaults for i210 TX/RX PBSIZE
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (5 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 06/34] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 08/34] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
` (29 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
These are the defaults for the packet buffer size registers that need to
be explicitly set back if someone changes them and comes back to a normal
driver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_defines.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 79a88bb..8e40771 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -1468,6 +1468,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_RXPBS_CFG_TS_EN 0x80000000 /* Timestamp in Rx buffer */
#define E1000_RXPBS_SIZE_I210_MASK 0x0000003F /* Rx packet buffer size */
#define E1000_TXPB0S_SIZE_I210_MASK 0x0000003F /* Tx packet buffer 0 size */
+#define I210_RXPBSIZE_DEFAULT 0x000000A2 /* RXPBSIZE default */
+#define I210_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */
/* Proxy Filter Control */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 08/34] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (6 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 07/34] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 09/34] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
` (28 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
For DH89XXCC_SGMII, write flush leaves registers of this device trashed
(0xFFFFFFFF). Added check for this device.
Also, after both for Port SW Reset and Device Reset case, platform should
wait at least 3ms before reading any registers. Since waiting is
conditionally executed only for Device Reset - removed the condition.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 3dc8066..ab547ca 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -2490,11 +2490,17 @@ STATIC s32 e1000_reset_hw_82580(struct e1000_hw *hw)
ctrl |= E1000_CTRL_RST;
E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
- E1000_WRITE_FLUSH(hw);
- /* Add delay to insure DEV_RST has time to complete */
- if (global_device_reset)
- msec_delay(5);
+ switch (hw->device_id) {
+ case E1000_DEV_ID_DH89XXCC_SGMII:
+ break;
+ default:
+ E1000_WRITE_FLUSH(hw);
+ break;
+ }
+
+ /* Add delay to insure DEV_RST or RST has time to complete */
+ msec_delay(5);
ret_val = e1000_get_auto_rd_done_generic(hw);
if (ret_val) {
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 09/34] e1000/base: add evaluation of e1000_nvm_read return value
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (7 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 08/34] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 10/34] e1000/base: change invariant return to not use variables Wenzhuo Lu
` (27 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Adding code to a case where e1000_nvn_read is called, but there is no
consideration for when the read fails (returns an error code).
Also, this patch adds an error message to a base NVM reading function that
is missing it for consistency.
This patch is not covering all cases of these conditions, it only covers
the code used by the e1000e driver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_manage.c | 5 ++++-
drivers/net/e1000/base/e1000_nvm.c | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_manage.c b/drivers/net/e1000/base/e1000_manage.c
index ac4c08a..8564a7f 100644
--- a/drivers/net/e1000/base/e1000_manage.c
+++ b/drivers/net/e1000/base/e1000_manage.c
@@ -363,9 +363,12 @@ bool e1000_enable_mng_pass_thru(struct e1000_hw *hw)
} else if ((hw->mac.type == e1000_82574) ||
(hw->mac.type == e1000_82583)) {
u16 data;
+ s32 ret_val;
factps = E1000_READ_REG(hw, E1000_FACTPS);
- e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ ret_val = e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ if (ret_val)
+ return false;
if (!(factps & E1000_FACTPS_MNGCG) &&
((data & E1000_NVM_INIT_CTRL2_MNGM) ==
diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c
index 966a34c..01be9e4 100644
--- a/drivers/net/e1000/base/e1000_nvm.c
+++ b/drivers/net/e1000/base/e1000_nvm.c
@@ -585,6 +585,9 @@ s32 e1000_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
E1000_NVM_RW_REG_DATA);
}
+ if (ret_val)
+ DEBUGOUT1("NVM read error: %d\n", ret_val);
+
return ret_val;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 10/34] e1000/base: change invariant return to not use variables
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (8 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 09/34] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 11/34] e1000/base: add return value handler when check manage mode Wenzhuo Lu
` (26 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Although this change should be optimized out by the compiler, just
return a constant directly rather than declare a variable.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index ab547ca..3bdcf69 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -891,7 +891,6 @@ out:
STATIC s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
{
struct e1000_phy_info *phy = &hw->phy;
- s32 ret_val = E1000_SUCCESS;
u32 data;
DEBUGFUNC("e1000_set_d0_lplu_state_82580");
@@ -919,7 +918,7 @@ STATIC s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
}
E1000_WRITE_REG(hw, E1000_82580_PHY_POWER_MGMT, data);
- return ret_val;
+ return E1000_SUCCESS;
}
/**
@@ -939,7 +938,6 @@ STATIC s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
{
struct e1000_phy_info *phy = &hw->phy;
- s32 ret_val = E1000_SUCCESS;
u32 data;
DEBUGFUNC("e1000_set_d3_lplu_state_82580");
@@ -967,7 +965,7 @@ s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
}
E1000_WRITE_REG(hw, E1000_82580_PHY_POWER_MGMT, data);
- return ret_val;
+ return E1000_SUCCESS;
}
/**
@@ -981,7 +979,7 @@ s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
**/
STATIC s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
{
- s32 ret_val;
+ s32 ret_val = E1000_SUCCESS;
DEBUGFUNC("e1000_acquire_nvm_82575");
@@ -1003,6 +1001,7 @@ STATIC s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
DEBUGOUT("Nvm bit banging access error detected and cleared.\n");
}
}
+
if (hw->mac.type == e1000_82580) {
u32 eecd = E1000_READ_REG(hw, E1000_EECD);
if (eecd & E1000_EECD_BLOCKED) {
@@ -1013,7 +1012,6 @@ STATIC s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
}
}
-
ret_val = e1000_acquire_nvm_generic(hw);
if (ret_val)
e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM);
@@ -1127,7 +1125,6 @@ STATIC void e1000_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask)
STATIC s32 e1000_get_cfg_done_82575(struct e1000_hw *hw)
{
s32 timeout = PHY_CFG_TIMEOUT;
- s32 ret_val = E1000_SUCCESS;
u32 mask = E1000_NVM_CFG_DONE_PORT_0;
DEBUGFUNC("e1000_get_cfg_done_82575");
@@ -1152,7 +1149,7 @@ STATIC s32 e1000_get_cfg_done_82575(struct e1000_hw *hw)
(hw->phy.type == e1000_phy_igp_3))
e1000_phy_init_script_igp3(hw);
- return ret_val;
+ return E1000_SUCCESS;
}
/**
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 11/34] e1000/base: add return value handler when check manage mode
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (9 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 10/34] e1000/base: change invariant return to not use variables Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 12/34] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
` (25 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Adding code, where missing, to handle the case when hw->nvm.ops.read returns
an error value.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82571.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_82571.c b/drivers/net/e1000/base/e1000_82571.c
index 5e0e43c..7c279db 100644
--- a/drivers/net/e1000/base/e1000_82571.c
+++ b/drivers/net/e1000/base/e1000_82571.c
@@ -1452,10 +1452,14 @@ STATIC void e1000_clear_vfta_82571(struct e1000_hw *hw)
STATIC bool e1000_check_mng_mode_82574(struct e1000_hw *hw)
{
u16 data;
+ s32 ret_val;
DEBUGFUNC("e1000_check_mng_mode_82574");
- hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ if (ret_val)
+ return false;
+
return (data & E1000_NVM_INIT_CTRL2_MNGM) != 0;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 12/34] e1000/base: add return value handler for ESB2 controller init and reset
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (10 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 11/34] e1000/base: add return value handler when check manage mode Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 13/34] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
` (24 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Adding code where missing to handle case where calls to
e1000_read_kmrn_reg_80003es2lan and e1000_write_kmrn_reg_80003es2lan return
an error value.
Also, when accessing the E1000_KMRNCTRLSTA_INBAND_PARAM offset to disable
far-end loopback on 80003es2lan devices, make the handling of a read or
write failure consistent between hw_init and hw_reset.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_80003es2lan.c | 31 ++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_80003es2lan.c b/drivers/net/e1000/base/e1000_80003es2lan.c
index b79496b..5ac925e 100644
--- a/drivers/net/e1000/base/e1000_80003es2lan.c
+++ b/drivers/net/e1000/base/e1000_80003es2lan.c
@@ -852,11 +852,15 @@ STATIC s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)
/* Disable IBIST slave mode (far-end loopback) */
ret_val = e1000_read_kmrn_reg_80003es2lan(hw,
E1000_KMRNCTRLSTA_INBAND_PARAM, &kum_reg_data);
- if (ret_val)
- return ret_val;
- kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
- e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- kum_reg_data);
+ if (!ret_val) {
+ kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
+ ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
+ E1000_KMRNCTRLSTA_INBAND_PARAM,
+ kum_reg_data);
+ if (ret_val)
+ DEBUGOUT("Error disabling far-end loopback\n");
+ } else
+ DEBUGOUT("Error disabling far-end loopback\n");
ret_val = e1000_get_auto_rd_done_generic(hw);
if (ret_val)
@@ -912,11 +916,18 @@ STATIC s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
return ret_val;
/* Disable IBIST slave mode (far-end loopback) */
- e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- &kum_reg_data);
- kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
- e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- kum_reg_data);
+ ret_val =
+ e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
+ &kum_reg_data);
+ if (!ret_val) {
+ kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
+ ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
+ E1000_KMRNCTRLSTA_INBAND_PARAM,
+ kum_reg_data);
+ if (ret_val)
+ DEBUGOUT("Error disabling far-end loopback\n");
+ } else
+ DEBUGOUT("Error disabling far-end loopback\n");
/* Set the transmit descriptor write-back policy */
reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0));
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 13/34] e1000/base: add support for inverted format ETrackId
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (11 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 12/34] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 14/34] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
` (23 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
There are some images which contain ETrackID in inverted format. This patch
allows reading this format.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_nvm.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c
index 01be9e4..762acd1 100644
--- a/drivers/net/e1000/base/e1000_nvm.c
+++ b/drivers/net/e1000/base/e1000_nvm.c
@@ -1373,8 +1373,12 @@ etrack_id:
hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verh);
fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT)
| eeprom_verl;
+ } else if ((etrack_test & NVM_ETRACK_VALID) == 0) {
+ hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verh);
+ hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verl);
+ fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) |
+ eeprom_verl;
}
- return;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 14/34] e1000/base: add EEARBC_I210 for i210
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (12 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 13/34] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 15/34] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
` (22 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
EEARBC has changed on i210. It means EEARBC has a different address on
i210 than on other NICs. So, add a new entity named EEARBC_I210 to the
register list and make sure the right one is being used on i210.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_i210.c | 17 ++++++++++-------
drivers/net/e1000/base/e1000_regs.h | 1 +
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index 842e9d4..fedf88e 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -925,7 +925,7 @@ s32 e1000_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 data)
STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
{
s32 ret_val;
- u32 wuc, mdicnfg, ctrl_ext, reg_val;
+ u32 wuc, mdicnfg, ctrl, ctrl_ext, reg_val;
u16 nvm_word, phy_word, pci_word, tmp_nvm;
int i;
@@ -942,9 +942,9 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
nvm_word = E1000_INVM_DEFAULT_AL;
tmp_nvm = nvm_word | E1000_INVM_PLL_WO_VAL;
for (i = 0; i < E1000_MAX_PLL_TRIES; i++) {
- /* check current state */
- hw->phy.ops.read_reg(hw, (E1000_PHY_PLL_FREQ_PAGE |
- E1000_PHY_PLL_FREQ_REG), &phy_word);
+ /* check current state directly from internal PHY */
+ e1000_read_phy_reg_gs40g(hw, (E1000_PHY_PLL_FREQ_PAGE |
+ E1000_PHY_PLL_FREQ_REG), &phy_word);
if ((phy_word & E1000_PHY_PLL_UNCONF)
!= E1000_PHY_PLL_UNCONF) {
ret_val = E1000_SUCCESS;
@@ -952,14 +952,17 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
} else {
ret_val = -E1000_ERR_PHY;
}
- hw->phy.ops.reset(hw);
+ /* directly reset the internal PHY */
+ ctrl = E1000_READ_REG(hw, E1000_CTRL);
+ E1000_WRITE_REG(hw, E1000_CTRL, ctrl|E1000_CTRL_PHY_RST);
+
ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
ctrl_ext |= (E1000_CTRL_EXT_PHYPDEN | E1000_CTRL_EXT_SDLPE);
E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
E1000_WRITE_REG(hw, E1000_WUC, 0);
reg_val = (E1000_INVM_AUTOLOAD << 4) | (tmp_nvm << 16);
- E1000_WRITE_REG(hw, E1000_EEARBC, reg_val);
+ E1000_WRITE_REG(hw, E1000_EEARBC_I210, reg_val);
e1000_read_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
pci_word |= E1000_PCI_PMCSR_D3;
@@ -968,7 +971,7 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
pci_word &= ~E1000_PCI_PMCSR_D3;
e1000_write_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
reg_val = (E1000_INVM_AUTOLOAD << 4) | (nvm_word << 16);
- E1000_WRITE_REG(hw, E1000_EEARBC, reg_val);
+ E1000_WRITE_REG(hw, E1000_EEARBC_I210, reg_val);
/* restore WUC register */
E1000_WRITE_REG(hw, E1000_WUC, wuc);
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 8999b5b..b9fcdea 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -110,6 +110,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PBECCSTS 0x0100C /* Packet Buffer ECC Status - RW */
#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
+#define E1000_EEARBC_I210 0x12024 /* EEPROM Auto Read Bus Control */
#define E1000_FLASHT 0x01028 /* FLASH Timer Register */
#define E1000_EEWR 0x0102C /* EEPROM Write Register - RW */
#define E1000_FLSWCTL 0x01030 /* FLASH control register */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 15/34] e1000/base: apply paranoia to macro arguments
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (13 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 14/34] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 16/34] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
` (21 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Macro arguments need to be in parens since we can pass in expressions.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_api.h | 16 ++++++++--------
drivers/net/e1000/base/e1000_hw.h | 2 +-
drivers/net/e1000/base/e1000_regs.h | 4 ++--
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_api.h b/drivers/net/e1000/base/e1000_api.h
index 563d0ca..0bc471d 100644
--- a/drivers/net/e1000/base/e1000_api.h
+++ b/drivers/net/e1000/base/e1000_api.h
@@ -124,14 +124,14 @@ u32 e1000_translate_register_82542(u32 reg);
* TBI_ACCEPT macro definition:
*
* This macro requires:
- * adapter = a pointer to struct e1000_hw
+ * a = a pointer to struct e1000_hw
* status = the 8 bit status field of the Rx descriptor with EOP set
- * error = the 8 bit error field of the Rx descriptor with EOP set
+ * errors = the 8 bit error field of the Rx descriptor with EOP set
* length = the sum of all the length fields of the Rx descriptors that
* make up the current frame
* last_byte = the last byte of the frame DMAed by the hardware
- * max_frame_length = the maximum frame length we want to accept.
- * min_frame_length = the minimum frame length we want to accept.
+ * min_frame_size = the minimum frame length we want to accept.
+ * max_frame_size = the maximum frame length we want to accept.
*
* This macro is a conditional that should be used in the interrupt
* handler's Rx processing routine when RxErrors have been detected.
@@ -157,10 +157,10 @@ u32 e1000_translate_register_82542(u32 reg);
(((errors) & E1000_RXD_ERR_FRAME_ERR_MASK) == E1000_RXD_ERR_CE) && \
((last_byte) == CARRIER_EXTENSION) && \
(((status) & E1000_RXD_STAT_VP) ? \
- (((length) > (min_frame_size - VLAN_TAG_SIZE)) && \
- ((length) <= (max_frame_size + 1))) : \
- (((length) > min_frame_size) && \
- ((length) <= (max_frame_size + VLAN_TAG_SIZE + 1)))))
+ (((length) > ((min_frame_size) - VLAN_TAG_SIZE)) && \
+ ((length) <= ((max_frame_size) + 1))) : \
+ (((length) > (min_frame_size)) && \
+ ((length) <= ((max_frame_size) + VLAN_TAG_SIZE + 1)))))
#define E1000_MAX(a, b) ((a) > (b) ? (a) : (b))
#define E1000_DIVIDE_ROUND_UP(a, b) (((a) + (b) - 1) / (b)) /* ceil(a/b) */
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index f06be0c..fd48104 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -785,7 +785,7 @@ struct e1000_mac_info {
u16 uta_reg_count;
/* Maximum size of the MTA register table in all supported adapters */
- #define MAX_MTA_REG 128
+#define MAX_MTA_REG 128
u32 mta_shadow[MAX_MTA_REG];
u16 rar_entry_count;
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index b9fcdea..2891da3 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -203,7 +203,7 @@ POSSIBILITY OF SUCH DAMAGE.
/* Queues fetch arbitration priority control register */
#define E1000_I210_TQAVARBCTRL 0x3574
/* Queues priority masks where _n and _p can be 0-3. */
-#define E1000_TQAVARBCTRL_QUEUE_PRI(_n, _p) ((_p) << (2 * _n))
+#define E1000_TQAVARBCTRL_QUEUE_PRI(_n, _p) ((_p) << (2 * (_n)))
/* QAV Tx mode control registers where _n can be 0 or 1. */
#define E1000_I210_TQAVCC(_n) (0x3004 + 0x40 * (_n))
@@ -216,7 +216,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PQGPTC(_n) (0x010014 + (0x100 * (_n)))
/* Queues packet buffer size masks where _n can be 0-3 and _s 0-63 [kB] */
-#define E1000_I210_TXPBS_SIZE(_n, _s) ((_s) << (6 * _n))
+#define E1000_I210_TXPBS_SIZE(_n, _s) ((_s) << (6 * (_n)))
#define E1000_MMDAC 13 /* MMD Access Control */
#define E1000_MMDAAD 14 /* MMD Access Address/Data */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 16/34] e1000/base: add flags to set eee advertisement modes
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (14 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 15/34] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 17/34] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
` (20 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
!!! REQUIRES DRIVER CHANGES !!!
Change e1000_set_eee_i350 and e1000_set_eee_i354 to have flags allowing
changes in the advertised EEE speeds.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 34 +++++++++++++++++++++++++++-------
drivers/net/e1000/base/e1000_82575.h | 4 ++--
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 3bdcf69..81e6011 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -2893,13 +2893,14 @@ out:
/**
* e1000_set_eee_i350 - Enable/disable EEE support
* @hw: pointer to the HW structure
+ * @adv1g: boolean flag enabling 1G EEE advertisement
+ * @adv100m: boolean flag enabling 100M EEE advertisement
*
* Enable/disable EEE based on setting in dev_spec structure.
*
**/
-s32 e1000_set_eee_i350(struct e1000_hw *hw)
+s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M)
{
- s32 ret_val = E1000_SUCCESS;
u32 ipcnfg, eeer;
DEBUGFUNC("e1000_set_eee_i350");
@@ -2914,7 +2915,16 @@ s32 e1000_set_eee_i350(struct e1000_hw *hw)
if (!(hw->dev_spec._82575.eee_disable)) {
u32 eee_su = E1000_READ_REG(hw, E1000_EEE_SU);
- ipcnfg |= (E1000_IPCNFG_EEE_1G_AN | E1000_IPCNFG_EEE_100M_AN);
+ if (adv100M)
+ ipcnfg |= E1000_IPCNFG_EEE_100M_AN;
+ else
+ ipcnfg &= ~E1000_IPCNFG_EEE_100M_AN;
+
+ if (adv1G)
+ ipcnfg |= E1000_IPCNFG_EEE_1G_AN;
+ else
+ ipcnfg &= ~E1000_IPCNFG_EEE_1G_AN;
+
eeer |= (E1000_EEER_TX_LPI_EN | E1000_EEER_RX_LPI_EN |
E1000_EEER_LPI_FC);
@@ -2932,17 +2942,19 @@ s32 e1000_set_eee_i350(struct e1000_hw *hw)
E1000_READ_REG(hw, E1000_EEER);
out:
- return ret_val;
+ return E1000_SUCCESS;
}
/**
* e1000_set_eee_i354 - Enable/disable EEE support
* @hw: pointer to the HW structure
+ * @adv1g: boolean flag enabling 1G EEE advertisement
+ * @adv100m: boolean flag enabling 100M EEE advertisement
*
* Enable/disable EEE legacy mode based on setting in dev_spec structure.
*
**/
-s32 e1000_set_eee_i354(struct e1000_hw *hw)
+s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val = E1000_SUCCESS;
@@ -2984,8 +2996,16 @@ s32 e1000_set_eee_i354(struct e1000_hw *hw)
if (ret_val)
goto out;
- phy_data |= E1000_EEE_ADV_100_SUPPORTED |
- E1000_EEE_ADV_1000_SUPPORTED;
+ if (adv100M)
+ phy_data |= E1000_EEE_ADV_100_SUPPORTED;
+ else
+ phy_data &= ~E1000_EEE_ADV_100_SUPPORTED;
+
+ if (adv1G)
+ phy_data |= E1000_EEE_ADV_1000_SUPPORTED;
+ else
+ phy_data &= ~E1000_EEE_ADV_1000_SUPPORTED;
+
ret_val = e1000_write_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354,
E1000_EEE_ADV_DEV_I354,
phy_data);
diff --git a/drivers/net/e1000/base/e1000_82575.h b/drivers/net/e1000/base/e1000_82575.h
index 0c8a464..7a46ceb 100644
--- a/drivers/net/e1000/base/e1000_82575.h
+++ b/drivers/net/e1000/base/e1000_82575.h
@@ -494,8 +494,8 @@ void e1000_rlpml_set_vf(struct e1000_hw *, u16);
s32 e1000_promisc_set_vf(struct e1000_hw *, enum e1000_promisc_type type);
u16 e1000_rxpbs_adjust_82580(u32 data);
s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data);
-s32 e1000_set_eee_i350(struct e1000_hw *);
-s32 e1000_set_eee_i354(struct e1000_hw *);
+s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M);
+s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M);
s32 e1000_get_eee_status_i354(struct e1000_hw *, bool *);
s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw);
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 17/34] e1000/base: prevent ulp flow if cable connected
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (15 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 16/34] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 18/34] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
` (19 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Enabling ulp on link down when cable is connect caused an infinite
loop of linkup/down indications in the NDIS driver.
After discussed, correct flow is to enable ULP only when cable is
disconnected.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 228d4c5..5077a3f 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1089,6 +1089,9 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
(E1000_READ_REG(hw, E1000_FEXT) &
E1000_FEXT_PHY_CABLE_DISCONNECTED) ? "" : "not",
i * 50);
+ if (!(E1000_READ_REG(hw, E1000_FEXT) &
+ E1000_FEXT_PHY_CABLE_DISCONNECTED))
+ return 0;
}
if (E1000_READ_REG(hw, E1000_FWSM) & E1000_ICH_FWSM_FW_VALID) {
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 18/34] e1000/base: fix TIPG value for non 10 half duplex mode
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (16 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 17/34] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 19/34] e1000/base: add return value for resume workaround Wenzhuo Lu
` (18 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
TIPG value is increased when setting speed to 10 half to prevent
packet loss. However, it was never decreased again when speed
changes. This caused performance issues in the NDIS driver.
Fix this to restore TIPG to default value on non 10 half.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 49 +++++++++++++++++++---------------
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 5077a3f..4ffaeef 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1392,7 +1392,8 @@ out:
STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;
- s32 ret_val;
+ s32 ret_val, tipg_reg = 0;
+ u16 emi_addr, emi_val = 0;
bool link = false;
u16 phy_reg;
@@ -1442,32 +1443,38 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
*/
if (((hw->mac.type == e1000_pch2lan) ||
(hw->mac.type == e1000_pch_lpt)) && link) {
- u32 reg;
- reg = E1000_READ_REG(hw, E1000_STATUS);
- if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) {
- u16 emi_addr;
+ u16 speed, duplex;
- reg = E1000_READ_REG(hw, E1000_TIPG);
- reg &= ~E1000_TIPG_IPGT_MASK;
- reg |= 0xFF;
- E1000_WRITE_REG(hw, E1000_TIPG, reg);
+ e1000_get_speed_and_duplex_copper_generic(hw, &speed, &duplex);
+ tipg_reg = E1000_READ_REG(hw, E1000_TIPG);
+ tipg_reg &= ~E1000_TIPG_IPGT_MASK;
+ if (duplex == HALF_DUPLEX && speed == SPEED_10) {
+ tipg_reg |= 0xFF;
/* Reduce Rx latency in analog PHY */
- ret_val = hw->phy.ops.acquire(hw);
- if (ret_val)
- return ret_val;
+ emi_val = 0;
+ } else {
+ /* Roll back the default values */
+ tipg_reg |= 0x08;
+ emi_val = 1;
+ }
- if (hw->mac.type == e1000_pch2lan)
- emi_addr = I82579_RX_CONFIG;
- else
- emi_addr = I217_RX_CONFIG;
- ret_val = e1000_write_emi_reg_locked(hw, emi_addr, 0);
+ E1000_WRITE_REG(hw, E1000_TIPG, tipg_reg);
- hw->phy.ops.release(hw);
+ ret_val = hw->phy.ops.acquire(hw);
+ if (ret_val)
+ return ret_val;
- if (ret_val)
- return ret_val;
- }
+ if (hw->mac.type == e1000_pch2lan)
+ emi_addr = I82579_RX_CONFIG;
+ else
+ emi_addr = I217_RX_CONFIG;
+ ret_val = e1000_write_emi_reg_locked(hw, emi_addr, emi_val);
+
+ hw->phy.ops.release(hw);
+
+ if (ret_val)
+ return ret_val;
}
/* Work-around I218 hang issue */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 19/34] e1000/base: add return value for resume workaround
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (17 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 18/34] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 20/34] e1000/base: fix link detect flow Wenzhuo Lu
` (17 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Add u32 return value to function e1000_resume_workarounds_pchlan,
so that calling function can detect PHY access failure during resuming
flow.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 11 ++++++-----
drivers/net/e1000/base/e1000_ich8lan.h | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 4ffaeef..5635dd5 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -4943,19 +4943,18 @@ out:
* the PHY.
* On i217, setup Intel Rapid Start Technology.
**/
-void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
+u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
{
s32 ret_val;
DEBUGFUNC("e1000_resume_workarounds_pchlan");
-
if (hw->mac.type < e1000_pch2lan)
- return;
+ return E1000_SUCCESS;
ret_val = e1000_init_phy_workarounds_pchlan(hw);
if (ret_val) {
DEBUGOUT1("Failed to init PHY flow ret_val=%d\n", ret_val);
- return;
+ return ret_val;
}
/* For i217 Intel Rapid Start Technology support when the system
@@ -4969,7 +4968,7 @@ void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
ret_val = hw->phy.ops.acquire(hw);
if (ret_val) {
DEBUGOUT("Failed to setup iRST\n");
- return;
+ return ret_val;
}
/* Clear Auto Enable LPI after link up */
@@ -5003,7 +5002,9 @@ release:
if (ret_val)
DEBUGOUT1("Error %d in resume workarounds\n", ret_val);
hw->phy.ops.release(hw);
+ return ret_val;
}
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index c690d9e..130627c 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -300,7 +300,7 @@ void e1000_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw);
void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw);
void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw);
-void e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
+u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw);
s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 20/34] e1000/base: fix link detect flow
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (18 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 19/34] e1000/base: add return value for resume workaround Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 21/34] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
` (16 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
In case that auto-negotiate is not enabled, call
e1000_setup_copper_link_generic instead of e1000_phy_setup_autoneg.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 5635dd5..d10c5d8 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1254,10 +1254,15 @@ s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
/* Restore link speed advertisements and restart
* Auto-negotiation
*/
- ret_val = e1000_phy_setup_autoneg(hw);
- if (ret_val)
- goto out;
-
+ if (hw->mac.autoneg) {
+ ret_val = e1000_phy_setup_autoneg(hw);
+ if (ret_val)
+ goto out;
+ } else {
+ ret_val = e1000_setup_copper_link_generic(hw);
+ if (ret_val)
+ goto out;
+ }
ret_val = e1000_oem_bits_config_ich8lan(hw, true);
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 21/34] e1000/base: cleanup NAHUM6LP_HW tags
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (19 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 20/34] e1000/base: fix link detect flow Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 22/34] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
` (15 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Remove all NAHUM6LP_HW tags.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_hw.h | 6 +++---
drivers/net/e1000/base/e1000_ich8lan.c | 9 +++++----
drivers/net/e1000/base/e1000_ich8lan.h | 29 ++++++++++++++---------------
drivers/net/e1000/base/e1000_osdep.h | 1 -
drivers/net/e1000/base/e1000_regs.h | 4 ++--
5 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index fd48104..e4e4f76 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -935,7 +935,7 @@ struct e1000_shadow_ram {
#define E1000_SHADOW_RAM_WORDS 2048
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
/* I218 PHY Ultra Low Power (ULP) states */
enum e1000_ulp_state {
e1000_ulp_state_unknown,
@@ -943,7 +943,7 @@ enum e1000_ulp_state {
e1000_ulp_state_on,
};
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
struct e1000_dev_spec_ich8lan {
bool kmrn_lock_loss_workaround_enabled;
struct e1000_shadow_ram shadow_ram[E1000_SHADOW_RAM_WORDS];
@@ -952,7 +952,7 @@ struct e1000_dev_spec_ich8lan {
bool nvm_k1_enabled;
bool eee_disable;
u16 eee_lp_ability;
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
enum e1000_ulp_state ulp_state;
#endif /* NAHUM6LP_HW && ULP_SUPPORT */
u16 lat_enc;
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index d10c5d8..782da2a 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -311,13 +311,13 @@ STATIC s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
*/
e1000_gate_hw_phy_config_ich8lan(hw, true);
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
/* It is not possible to be certain of the current state of ULP
* so forcibly disable it.
*/
hw->dev_spec.ich8lan.ulp_state = e1000_ulp_state_unknown;
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
ret_val = hw->phy.ops.acquire(hw);
if (ret_val) {
DEBUGOUT("Failed to initialize PHY flow\n");
@@ -758,6 +758,7 @@ STATIC s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
/* multicast address update for pch2 */
mac->ops.update_mc_addr_list =
e1000_update_mc_addr_list_pch2lan;
+ /* fall-through */
#endif
case e1000_pchlan:
#if defined(QV_RELEASE) || !defined(NO_PCH_LPT_B0_SUPPORT)
@@ -1047,7 +1048,7 @@ update_fextnvm6:
return ret_val;
}
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
/**
* e1000_enable_ulp_lpt_lp - configure Ultra Low Power mode for LynxPoint-LP
* @hw: pointer to the HW structure
@@ -1385,7 +1386,7 @@ out:
return ret_val;
}
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
/**
* e1000_check_for_copper_link_ich8lan - Check for link (Copper)
* @hw: pointer to the HW structure
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index 130627c..f5d8ab1 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -69,22 +69,22 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FWSM_WLOCK_MAC_MASK 0x0380
#define E1000_FWSM_WLOCK_MAC_SHIFT 7
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FWSM_ULP_CFG_DONE 0x00000400 /* Low power cfg done */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
/* Shared Receive Address Registers */
#define E1000_SHRAL_PCH_LPT(_i) (0x05408 + ((_i) * 8))
#define E1000_SHRAH_PCH_LPT(_i) (0x0540C + ((_i) * 8))
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_H2ME 0x05B50 /* Host to ME */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_H2ME_ULP 0x00000800 /* ULP Indication Bit */
#define E1000_H2ME_ENFORCE_SETTINGS 0x00001000 /* Enforce Settings */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define ID_LED_DEFAULT_ICH8LAN ((ID_LED_DEF1_DEF2 << 12) | \
(ID_LED_OFF1_OFF2 << 8) | \
(ID_LED_OFF1_ON2 << 4) | \
@@ -97,11 +97,11 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_ICH8_LAN_INIT_TIMEOUT 1500
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
/* FEXT register bit definition */
#define E1000_FEXT_PHY_CABLE_DISCONNECTED 0x00000004
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define E1000_FEXTNVM_SW_CONFIG 1
#define E1000_FEXTNVM_SW_CONFIG_ICH8M (1 << 27) /* different on ICH8M */
@@ -115,10 +115,9 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
-
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
#define E1000_ICH_RAR_ENTRIES 7
@@ -185,7 +184,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define CV_SMB_CTRL PHY_REG(769, 23)
#define CV_SMB_CTRL_FORCE_SMBUS 0x0001
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
/* I218 Ultra Low Power Configuration 1 Register */
#define I218_ULP_CONFIG1 PHY_REG(779, 16)
#define I218_ULP_CONFIG1_START 0x0001 /* Start auto ULP config */
@@ -196,7 +195,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define I218_ULP_CONFIG1_RESET_TO_SMBUS 0x0100 /* Reset to SMBus mode */
#define I218_ULP_CONFIG1_DISABLE_SMB_PERST 0x1000 /* Disable on PERST# */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
/* SMBus Address Phy Register */
#define HV_SMB_ADDR PHY_REG(768, 26)
#define HV_SMB_ADDR_MASK 0x007F
@@ -307,9 +306,9 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data);
s32 e1000_write_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 data);
s32 e1000_set_eee_pchlan(struct e1000_hw *hw);
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx);
s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force);
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
#endif /* _E1000_ICH8LAN_H_ */
void e1000_demote_ltr(struct e1000_hw *hw, bool demote, bool link);
diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h
index d04ec73..b2c76e3 100644
--- a/drivers/net/e1000/base/e1000_osdep.h
+++ b/drivers/net/e1000/base/e1000_osdep.h
@@ -118,7 +118,6 @@ static inline uint32_t e1000_read_addr(volatile void* addr)
ADVERTISE_10_FULL | ADVERTISE_100_FULL | ADVERTISE_1000_FULL)
#define M88E1543_E_PHY_ID 0x01410EA0
-#define NAHUM6LP_HW
#define ULP_SUPPORT
#define E1000_RCTL_DTYP_MASK 0x00000C00 /* Descriptor type mask */
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 2891da3..5178e49 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -58,9 +58,9 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_SCTL 0x00024 /* SerDes Control - RW */
#define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */
#define E1000_FCAH 0x0002C /* Flow Control Address High -RW */
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXT 0x0002C /* Future Extended - RW */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define E1000_FEXTNVM 0x00028 /* Future Extended NVM - RW */
#define E1000_FEXTNVM3 0x0003C /* Future Extended NVM 3 - RW */
#define E1000_FEXTNVM4 0x00024 /* Future Extended NVM 4 - RW */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 22/34] e1000/base: add bit for disable packetbuffer read
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (20 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 21/34] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 23/34] e1000/base: K1 flow fixes Wenzhuo Lu
` (14 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Added bit FEXTNVM7[18], that controls disabling MAC packet buffer read.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index f5d8ab1..f7f66a4 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -115,6 +115,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
+/* bit for disabling packet buffer read */
+#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 23/34] e1000/base: K1 flow fixes
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (21 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 22/34] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 24/34] e1000/base: remove FIXME comment Wenzhuo Lu
` (13 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
This patch is for the following updates to the K1 configurations:
Tx idle period for entering K1 should be 128 ns.
Minimum Tx idle period in K1 should be 256 ns.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 47 +++++++++++++++++++++++++++++++++-
drivers/net/e1000/base/e1000_ich8lan.h | 5 +++-
drivers/net/e1000/base/e1000_phy.h | 7 +++++
drivers/net/e1000/base/e1000_regs.h | 1 +
4 files changed, 58 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 782da2a..56e20b4 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1492,10 +1492,14 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
if (ret_val)
return ret_val;
}
-
/* Clear link partner's EEE ability */
hw->dev_spec.ich8lan.eee_lp_ability = 0;
+ /* Configure K0s minimum time */
+ if (hw->mac.type == e1000_pch_lpt) {
+ e1000_configure_k0s_lpt(hw, K1_ENTRY_LATENCY, K1_MIN_TIME);
+ }
+
if (!link)
return E1000_SUCCESS; /* No link detected */
@@ -5298,3 +5302,44 @@ release:
}
}
+/**
+ * e1000_configure_k0s_lpt - Configure K0s power state
+ * @hw: pointer to the HW structure
+ * @entry_latency: Tx idle period for entering K0s - valid values are 0 to 3.
+ * 0 corresponds to 128ns, each value over 0 doubles the duration.
+ * @min_time: Minimum Tx idle period allowed - valid values are 0 to 4.
+ * 0 corresponds to 128ns, each value over 0 doubles the duration.
+ *
+ * Configure the K1 power state based on the provided parameter.
+ * Assumes semaphore already acquired.
+ *
+ * Success returns 0, Failure returns:
+ * -E1000_ERR_PHY (-2) in case of access error
+ * -E1000_ERR_PARAM (-4) in case of parameters error
+ **/
+s32 e1000_configure_k0s_lpt(struct e1000_hw *hw, u8 entry_latency, u8 min_time)
+{
+ s32 ret_val;
+ u16 kmrn_reg = 0;
+
+ DEBUGFUNC("e1000_configure_k0s_lpt");
+
+ if (entry_latency > 3 || min_time > 4)
+ return -E1000_ERR_PARAM;
+
+ ret_val = e1000_read_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K0S_CTRL,
+ &kmrn_reg);
+ if (ret_val)
+ return ret_val;
+
+ /* for now don't touch the latency */
+ kmrn_reg &= ~(E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_MASK);
+ kmrn_reg |= ((min_time << E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_SHIFT));
+
+ ret_val = e1000_write_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K0S_CTRL,
+ kmrn_reg);
+ if (ret_val)
+ return ret_val;
+
+ return E1000_SUCCESS;
+}
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index f7f66a4..c54e4e7 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -114,7 +114,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
-
+#define E1000_FEXTNVM6_K1_OFF_ENABLE 0x80000000
/* bit for disabling packet buffer read */
#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
@@ -181,6 +181,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_NVM_K1_CONFIG 0x1B /* NVM K1 Config Word */
#define E1000_NVM_K1_ENABLE 0x1 /* NVM Enable K1 bit */
+#define K1_ENTRY_LATENCY 0
+#define K1_MIN_TIME 1
/* SMBus Control Phy Register */
#define CV_SMB_CTRL PHY_REG(769, 23)
@@ -303,6 +305,7 @@ void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw);
void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw);
u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
+s32 e1000_configure_k0s_lpt(struct e1000_hw *hw, u8 entry_latency, u8 min_time);
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw);
s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data);
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index 2b78af0..3e45a9e 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -274,6 +274,13 @@ bool e1000_is_mphy_ready(struct e1000_hw *hw);
#define E1000_KMRNCTRLSTA_K1_CONFIG 0x7
#define E1000_KMRNCTRLSTA_K1_ENABLE 0x0002 /* enable K1 */
#define E1000_KMRNCTRLSTA_HD_CTRL 0x10 /* Kumeran HD Control */
+#define E1000_KMRNCTRLSTA_K0S_CTRL 0x1E /* Kumeran K0s Control */
+#define E1000_KMRNCTRLSTA_K0S_CTRL_ENTRY_LTNCY_SHIFT 0
+#define E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_SHIFT 4
+#define E1000_KMRNCTRLSTA_K0S_CTRL_ENTRY_LTNCY_MASK \
+ (3 << E1000_KMRNCTRLSTA_K0S_CTRL_ENTRY_LTNCY_SHIFT)
+#define E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_MASK \
+ (7 << E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_SHIFT)
#define E1000_KMRNCTRLSTA_OP_MODES 0x1F /* Kumeran Modes of Operation */
#define E1000_KMRNCTRLSTA_OP_MODES_LSC2CSC 0x0002 /* change LSC to CSC */
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 5178e49..e23e1e8 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -66,6 +66,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM4 0x00024 /* Future Extended NVM 4 - RW */
#define E1000_FEXTNVM6 0x00010 /* Future Extended NVM 6 - RW */
#define E1000_FEXTNVM7 0x000E4 /* Future Extended NVM 7 - RW */
+#define E1000_PCIEANACFG 0x00F18 /* PCIE Analog Config */
#define E1000_FCT 0x00030 /* Flow Control Type - RW */
#define E1000_CONNSW 0x00034 /* Copper/Fiber switch control - RW */
#define E1000_VET 0x00038 /* VLAN Ether Type - RW */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 24/34] e1000/base: remove FIXME comment
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (22 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 23/34] e1000/base: K1 flow fixes Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 25/34] e1000/base: set correct value of beacon duration Wenzhuo Lu
` (12 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
The "FIXME" comment is revomed from e1000_acquire_swfw_sync_80003es2lan
but forgotten being removed from e1000_acquire_swfw_sync_82575 while
the similar changes were made to both.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 81e6011..511636a 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -1050,7 +1050,7 @@ STATIC s32 e1000_acquire_swfw_sync_82575(struct e1000_hw *hw, u16 mask)
u32 swmask = mask;
u32 fwmask = mask << 16;
s32 ret_val = E1000_SUCCESS;
- s32 i = 0, timeout = 200; /* FIXME: find real value to use here */
+ s32 i = 0, timeout = 200;
DEBUGFUNC("e1000_acquire_swfw_sync_82575");
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 25/34] e1000/base: set correct value of beacon duration
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (23 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 24/34] e1000/base: remove FIXME comment Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 26/34] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
` (11 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Fix for I217 Packet Loss issue - The Management Engine sets the FEXTNVM4
Beacon Duration incorrectly. This fix ensures that the correct value will
always be set. Correct value for this field is 8 usec.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 56e20b4..7b7c631 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1483,6 +1483,20 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
return ret_val;
}
+ /* I217 Packet Loss issue:
+ * ensure that FEXTNVM4 Beacon Duration is set correctly
+ * on power up.
+ * Set the Beacon Duration for I217 to 8 usec
+ */
+ if (hw->mac.type == e1000_pch_lpt) {
+ u32 mac_reg;
+
+ mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM4);
+ mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK;
+ mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_8USEC;
+ E1000_WRITE_REG(hw, E1000_FEXTNVM4, mac_reg);
+ }
+
/* Work-around I218 hang issue */
if ((hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
(hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 26/34] e1000/base: disable extension header parsing for IPv6
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (24 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 25/34] e1000/base: set correct value of beacon duration Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 27/34] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
` (10 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
All 1G Server products need to have IPv6 extension headers turned off.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 511636a..e170353 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -2125,7 +2125,7 @@ STATIC void e1000_clear_hw_cntrs_82575(struct e1000_hw *hw)
* e1000_rx_fifo_flush_82575 - Clean rx fifo after Rx enable
* @hw: pointer to the HW structure
*
- * After rx enable if managability is enabled then there is likely some
+ * After Rx enable, if manageability is enabled then there is likely some
* bad data at the start of the fifo and possibly in the DMA fifo. This
* function clears the fifos and flushes any packets that came in as rx was
* being enabled.
@@ -2135,7 +2135,13 @@ void e1000_rx_fifo_flush_82575(struct e1000_hw *hw)
u32 rctl, rlpml, rxdctl[4], rfctl, temp_rctl, rx_enabled;
int i, ms_wait;
- DEBUGFUNC("e1000_rx_fifo_workaround_82575");
+ DEBUGFUNC("e1000_rx_fifo_flush_82575");
+
+ /* disable IPv6 options as per hardware errata */
+ rfctl = E1000_READ_REG(hw, E1000_RFCTL);
+ rfctl |= E1000_RFCTL_IPV6_EX_DIS;
+ E1000_WRITE_REG(hw, E1000_RFCTL, rfctl);
+
if (hw->mac.type != e1000_82575 ||
!(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN))
return;
@@ -2163,7 +2169,6 @@ void e1000_rx_fifo_flush_82575(struct e1000_hw *hw)
* incoming packets are rejected. Set enable and wait 2ms so that
* any packet that was coming in as RCTL.EN was set is flushed
*/
- rfctl = E1000_READ_REG(hw, E1000_RFCTL);
E1000_WRITE_REG(hw, E1000_RFCTL, rfctl & ~E1000_RFCTL_LEF);
rlpml = E1000_READ_REG(hw, E1000_RLPML);
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 27/34] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (25 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 26/34] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 28/34] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
` (9 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
e1000_check_for_link_media_swap() is supposed to check PHY page 0 for
copper and PHY page 1 for "other" (fiber) link. We switched back from
page 1 to page 0 too soon, before e1000_check_for_link_82575() is
executed and we were never finding link on fiber (other).
Note: The precedence of link type is controlled by the PHY settings.
If the link is copper, as the M88E1112 page address is set to 1, it should be
set back to 0 before checking this link.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index e170353..4374eab 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -1234,7 +1234,7 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
DEBUGFUNC("e1000_check_for_link_media_swap");
- /* Check the copper medium. */
+ /* Check for copper. */
ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
if (ret_val)
return ret_val;
@@ -1246,7 +1246,7 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
if (data & E1000_M88E1112_STATUS_LINK)
port = E1000_MEDIA_PORT_COPPER;
- /* Check the other medium. */
+ /* Check for other. */
ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 1);
if (ret_val)
return ret_val;
@@ -1255,11 +1255,6 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
if (ret_val)
return ret_val;
- /* reset page to 0 */
- ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
- if (ret_val)
- return ret_val;
-
if (data & E1000_M88E1112_STATUS_LINK)
port = E1000_MEDIA_PORT_OTHER;
@@ -1267,8 +1262,20 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
if (port && (hw->dev_spec._82575.media_port != port)) {
hw->dev_spec._82575.media_port = port;
hw->dev_spec._82575.media_changed = true;
+ }
+
+ if (port == E1000_MEDIA_PORT_COPPER) {
+ /* reset page to 0 */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
+ if (ret_val)
+ return ret_val;
+ e1000_check_for_link_82575(hw);
} else {
- ret_val = e1000_check_for_link_82575(hw);
+ e1000_check_for_link_82575(hw);
+ /* reset page to 0 */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
+ if (ret_val)
+ return ret_val;
}
return E1000_SUCCESS;
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 28/34] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (26 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 27/34] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 29/34] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
` (8 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Previously, in check_reset_block RSPCIPHY was polled for 100 ms before determining
that the ME veto is set. This needed to be increased to 300 ms.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 7b7c631..70eba71 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1991,7 +1991,7 @@ STATIC s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw)
continue;
}
blocked = false;
- } while (blocked && (i++ < 10));
+ } while (blocked && (i++ < 30));
return blocked ? E1000_BLK_PHY_RESET : E1000_SUCCESS;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 29/34] e1000/base: implement 88E1543 PHY initialization
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (27 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 28/34] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 30/34] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
` (7 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
The initializtion process for 88E1543 PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 106 ++++++++++++++++++++++++++++++++-
drivers/net/e1000/base/e1000_82575.h | 1 +
drivers/net/e1000/base/e1000_defines.h | 1 +
3 files changed, 107 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 4374eab..723885d 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -277,6 +277,11 @@ STATIC s32 e1000_init_phy_params_82575(struct e1000_hw *hw)
if (ret_val)
goto out;
}
+ if (phy->id == M88E1543_E_PHY_ID) {
+ ret_val = e1000_initialize_M88E1543_phy(hw);
+ if (ret_val)
+ goto out;
+ }
break;
case IGP03E1000_E_PHY_ID:
case IGP04E1000_E_PHY_ID:
@@ -2817,7 +2822,7 @@ s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data)
* e1000_initialize_M88E1512_phy - Initialize M88E1512 PHY
* @hw: pointer to the HW structure
*
- * Initialize Marverl 1512 to work correctly with Avoton.
+ * Initialize Marvell 1512 to work correctly with Avoton.
**/
s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw)
{
@@ -2903,6 +2908,105 @@ out:
}
/**
+ * e1000_initialize_M88E1543_phy - Initialize M88E1543 PHY
+ * @hw: pointer to the HW structure
+ *
+ * Initialize Marvell 1543 to work correctly with Avoton.
+ **/
+s32 e1000_initialize_M88E1543_phy(struct e1000_hw *hw)
+{
+ struct e1000_phy_info *phy = &hw->phy;
+ s32 ret_val = E1000_SUCCESS;
+
+ DEBUGFUNC("e1000_initialize_M88E1543_phy");
+
+ /* Check if this is correct PHY. */
+ if (phy->id != M88E1543_E_PHY_ID)
+ goto out;
+
+ /* Switch to PHY page 0xFF. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FF);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x214B);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2144);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x0C28);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2146);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xB233);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x214D);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xDC0C);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2159);
+ if (ret_val)
+ goto out;
+
+ /* Switch to PHY page 0xFB. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FB);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_3, 0xC00D);
+ if (ret_val)
+ goto out;
+
+ /* Switch to PHY page 0x12. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x12);
+ if (ret_val)
+ goto out;
+
+ /* Change mode to SGMII-to-Copper */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_MODE, 0x8001);
+ if (ret_val)
+ goto out;
+
+ /* Switch to PHY page 1. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x1);
+ if (ret_val)
+ goto out;
+
+ /* Change mode to 1000BASE-X/SGMII and autoneg enable; reset */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_FIBER_CTRL, 0x9140);
+ if (ret_val)
+ goto out;
+
+ /* Return the PHY to page 0. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.commit(hw);
+ if (ret_val) {
+ DEBUGOUT("Error committing the PHY changes\n");
+ return ret_val;
+ }
+
+ msec_delay(1000);
+out:
+ return ret_val;
+}
+
+/**
* e1000_set_eee_i350 - Enable/disable EEE support
* @hw: pointer to the HW structure
* @adv1g: boolean flag enabling 1G EEE advertisement
diff --git a/drivers/net/e1000/base/e1000_82575.h b/drivers/net/e1000/base/e1000_82575.h
index 7a46ceb..c498684 100644
--- a/drivers/net/e1000/base/e1000_82575.h
+++ b/drivers/net/e1000/base/e1000_82575.h
@@ -498,6 +498,7 @@ s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M);
s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M);
s32 e1000_get_eee_status_i354(struct e1000_hw *, bool *);
s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw);
+s32 e1000_initialize_M88E1543_phy(struct e1000_hw *hw);
/* I2C SDA and SCL timing parameters for standard mode */
#define E1000_I2C_T_HD_STA 4
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 8e40771..69aa1f2 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -847,6 +847,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_M88E1543_PAGE_ADDR 0x16 /* Page Offset Register */
#define E1000_M88E1543_EEE_CTRL_1 0x0
#define E1000_M88E1543_EEE_CTRL_1_MS 0x0001 /* EEE Master/Slave */
+#define E1000_M88E1543_FIBER_CTRL 0x0 /* Fiber Control Register */
#define E1000_EEE_ADV_DEV_I354 7
#define E1000_EEE_ADV_ADDR_I354 60
#define E1000_EEE_ADV_100_SUPPORTED (1 << 1) /* 100BaseTx EEE Supported */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 30/34] e1000/base: use the correct i210 register for EEMNGCTL
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (28 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 29/34] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 31/34] e1000/base: move the print to the right position Wenzhuo Lu
` (6 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
The i210 has two EEPROM access registers that are located in
non-standard offsets: EEARBC and EEMNGCTL. EEARBC was fixed previously
and EEMNGCTL should also be corrected.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_i210.c | 30 ++++++++++++++++++++++++++++++
drivers/net/e1000/base/e1000_regs.h | 1 +
2 files changed, 31 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index fedf88e..277331c 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -982,6 +982,35 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
}
/**
+ * e1000_get_cfg_done_i210 - Read config done bit
+ * @hw: pointer to the HW structure
+ *
+ * Read the management control register for the config done bit for
+ * completion status. NOTE: silicon which is EEPROM-less will fail trying
+ * to read the config done bit, so an error is *ONLY* logged and returns
+ * E1000_SUCCESS. If we were to return with error, EEPROM-less silicon
+ * would not be able to be reset or change link.
+ **/
+STATIC s32 e1000_get_cfg_done_i210(struct e1000_hw *hw)
+{
+ s32 timeout = PHY_CFG_TIMEOUT;
+ u32 mask = E1000_NVM_CFG_DONE_PORT_0;
+
+ DEBUGFUNC("e1000_get_cfg_done_i210");
+
+ while (timeout) {
+ if (E1000_READ_REG(hw, E1000_EEMNGCTL_I210) & mask)
+ break;
+ msec_delay(1);
+ timeout--;
+ }
+ if (!timeout)
+ DEBUGOUT("MNG configuration cycle has not completed.\n");
+
+ return E1000_SUCCESS;
+}
+
+/**
* e1000_init_hw_i210 - Init hw for I210/I211
* @hw: pointer to the HW structure
*
@@ -998,6 +1027,7 @@ s32 e1000_init_hw_i210(struct e1000_hw *hw)
if (ret_val != E1000_SUCCESS)
return ret_val;
}
+ hw->phy.ops.get_cfg_done = e1000_get_cfg_done_i210;
ret_val = e1000_init_hw_82575(hw);
return ret_val;
}
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index e23e1e8..84531a9 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -110,6 +110,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PBS 0x01008 /* Packet Buffer Size */
#define E1000_PBECCSTS 0x0100C /* Packet Buffer ECC Status - RW */
#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
+#define E1000_EEMNGCTL_I210 0x01010 /* i210 MNG EEprom Mode Control */
#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
#define E1000_EEARBC_I210 0x12024 /* EEPROM Auto Read Bus Control */
#define E1000_FLASHT 0x01028 /* FLASH Timer Register */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 31/34] e1000/base: move the print to the right position
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (29 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 30/34] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 32/34] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
` (5 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
This info need not to be always printed. Move it into the if.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_phy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index 6bbb379..d43b7ce 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -1833,9 +1833,9 @@ s32 e1000_phy_force_speed_duplex_m88(struct e1000_hw *hw)
phy_data);
if (ret_val)
return ret_val;
- }
- DEBUGOUT1("M88E1000 PSCR: %X\n", phy_data);
+ DEBUGOUT1("M88E1000 PSCR: %X\n", phy_data);
+ }
ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
if (ret_val)
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 32/34] e1000/base: synchronization of MAC-PHY interface only on non- ME systems
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (30 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 31/34] e1000/base: move the print to the right position Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 33/34] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
` (4 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
On power up, the MAC - PHY interface needs to be set to PCIe, even if
cable is disconnected. In ME systems, the ME handles this on exit from
Sx(Sticky mode) state. In non-ME, the driver handles it. Added a check
for non-ME system to the driver code that handles that.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 70eba71..6dc053f 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -234,15 +234,19 @@ STATIC bool e1000_phy_is_accessible_pchlan(struct e1000_hw *hw)
return false;
out:
if (hw->mac.type == e1000_pch_lpt) {
- /* Unforce SMBus mode in PHY */
- hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg);
- phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
- hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg);
+ /* Only unforce SMBus if ME is not active */
+ if (!(E1000_READ_REG(hw, E1000_FWSM) &
+ E1000_ICH_FWSM_FW_VALID)) {
+ /* Unforce SMBus mode in PHY */
+ hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg);
+ phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
+ hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg);
- /* Unforce SMBus mode in MAC */
- mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT);
- mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
- E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg);
+ /* Unforce SMBus mode in MAC */
+ mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT);
+ mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
+ E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg);
+ }
}
return true;
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 33/34] e1000/base: fix to enable both ulp and EEE in Sx state
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (31 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 32/34] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 34/34] e1000/base: some minor change Wenzhuo Lu
` (3 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
This patch implements a modified flow that allows both ULP and EEE
in Sx(Sticky mode).
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 6dc053f..f62ad0b 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1154,10 +1154,15 @@ skip_smbus:
if (to_sx) {
if (E1000_READ_REG(hw, E1000_WUFC) & E1000_WUFC_LNKC)
phy_reg |= I218_ULP_CONFIG1_WOL_HOST;
+ else
+ phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST;
phy_reg |= I218_ULP_CONFIG1_STICKY_ULP;
+ phy_reg &= ~I218_ULP_CONFIG1_INBAND_EXIT;
} else {
phy_reg |= I218_ULP_CONFIG1_INBAND_EXIT;
+ phy_reg &= ~I218_ULP_CONFIG1_STICKY_ULP;
+ phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST;
}
e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg);
@@ -1178,6 +1183,7 @@ skip_smbus:
mac_reg &= ~E1000_TCTL_EN;
E1000_WRITE_REG(hw, E1000_TCTL, mac_reg);
}
+
release:
hw->phy.ops.release(hw);
out:
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH 34/34] e1000/base: some minor change
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (32 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 33/34] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
@ 2015-10-14 6:34 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (2 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-14 6:34 UTC (permalink / raw)
To: dev
Some minor code change. No functionality impact.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 27 ++++++++++++---------------
drivers/net/e1000/base/e1000_ich8lan.h | 1 +
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index f62ad0b..89d07e9 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1442,7 +1442,6 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
ret_val = e1000_disable_ulp_lpt_lp(hw, false);
else
ret_val = e1000_enable_ulp_lpt_lp(hw, false);
-
if (ret_val)
return ret_val;
}
@@ -2979,7 +2978,6 @@ STATIC s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active)
u16 oem_reg;
DEBUGFUNC("e1000_set_lplu_state_pchlan");
-
ret_val = hw->phy.ops.read_reg(hw, HV_OEM_BITS, &oem_reg);
if (ret_val)
return ret_val;
@@ -3199,6 +3197,7 @@ STATIC s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
struct e1000_nvm_info *nvm = &hw->nvm;
u32 bank1_offset = nvm->flash_bank_size * sizeof(u16);
u32 act_offset = E1000_ICH_NVM_SIG_WORD * 2 + 1;
+ u32 nvm_dword = 0;
u8 sig_byte = 0;
s32 ret_val;
@@ -3506,12 +3505,10 @@ STATIC s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
hsflctl.hsf_ctrl.fldbcount = size - 1;
hsflctl.hsf_ctrl.flcycle = ICH_CYCLE_READ;
E1000_WRITE_FLASH_REG16(hw, ICH_FLASH_HSFCTL, hsflctl.regval);
-
E1000_WRITE_FLASH_REG(hw, ICH_FLASH_FADDR, flash_linear_addr);
- ret_val =
- e1000_flash_cycle_ich8lan(hw,
- ICH_FLASH_READ_COMMAND_TIMEOUT);
+ ret_val = e1000_flash_cycle_ich8lan(hw,
+ ICH_FLASH_READ_COMMAND_TIMEOUT);
/* Check if FCERR is set to 1, if set to 1, clear it
* and try the whole sequence a few more times, else
@@ -3546,6 +3543,7 @@ STATIC s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
return ret_val;
}
+
/**
* e1000_write_nvm_ich8lan - Write word(s) to the NVM
* @hw: pointer to the HW structure
@@ -3599,7 +3597,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
u32 i, act_offset, new_bank_offset, old_bank_offset, bank;
s32 ret_val;
- u16 data;
+ u16 data = 0;
DEBUGFUNC("e1000_update_nvm_checksum_ich8lan");
@@ -3635,12 +3633,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
if (ret_val)
goto release;
}
-
for (i = 0; i < E1000_SHADOW_RAM_WORDS; i++) {
- /* Determine whether to write the value stored
- * in the other NVM bank or a modified value stored
- * in the shadow RAM
- */
if (dev_spec->shadow_ram[i].modified) {
data = dev_spec->shadow_ram[i].value;
} else {
@@ -3650,7 +3643,6 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
if (ret_val)
break;
}
-
/* If the word is 0x13, then make sure the signature bits
* (15:14) are 11b until the commit has completed.
* This will allow us to write 10b which indicates the
@@ -3665,6 +3657,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
act_offset = (i + new_bank_offset) << 1;
usec_delay(100);
+
/* Write the bytes to the new bank. */
ret_val = e1000_retry_write_flash_byte_ich8lan(hw,
act_offset,
@@ -3699,8 +3692,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
goto release;
data &= 0xBFFF;
- ret_val = e1000_retry_write_flash_byte_ich8lan(hw,
- act_offset * 2 + 1,
+ ret_val = e1000_retry_write_flash_byte_ich8lan(hw, act_offset * 2 + 1,
(u8)(data >> 8));
if (ret_val)
goto release;
@@ -3711,7 +3703,9 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
* to 1's. We can write 1's to 0's without an erase
*/
act_offset = (old_bank_offset + E1000_ICH_NVM_SIG_WORD) * 2 + 1;
+
ret_val = e1000_retry_write_flash_byte_ich8lan(hw, act_offset, 0);
+
if (ret_val)
goto release;
@@ -3865,6 +3859,7 @@ STATIC s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
return ret_val;
}
+
/**
* e1000_write_flash_byte_ich8lan - Write a single byte to NVM
* @hw: pointer to the HW structure
@@ -3883,6 +3878,8 @@ STATIC s32 e1000_write_flash_byte_ich8lan(struct e1000_hw *hw, u32 offset,
return e1000_write_flash_data_ich8lan(hw, offset, 1, word);
}
+
+
/**
* e1000_retry_write_flash_byte_ich8lan - Writes a single byte to NVM
* @hw: pointer to the HW structure
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index c54e4e7..33e77fb 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -117,6 +117,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_K1_OFF_ENABLE 0x80000000
/* bit for disabling packet buffer read */
#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
+#define E1000_FEXTNVM7_SIDE_CLK_UNGATE 0x00000004
#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH 02/34] e1000/base: add new devices
2015-10-14 6:34 ` [dpdk-dev] [PATCH 02/34] e1000/base: add new devices Wenzhuo Lu
@ 2015-10-14 16:00 ` Stephen Hemminger
0 siblings, 0 replies; 118+ messages in thread
From: Stephen Hemminger @ 2015-10-14 16:00 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: dev
On Wed, 14 Oct 2015 14:34:07 +0800
Wenzhuo Lu <wenzhuo.lu@intel.com> wrote:
> Add some new i218 devices.
>
> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
> ---
> drivers/net/e1000/base/e1000_api.c | 4 ++++
> drivers/net/e1000/base/e1000_defines.h | 2 ++
> drivers/net/e1000/base/e1000_hw.h | 4 ++++
> drivers/net/e1000/base/e1000_ich8lan.c | 18 ++++++++++++++----
> 4 files changed, 24 insertions(+), 4 deletions(-)
I assume a later patch will add these devices to the DPDK PCI device
list. There are still some issues where base driver supports more
devices than the DPDK list.
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 00/35] update e1000 base code
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (33 preceding siblings ...)
2015-10-14 6:34 ` [dpdk-dev] [PATCH 34/34] e1000/base: some minor change Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and copyright Wenzhuo Lu
` (34 more replies)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
2015-10-19 16:03 ` [dpdk-dev] [PATCH 00/34] update e1000 base driver Thomas Monjalon
36 siblings, 35 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Short summary:
*update readme and copyright
*add new devices
*fix issue with link flap on 82579
*fix issue with jumbo frame CRC failures in client
*redundant PHY power down for i210
*add return value to the functions of setting receive address register
*add defaults for i210 TX/RX PBSIZE
*remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset
*add evaluation of e1000_nvm_read return value
*change invariant return to not use variables
*add return value handler when check manage mode
*add return value handler for ESB2 controller init and reset
*add support for inverted format ETrackId
*add EEARBC_I210 for i210
*apply paranoia to macro arguments
*add flags to set eee advertisement modes
*prevent ulp flow if cable connected
*fix TIPG value for non 10 half duplex mode
*add return value for resume workaround
*fix link detect flow
*cleanup NAHUM6LP_HW tags
*add bit for disable packetbuffer read
*K1 flow fixes
*remove FIXME comment
*set correct value of beacon duration
*disable extension header parsing for IPv6
*fix for i354 88E1112 PHY using AutoMedia Detect
*increase timeout of polling bit RSPCIPHY in check_reset_block
*implement 88E1543 PHY initialization
*use the correct i210 register for EEMNGCTL
*move the print to the right position
*synchronization of MAC-PHY interface only on non- ME systems
*fix to enable both ulp and EEE in Sx state
V2:
Add the new devices to the DPDK PCI device list.
Wenzhuo Lu (35):
e1000/base: update readme and copyright
e1000/base: add new devices
e1000/base: fix issue with link flap on 82579
e1000/base: fix issue with jumbo frame CRC failures in client
e1000/base: redundant PHY power down for i210
e1000/base: add return value to the functions of setting receive
address register
e1000/base: add defaults for i210 TX/RX PBSIZE
e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after
commencing HW reset
e1000/base: add evaluation of e1000_nvm_read return value
e1000/base: change invariant return to not use variables
e1000/base: add return value handler when check manage mode
e1000/base: add return value handler for ESB2 controller init and
reset
e1000/base: add support for inverted format ETrackId
e1000/base: add EEARBC_I210 for i210
e1000/base: apply paranoia to macro arguments
e1000/base: add flags to set eee advertisement modes
e1000/base: prevent ulp flow if cable connected
e1000/base: fix TIPG value for non 10 half duplex mode
e1000/base: add return value for resume workaround
e1000/base: fix link detect flow
e1000/base: cleanup NAHUM6LP_HW tags
e1000/base: add bit for disable packetbuffer read
e1000/base: K1 flow fixes
e1000/base: remove FIXME comment
e1000/base: set correct value of beacon duration
e1000/base: disable extension header parsing for IPv6
e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect
e1000/base: increase timeout of polling bit RSPCIPHY in
check_reset_block
e1000/base: implement 88E1543 PHY initialization
e1000/base: use the correct i210 register for EEMNGCTL
e1000/base: move the print to the right position
e1000/base: synchronization of MAC-PHY interface only on non- ME
systems
e1000/base: fix to enable both ulp and EEE in Sx state
e1000/base: some minor change
e1000: add new devices
drivers/net/e1000/base/README | 4 +-
drivers/net/e1000/base/e1000_80003es2lan.c | 33 ++--
drivers/net/e1000/base/e1000_80003es2lan.h | 2 +-
drivers/net/e1000/base/e1000_82540.c | 2 +-
drivers/net/e1000/base/e1000_82541.c | 2 +-
drivers/net/e1000/base/e1000_82541.h | 2 +-
drivers/net/e1000/base/e1000_82542.c | 8 +-
drivers/net/e1000/base/e1000_82543.c | 2 +-
drivers/net/e1000/base/e1000_82543.h | 2 +-
drivers/net/e1000/base/e1000_82571.c | 8 +-
drivers/net/e1000/base/e1000_82571.h | 2 +-
drivers/net/e1000/base/e1000_82575.c | 205 +++++++++++++++----
drivers/net/e1000/base/e1000_82575.h | 7 +-
drivers/net/e1000/base/e1000_api.c | 12 +-
drivers/net/e1000/base/e1000_api.h | 20 +-
drivers/net/e1000/base/e1000_defines.h | 8 +-
drivers/net/e1000/base/e1000_hw.h | 16 +-
drivers/net/e1000/base/e1000_i210.c | 49 ++++-
drivers/net/e1000/base/e1000_i210.h | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 252 +++++++++++++++++-------
drivers/net/e1000/base/e1000_ich8lan.h | 43 ++--
drivers/net/e1000/base/e1000_mac.c | 14 +-
drivers/net/e1000/base/e1000_mac.h | 4 +-
drivers/net/e1000/base/e1000_manage.c | 7 +-
drivers/net/e1000/base/e1000_manage.h | 2 +-
drivers/net/e1000/base/e1000_mbx.c | 2 +-
drivers/net/e1000/base/e1000_mbx.h | 2 +-
drivers/net/e1000/base/e1000_nvm.c | 11 +-
drivers/net/e1000/base/e1000_nvm.h | 2 +-
drivers/net/e1000/base/e1000_osdep.h | 1 -
drivers/net/e1000/base/e1000_phy.c | 21 +-
drivers/net/e1000/base/e1000_phy.h | 10 +-
drivers/net/e1000/base/e1000_regs.h | 13 +-
drivers/net/e1000/base/e1000_vf.c | 8 +-
drivers/net/e1000/base/e1000_vf.h | 4 +-
lib/librte_eal/common/include/rte_pci_dev_ids.h | 5 +
36 files changed, 559 insertions(+), 228 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and copyright
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 8:30 ` Mcnamara, John
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 02/35] e1000/base: add new devices Wenzhuo Lu
` (33 subsequent siblings)
34 siblings, 1 reply; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/README | 4 ++--
drivers/net/e1000/base/e1000_80003es2lan.c | 2 +-
drivers/net/e1000/base/e1000_80003es2lan.h | 2 +-
drivers/net/e1000/base/e1000_82540.c | 2 +-
drivers/net/e1000/base/e1000_82541.c | 2 +-
drivers/net/e1000/base/e1000_82541.h | 2 +-
drivers/net/e1000/base/e1000_82542.c | 2 +-
drivers/net/e1000/base/e1000_82543.c | 2 +-
drivers/net/e1000/base/e1000_82543.h | 2 +-
drivers/net/e1000/base/e1000_82571.c | 2 +-
drivers/net/e1000/base/e1000_82571.h | 2 +-
drivers/net/e1000/base/e1000_82575.c | 2 +-
drivers/net/e1000/base/e1000_82575.h | 2 +-
drivers/net/e1000/base/e1000_api.c | 2 +-
drivers/net/e1000/base/e1000_api.h | 2 +-
drivers/net/e1000/base/e1000_defines.h | 2 +-
drivers/net/e1000/base/e1000_hw.h | 2 +-
drivers/net/e1000/base/e1000_i210.c | 2 +-
drivers/net/e1000/base/e1000_i210.h | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
drivers/net/e1000/base/e1000_ich8lan.h | 2 +-
drivers/net/e1000/base/e1000_mac.c | 2 +-
drivers/net/e1000/base/e1000_mac.h | 2 +-
drivers/net/e1000/base/e1000_manage.c | 2 +-
drivers/net/e1000/base/e1000_manage.h | 2 +-
drivers/net/e1000/base/e1000_mbx.c | 2 +-
drivers/net/e1000/base/e1000_mbx.h | 2 +-
drivers/net/e1000/base/e1000_nvm.c | 2 +-
drivers/net/e1000/base/e1000_nvm.h | 2 +-
drivers/net/e1000/base/e1000_phy.c | 2 +-
drivers/net/e1000/base/e1000_phy.h | 2 +-
drivers/net/e1000/base/e1000_regs.h | 2 +-
drivers/net/e1000/base/e1000_vf.c | 2 +-
drivers/net/e1000/base/e1000_vf.h | 2 +-
34 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/net/e1000/base/README b/drivers/net/e1000/base/README
index 59275b6..8d48135 100644
--- a/drivers/net/e1000/base/README
+++ b/drivers/net/e1000/base/README
@@ -1,7 +1,7 @@
..
BSD LICENSE
- Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This directory contains source code of FreeBSD em & igb drivers of version
-cid-shared-code.2014.04.21 released by LAD. The sub-directory of lad/
+cid-shared-code.2015.10.09 released by ND. The sub-directory of base/
contains the original source package.
Updating the driver
diff --git a/drivers/net/e1000/base/e1000_80003es2lan.c b/drivers/net/e1000/base/e1000_80003es2lan.c
index 72692d9..b79496b 100644
--- a/drivers/net/e1000/base/e1000_80003es2lan.c
+++ b/drivers/net/e1000/base/e1000_80003es2lan.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_80003es2lan.h b/drivers/net/e1000/base/e1000_80003es2lan.h
index f5fe967..93ec19b 100644
--- a/drivers/net/e1000/base/e1000_80003es2lan.h
+++ b/drivers/net/e1000/base/e1000_80003es2lan.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82540.c b/drivers/net/e1000/base/e1000_82540.c
index fc1fa94..7de7b7b 100644
--- a/drivers/net/e1000/base/e1000_82540.c
+++ b/drivers/net/e1000/base/e1000_82540.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82541.c b/drivers/net/e1000/base/e1000_82541.c
index 952aea2..9cdb91c 100644
--- a/drivers/net/e1000/base/e1000_82541.c
+++ b/drivers/net/e1000/base/e1000_82541.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82541.h b/drivers/net/e1000/base/e1000_82541.h
index 0f50f55..e0bee7c 100644
--- a/drivers/net/e1000/base/e1000_82541.h
+++ b/drivers/net/e1000/base/e1000_82541.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82542.c b/drivers/net/e1000/base/e1000_82542.c
index afea469..a538cba 100644
--- a/drivers/net/e1000/base/e1000_82542.c
+++ b/drivers/net/e1000/base/e1000_82542.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82543.c b/drivers/net/e1000/base/e1000_82543.c
index 36335ba..fc96199 100644
--- a/drivers/net/e1000/base/e1000_82543.c
+++ b/drivers/net/e1000/base/e1000_82543.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82543.h b/drivers/net/e1000/base/e1000_82543.h
index 51056db..4eb3f62 100644
--- a/drivers/net/e1000/base/e1000_82543.h
+++ b/drivers/net/e1000/base/e1000_82543.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82571.c b/drivers/net/e1000/base/e1000_82571.c
index 8ae1cb1..5e0e43c 100644
--- a/drivers/net/e1000/base/e1000_82571.c
+++ b/drivers/net/e1000/base/e1000_82571.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82571.h b/drivers/net/e1000/base/e1000_82571.h
index bdf6446..c8037b6 100644
--- a/drivers/net/e1000/base/e1000_82571.h
+++ b/drivers/net/e1000/base/e1000_82571.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 25fa672..3dc8066 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82575.h b/drivers/net/e1000/base/e1000_82575.h
index 09b7bf2..0c8a464 100644
--- a/drivers/net/e1000/base/e1000_82575.h
+++ b/drivers/net/e1000/base/e1000_82575.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c
index a064565..bfddb79 100644
--- a/drivers/net/e1000/base/e1000_api.c
+++ b/drivers/net/e1000/base/e1000_api.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_api.h b/drivers/net/e1000/base/e1000_api.h
index 02b16da..53a641c 100644
--- a/drivers/net/e1000/base/e1000_api.h
+++ b/drivers/net/e1000/base/e1000_api.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 278c507..605e26e 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index 4dd92a3..b0e7a61 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index 1f5600d..842e9d4 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_i210.h b/drivers/net/e1000/base/e1000_i210.h
index f2bd43b..1a6f1dd 100644
--- a/drivers/net/e1000/base/e1000_i210.h
+++ b/drivers/net/e1000/base/e1000_i210.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 3b1627b..f98d54e 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index 8c5e9c3..e9b73df 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mac.c b/drivers/net/e1000/base/e1000_mac.c
index c8ec049..5c107c6 100644
--- a/drivers/net/e1000/base/e1000_mac.c
+++ b/drivers/net/e1000/base/e1000_mac.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mac.h b/drivers/net/e1000/base/e1000_mac.h
index 5a7ce4a..b5d0940 100644
--- a/drivers/net/e1000/base/e1000_mac.h
+++ b/drivers/net/e1000/base/e1000_mac.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_manage.c b/drivers/net/e1000/base/e1000_manage.c
index 30db892..ac4c08a 100644
--- a/drivers/net/e1000/base/e1000_manage.c
+++ b/drivers/net/e1000/base/e1000_manage.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_manage.h b/drivers/net/e1000/base/e1000_manage.h
index e6f92c0..25be115 100644
--- a/drivers/net/e1000/base/e1000_manage.h
+++ b/drivers/net/e1000/base/e1000_manage.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mbx.c b/drivers/net/e1000/base/e1000_mbx.c
index 7ec4c56..6daf16b 100644
--- a/drivers/net/e1000/base/e1000_mbx.c
+++ b/drivers/net/e1000/base/e1000_mbx.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mbx.h b/drivers/net/e1000/base/e1000_mbx.h
index e9524fc..563dcb9 100644
--- a/drivers/net/e1000/base/e1000_mbx.h
+++ b/drivers/net/e1000/base/e1000_mbx.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c
index 8be437a..966a34c 100644
--- a/drivers/net/e1000/base/e1000_nvm.c
+++ b/drivers/net/e1000/base/e1000_nvm.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_nvm.h b/drivers/net/e1000/base/e1000_nvm.h
index dee1f62..c400dc3 100644
--- a/drivers/net/e1000/base/e1000_nvm.h
+++ b/drivers/net/e1000/base/e1000_nvm.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index e214f17..7620ecf 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index 73a9b1f..b30b36e 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index bde2a08..8999b5b 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_vf.c b/drivers/net/e1000/base/e1000_vf.c
index 778561e..3a47d35 100644
--- a/drivers/net/e1000/base/e1000_vf.c
+++ b/drivers/net/e1000/base/e1000_vf.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_vf.h b/drivers/net/e1000/base/e1000_vf.h
index 6d5bd99..7218212 100644
--- a/drivers/net/e1000/base/e1000_vf.h
+++ b/drivers/net/e1000/base/e1000_vf.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 02/35] e1000/base: add new devices
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and copyright Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 03/35] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
` (32 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Add some new i218 devices.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_api.c | 4 ++++
drivers/net/e1000/base/e1000_defines.h | 2 ++
drivers/net/e1000/base/e1000_hw.h | 4 ++++
drivers/net/e1000/base/e1000_ich8lan.c | 18 ++++++++++++++----
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c
index bfddb79..5ec0ad1 100644
--- a/drivers/net/e1000/base/e1000_api.c
+++ b/drivers/net/e1000/base/e1000_api.c
@@ -292,6 +292,10 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_PCH_LPT_I217_V:
case E1000_DEV_ID_PCH_LPTLP_I218_LM:
case E1000_DEV_ID_PCH_LPTLP_I218_V:
+ case E1000_DEV_ID_PCH_I218_LM2:
+ case E1000_DEV_ID_PCH_I218_V2:
+ case E1000_DEV_ID_PCH_I218_LM3:
+ case E1000_DEV_ID_PCH_I218_V3:
mac->type = e1000_pch_lpt;
break;
case E1000_DEV_ID_82575EB_COPPER:
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 605e26e..71bd2e0 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -197,6 +197,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */
#define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */
#define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min thresh size */
+#define E1000_RCTL_RDMTS_HEX 0x00010000
#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */
#define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */
#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */
@@ -1467,6 +1468,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_RXPBS_SIZE_I210_MASK 0x0000003F /* Rx packet buffer size */
#define E1000_TXPB0S_SIZE_I210_MASK 0x0000003F /* Tx packet buffer 0 size */
+
/* Proxy Filter Control */
#define E1000_PROXYFC_D0 0x00000001 /* Enable offload in D0 */
#define E1000_PROXYFC_EX 0x00000004 /* Directed exact proxy */
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index b0e7a61..154b9e5 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -132,6 +132,10 @@ struct e1000_hw;
#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B
#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A
#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559
+#define E1000_DEV_ID_PCH_I218_LM2 0x15A0
+#define E1000_DEV_ID_PCH_I218_V2 0x15A1
+#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 /* Wildcat Point PCH */
+#define E1000_DEV_ID_PCH_I218_V3 0x15A3 /* Wildcat Point PCH */
#define E1000_DEV_ID_82576 0x10C9
#define E1000_DEV_ID_82576_FIBER 0x10E6
#define E1000_DEV_ID_82576_SERDES 0x10E7
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index f98d54e..6d998df 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -62,6 +62,10 @@ POSSIBILITY OF SUCH DAMAGE.
* Ethernet Connection I217-V
* Ethernet Connection I218-V
* Ethernet Connection I218-LM
+ * Ethernet Connection (2) I218-LM
+ * Ethernet Connection (2) I218-V
+ * Ethernet Connection (3) I218-LM
+ * Ethernet Connection (3) I218-V
*/
#include "e1000_api.h"
@@ -1052,19 +1056,19 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
if ((hw->mac.type < e1000_pch_lpt) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_LM) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_V) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_LM2) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_V2) ||
(hw->dev_spec.ich8lan.ulp_state == e1000_ulp_state_on))
return 0;
if (!to_sx) {
int i = 0;
-
/* Poll up to 5 seconds for Cable Disconnected indication */
while (!(E1000_READ_REG(hw, E1000_FEXT) &
E1000_FEXT_PHY_CABLE_DISCONNECTED)) {
/* Bail if link is re-acquired */
if (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)
return -E1000_ERR_PHY;
-
if (i++ == 100)
break;
@@ -1197,6 +1201,8 @@ s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
if ((hw->mac.type < e1000_pch_lpt) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_LM) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_V) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_LM2) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_V2) ||
(hw->dev_spec.ich8lan.ulp_state == e1000_ulp_state_off))
return 0;
@@ -1452,7 +1458,9 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
/* Work-around I218 hang issue */
if ((hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
- (hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V)) {
+ (hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_LM3) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_V3)) {
ret_val = e1000_k1_workaround_lpt_lp(hw, link);
if (ret_val)
return ret_val;
@@ -4794,7 +4802,9 @@ void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw)
u16 phy_reg, device_id = hw->device_id;
if ((device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
- (device_id == E1000_DEV_ID_PCH_LPTLP_I218_V)) {
+ (device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||
+ (device_id == E1000_DEV_ID_PCH_I218_LM3) ||
+ (device_id == E1000_DEV_ID_PCH_I218_V3)) {
u32 fextnvm6 = E1000_READ_REG(hw, E1000_FEXTNVM6);
E1000_WRITE_REG(hw, E1000_FEXTNVM6,
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 03/35] e1000/base: fix issue with link flap on 82579
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and copyright Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 02/35] e1000/base: add new devices Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 04/35] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
` (31 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Several customers have reported a link flap issue on 82579. The symptoms
are random and intermittent link losses when 82579 is connected to specific
switches. Issue has been root caused as interoperability problem between
the NIC and at least some Broadcom PHYs in the Energy Efficient Ethernet
wake mechanism.
To fix the issue, we are disabling the Phase Locked Loop shutdown in 100M
Low Power Idle. This solution will cause an increase of power in 100M EEE
link. It may cost additional 28mW in this specific mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 11 +++++++++++
drivers/net/e1000/base/e1000_ich8lan.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 6d998df..f23d810 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -935,6 +935,17 @@ s32 e1000_set_eee_pchlan(struct e1000_hw *hw)
}
}
+ if (hw->phy.type == e1000_phy_82579) {
+ ret_val = e1000_read_emi_reg_locked(hw, I82579_LPI_PLL_SHUT,
+ &data);
+ if (ret_val)
+ goto release;
+
+ data &= ~I82579_LPI_100_PLL_SHUT;
+ ret_val = e1000_write_emi_reg_locked(hw, I82579_LPI_PLL_SHUT,
+ data);
+ }
+
/* R/Clr IEEE MMD 3.1 bits 11:10 - Tx/Rx LPI Received */
ret_val = e1000_read_emi_reg_locked(hw, pcs_status, &data);
if (ret_val)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index e9b73df..c690d9e 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -262,12 +262,14 @@ POSSIBILITY OF SUCH DAMAGE.
#define I82577_MSE_THRESHOLD 0x0887 /* 82577 Mean Square Error Threshold */
#define I82579_MSE_LINK_DOWN 0x2411 /* MSE count before dropping link */
#define I82579_RX_CONFIG 0x3412 /* Receive configuration */
+#define I82579_LPI_PLL_SHUT 0x4412 /* LPI PLL Shut Enable */
#define I82579_EEE_PCS_STATUS 0x182E /* IEEE MMD Register 3.1 >> 8 */
#define I82579_EEE_CAPABILITY 0x0410 /* IEEE MMD Register 3.20 */
#define I82579_EEE_ADVERTISEMENT 0x040E /* IEEE MMD Register 7.60 */
#define I82579_EEE_LP_ABILITY 0x040F /* IEEE MMD Register 7.61 */
#define I82579_EEE_100_SUPPORTED (1 << 1) /* 100BaseTx EEE */
#define I82579_EEE_1000_SUPPORTED (1 << 2) /* 1000BaseTx EEE */
+#define I82579_LPI_100_PLL_SHUT (1 << 2) /* 100M LPI PLL Shut Enabled */
#define I217_EEE_PCS_STATUS 0x9401 /* IEEE MMD Register 3.1 */
#define I217_EEE_CAPABILITY 0x8000 /* IEEE MMD Register 3.20 */
#define I217_EEE_ADVERTISEMENT 0x8001 /* IEEE MMD Register 7.60 */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 04/35] e1000/base: fix issue with jumbo frame CRC failures in client
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (2 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 03/35] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 05/35] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
` (30 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
This is a patch to change the value of register 776.20[11:2] for jumbo
mode from 0x1A to 0x1F. This is to enlarge the gap between read and
write pointers in the TX Fifo.
And replace the magic number with a macro by the way.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_defines.h | 1 +
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 71bd2e0..79a88bb 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -468,6 +468,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define ETHERNET_FCS_SIZE 4
#define MAX_JUMBO_FRAME_SIZE 0x3F00
+#define E1000_TX_PTR_GAP 0x1F
/* Extended Configuration Control and Size */
#define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP 0x00000020
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index f23d810..cc6e033 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -2601,7 +2601,7 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
return ret_val;
hw->phy.ops.read_reg(hw, PHY_REG(776, 20), &data);
data &= ~(0x3FF << 2);
- data |= (0x1A << 2);
+ data |= (E1000_TX_PTR_GAP << 2);
ret_val = hw->phy.ops.write_reg(hw, PHY_REG(776, 20), data);
if (ret_val)
return ret_val;
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 05/35] e1000/base: redundant PHY power down for i210
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (3 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 04/35] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 06/35] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
` (29 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
The wrong bit is being used in PHYREG16 for PHY power down. In addition,
the use of PHYREG 16 is unnecessary if bit 11 of PHYREG 0 is used.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_phy.c | 15 ---------------
drivers/net/e1000/base/e1000_phy.h | 1 -
2 files changed, 16 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index 7620ecf..6bbb379 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -3498,16 +3498,10 @@ STATIC s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
void e1000_power_up_phy_copper(struct e1000_hw *hw)
{
u16 mii_reg = 0;
- u16 power_reg = 0;
/* The PHY will retain its settings across a power down/up cycle */
hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);
mii_reg &= ~MII_CR_POWER_DOWN;
- if (hw->phy.type == e1000_phy_i210) {
- hw->phy.ops.read_reg(hw, GS40G_COPPER_SPEC, &power_reg);
- power_reg &= ~GS40G_CS_POWER_DOWN;
- hw->phy.ops.write_reg(hw, GS40G_COPPER_SPEC, power_reg);
- }
hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);
}
@@ -3522,17 +3516,10 @@ void e1000_power_up_phy_copper(struct e1000_hw *hw)
void e1000_power_down_phy_copper(struct e1000_hw *hw)
{
u16 mii_reg = 0;
- u16 power_reg = 0;
/* The PHY will retain its settings across a power down/up cycle */
hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);
mii_reg |= MII_CR_POWER_DOWN;
- /* i210 Phy requires an additional bit for power up/down */
- if (hw->phy.type == e1000_phy_i210) {
- hw->phy.ops.read_reg(hw, GS40G_COPPER_SPEC, &power_reg);
- power_reg |= GS40G_CS_POWER_DOWN;
- hw->phy.ops.write_reg(hw, GS40G_COPPER_SPEC, power_reg);
- }
hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);
msec_delay(1);
}
@@ -3563,7 +3550,6 @@ STATIC s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data,
if (ret_val)
return ret_val;
}
-
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
@@ -3673,7 +3659,6 @@ STATIC s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data,
if (ret_val)
return ret_val;
}
-
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index b30b36e..2b78af0 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -143,7 +143,6 @@ bool e1000_is_mphy_ready(struct e1000_hw *hw);
#define GS40G_MAC_LB 0x4140
#define GS40G_MAC_SPEED_1G 0X0006
#define GS40G_COPPER_SPEC 0x0010
-#define GS40G_CS_POWER_DOWN 0x0002
/* BM/HV Specific Registers */
#define BM_PORT_CTRL_PAGE 769
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 06/35] e1000/base: add return value to the functions of setting receive address register
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (4 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 05/35] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 07/35] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
` (28 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Previously, the rar_set functions were of type void, and when they failed
to program an address register they would, at most, put a message into
the log and end. The fact that they failed to program an address into a
address register, if checked for, should be captured and passed back to
the caller so that the drivers can deal with the situation (or not) as
they deem best.
Drivers can ignore or use the return value. No change to base drivers
is mandated by this change unless a driver wants to handle the failure
to program an address register (e.g. evaluate the return value).
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82542.c | 6 ++++--
drivers/net/e1000/base/e1000_api.c | 6 ++++--
drivers/net/e1000/base/e1000_api.h | 2 +-
drivers/net/e1000/base/e1000_hw.h | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 18 ++++++++++--------
drivers/net/e1000/base/e1000_mac.c | 12 +++++++-----
drivers/net/e1000/base/e1000_mac.h | 2 +-
drivers/net/e1000/base/e1000_vf.c | 6 ++++--
drivers/net/e1000/base/e1000_vf.h | 2 +-
9 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82542.c b/drivers/net/e1000/base/e1000_82542.c
index a538cba..4f1183a 100644
--- a/drivers/net/e1000/base/e1000_82542.c
+++ b/drivers/net/e1000/base/e1000_82542.c
@@ -46,7 +46,7 @@ STATIC s32 e1000_init_hw_82542(struct e1000_hw *hw);
STATIC s32 e1000_setup_link_82542(struct e1000_hw *hw);
STATIC s32 e1000_led_on_82542(struct e1000_hw *hw);
STATIC s32 e1000_led_off_82542(struct e1000_hw *hw);
-STATIC void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index);
STATIC void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw);
STATIC s32 e1000_read_mac_addr_82542(struct e1000_hw *hw);
@@ -410,7 +410,7 @@ STATIC s32 e1000_led_off_82542(struct e1000_hw *hw)
* Sets the receive address array register at index to the address passed
* in by addr.
**/
-STATIC void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
@@ -431,6 +431,8 @@ STATIC void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_REG_ARRAY(hw, E1000_RA, (index << 1), rar_low);
E1000_WRITE_REG_ARRAY(hw, E1000_RA, ((index << 1) + 1), rar_high);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c
index 5ec0ad1..bbfcae8 100644
--- a/drivers/net/e1000/base/e1000_api.c
+++ b/drivers/net/e1000/base/e1000_api.c
@@ -831,10 +831,12 @@ void e1000_config_collision_dist(struct e1000_hw *hw)
*
* Sets a Receive Address Register (RAR) to the specified address.
**/
-void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)
+int e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)
{
if (hw->mac.ops.rar_set)
- hw->mac.ops.rar_set(hw, addr, index);
+ return hw->mac.ops.rar_set(hw, addr, index);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_api.h b/drivers/net/e1000/base/e1000_api.h
index 53a641c..563d0ca 100644
--- a/drivers/net/e1000/base/e1000_api.h
+++ b/drivers/net/e1000/base/e1000_api.h
@@ -68,7 +68,7 @@ s32 e1000_setup_link(struct e1000_hw *hw);
s32 e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed, u16 *duplex);
s32 e1000_disable_pcie_master(struct e1000_hw *hw);
void e1000_config_collision_dist(struct e1000_hw *hw);
-void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
+int e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr);
void e1000_update_mc_addr_list(struct e1000_hw *hw, u8 *mc_addr_list,
u32 mc_addr_count);
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index 154b9e5..f06be0c 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -699,7 +699,7 @@ struct e1000_mac_operations {
s32 (*setup_led)(struct e1000_hw *);
void (*write_vfta)(struct e1000_hw *, u32, u32);
void (*config_collision_dist)(struct e1000_hw *);
- void (*rar_set)(struct e1000_hw *, u8*, u32);
+ int (*rar_set)(struct e1000_hw *, u8*, u32);
s32 (*read_mac_addr)(struct e1000_hw *);
s32 (*validate_mdi_setting)(struct e1000_hw *);
s32 (*acquire_swfw_sync)(struct e1000_hw *, u16);
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index cc6e033..228d4c5 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -77,8 +77,8 @@ STATIC s32 e1000_acquire_nvm_ich8lan(struct e1000_hw *hw);
STATIC void e1000_release_nvm_ich8lan(struct e1000_hw *hw);
STATIC bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw);
STATIC bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw);
-STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
-STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
STATIC s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw);
#ifndef NO_NON_BLOCKING_PHY_MTA_UPDATE_SUPPORT
STATIC void e1000_update_mc_addr_list_pch2lan(struct e1000_hw *hw,
@@ -1750,7 +1750,7 @@ STATIC bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw)
* contain the MAC address but RAR[1-6] are reserved for manageability (ME).
* Use SHRA[0-3] in place of those reserved for ME.
**/
-STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
@@ -1774,7 +1774,7 @@ STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_FLUSH(hw);
E1000_WRITE_REG(hw, E1000_RAH(index), rar_high);
E1000_WRITE_FLUSH(hw);
- return;
+ return E1000_SUCCESS;
}
/* RAR[1-6] are owned by manageability. Skip those and program the
@@ -1797,7 +1797,7 @@ STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
/* verify the register updates */
if ((E1000_READ_REG(hw, E1000_SHRAL(index - 1)) == rar_low) &&
(E1000_READ_REG(hw, E1000_SHRAH(index - 1)) == rar_high))
- return;
+ return E1000_SUCCESS;
DEBUGOUT2("SHRA[%d] might be locked by ME - FWSM=0x%8.8x\n",
(index - 1), E1000_READ_REG(hw, E1000_FWSM));
@@ -1805,6 +1805,7 @@ STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
out:
DEBUGOUT1("Failed to write receive address at index %d\n", index);
+ return -E1000_ERR_CONFIG;
}
/**
@@ -1818,7 +1819,7 @@ out:
* contain the MAC address. SHRA[0-10] are the shared receive address
* registers that are shared between the Host and manageability engine (ME).
**/
-STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
u32 wlock_mac;
@@ -1842,7 +1843,7 @@ STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_FLUSH(hw);
E1000_WRITE_REG(hw, E1000_RAH(index), rar_high);
E1000_WRITE_FLUSH(hw);
- return;
+ return E1000_SUCCESS;
}
/* The manageability engine (ME) can lock certain SHRAR registers that
@@ -1877,12 +1878,13 @@ STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
/* verify the register updates */
if ((E1000_READ_REG(hw, E1000_SHRAL_PCH_LPT(index - 1)) == rar_low) &&
(E1000_READ_REG(hw, E1000_SHRAH_PCH_LPT(index - 1)) == rar_high))
- return;
+ return E1000_SUCCESS;
}
}
out:
DEBUGOUT1("Failed to write receive address at index %d\n", index);
+ return -E1000_ERR_CONFIG;
}
#ifndef NO_NON_BLOCKING_PHY_MTA_UPDATE_SUPPORT
diff --git a/drivers/net/e1000/base/e1000_mac.c b/drivers/net/e1000/base/e1000_mac.c
index 5c107c6..a0f3a99 100644
--- a/drivers/net/e1000/base/e1000_mac.c
+++ b/drivers/net/e1000/base/e1000_mac.c
@@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
STATIC s32 e1000_validate_mdi_setting_generic(struct e1000_hw *hw);
STATIC void e1000_set_lan_id_multi_port_pcie(struct e1000_hw *hw);
STATIC void e1000_config_collision_dist_generic(struct e1000_hw *hw);
-STATIC void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
/**
* e1000_init_mac_ops_generic - Initialize MAC function pointers
@@ -149,15 +149,15 @@ void e1000_null_write_vfta(struct e1000_hw E1000_UNUSEDARG *hw,
}
/**
- * e1000_null_rar_set - No-op function, return void
+ * e1000_null_rar_set - No-op function, return 0
* @hw: pointer to the HW structure
**/
-void e1000_null_rar_set(struct e1000_hw E1000_UNUSEDARG *hw,
+int e1000_null_rar_set(struct e1000_hw E1000_UNUSEDARG *hw,
u8 E1000_UNUSEDARG *h, u32 E1000_UNUSEDARG a)
{
DEBUGFUNC("e1000_null_rar_set");
UNREFERENCED_3PARAMETER(hw, h, a);
- return;
+ return E1000_SUCCESS;
}
/**
@@ -469,7 +469,7 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw)
* Sets the receive address array register at index to the address passed
* in by addr.
**/
-STATIC void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
@@ -495,6 +495,8 @@ STATIC void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_FLUSH(hw);
E1000_WRITE_REG(hw, E1000_RAH(index), rar_high);
E1000_WRITE_FLUSH(hw);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_mac.h b/drivers/net/e1000/base/e1000_mac.h
index b5d0940..96a260c 100644
--- a/drivers/net/e1000/base/e1000_mac.h
+++ b/drivers/net/e1000/base/e1000_mac.h
@@ -44,7 +44,7 @@ s32 e1000_null_link_info(struct e1000_hw *hw, u16 *s, u16 *d);
bool e1000_null_mng_mode(struct e1000_hw *hw);
void e1000_null_update_mc(struct e1000_hw *hw, u8 *h, u32 a);
void e1000_null_write_vfta(struct e1000_hw *hw, u32 a, u32 b);
-void e1000_null_rar_set(struct e1000_hw *hw, u8 *h, u32 a);
+int e1000_null_rar_set(struct e1000_hw *hw, u8 *h, u32 a);
s32 e1000_blink_led_generic(struct e1000_hw *hw);
s32 e1000_check_for_copper_link_generic(struct e1000_hw *hw);
s32 e1000_check_for_fiber_link_generic(struct e1000_hw *hw);
diff --git a/drivers/net/e1000/base/e1000_vf.c b/drivers/net/e1000/base/e1000_vf.c
index 3a47d35..7845b48 100644
--- a/drivers/net/e1000/base/e1000_vf.c
+++ b/drivers/net/e1000/base/e1000_vf.c
@@ -48,7 +48,7 @@ STATIC s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
STATIC s32 e1000_init_hw_vf(struct e1000_hw *hw);
STATIC s32 e1000_reset_hw_vf(struct e1000_hw *hw);
STATIC void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, u8 *, u32);
-STATIC void e1000_rar_set_vf(struct e1000_hw *, u8 *, u32);
+STATIC int e1000_rar_set_vf(struct e1000_hw *, u8 *, u32);
STATIC s32 e1000_read_mac_addr_vf(struct e1000_hw *);
/**
@@ -322,7 +322,7 @@ STATIC s32 e1000_init_hw_vf(struct e1000_hw *hw)
* @addr: pointer to the receive address
* @index receive address array register
**/
-STATIC void e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
+STATIC int e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
u32 E1000_UNUSEDARG index)
{
struct e1000_mbx_info *mbx = &hw->mbx;
@@ -345,6 +345,8 @@ STATIC void e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
if (!ret_val &&
(msgbuf[0] == (E1000_VF_SET_MAC_ADDR | E1000_VT_MSGTYPE_NACK)))
e1000_read_mac_addr_vf(hw);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_vf.h b/drivers/net/e1000/base/e1000_vf.h
index 7218212..d6216de 100644
--- a/drivers/net/e1000/base/e1000_vf.h
+++ b/drivers/net/e1000/base/e1000_vf.h
@@ -207,7 +207,7 @@ struct e1000_mac_operations {
s32 (*init_hw)(struct e1000_hw *);
s32 (*setup_link)(struct e1000_hw *);
void (*write_vfta)(struct e1000_hw *, u32, u32);
- void (*rar_set)(struct e1000_hw *, u8*, u32);
+ int (*rar_set)(struct e1000_hw *, u8*, u32);
s32 (*read_mac_addr)(struct e1000_hw *);
};
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 07/35] e1000/base: add defaults for i210 TX/RX PBSIZE
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (5 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 06/35] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 08/35] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
` (27 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
These are the defaults for the packet buffer size registers that need to
be explicitly set back if someone changes them and comes back to a normal
driver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_defines.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 79a88bb..8e40771 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -1468,6 +1468,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_RXPBS_CFG_TS_EN 0x80000000 /* Timestamp in Rx buffer */
#define E1000_RXPBS_SIZE_I210_MASK 0x0000003F /* Rx packet buffer size */
#define E1000_TXPB0S_SIZE_I210_MASK 0x0000003F /* Tx packet buffer 0 size */
+#define I210_RXPBSIZE_DEFAULT 0x000000A2 /* RXPBSIZE default */
+#define I210_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */
/* Proxy Filter Control */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 08/35] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (6 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 07/35] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 09/35] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
` (26 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
For DH89XXCC_SGMII, write flush leaves registers of this device trashed
(0xFFFFFFFF). Added check for this device.
Also, after both for Port SW Reset and Device Reset case, platform should
wait at least 3ms before reading any registers. Since waiting is
conditionally executed only for Device Reset - removed the condition.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 3dc8066..ab547ca 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -2490,11 +2490,17 @@ STATIC s32 e1000_reset_hw_82580(struct e1000_hw *hw)
ctrl |= E1000_CTRL_RST;
E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
- E1000_WRITE_FLUSH(hw);
- /* Add delay to insure DEV_RST has time to complete */
- if (global_device_reset)
- msec_delay(5);
+ switch (hw->device_id) {
+ case E1000_DEV_ID_DH89XXCC_SGMII:
+ break;
+ default:
+ E1000_WRITE_FLUSH(hw);
+ break;
+ }
+
+ /* Add delay to insure DEV_RST or RST has time to complete */
+ msec_delay(5);
ret_val = e1000_get_auto_rd_done_generic(hw);
if (ret_val) {
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 09/35] e1000/base: add evaluation of e1000_nvm_read return value
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (7 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 08/35] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 10/35] e1000/base: change invariant return to not use variables Wenzhuo Lu
` (25 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Adding code to a case where e1000_nvn_read is called, but there is no
consideration for when the read fails (returns an error code).
Also, this patch adds an error message to a base NVM reading function that
is missing it for consistency.
This patch is not covering all cases of these conditions, it only covers
the code used by the e1000e driver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_manage.c | 5 ++++-
drivers/net/e1000/base/e1000_nvm.c | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_manage.c b/drivers/net/e1000/base/e1000_manage.c
index ac4c08a..8564a7f 100644
--- a/drivers/net/e1000/base/e1000_manage.c
+++ b/drivers/net/e1000/base/e1000_manage.c
@@ -363,9 +363,12 @@ bool e1000_enable_mng_pass_thru(struct e1000_hw *hw)
} else if ((hw->mac.type == e1000_82574) ||
(hw->mac.type == e1000_82583)) {
u16 data;
+ s32 ret_val;
factps = E1000_READ_REG(hw, E1000_FACTPS);
- e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ ret_val = e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ if (ret_val)
+ return false;
if (!(factps & E1000_FACTPS_MNGCG) &&
((data & E1000_NVM_INIT_CTRL2_MNGM) ==
diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c
index 966a34c..01be9e4 100644
--- a/drivers/net/e1000/base/e1000_nvm.c
+++ b/drivers/net/e1000/base/e1000_nvm.c
@@ -585,6 +585,9 @@ s32 e1000_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
E1000_NVM_RW_REG_DATA);
}
+ if (ret_val)
+ DEBUGOUT1("NVM read error: %d\n", ret_val);
+
return ret_val;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 10/35] e1000/base: change invariant return to not use variables
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (8 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 09/35] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 11/35] e1000/base: add return value handler when check manage mode Wenzhuo Lu
` (24 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Although this change should be optimized out by the compiler, just
return a constant directly rather than declare a variable.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index ab547ca..3bdcf69 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -891,7 +891,6 @@ out:
STATIC s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
{
struct e1000_phy_info *phy = &hw->phy;
- s32 ret_val = E1000_SUCCESS;
u32 data;
DEBUGFUNC("e1000_set_d0_lplu_state_82580");
@@ -919,7 +918,7 @@ STATIC s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
}
E1000_WRITE_REG(hw, E1000_82580_PHY_POWER_MGMT, data);
- return ret_val;
+ return E1000_SUCCESS;
}
/**
@@ -939,7 +938,6 @@ STATIC s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
{
struct e1000_phy_info *phy = &hw->phy;
- s32 ret_val = E1000_SUCCESS;
u32 data;
DEBUGFUNC("e1000_set_d3_lplu_state_82580");
@@ -967,7 +965,7 @@ s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
}
E1000_WRITE_REG(hw, E1000_82580_PHY_POWER_MGMT, data);
- return ret_val;
+ return E1000_SUCCESS;
}
/**
@@ -981,7 +979,7 @@ s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
**/
STATIC s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
{
- s32 ret_val;
+ s32 ret_val = E1000_SUCCESS;
DEBUGFUNC("e1000_acquire_nvm_82575");
@@ -1003,6 +1001,7 @@ STATIC s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
DEBUGOUT("Nvm bit banging access error detected and cleared.\n");
}
}
+
if (hw->mac.type == e1000_82580) {
u32 eecd = E1000_READ_REG(hw, E1000_EECD);
if (eecd & E1000_EECD_BLOCKED) {
@@ -1013,7 +1012,6 @@ STATIC s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
}
}
-
ret_val = e1000_acquire_nvm_generic(hw);
if (ret_val)
e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM);
@@ -1127,7 +1125,6 @@ STATIC void e1000_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask)
STATIC s32 e1000_get_cfg_done_82575(struct e1000_hw *hw)
{
s32 timeout = PHY_CFG_TIMEOUT;
- s32 ret_val = E1000_SUCCESS;
u32 mask = E1000_NVM_CFG_DONE_PORT_0;
DEBUGFUNC("e1000_get_cfg_done_82575");
@@ -1152,7 +1149,7 @@ STATIC s32 e1000_get_cfg_done_82575(struct e1000_hw *hw)
(hw->phy.type == e1000_phy_igp_3))
e1000_phy_init_script_igp3(hw);
- return ret_val;
+ return E1000_SUCCESS;
}
/**
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 11/35] e1000/base: add return value handler when check manage mode
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (9 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 10/35] e1000/base: change invariant return to not use variables Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 12/35] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
` (23 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Adding code, where missing, to handle the case when hw->nvm.ops.read returns
an error value.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82571.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_82571.c b/drivers/net/e1000/base/e1000_82571.c
index 5e0e43c..7c279db 100644
--- a/drivers/net/e1000/base/e1000_82571.c
+++ b/drivers/net/e1000/base/e1000_82571.c
@@ -1452,10 +1452,14 @@ STATIC void e1000_clear_vfta_82571(struct e1000_hw *hw)
STATIC bool e1000_check_mng_mode_82574(struct e1000_hw *hw)
{
u16 data;
+ s32 ret_val;
DEBUGFUNC("e1000_check_mng_mode_82574");
- hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ if (ret_val)
+ return false;
+
return (data & E1000_NVM_INIT_CTRL2_MNGM) != 0;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 12/35] e1000/base: add return value handler for ESB2 controller init and reset
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (10 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 11/35] e1000/base: add return value handler when check manage mode Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 13/35] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
` (22 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Adding code where missing to handle case where calls to
e1000_read_kmrn_reg_80003es2lan and e1000_write_kmrn_reg_80003es2lan return
an error value.
Also, when accessing the E1000_KMRNCTRLSTA_INBAND_PARAM offset to disable
far-end loopback on 80003es2lan devices, make the handling of a read or
write failure consistent between hw_init and hw_reset.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_80003es2lan.c | 31 ++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_80003es2lan.c b/drivers/net/e1000/base/e1000_80003es2lan.c
index b79496b..5ac925e 100644
--- a/drivers/net/e1000/base/e1000_80003es2lan.c
+++ b/drivers/net/e1000/base/e1000_80003es2lan.c
@@ -852,11 +852,15 @@ STATIC s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)
/* Disable IBIST slave mode (far-end loopback) */
ret_val = e1000_read_kmrn_reg_80003es2lan(hw,
E1000_KMRNCTRLSTA_INBAND_PARAM, &kum_reg_data);
- if (ret_val)
- return ret_val;
- kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
- e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- kum_reg_data);
+ if (!ret_val) {
+ kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
+ ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
+ E1000_KMRNCTRLSTA_INBAND_PARAM,
+ kum_reg_data);
+ if (ret_val)
+ DEBUGOUT("Error disabling far-end loopback\n");
+ } else
+ DEBUGOUT("Error disabling far-end loopback\n");
ret_val = e1000_get_auto_rd_done_generic(hw);
if (ret_val)
@@ -912,11 +916,18 @@ STATIC s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
return ret_val;
/* Disable IBIST slave mode (far-end loopback) */
- e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- &kum_reg_data);
- kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
- e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- kum_reg_data);
+ ret_val =
+ e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
+ &kum_reg_data);
+ if (!ret_val) {
+ kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
+ ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
+ E1000_KMRNCTRLSTA_INBAND_PARAM,
+ kum_reg_data);
+ if (ret_val)
+ DEBUGOUT("Error disabling far-end loopback\n");
+ } else
+ DEBUGOUT("Error disabling far-end loopback\n");
/* Set the transmit descriptor write-back policy */
reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0));
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 13/35] e1000/base: add support for inverted format ETrackId
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (11 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 12/35] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 14/35] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
` (21 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
There are some images which contain ETrackID in inverted format. This patch
allows reading this format.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_nvm.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c
index 01be9e4..762acd1 100644
--- a/drivers/net/e1000/base/e1000_nvm.c
+++ b/drivers/net/e1000/base/e1000_nvm.c
@@ -1373,8 +1373,12 @@ etrack_id:
hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verh);
fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT)
| eeprom_verl;
+ } else if ((etrack_test & NVM_ETRACK_VALID) == 0) {
+ hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verh);
+ hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verl);
+ fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) |
+ eeprom_verl;
}
- return;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 14/35] e1000/base: add EEARBC_I210 for i210
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (12 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 13/35] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 15/35] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
` (20 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
EEARBC has changed on i210. It means EEARBC has a different address on
i210 than on other NICs. So, add a new entity named EEARBC_I210 to the
register list and make sure the right one is being used on i210.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_i210.c | 17 ++++++++++-------
drivers/net/e1000/base/e1000_regs.h | 1 +
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index 842e9d4..fedf88e 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -925,7 +925,7 @@ s32 e1000_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 data)
STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
{
s32 ret_val;
- u32 wuc, mdicnfg, ctrl_ext, reg_val;
+ u32 wuc, mdicnfg, ctrl, ctrl_ext, reg_val;
u16 nvm_word, phy_word, pci_word, tmp_nvm;
int i;
@@ -942,9 +942,9 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
nvm_word = E1000_INVM_DEFAULT_AL;
tmp_nvm = nvm_word | E1000_INVM_PLL_WO_VAL;
for (i = 0; i < E1000_MAX_PLL_TRIES; i++) {
- /* check current state */
- hw->phy.ops.read_reg(hw, (E1000_PHY_PLL_FREQ_PAGE |
- E1000_PHY_PLL_FREQ_REG), &phy_word);
+ /* check current state directly from internal PHY */
+ e1000_read_phy_reg_gs40g(hw, (E1000_PHY_PLL_FREQ_PAGE |
+ E1000_PHY_PLL_FREQ_REG), &phy_word);
if ((phy_word & E1000_PHY_PLL_UNCONF)
!= E1000_PHY_PLL_UNCONF) {
ret_val = E1000_SUCCESS;
@@ -952,14 +952,17 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
} else {
ret_val = -E1000_ERR_PHY;
}
- hw->phy.ops.reset(hw);
+ /* directly reset the internal PHY */
+ ctrl = E1000_READ_REG(hw, E1000_CTRL);
+ E1000_WRITE_REG(hw, E1000_CTRL, ctrl|E1000_CTRL_PHY_RST);
+
ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
ctrl_ext |= (E1000_CTRL_EXT_PHYPDEN | E1000_CTRL_EXT_SDLPE);
E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
E1000_WRITE_REG(hw, E1000_WUC, 0);
reg_val = (E1000_INVM_AUTOLOAD << 4) | (tmp_nvm << 16);
- E1000_WRITE_REG(hw, E1000_EEARBC, reg_val);
+ E1000_WRITE_REG(hw, E1000_EEARBC_I210, reg_val);
e1000_read_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
pci_word |= E1000_PCI_PMCSR_D3;
@@ -968,7 +971,7 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
pci_word &= ~E1000_PCI_PMCSR_D3;
e1000_write_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
reg_val = (E1000_INVM_AUTOLOAD << 4) | (nvm_word << 16);
- E1000_WRITE_REG(hw, E1000_EEARBC, reg_val);
+ E1000_WRITE_REG(hw, E1000_EEARBC_I210, reg_val);
/* restore WUC register */
E1000_WRITE_REG(hw, E1000_WUC, wuc);
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 8999b5b..b9fcdea 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -110,6 +110,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PBECCSTS 0x0100C /* Packet Buffer ECC Status - RW */
#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
+#define E1000_EEARBC_I210 0x12024 /* EEPROM Auto Read Bus Control */
#define E1000_FLASHT 0x01028 /* FLASH Timer Register */
#define E1000_EEWR 0x0102C /* EEPROM Write Register - RW */
#define E1000_FLSWCTL 0x01030 /* FLASH control register */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 15/35] e1000/base: apply paranoia to macro arguments
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (13 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 14/35] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 16/35] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
` (19 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Macro arguments need to be in parens since we can pass in expressions.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_api.h | 16 ++++++++--------
drivers/net/e1000/base/e1000_hw.h | 2 +-
drivers/net/e1000/base/e1000_regs.h | 4 ++--
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_api.h b/drivers/net/e1000/base/e1000_api.h
index 563d0ca..0bc471d 100644
--- a/drivers/net/e1000/base/e1000_api.h
+++ b/drivers/net/e1000/base/e1000_api.h
@@ -124,14 +124,14 @@ u32 e1000_translate_register_82542(u32 reg);
* TBI_ACCEPT macro definition:
*
* This macro requires:
- * adapter = a pointer to struct e1000_hw
+ * a = a pointer to struct e1000_hw
* status = the 8 bit status field of the Rx descriptor with EOP set
- * error = the 8 bit error field of the Rx descriptor with EOP set
+ * errors = the 8 bit error field of the Rx descriptor with EOP set
* length = the sum of all the length fields of the Rx descriptors that
* make up the current frame
* last_byte = the last byte of the frame DMAed by the hardware
- * max_frame_length = the maximum frame length we want to accept.
- * min_frame_length = the minimum frame length we want to accept.
+ * min_frame_size = the minimum frame length we want to accept.
+ * max_frame_size = the maximum frame length we want to accept.
*
* This macro is a conditional that should be used in the interrupt
* handler's Rx processing routine when RxErrors have been detected.
@@ -157,10 +157,10 @@ u32 e1000_translate_register_82542(u32 reg);
(((errors) & E1000_RXD_ERR_FRAME_ERR_MASK) == E1000_RXD_ERR_CE) && \
((last_byte) == CARRIER_EXTENSION) && \
(((status) & E1000_RXD_STAT_VP) ? \
- (((length) > (min_frame_size - VLAN_TAG_SIZE)) && \
- ((length) <= (max_frame_size + 1))) : \
- (((length) > min_frame_size) && \
- ((length) <= (max_frame_size + VLAN_TAG_SIZE + 1)))))
+ (((length) > ((min_frame_size) - VLAN_TAG_SIZE)) && \
+ ((length) <= ((max_frame_size) + 1))) : \
+ (((length) > (min_frame_size)) && \
+ ((length) <= ((max_frame_size) + VLAN_TAG_SIZE + 1)))))
#define E1000_MAX(a, b) ((a) > (b) ? (a) : (b))
#define E1000_DIVIDE_ROUND_UP(a, b) (((a) + (b) - 1) / (b)) /* ceil(a/b) */
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index f06be0c..fd48104 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -785,7 +785,7 @@ struct e1000_mac_info {
u16 uta_reg_count;
/* Maximum size of the MTA register table in all supported adapters */
- #define MAX_MTA_REG 128
+#define MAX_MTA_REG 128
u32 mta_shadow[MAX_MTA_REG];
u16 rar_entry_count;
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index b9fcdea..2891da3 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -203,7 +203,7 @@ POSSIBILITY OF SUCH DAMAGE.
/* Queues fetch arbitration priority control register */
#define E1000_I210_TQAVARBCTRL 0x3574
/* Queues priority masks where _n and _p can be 0-3. */
-#define E1000_TQAVARBCTRL_QUEUE_PRI(_n, _p) ((_p) << (2 * _n))
+#define E1000_TQAVARBCTRL_QUEUE_PRI(_n, _p) ((_p) << (2 * (_n)))
/* QAV Tx mode control registers where _n can be 0 or 1. */
#define E1000_I210_TQAVCC(_n) (0x3004 + 0x40 * (_n))
@@ -216,7 +216,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PQGPTC(_n) (0x010014 + (0x100 * (_n)))
/* Queues packet buffer size masks where _n can be 0-3 and _s 0-63 [kB] */
-#define E1000_I210_TXPBS_SIZE(_n, _s) ((_s) << (6 * _n))
+#define E1000_I210_TXPBS_SIZE(_n, _s) ((_s) << (6 * (_n)))
#define E1000_MMDAC 13 /* MMD Access Control */
#define E1000_MMDAAD 14 /* MMD Access Address/Data */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 16/35] e1000/base: add flags to set eee advertisement modes
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (14 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 15/35] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 17/35] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
` (18 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
!!! REQUIRES DRIVER CHANGES !!!
Change e1000_set_eee_i350 and e1000_set_eee_i354 to have flags allowing
changes in the advertised EEE speeds.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 34 +++++++++++++++++++++++++++-------
drivers/net/e1000/base/e1000_82575.h | 4 ++--
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 3bdcf69..81e6011 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -2893,13 +2893,14 @@ out:
/**
* e1000_set_eee_i350 - Enable/disable EEE support
* @hw: pointer to the HW structure
+ * @adv1g: boolean flag enabling 1G EEE advertisement
+ * @adv100m: boolean flag enabling 100M EEE advertisement
*
* Enable/disable EEE based on setting in dev_spec structure.
*
**/
-s32 e1000_set_eee_i350(struct e1000_hw *hw)
+s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M)
{
- s32 ret_val = E1000_SUCCESS;
u32 ipcnfg, eeer;
DEBUGFUNC("e1000_set_eee_i350");
@@ -2914,7 +2915,16 @@ s32 e1000_set_eee_i350(struct e1000_hw *hw)
if (!(hw->dev_spec._82575.eee_disable)) {
u32 eee_su = E1000_READ_REG(hw, E1000_EEE_SU);
- ipcnfg |= (E1000_IPCNFG_EEE_1G_AN | E1000_IPCNFG_EEE_100M_AN);
+ if (adv100M)
+ ipcnfg |= E1000_IPCNFG_EEE_100M_AN;
+ else
+ ipcnfg &= ~E1000_IPCNFG_EEE_100M_AN;
+
+ if (adv1G)
+ ipcnfg |= E1000_IPCNFG_EEE_1G_AN;
+ else
+ ipcnfg &= ~E1000_IPCNFG_EEE_1G_AN;
+
eeer |= (E1000_EEER_TX_LPI_EN | E1000_EEER_RX_LPI_EN |
E1000_EEER_LPI_FC);
@@ -2932,17 +2942,19 @@ s32 e1000_set_eee_i350(struct e1000_hw *hw)
E1000_READ_REG(hw, E1000_EEER);
out:
- return ret_val;
+ return E1000_SUCCESS;
}
/**
* e1000_set_eee_i354 - Enable/disable EEE support
* @hw: pointer to the HW structure
+ * @adv1g: boolean flag enabling 1G EEE advertisement
+ * @adv100m: boolean flag enabling 100M EEE advertisement
*
* Enable/disable EEE legacy mode based on setting in dev_spec structure.
*
**/
-s32 e1000_set_eee_i354(struct e1000_hw *hw)
+s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val = E1000_SUCCESS;
@@ -2984,8 +2996,16 @@ s32 e1000_set_eee_i354(struct e1000_hw *hw)
if (ret_val)
goto out;
- phy_data |= E1000_EEE_ADV_100_SUPPORTED |
- E1000_EEE_ADV_1000_SUPPORTED;
+ if (adv100M)
+ phy_data |= E1000_EEE_ADV_100_SUPPORTED;
+ else
+ phy_data &= ~E1000_EEE_ADV_100_SUPPORTED;
+
+ if (adv1G)
+ phy_data |= E1000_EEE_ADV_1000_SUPPORTED;
+ else
+ phy_data &= ~E1000_EEE_ADV_1000_SUPPORTED;
+
ret_val = e1000_write_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354,
E1000_EEE_ADV_DEV_I354,
phy_data);
diff --git a/drivers/net/e1000/base/e1000_82575.h b/drivers/net/e1000/base/e1000_82575.h
index 0c8a464..7a46ceb 100644
--- a/drivers/net/e1000/base/e1000_82575.h
+++ b/drivers/net/e1000/base/e1000_82575.h
@@ -494,8 +494,8 @@ void e1000_rlpml_set_vf(struct e1000_hw *, u16);
s32 e1000_promisc_set_vf(struct e1000_hw *, enum e1000_promisc_type type);
u16 e1000_rxpbs_adjust_82580(u32 data);
s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data);
-s32 e1000_set_eee_i350(struct e1000_hw *);
-s32 e1000_set_eee_i354(struct e1000_hw *);
+s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M);
+s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M);
s32 e1000_get_eee_status_i354(struct e1000_hw *, bool *);
s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw);
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 17/35] e1000/base: prevent ulp flow if cable connected
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (15 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 16/35] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 18/35] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
` (17 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Enabling ulp on link down when cable is connect caused an infinite
loop of linkup/down indications in the NDIS driver.
After discussed, correct flow is to enable ULP only when cable is
disconnected.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 228d4c5..5077a3f 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1089,6 +1089,9 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
(E1000_READ_REG(hw, E1000_FEXT) &
E1000_FEXT_PHY_CABLE_DISCONNECTED) ? "" : "not",
i * 50);
+ if (!(E1000_READ_REG(hw, E1000_FEXT) &
+ E1000_FEXT_PHY_CABLE_DISCONNECTED))
+ return 0;
}
if (E1000_READ_REG(hw, E1000_FWSM) & E1000_ICH_FWSM_FW_VALID) {
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 18/35] e1000/base: fix TIPG value for non 10 half duplex mode
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (16 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 17/35] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 19/35] e1000/base: add return value for resume workaround Wenzhuo Lu
` (16 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
TIPG value is increased when setting speed to 10 half to prevent
packet loss. However, it was never decreased again when speed
changes. This caused performance issues in the NDIS driver.
Fix this to restore TIPG to default value on non 10 half.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 49 +++++++++++++++++++---------------
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 5077a3f..4ffaeef 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1392,7 +1392,8 @@ out:
STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;
- s32 ret_val;
+ s32 ret_val, tipg_reg = 0;
+ u16 emi_addr, emi_val = 0;
bool link = false;
u16 phy_reg;
@@ -1442,32 +1443,38 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
*/
if (((hw->mac.type == e1000_pch2lan) ||
(hw->mac.type == e1000_pch_lpt)) && link) {
- u32 reg;
- reg = E1000_READ_REG(hw, E1000_STATUS);
- if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) {
- u16 emi_addr;
+ u16 speed, duplex;
- reg = E1000_READ_REG(hw, E1000_TIPG);
- reg &= ~E1000_TIPG_IPGT_MASK;
- reg |= 0xFF;
- E1000_WRITE_REG(hw, E1000_TIPG, reg);
+ e1000_get_speed_and_duplex_copper_generic(hw, &speed, &duplex);
+ tipg_reg = E1000_READ_REG(hw, E1000_TIPG);
+ tipg_reg &= ~E1000_TIPG_IPGT_MASK;
+ if (duplex == HALF_DUPLEX && speed == SPEED_10) {
+ tipg_reg |= 0xFF;
/* Reduce Rx latency in analog PHY */
- ret_val = hw->phy.ops.acquire(hw);
- if (ret_val)
- return ret_val;
+ emi_val = 0;
+ } else {
+ /* Roll back the default values */
+ tipg_reg |= 0x08;
+ emi_val = 1;
+ }
- if (hw->mac.type == e1000_pch2lan)
- emi_addr = I82579_RX_CONFIG;
- else
- emi_addr = I217_RX_CONFIG;
- ret_val = e1000_write_emi_reg_locked(hw, emi_addr, 0);
+ E1000_WRITE_REG(hw, E1000_TIPG, tipg_reg);
- hw->phy.ops.release(hw);
+ ret_val = hw->phy.ops.acquire(hw);
+ if (ret_val)
+ return ret_val;
- if (ret_val)
- return ret_val;
- }
+ if (hw->mac.type == e1000_pch2lan)
+ emi_addr = I82579_RX_CONFIG;
+ else
+ emi_addr = I217_RX_CONFIG;
+ ret_val = e1000_write_emi_reg_locked(hw, emi_addr, emi_val);
+
+ hw->phy.ops.release(hw);
+
+ if (ret_val)
+ return ret_val;
}
/* Work-around I218 hang issue */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 19/35] e1000/base: add return value for resume workaround
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (17 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 18/35] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 20/35] e1000/base: fix link detect flow Wenzhuo Lu
` (15 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Add u32 return value to function e1000_resume_workarounds_pchlan,
so that calling function can detect PHY access failure during resuming
flow.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 11 ++++++-----
drivers/net/e1000/base/e1000_ich8lan.h | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 4ffaeef..5635dd5 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -4943,19 +4943,18 @@ out:
* the PHY.
* On i217, setup Intel Rapid Start Technology.
**/
-void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
+u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
{
s32 ret_val;
DEBUGFUNC("e1000_resume_workarounds_pchlan");
-
if (hw->mac.type < e1000_pch2lan)
- return;
+ return E1000_SUCCESS;
ret_val = e1000_init_phy_workarounds_pchlan(hw);
if (ret_val) {
DEBUGOUT1("Failed to init PHY flow ret_val=%d\n", ret_val);
- return;
+ return ret_val;
}
/* For i217 Intel Rapid Start Technology support when the system
@@ -4969,7 +4968,7 @@ void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
ret_val = hw->phy.ops.acquire(hw);
if (ret_val) {
DEBUGOUT("Failed to setup iRST\n");
- return;
+ return ret_val;
}
/* Clear Auto Enable LPI after link up */
@@ -5003,7 +5002,9 @@ release:
if (ret_val)
DEBUGOUT1("Error %d in resume workarounds\n", ret_val);
hw->phy.ops.release(hw);
+ return ret_val;
}
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index c690d9e..130627c 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -300,7 +300,7 @@ void e1000_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw);
void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw);
void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw);
-void e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
+u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw);
s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 20/35] e1000/base: fix link detect flow
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (18 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 19/35] e1000/base: add return value for resume workaround Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 21/35] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
` (14 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
In case that auto-negotiate is not enabled, call
e1000_setup_copper_link_generic instead of e1000_phy_setup_autoneg.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 5635dd5..d10c5d8 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1254,10 +1254,15 @@ s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
/* Restore link speed advertisements and restart
* Auto-negotiation
*/
- ret_val = e1000_phy_setup_autoneg(hw);
- if (ret_val)
- goto out;
-
+ if (hw->mac.autoneg) {
+ ret_val = e1000_phy_setup_autoneg(hw);
+ if (ret_val)
+ goto out;
+ } else {
+ ret_val = e1000_setup_copper_link_generic(hw);
+ if (ret_val)
+ goto out;
+ }
ret_val = e1000_oem_bits_config_ich8lan(hw, true);
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 21/35] e1000/base: cleanup NAHUM6LP_HW tags
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (19 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 20/35] e1000/base: fix link detect flow Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 22/35] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
` (13 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Remove all NAHUM6LP_HW tags.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_hw.h | 6 +++---
drivers/net/e1000/base/e1000_ich8lan.c | 9 +++++----
drivers/net/e1000/base/e1000_ich8lan.h | 29 ++++++++++++++---------------
drivers/net/e1000/base/e1000_osdep.h | 1 -
drivers/net/e1000/base/e1000_regs.h | 4 ++--
5 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index fd48104..e4e4f76 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -935,7 +935,7 @@ struct e1000_shadow_ram {
#define E1000_SHADOW_RAM_WORDS 2048
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
/* I218 PHY Ultra Low Power (ULP) states */
enum e1000_ulp_state {
e1000_ulp_state_unknown,
@@ -943,7 +943,7 @@ enum e1000_ulp_state {
e1000_ulp_state_on,
};
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
struct e1000_dev_spec_ich8lan {
bool kmrn_lock_loss_workaround_enabled;
struct e1000_shadow_ram shadow_ram[E1000_SHADOW_RAM_WORDS];
@@ -952,7 +952,7 @@ struct e1000_dev_spec_ich8lan {
bool nvm_k1_enabled;
bool eee_disable;
u16 eee_lp_ability;
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
enum e1000_ulp_state ulp_state;
#endif /* NAHUM6LP_HW && ULP_SUPPORT */
u16 lat_enc;
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index d10c5d8..782da2a 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -311,13 +311,13 @@ STATIC s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
*/
e1000_gate_hw_phy_config_ich8lan(hw, true);
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
/* It is not possible to be certain of the current state of ULP
* so forcibly disable it.
*/
hw->dev_spec.ich8lan.ulp_state = e1000_ulp_state_unknown;
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
ret_val = hw->phy.ops.acquire(hw);
if (ret_val) {
DEBUGOUT("Failed to initialize PHY flow\n");
@@ -758,6 +758,7 @@ STATIC s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
/* multicast address update for pch2 */
mac->ops.update_mc_addr_list =
e1000_update_mc_addr_list_pch2lan;
+ /* fall-through */
#endif
case e1000_pchlan:
#if defined(QV_RELEASE) || !defined(NO_PCH_LPT_B0_SUPPORT)
@@ -1047,7 +1048,7 @@ update_fextnvm6:
return ret_val;
}
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
/**
* e1000_enable_ulp_lpt_lp - configure Ultra Low Power mode for LynxPoint-LP
* @hw: pointer to the HW structure
@@ -1385,7 +1386,7 @@ out:
return ret_val;
}
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
/**
* e1000_check_for_copper_link_ich8lan - Check for link (Copper)
* @hw: pointer to the HW structure
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index 130627c..f5d8ab1 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -69,22 +69,22 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FWSM_WLOCK_MAC_MASK 0x0380
#define E1000_FWSM_WLOCK_MAC_SHIFT 7
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FWSM_ULP_CFG_DONE 0x00000400 /* Low power cfg done */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
/* Shared Receive Address Registers */
#define E1000_SHRAL_PCH_LPT(_i) (0x05408 + ((_i) * 8))
#define E1000_SHRAH_PCH_LPT(_i) (0x0540C + ((_i) * 8))
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_H2ME 0x05B50 /* Host to ME */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_H2ME_ULP 0x00000800 /* ULP Indication Bit */
#define E1000_H2ME_ENFORCE_SETTINGS 0x00001000 /* Enforce Settings */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define ID_LED_DEFAULT_ICH8LAN ((ID_LED_DEF1_DEF2 << 12) | \
(ID_LED_OFF1_OFF2 << 8) | \
(ID_LED_OFF1_ON2 << 4) | \
@@ -97,11 +97,11 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_ICH8_LAN_INIT_TIMEOUT 1500
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
/* FEXT register bit definition */
#define E1000_FEXT_PHY_CABLE_DISCONNECTED 0x00000004
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define E1000_FEXTNVM_SW_CONFIG 1
#define E1000_FEXTNVM_SW_CONFIG_ICH8M (1 << 27) /* different on ICH8M */
@@ -115,10 +115,9 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
-
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
#define E1000_ICH_RAR_ENTRIES 7
@@ -185,7 +184,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define CV_SMB_CTRL PHY_REG(769, 23)
#define CV_SMB_CTRL_FORCE_SMBUS 0x0001
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
/* I218 Ultra Low Power Configuration 1 Register */
#define I218_ULP_CONFIG1 PHY_REG(779, 16)
#define I218_ULP_CONFIG1_START 0x0001 /* Start auto ULP config */
@@ -196,7 +195,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define I218_ULP_CONFIG1_RESET_TO_SMBUS 0x0100 /* Reset to SMBus mode */
#define I218_ULP_CONFIG1_DISABLE_SMB_PERST 0x1000 /* Disable on PERST# */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
/* SMBus Address Phy Register */
#define HV_SMB_ADDR PHY_REG(768, 26)
#define HV_SMB_ADDR_MASK 0x007F
@@ -307,9 +306,9 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data);
s32 e1000_write_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 data);
s32 e1000_set_eee_pchlan(struct e1000_hw *hw);
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx);
s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force);
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
#endif /* _E1000_ICH8LAN_H_ */
void e1000_demote_ltr(struct e1000_hw *hw, bool demote, bool link);
diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h
index d04ec73..b2c76e3 100644
--- a/drivers/net/e1000/base/e1000_osdep.h
+++ b/drivers/net/e1000/base/e1000_osdep.h
@@ -118,7 +118,6 @@ static inline uint32_t e1000_read_addr(volatile void* addr)
ADVERTISE_10_FULL | ADVERTISE_100_FULL | ADVERTISE_1000_FULL)
#define M88E1543_E_PHY_ID 0x01410EA0
-#define NAHUM6LP_HW
#define ULP_SUPPORT
#define E1000_RCTL_DTYP_MASK 0x00000C00 /* Descriptor type mask */
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 2891da3..5178e49 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -58,9 +58,9 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_SCTL 0x00024 /* SerDes Control - RW */
#define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */
#define E1000_FCAH 0x0002C /* Flow Control Address High -RW */
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXT 0x0002C /* Future Extended - RW */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define E1000_FEXTNVM 0x00028 /* Future Extended NVM - RW */
#define E1000_FEXTNVM3 0x0003C /* Future Extended NVM 3 - RW */
#define E1000_FEXTNVM4 0x00024 /* Future Extended NVM 4 - RW */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 22/35] e1000/base: add bit for disable packetbuffer read
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (20 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 21/35] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 23/35] e1000/base: K1 flow fixes Wenzhuo Lu
` (12 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Added bit FEXTNVM7[18], that controls disabling MAC packet buffer read.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index f5d8ab1..f7f66a4 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -115,6 +115,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
+/* bit for disabling packet buffer read */
+#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 23/35] e1000/base: K1 flow fixes
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (21 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 22/35] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 24/35] e1000/base: remove FIXME comment Wenzhuo Lu
` (11 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
This patch is for the following updates to the K1 configurations:
Tx idle period for entering K1 should be 128 ns.
Minimum Tx idle period in K1 should be 256 ns.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 47 +++++++++++++++++++++++++++++++++-
drivers/net/e1000/base/e1000_ich8lan.h | 5 +++-
drivers/net/e1000/base/e1000_phy.h | 7 +++++
drivers/net/e1000/base/e1000_regs.h | 1 +
4 files changed, 58 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 782da2a..56e20b4 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1492,10 +1492,14 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
if (ret_val)
return ret_val;
}
-
/* Clear link partner's EEE ability */
hw->dev_spec.ich8lan.eee_lp_ability = 0;
+ /* Configure K0s minimum time */
+ if (hw->mac.type == e1000_pch_lpt) {
+ e1000_configure_k0s_lpt(hw, K1_ENTRY_LATENCY, K1_MIN_TIME);
+ }
+
if (!link)
return E1000_SUCCESS; /* No link detected */
@@ -5298,3 +5302,44 @@ release:
}
}
+/**
+ * e1000_configure_k0s_lpt - Configure K0s power state
+ * @hw: pointer to the HW structure
+ * @entry_latency: Tx idle period for entering K0s - valid values are 0 to 3.
+ * 0 corresponds to 128ns, each value over 0 doubles the duration.
+ * @min_time: Minimum Tx idle period allowed - valid values are 0 to 4.
+ * 0 corresponds to 128ns, each value over 0 doubles the duration.
+ *
+ * Configure the K1 power state based on the provided parameter.
+ * Assumes semaphore already acquired.
+ *
+ * Success returns 0, Failure returns:
+ * -E1000_ERR_PHY (-2) in case of access error
+ * -E1000_ERR_PARAM (-4) in case of parameters error
+ **/
+s32 e1000_configure_k0s_lpt(struct e1000_hw *hw, u8 entry_latency, u8 min_time)
+{
+ s32 ret_val;
+ u16 kmrn_reg = 0;
+
+ DEBUGFUNC("e1000_configure_k0s_lpt");
+
+ if (entry_latency > 3 || min_time > 4)
+ return -E1000_ERR_PARAM;
+
+ ret_val = e1000_read_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K0S_CTRL,
+ &kmrn_reg);
+ if (ret_val)
+ return ret_val;
+
+ /* for now don't touch the latency */
+ kmrn_reg &= ~(E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_MASK);
+ kmrn_reg |= ((min_time << E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_SHIFT));
+
+ ret_val = e1000_write_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K0S_CTRL,
+ kmrn_reg);
+ if (ret_val)
+ return ret_val;
+
+ return E1000_SUCCESS;
+}
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index f7f66a4..c54e4e7 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -114,7 +114,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
-
+#define E1000_FEXTNVM6_K1_OFF_ENABLE 0x80000000
/* bit for disabling packet buffer read */
#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
@@ -181,6 +181,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_NVM_K1_CONFIG 0x1B /* NVM K1 Config Word */
#define E1000_NVM_K1_ENABLE 0x1 /* NVM Enable K1 bit */
+#define K1_ENTRY_LATENCY 0
+#define K1_MIN_TIME 1
/* SMBus Control Phy Register */
#define CV_SMB_CTRL PHY_REG(769, 23)
@@ -303,6 +305,7 @@ void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw);
void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw);
u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
+s32 e1000_configure_k0s_lpt(struct e1000_hw *hw, u8 entry_latency, u8 min_time);
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw);
s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data);
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index 2b78af0..3e45a9e 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -274,6 +274,13 @@ bool e1000_is_mphy_ready(struct e1000_hw *hw);
#define E1000_KMRNCTRLSTA_K1_CONFIG 0x7
#define E1000_KMRNCTRLSTA_K1_ENABLE 0x0002 /* enable K1 */
#define E1000_KMRNCTRLSTA_HD_CTRL 0x10 /* Kumeran HD Control */
+#define E1000_KMRNCTRLSTA_K0S_CTRL 0x1E /* Kumeran K0s Control */
+#define E1000_KMRNCTRLSTA_K0S_CTRL_ENTRY_LTNCY_SHIFT 0
+#define E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_SHIFT 4
+#define E1000_KMRNCTRLSTA_K0S_CTRL_ENTRY_LTNCY_MASK \
+ (3 << E1000_KMRNCTRLSTA_K0S_CTRL_ENTRY_LTNCY_SHIFT)
+#define E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_MASK \
+ (7 << E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_SHIFT)
#define E1000_KMRNCTRLSTA_OP_MODES 0x1F /* Kumeran Modes of Operation */
#define E1000_KMRNCTRLSTA_OP_MODES_LSC2CSC 0x0002 /* change LSC to CSC */
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 5178e49..e23e1e8 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -66,6 +66,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM4 0x00024 /* Future Extended NVM 4 - RW */
#define E1000_FEXTNVM6 0x00010 /* Future Extended NVM 6 - RW */
#define E1000_FEXTNVM7 0x000E4 /* Future Extended NVM 7 - RW */
+#define E1000_PCIEANACFG 0x00F18 /* PCIE Analog Config */
#define E1000_FCT 0x00030 /* Flow Control Type - RW */
#define E1000_CONNSW 0x00034 /* Copper/Fiber switch control - RW */
#define E1000_VET 0x00038 /* VLAN Ether Type - RW */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 24/35] e1000/base: remove FIXME comment
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (22 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 23/35] e1000/base: K1 flow fixes Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 25/35] e1000/base: set correct value of beacon duration Wenzhuo Lu
` (10 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
The "FIXME" comment is revomed from e1000_acquire_swfw_sync_80003es2lan
but forgotten being removed from e1000_acquire_swfw_sync_82575 while
the similar changes were made to both.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 81e6011..511636a 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -1050,7 +1050,7 @@ STATIC s32 e1000_acquire_swfw_sync_82575(struct e1000_hw *hw, u16 mask)
u32 swmask = mask;
u32 fwmask = mask << 16;
s32 ret_val = E1000_SUCCESS;
- s32 i = 0, timeout = 200; /* FIXME: find real value to use here */
+ s32 i = 0, timeout = 200;
DEBUGFUNC("e1000_acquire_swfw_sync_82575");
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 25/35] e1000/base: set correct value of beacon duration
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (23 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 24/35] e1000/base: remove FIXME comment Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 26/35] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
` (9 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Fix for I217 Packet Loss issue - The Management Engine sets the FEXTNVM4
Beacon Duration incorrectly. This fix ensures that the correct value will
always be set. Correct value for this field is 8 usec.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 56e20b4..7b7c631 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1483,6 +1483,20 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
return ret_val;
}
+ /* I217 Packet Loss issue:
+ * ensure that FEXTNVM4 Beacon Duration is set correctly
+ * on power up.
+ * Set the Beacon Duration for I217 to 8 usec
+ */
+ if (hw->mac.type == e1000_pch_lpt) {
+ u32 mac_reg;
+
+ mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM4);
+ mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK;
+ mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_8USEC;
+ E1000_WRITE_REG(hw, E1000_FEXTNVM4, mac_reg);
+ }
+
/* Work-around I218 hang issue */
if ((hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
(hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 26/35] e1000/base: disable extension header parsing for IPv6
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (24 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 25/35] e1000/base: set correct value of beacon duration Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 27/35] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
` (8 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
All 1G Server products need to have IPv6 extension headers turned off.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 511636a..e170353 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -2125,7 +2125,7 @@ STATIC void e1000_clear_hw_cntrs_82575(struct e1000_hw *hw)
* e1000_rx_fifo_flush_82575 - Clean rx fifo after Rx enable
* @hw: pointer to the HW structure
*
- * After rx enable if managability is enabled then there is likely some
+ * After Rx enable, if manageability is enabled then there is likely some
* bad data at the start of the fifo and possibly in the DMA fifo. This
* function clears the fifos and flushes any packets that came in as rx was
* being enabled.
@@ -2135,7 +2135,13 @@ void e1000_rx_fifo_flush_82575(struct e1000_hw *hw)
u32 rctl, rlpml, rxdctl[4], rfctl, temp_rctl, rx_enabled;
int i, ms_wait;
- DEBUGFUNC("e1000_rx_fifo_workaround_82575");
+ DEBUGFUNC("e1000_rx_fifo_flush_82575");
+
+ /* disable IPv6 options as per hardware errata */
+ rfctl = E1000_READ_REG(hw, E1000_RFCTL);
+ rfctl |= E1000_RFCTL_IPV6_EX_DIS;
+ E1000_WRITE_REG(hw, E1000_RFCTL, rfctl);
+
if (hw->mac.type != e1000_82575 ||
!(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN))
return;
@@ -2163,7 +2169,6 @@ void e1000_rx_fifo_flush_82575(struct e1000_hw *hw)
* incoming packets are rejected. Set enable and wait 2ms so that
* any packet that was coming in as RCTL.EN was set is flushed
*/
- rfctl = E1000_READ_REG(hw, E1000_RFCTL);
E1000_WRITE_REG(hw, E1000_RFCTL, rfctl & ~E1000_RFCTL_LEF);
rlpml = E1000_READ_REG(hw, E1000_RLPML);
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 27/35] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (25 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 26/35] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 28/35] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
` (7 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
e1000_check_for_link_media_swap() is supposed to check PHY page 0 for
copper and PHY page 1 for "other" (fiber) link. We switched back from
page 1 to page 0 too soon, before e1000_check_for_link_82575() is
executed and we were never finding link on fiber (other).
Note: The precedence of link type is controlled by the PHY settings.
If the link is copper, as the M88E1112 page address is set to 1, it should be
set back to 0 before checking this link.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index e170353..4374eab 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -1234,7 +1234,7 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
DEBUGFUNC("e1000_check_for_link_media_swap");
- /* Check the copper medium. */
+ /* Check for copper. */
ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
if (ret_val)
return ret_val;
@@ -1246,7 +1246,7 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
if (data & E1000_M88E1112_STATUS_LINK)
port = E1000_MEDIA_PORT_COPPER;
- /* Check the other medium. */
+ /* Check for other. */
ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 1);
if (ret_val)
return ret_val;
@@ -1255,11 +1255,6 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
if (ret_val)
return ret_val;
- /* reset page to 0 */
- ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
- if (ret_val)
- return ret_val;
-
if (data & E1000_M88E1112_STATUS_LINK)
port = E1000_MEDIA_PORT_OTHER;
@@ -1267,8 +1262,20 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
if (port && (hw->dev_spec._82575.media_port != port)) {
hw->dev_spec._82575.media_port = port;
hw->dev_spec._82575.media_changed = true;
+ }
+
+ if (port == E1000_MEDIA_PORT_COPPER) {
+ /* reset page to 0 */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
+ if (ret_val)
+ return ret_val;
+ e1000_check_for_link_82575(hw);
} else {
- ret_val = e1000_check_for_link_82575(hw);
+ e1000_check_for_link_82575(hw);
+ /* reset page to 0 */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
+ if (ret_val)
+ return ret_val;
}
return E1000_SUCCESS;
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 28/35] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (26 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 27/35] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 29/35] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
` (6 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Previously, in check_reset_block RSPCIPHY was polled for 100 ms before determining
that the ME veto is set. This needed to be increased to 300 ms.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 7b7c631..70eba71 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1991,7 +1991,7 @@ STATIC s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw)
continue;
}
blocked = false;
- } while (blocked && (i++ < 10));
+ } while (blocked && (i++ < 30));
return blocked ? E1000_BLK_PHY_RESET : E1000_SUCCESS;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 29/35] e1000/base: implement 88E1543 PHY initialization
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (27 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 28/35] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 30/35] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
` (5 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
The initializtion process for 88E1543 PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 106 ++++++++++++++++++++++++++++++++-
drivers/net/e1000/base/e1000_82575.h | 1 +
drivers/net/e1000/base/e1000_defines.h | 1 +
3 files changed, 107 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 4374eab..723885d 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -277,6 +277,11 @@ STATIC s32 e1000_init_phy_params_82575(struct e1000_hw *hw)
if (ret_val)
goto out;
}
+ if (phy->id == M88E1543_E_PHY_ID) {
+ ret_val = e1000_initialize_M88E1543_phy(hw);
+ if (ret_val)
+ goto out;
+ }
break;
case IGP03E1000_E_PHY_ID:
case IGP04E1000_E_PHY_ID:
@@ -2817,7 +2822,7 @@ s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data)
* e1000_initialize_M88E1512_phy - Initialize M88E1512 PHY
* @hw: pointer to the HW structure
*
- * Initialize Marverl 1512 to work correctly with Avoton.
+ * Initialize Marvell 1512 to work correctly with Avoton.
**/
s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw)
{
@@ -2903,6 +2908,105 @@ out:
}
/**
+ * e1000_initialize_M88E1543_phy - Initialize M88E1543 PHY
+ * @hw: pointer to the HW structure
+ *
+ * Initialize Marvell 1543 to work correctly with Avoton.
+ **/
+s32 e1000_initialize_M88E1543_phy(struct e1000_hw *hw)
+{
+ struct e1000_phy_info *phy = &hw->phy;
+ s32 ret_val = E1000_SUCCESS;
+
+ DEBUGFUNC("e1000_initialize_M88E1543_phy");
+
+ /* Check if this is correct PHY. */
+ if (phy->id != M88E1543_E_PHY_ID)
+ goto out;
+
+ /* Switch to PHY page 0xFF. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FF);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x214B);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2144);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x0C28);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2146);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xB233);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x214D);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xDC0C);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2159);
+ if (ret_val)
+ goto out;
+
+ /* Switch to PHY page 0xFB. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FB);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_3, 0xC00D);
+ if (ret_val)
+ goto out;
+
+ /* Switch to PHY page 0x12. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x12);
+ if (ret_val)
+ goto out;
+
+ /* Change mode to SGMII-to-Copper */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_MODE, 0x8001);
+ if (ret_val)
+ goto out;
+
+ /* Switch to PHY page 1. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x1);
+ if (ret_val)
+ goto out;
+
+ /* Change mode to 1000BASE-X/SGMII and autoneg enable; reset */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_FIBER_CTRL, 0x9140);
+ if (ret_val)
+ goto out;
+
+ /* Return the PHY to page 0. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.commit(hw);
+ if (ret_val) {
+ DEBUGOUT("Error committing the PHY changes\n");
+ return ret_val;
+ }
+
+ msec_delay(1000);
+out:
+ return ret_val;
+}
+
+/**
* e1000_set_eee_i350 - Enable/disable EEE support
* @hw: pointer to the HW structure
* @adv1g: boolean flag enabling 1G EEE advertisement
diff --git a/drivers/net/e1000/base/e1000_82575.h b/drivers/net/e1000/base/e1000_82575.h
index 7a46ceb..c498684 100644
--- a/drivers/net/e1000/base/e1000_82575.h
+++ b/drivers/net/e1000/base/e1000_82575.h
@@ -498,6 +498,7 @@ s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M);
s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M);
s32 e1000_get_eee_status_i354(struct e1000_hw *, bool *);
s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw);
+s32 e1000_initialize_M88E1543_phy(struct e1000_hw *hw);
/* I2C SDA and SCL timing parameters for standard mode */
#define E1000_I2C_T_HD_STA 4
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 8e40771..69aa1f2 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -847,6 +847,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_M88E1543_PAGE_ADDR 0x16 /* Page Offset Register */
#define E1000_M88E1543_EEE_CTRL_1 0x0
#define E1000_M88E1543_EEE_CTRL_1_MS 0x0001 /* EEE Master/Slave */
+#define E1000_M88E1543_FIBER_CTRL 0x0 /* Fiber Control Register */
#define E1000_EEE_ADV_DEV_I354 7
#define E1000_EEE_ADV_ADDR_I354 60
#define E1000_EEE_ADV_100_SUPPORTED (1 << 1) /* 100BaseTx EEE Supported */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 30/35] e1000/base: use the correct i210 register for EEMNGCTL
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (28 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 29/35] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 31/35] e1000/base: move the print to the right position Wenzhuo Lu
` (4 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
The i210 has two EEPROM access registers that are located in
non-standard offsets: EEARBC and EEMNGCTL. EEARBC was fixed previously
and EEMNGCTL should also be corrected.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_i210.c | 30 ++++++++++++++++++++++++++++++
drivers/net/e1000/base/e1000_regs.h | 1 +
2 files changed, 31 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index fedf88e..277331c 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -982,6 +982,35 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
}
/**
+ * e1000_get_cfg_done_i210 - Read config done bit
+ * @hw: pointer to the HW structure
+ *
+ * Read the management control register for the config done bit for
+ * completion status. NOTE: silicon which is EEPROM-less will fail trying
+ * to read the config done bit, so an error is *ONLY* logged and returns
+ * E1000_SUCCESS. If we were to return with error, EEPROM-less silicon
+ * would not be able to be reset or change link.
+ **/
+STATIC s32 e1000_get_cfg_done_i210(struct e1000_hw *hw)
+{
+ s32 timeout = PHY_CFG_TIMEOUT;
+ u32 mask = E1000_NVM_CFG_DONE_PORT_0;
+
+ DEBUGFUNC("e1000_get_cfg_done_i210");
+
+ while (timeout) {
+ if (E1000_READ_REG(hw, E1000_EEMNGCTL_I210) & mask)
+ break;
+ msec_delay(1);
+ timeout--;
+ }
+ if (!timeout)
+ DEBUGOUT("MNG configuration cycle has not completed.\n");
+
+ return E1000_SUCCESS;
+}
+
+/**
* e1000_init_hw_i210 - Init hw for I210/I211
* @hw: pointer to the HW structure
*
@@ -998,6 +1027,7 @@ s32 e1000_init_hw_i210(struct e1000_hw *hw)
if (ret_val != E1000_SUCCESS)
return ret_val;
}
+ hw->phy.ops.get_cfg_done = e1000_get_cfg_done_i210;
ret_val = e1000_init_hw_82575(hw);
return ret_val;
}
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index e23e1e8..84531a9 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -110,6 +110,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PBS 0x01008 /* Packet Buffer Size */
#define E1000_PBECCSTS 0x0100C /* Packet Buffer ECC Status - RW */
#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
+#define E1000_EEMNGCTL_I210 0x01010 /* i210 MNG EEprom Mode Control */
#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
#define E1000_EEARBC_I210 0x12024 /* EEPROM Auto Read Bus Control */
#define E1000_FLASHT 0x01028 /* FLASH Timer Register */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 31/35] e1000/base: move the print to the right position
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (29 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 30/35] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 32/35] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
` (3 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
This info need not to be always printed. Move it into the if.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_phy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index 6bbb379..d43b7ce 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -1833,9 +1833,9 @@ s32 e1000_phy_force_speed_duplex_m88(struct e1000_hw *hw)
phy_data);
if (ret_val)
return ret_val;
- }
- DEBUGOUT1("M88E1000 PSCR: %X\n", phy_data);
+ DEBUGOUT1("M88E1000 PSCR: %X\n", phy_data);
+ }
ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
if (ret_val)
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 32/35] e1000/base: synchronization of MAC-PHY interface only on non- ME systems
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (30 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 31/35] e1000/base: move the print to the right position Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 33/35] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
` (2 subsequent siblings)
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
On power up, the MAC - PHY interface needs to be set to PCIe, even if
cable is disconnected. In ME systems, the ME handles this on exit from
Sx(Sticky mode) state. In non-ME, the driver handles it. Added a check
for non-ME system to the driver code that handles that.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 70eba71..6dc053f 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -234,15 +234,19 @@ STATIC bool e1000_phy_is_accessible_pchlan(struct e1000_hw *hw)
return false;
out:
if (hw->mac.type == e1000_pch_lpt) {
- /* Unforce SMBus mode in PHY */
- hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg);
- phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
- hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg);
+ /* Only unforce SMBus if ME is not active */
+ if (!(E1000_READ_REG(hw, E1000_FWSM) &
+ E1000_ICH_FWSM_FW_VALID)) {
+ /* Unforce SMBus mode in PHY */
+ hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg);
+ phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
+ hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg);
- /* Unforce SMBus mode in MAC */
- mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT);
- mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
- E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg);
+ /* Unforce SMBus mode in MAC */
+ mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT);
+ mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
+ E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg);
+ }
}
return true;
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 33/35] e1000/base: fix to enable both ulp and EEE in Sx state
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (31 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 32/35] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 34/35] e1000/base: some minor change Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 35/35] e1000: add new devices Wenzhuo Lu
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
This patch implements a modified flow that allows both ULP and EEE
in Sx(Sticky mode).
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 6dc053f..f62ad0b 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1154,10 +1154,15 @@ skip_smbus:
if (to_sx) {
if (E1000_READ_REG(hw, E1000_WUFC) & E1000_WUFC_LNKC)
phy_reg |= I218_ULP_CONFIG1_WOL_HOST;
+ else
+ phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST;
phy_reg |= I218_ULP_CONFIG1_STICKY_ULP;
+ phy_reg &= ~I218_ULP_CONFIG1_INBAND_EXIT;
} else {
phy_reg |= I218_ULP_CONFIG1_INBAND_EXIT;
+ phy_reg &= ~I218_ULP_CONFIG1_STICKY_ULP;
+ phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST;
}
e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg);
@@ -1178,6 +1183,7 @@ skip_smbus:
mac_reg &= ~E1000_TCTL_EN;
E1000_WRITE_REG(hw, E1000_TCTL, mac_reg);
}
+
release:
hw->phy.ops.release(hw);
out:
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 34/35] e1000/base: some minor change
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (32 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 33/35] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 35/35] e1000: add new devices Wenzhuo Lu
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Some minor code change. No functionality impact.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 27 ++++++++++++---------------
drivers/net/e1000/base/e1000_ich8lan.h | 1 +
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index f62ad0b..89d07e9 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1442,7 +1442,6 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
ret_val = e1000_disable_ulp_lpt_lp(hw, false);
else
ret_val = e1000_enable_ulp_lpt_lp(hw, false);
-
if (ret_val)
return ret_val;
}
@@ -2979,7 +2978,6 @@ STATIC s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active)
u16 oem_reg;
DEBUGFUNC("e1000_set_lplu_state_pchlan");
-
ret_val = hw->phy.ops.read_reg(hw, HV_OEM_BITS, &oem_reg);
if (ret_val)
return ret_val;
@@ -3199,6 +3197,7 @@ STATIC s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
struct e1000_nvm_info *nvm = &hw->nvm;
u32 bank1_offset = nvm->flash_bank_size * sizeof(u16);
u32 act_offset = E1000_ICH_NVM_SIG_WORD * 2 + 1;
+ u32 nvm_dword = 0;
u8 sig_byte = 0;
s32 ret_val;
@@ -3506,12 +3505,10 @@ STATIC s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
hsflctl.hsf_ctrl.fldbcount = size - 1;
hsflctl.hsf_ctrl.flcycle = ICH_CYCLE_READ;
E1000_WRITE_FLASH_REG16(hw, ICH_FLASH_HSFCTL, hsflctl.regval);
-
E1000_WRITE_FLASH_REG(hw, ICH_FLASH_FADDR, flash_linear_addr);
- ret_val =
- e1000_flash_cycle_ich8lan(hw,
- ICH_FLASH_READ_COMMAND_TIMEOUT);
+ ret_val = e1000_flash_cycle_ich8lan(hw,
+ ICH_FLASH_READ_COMMAND_TIMEOUT);
/* Check if FCERR is set to 1, if set to 1, clear it
* and try the whole sequence a few more times, else
@@ -3546,6 +3543,7 @@ STATIC s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
return ret_val;
}
+
/**
* e1000_write_nvm_ich8lan - Write word(s) to the NVM
* @hw: pointer to the HW structure
@@ -3599,7 +3597,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
u32 i, act_offset, new_bank_offset, old_bank_offset, bank;
s32 ret_val;
- u16 data;
+ u16 data = 0;
DEBUGFUNC("e1000_update_nvm_checksum_ich8lan");
@@ -3635,12 +3633,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
if (ret_val)
goto release;
}
-
for (i = 0; i < E1000_SHADOW_RAM_WORDS; i++) {
- /* Determine whether to write the value stored
- * in the other NVM bank or a modified value stored
- * in the shadow RAM
- */
if (dev_spec->shadow_ram[i].modified) {
data = dev_spec->shadow_ram[i].value;
} else {
@@ -3650,7 +3643,6 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
if (ret_val)
break;
}
-
/* If the word is 0x13, then make sure the signature bits
* (15:14) are 11b until the commit has completed.
* This will allow us to write 10b which indicates the
@@ -3665,6 +3657,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
act_offset = (i + new_bank_offset) << 1;
usec_delay(100);
+
/* Write the bytes to the new bank. */
ret_val = e1000_retry_write_flash_byte_ich8lan(hw,
act_offset,
@@ -3699,8 +3692,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
goto release;
data &= 0xBFFF;
- ret_val = e1000_retry_write_flash_byte_ich8lan(hw,
- act_offset * 2 + 1,
+ ret_val = e1000_retry_write_flash_byte_ich8lan(hw, act_offset * 2 + 1,
(u8)(data >> 8));
if (ret_val)
goto release;
@@ -3711,7 +3703,9 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
* to 1's. We can write 1's to 0's without an erase
*/
act_offset = (old_bank_offset + E1000_ICH_NVM_SIG_WORD) * 2 + 1;
+
ret_val = e1000_retry_write_flash_byte_ich8lan(hw, act_offset, 0);
+
if (ret_val)
goto release;
@@ -3865,6 +3859,7 @@ STATIC s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
return ret_val;
}
+
/**
* e1000_write_flash_byte_ich8lan - Write a single byte to NVM
* @hw: pointer to the HW structure
@@ -3883,6 +3878,8 @@ STATIC s32 e1000_write_flash_byte_ich8lan(struct e1000_hw *hw, u32 offset,
return e1000_write_flash_data_ich8lan(hw, offset, 1, word);
}
+
+
/**
* e1000_retry_write_flash_byte_ich8lan - Writes a single byte to NVM
* @hw: pointer to the HW structure
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index c54e4e7..33e77fb 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -117,6 +117,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_K1_OFF_ENABLE 0x80000000
/* bit for disabling packet buffer read */
#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
+#define E1000_FEXTNVM7_SIDE_CLK_UNGATE 0x00000004
#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v2 35/35] e1000: add new devices
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
` (33 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 34/35] e1000/base: some minor change Wenzhuo Lu
@ 2015-10-15 2:03 ` Wenzhuo Lu
34 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-15 2:03 UTC (permalink / raw)
To: dev
Add the new e1000 devices to the DPDK PCI device list.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
lib/librte_eal/common/include/rte_pci_dev_ids.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index 265e66c..19892e1 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -272,6 +272,11 @@
#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B
#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A
#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559
+#define E1000_DEV_ID_PCH_I218_LM2 0x15A0
+#define E1000_DEV_ID_PCH_I218_V2 0x15A1
+#define E1000_DEV_ID_PCH_I218_LM3 0x15A2
+#define E1000_DEV_ID_PCH_I218_V3 0x15A3
+
/*
* Tested (supported) on VM emulated HW.
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and copyright
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and copyright Wenzhuo Lu
@ 2015-10-15 8:30 ` Mcnamara, John
2015-10-15 8:37 ` Lu, Wenzhuo
0 siblings, 1 reply; 118+ messages in thread
From: Mcnamara, John @ 2015-10-15 8:30 UTC (permalink / raw)
To: Lu, Wenzhuo, dev
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> Sent: Thursday, October 15, 2015 3:03 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and
> copyright
Hi Wenzhuo,
If you do an update to this patchset again could you add something to the release note. Or just submit it in another patch if this gets merged as it is.
It doesn't need to include every change to e1000/base, just a summary of the important ones. See for example the entry for "Updated the ixgbe base driver" in the previous release notes:
http://dpdk.org/doc/guides/rel_notes/release_2_1.html
John.
--
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and copyright
2015-10-15 8:30 ` Mcnamara, John
@ 2015-10-15 8:37 ` Lu, Wenzhuo
0 siblings, 0 replies; 118+ messages in thread
From: Lu, Wenzhuo @ 2015-10-15 8:37 UTC (permalink / raw)
To: Mcnamara, John, dev
Hi John,
> -----Original Message-----
> From: Mcnamara, John
> Sent: Thursday, October 15, 2015 4:30 PM
> To: Lu, Wenzhuo; dev@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and
> copyright
>
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Wenzhuo Lu
> > Sent: Thursday, October 15, 2015 3:03 AM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and
> > copyright
>
> Hi Wenzhuo,
>
> If you do an update to this patchset again could you add something to the
> release note. Or just submit it in another patch if this gets merged as it is.
>
> It doesn't need to include every change to e1000/base, just a summary of the
> important ones. See for example the entry for "Updated the ixgbe base driver" in
> the previous release notes:
>
> http://dpdk.org/doc/guides/rel_notes/release_2_1.html
Thanks for the comments. I'll update the release notes.
>
> John.
> --
>
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 00/36] update e1000 base code
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (34 preceding siblings ...)
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 01/36] e1000/base: update readme and copyright Wenzhuo Lu
` (36 more replies)
2015-10-19 16:03 ` [dpdk-dev] [PATCH 00/34] update e1000 base driver Thomas Monjalon
36 siblings, 37 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
Short summary:
*update readme and copyright
*add new devices
*fix issue with link flap on 82579
*fix issue with jumbo frame CRC failures in client
*redundant PHY power down for i210
*add return value to the functions of setting receive address register
*add defaults for i210 TX/RX PBSIZE
*remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset
*add evaluation of e1000_nvm_read return value
*change invariant return to not use variables
*add return value handler when check manage mode
*add return value handler for ESB2 controller init and reset
*add support for inverted format ETrackId
*add EEARBC_I210 for i210
*apply paranoia to macro arguments
*add flags to set eee advertisement modes
*prevent ulp flow if cable connected
*fix TIPG value for non 10 half duplex mode
*add return value for resume workaround
*fix link detect flow
*cleanup NAHUM6LP_HW tags
*add bit for disable packetbuffer read
*K1 flow fixes
*remove FIXME comment
*set correct value of beacon duration
*disable extension header parsing for IPv6
*fix for i354 88E1112 PHY using AutoMedia Detect
*increase timeout of polling bit RSPCIPHY in check_reset_block
*implement 88E1543 PHY initialization
*use the correct i210 register for EEMNGCTL
*move the print to the right position
*synchronization of MAC-PHY interface only on non- ME systems
*fix to enable both ulp and EEE in Sx state
V2:
Add the new devices to the DPDK PCI device list.
V3:
Update the release notes.
Wenzhuo Lu (36):
e1000/base: update readme and copyright
e1000/base: add new devices
e1000/base: fix issue with link flap on 82579
e1000/base: fix issue with jumbo frame CRC failures in client
e1000/base: redundant PHY power down for i210
e1000/base: add return value to the functions of setting receive
address register
e1000/base: add defaults for i210 TX/RX PBSIZE
e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after
commencing HW reset
e1000/base: add evaluation of e1000_nvm_read return value
e1000/base: change invariant return to not use variables
e1000/base: add return value handler when check manage mode
e1000/base: add return value handler for ESB2 controller init and
reset
e1000/base: add support for inverted format ETrackId
e1000/base: add EEARBC_I210 for i210
e1000/base: apply paranoia to macro arguments
e1000/base: add flags to set eee advertisement modes
e1000/base: prevent ulp flow if cable connected
e1000/base: fix TIPG value for non 10 half duplex mode
e1000/base: add return value for resume workaround
e1000/base: fix link detect flow
e1000/base: cleanup NAHUM6LP_HW tags
e1000/base: add bit for disable packetbuffer read
e1000/base: K1 flow fixes
e1000/base: remove FIXME comment
e1000/base: set correct value of beacon duration
e1000/base: disable extension header parsing for IPv6
e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect
e1000/base: increase timeout of polling bit RSPCIPHY in
check_reset_block
e1000/base: implement 88E1543 PHY initialization
e1000/base: use the correct i210 register for EEMNGCTL
e1000/base: move the print to the right position
e1000/base: synchronization of MAC-PHY interface only on non- ME
systems
e1000/base: fix to enable both ulp and EEE in Sx state
e1000/base: some minor change
e1000: add new devices
doc: update release notes for e1000 base code update
doc/guides/rel_notes/release_2_2.rst | 22 +++
drivers/net/e1000/base/README | 4 +-
drivers/net/e1000/base/e1000_80003es2lan.c | 33 ++--
drivers/net/e1000/base/e1000_80003es2lan.h | 2 +-
drivers/net/e1000/base/e1000_82540.c | 2 +-
drivers/net/e1000/base/e1000_82541.c | 2 +-
drivers/net/e1000/base/e1000_82541.h | 2 +-
drivers/net/e1000/base/e1000_82542.c | 8 +-
drivers/net/e1000/base/e1000_82543.c | 2 +-
drivers/net/e1000/base/e1000_82543.h | 2 +-
drivers/net/e1000/base/e1000_82571.c | 8 +-
drivers/net/e1000/base/e1000_82571.h | 2 +-
drivers/net/e1000/base/e1000_82575.c | 205 +++++++++++++++----
drivers/net/e1000/base/e1000_82575.h | 7 +-
drivers/net/e1000/base/e1000_api.c | 12 +-
drivers/net/e1000/base/e1000_api.h | 20 +-
drivers/net/e1000/base/e1000_defines.h | 8 +-
drivers/net/e1000/base/e1000_hw.h | 16 +-
drivers/net/e1000/base/e1000_i210.c | 49 ++++-
drivers/net/e1000/base/e1000_i210.h | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 252 +++++++++++++++++-------
drivers/net/e1000/base/e1000_ich8lan.h | 43 ++--
drivers/net/e1000/base/e1000_mac.c | 14 +-
drivers/net/e1000/base/e1000_mac.h | 4 +-
drivers/net/e1000/base/e1000_manage.c | 7 +-
drivers/net/e1000/base/e1000_manage.h | 2 +-
drivers/net/e1000/base/e1000_mbx.c | 2 +-
drivers/net/e1000/base/e1000_mbx.h | 2 +-
drivers/net/e1000/base/e1000_nvm.c | 11 +-
drivers/net/e1000/base/e1000_nvm.h | 2 +-
drivers/net/e1000/base/e1000_osdep.h | 1 -
drivers/net/e1000/base/e1000_phy.c | 21 +-
drivers/net/e1000/base/e1000_phy.h | 10 +-
drivers/net/e1000/base/e1000_regs.h | 13 +-
drivers/net/e1000/base/e1000_vf.c | 8 +-
drivers/net/e1000/base/e1000_vf.h | 4 +-
lib/librte_eal/common/include/rte_pci_dev_ids.h | 5 +
37 files changed, 581 insertions(+), 228 deletions(-)
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 01/36] e1000/base: update readme and copyright
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 02/36] e1000/base: add new devices Wenzhuo Lu
` (35 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/README | 4 ++--
drivers/net/e1000/base/e1000_80003es2lan.c | 2 +-
drivers/net/e1000/base/e1000_80003es2lan.h | 2 +-
drivers/net/e1000/base/e1000_82540.c | 2 +-
drivers/net/e1000/base/e1000_82541.c | 2 +-
drivers/net/e1000/base/e1000_82541.h | 2 +-
drivers/net/e1000/base/e1000_82542.c | 2 +-
drivers/net/e1000/base/e1000_82543.c | 2 +-
drivers/net/e1000/base/e1000_82543.h | 2 +-
drivers/net/e1000/base/e1000_82571.c | 2 +-
drivers/net/e1000/base/e1000_82571.h | 2 +-
drivers/net/e1000/base/e1000_82575.c | 2 +-
drivers/net/e1000/base/e1000_82575.h | 2 +-
drivers/net/e1000/base/e1000_api.c | 2 +-
drivers/net/e1000/base/e1000_api.h | 2 +-
drivers/net/e1000/base/e1000_defines.h | 2 +-
drivers/net/e1000/base/e1000_hw.h | 2 +-
drivers/net/e1000/base/e1000_i210.c | 2 +-
drivers/net/e1000/base/e1000_i210.h | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
drivers/net/e1000/base/e1000_ich8lan.h | 2 +-
drivers/net/e1000/base/e1000_mac.c | 2 +-
drivers/net/e1000/base/e1000_mac.h | 2 +-
drivers/net/e1000/base/e1000_manage.c | 2 +-
drivers/net/e1000/base/e1000_manage.h | 2 +-
drivers/net/e1000/base/e1000_mbx.c | 2 +-
drivers/net/e1000/base/e1000_mbx.h | 2 +-
drivers/net/e1000/base/e1000_nvm.c | 2 +-
drivers/net/e1000/base/e1000_nvm.h | 2 +-
drivers/net/e1000/base/e1000_phy.c | 2 +-
drivers/net/e1000/base/e1000_phy.h | 2 +-
drivers/net/e1000/base/e1000_regs.h | 2 +-
drivers/net/e1000/base/e1000_vf.c | 2 +-
drivers/net/e1000/base/e1000_vf.h | 2 +-
34 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/net/e1000/base/README b/drivers/net/e1000/base/README
index 59275b6..8d48135 100644
--- a/drivers/net/e1000/base/README
+++ b/drivers/net/e1000/base/README
@@ -1,7 +1,7 @@
..
BSD LICENSE
- Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -31,7 +31,7 @@
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This directory contains source code of FreeBSD em & igb drivers of version
-cid-shared-code.2014.04.21 released by LAD. The sub-directory of lad/
+cid-shared-code.2015.10.09 released by ND. The sub-directory of base/
contains the original source package.
Updating the driver
diff --git a/drivers/net/e1000/base/e1000_80003es2lan.c b/drivers/net/e1000/base/e1000_80003es2lan.c
index 72692d9..b79496b 100644
--- a/drivers/net/e1000/base/e1000_80003es2lan.c
+++ b/drivers/net/e1000/base/e1000_80003es2lan.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_80003es2lan.h b/drivers/net/e1000/base/e1000_80003es2lan.h
index f5fe967..93ec19b 100644
--- a/drivers/net/e1000/base/e1000_80003es2lan.h
+++ b/drivers/net/e1000/base/e1000_80003es2lan.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82540.c b/drivers/net/e1000/base/e1000_82540.c
index fc1fa94..7de7b7b 100644
--- a/drivers/net/e1000/base/e1000_82540.c
+++ b/drivers/net/e1000/base/e1000_82540.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82541.c b/drivers/net/e1000/base/e1000_82541.c
index 952aea2..9cdb91c 100644
--- a/drivers/net/e1000/base/e1000_82541.c
+++ b/drivers/net/e1000/base/e1000_82541.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82541.h b/drivers/net/e1000/base/e1000_82541.h
index 0f50f55..e0bee7c 100644
--- a/drivers/net/e1000/base/e1000_82541.h
+++ b/drivers/net/e1000/base/e1000_82541.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82542.c b/drivers/net/e1000/base/e1000_82542.c
index afea469..a538cba 100644
--- a/drivers/net/e1000/base/e1000_82542.c
+++ b/drivers/net/e1000/base/e1000_82542.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82543.c b/drivers/net/e1000/base/e1000_82543.c
index 36335ba..fc96199 100644
--- a/drivers/net/e1000/base/e1000_82543.c
+++ b/drivers/net/e1000/base/e1000_82543.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82543.h b/drivers/net/e1000/base/e1000_82543.h
index 51056db..4eb3f62 100644
--- a/drivers/net/e1000/base/e1000_82543.h
+++ b/drivers/net/e1000/base/e1000_82543.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82571.c b/drivers/net/e1000/base/e1000_82571.c
index 8ae1cb1..5e0e43c 100644
--- a/drivers/net/e1000/base/e1000_82571.c
+++ b/drivers/net/e1000/base/e1000_82571.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82571.h b/drivers/net/e1000/base/e1000_82571.h
index bdf6446..c8037b6 100644
--- a/drivers/net/e1000/base/e1000_82571.h
+++ b/drivers/net/e1000/base/e1000_82571.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 25fa672..3dc8066 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_82575.h b/drivers/net/e1000/base/e1000_82575.h
index 09b7bf2..0c8a464 100644
--- a/drivers/net/e1000/base/e1000_82575.h
+++ b/drivers/net/e1000/base/e1000_82575.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c
index a064565..bfddb79 100644
--- a/drivers/net/e1000/base/e1000_api.c
+++ b/drivers/net/e1000/base/e1000_api.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_api.h b/drivers/net/e1000/base/e1000_api.h
index 02b16da..53a641c 100644
--- a/drivers/net/e1000/base/e1000_api.h
+++ b/drivers/net/e1000/base/e1000_api.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 278c507..605e26e 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index 4dd92a3..b0e7a61 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index 1f5600d..842e9d4 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_i210.h b/drivers/net/e1000/base/e1000_i210.h
index f2bd43b..1a6f1dd 100644
--- a/drivers/net/e1000/base/e1000_i210.h
+++ b/drivers/net/e1000/base/e1000_i210.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 3b1627b..f98d54e 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index 8c5e9c3..e9b73df 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mac.c b/drivers/net/e1000/base/e1000_mac.c
index c8ec049..5c107c6 100644
--- a/drivers/net/e1000/base/e1000_mac.c
+++ b/drivers/net/e1000/base/e1000_mac.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mac.h b/drivers/net/e1000/base/e1000_mac.h
index 5a7ce4a..b5d0940 100644
--- a/drivers/net/e1000/base/e1000_mac.h
+++ b/drivers/net/e1000/base/e1000_mac.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_manage.c b/drivers/net/e1000/base/e1000_manage.c
index 30db892..ac4c08a 100644
--- a/drivers/net/e1000/base/e1000_manage.c
+++ b/drivers/net/e1000/base/e1000_manage.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_manage.h b/drivers/net/e1000/base/e1000_manage.h
index e6f92c0..25be115 100644
--- a/drivers/net/e1000/base/e1000_manage.h
+++ b/drivers/net/e1000/base/e1000_manage.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mbx.c b/drivers/net/e1000/base/e1000_mbx.c
index 7ec4c56..6daf16b 100644
--- a/drivers/net/e1000/base/e1000_mbx.c
+++ b/drivers/net/e1000/base/e1000_mbx.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_mbx.h b/drivers/net/e1000/base/e1000_mbx.h
index e9524fc..563dcb9 100644
--- a/drivers/net/e1000/base/e1000_mbx.h
+++ b/drivers/net/e1000/base/e1000_mbx.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c
index 8be437a..966a34c 100644
--- a/drivers/net/e1000/base/e1000_nvm.c
+++ b/drivers/net/e1000/base/e1000_nvm.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_nvm.h b/drivers/net/e1000/base/e1000_nvm.h
index dee1f62..c400dc3 100644
--- a/drivers/net/e1000/base/e1000_nvm.h
+++ b/drivers/net/e1000/base/e1000_nvm.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index e214f17..7620ecf 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index 73a9b1f..b30b36e 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index bde2a08..8999b5b 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_vf.c b/drivers/net/e1000/base/e1000_vf.c
index 778561e..3a47d35 100644
--- a/drivers/net/e1000/base/e1000_vf.c
+++ b/drivers/net/e1000/base/e1000_vf.c
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
diff --git a/drivers/net/e1000/base/e1000_vf.h b/drivers/net/e1000/base/e1000_vf.h
index 6d5bd99..7218212 100644
--- a/drivers/net/e1000/base/e1000_vf.h
+++ b/drivers/net/e1000/base/e1000_vf.h
@@ -1,6 +1,6 @@
/*******************************************************************************
-Copyright (c) 2001-2014, Intel Corporation
+Copyright (c) 2001-2015, Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 02/36] e1000/base: add new devices
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 01/36] e1000/base: update readme and copyright Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 03/36] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
` (34 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
Add some new i218 devices.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_api.c | 4 ++++
drivers/net/e1000/base/e1000_defines.h | 2 ++
drivers/net/e1000/base/e1000_hw.h | 4 ++++
drivers/net/e1000/base/e1000_ich8lan.c | 18 ++++++++++++++----
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c
index bfddb79..5ec0ad1 100644
--- a/drivers/net/e1000/base/e1000_api.c
+++ b/drivers/net/e1000/base/e1000_api.c
@@ -292,6 +292,10 @@ s32 e1000_set_mac_type(struct e1000_hw *hw)
case E1000_DEV_ID_PCH_LPT_I217_V:
case E1000_DEV_ID_PCH_LPTLP_I218_LM:
case E1000_DEV_ID_PCH_LPTLP_I218_V:
+ case E1000_DEV_ID_PCH_I218_LM2:
+ case E1000_DEV_ID_PCH_I218_V2:
+ case E1000_DEV_ID_PCH_I218_LM3:
+ case E1000_DEV_ID_PCH_I218_V3:
mac->type = e1000_pch_lpt;
break;
case E1000_DEV_ID_82575EB_COPPER:
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 605e26e..71bd2e0 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -197,6 +197,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */
#define E1000_RCTL_DTYP_PS 0x00000400 /* Packet Split descriptor */
#define E1000_RCTL_RDMTS_HALF 0x00000000 /* Rx desc min thresh size */
+#define E1000_RCTL_RDMTS_HEX 0x00010000
#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */
#define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */
#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */
@@ -1467,6 +1468,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_RXPBS_SIZE_I210_MASK 0x0000003F /* Rx packet buffer size */
#define E1000_TXPB0S_SIZE_I210_MASK 0x0000003F /* Tx packet buffer 0 size */
+
/* Proxy Filter Control */
#define E1000_PROXYFC_D0 0x00000001 /* Enable offload in D0 */
#define E1000_PROXYFC_EX 0x00000004 /* Directed exact proxy */
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index b0e7a61..154b9e5 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -132,6 +132,10 @@ struct e1000_hw;
#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B
#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A
#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559
+#define E1000_DEV_ID_PCH_I218_LM2 0x15A0
+#define E1000_DEV_ID_PCH_I218_V2 0x15A1
+#define E1000_DEV_ID_PCH_I218_LM3 0x15A2 /* Wildcat Point PCH */
+#define E1000_DEV_ID_PCH_I218_V3 0x15A3 /* Wildcat Point PCH */
#define E1000_DEV_ID_82576 0x10C9
#define E1000_DEV_ID_82576_FIBER 0x10E6
#define E1000_DEV_ID_82576_SERDES 0x10E7
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index f98d54e..6d998df 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -62,6 +62,10 @@ POSSIBILITY OF SUCH DAMAGE.
* Ethernet Connection I217-V
* Ethernet Connection I218-V
* Ethernet Connection I218-LM
+ * Ethernet Connection (2) I218-LM
+ * Ethernet Connection (2) I218-V
+ * Ethernet Connection (3) I218-LM
+ * Ethernet Connection (3) I218-V
*/
#include "e1000_api.h"
@@ -1052,19 +1056,19 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
if ((hw->mac.type < e1000_pch_lpt) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_LM) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_V) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_LM2) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_V2) ||
(hw->dev_spec.ich8lan.ulp_state == e1000_ulp_state_on))
return 0;
if (!to_sx) {
int i = 0;
-
/* Poll up to 5 seconds for Cable Disconnected indication */
while (!(E1000_READ_REG(hw, E1000_FEXT) &
E1000_FEXT_PHY_CABLE_DISCONNECTED)) {
/* Bail if link is re-acquired */
if (E1000_READ_REG(hw, E1000_STATUS) & E1000_STATUS_LU)
return -E1000_ERR_PHY;
-
if (i++ == 100)
break;
@@ -1197,6 +1201,8 @@ s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
if ((hw->mac.type < e1000_pch_lpt) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_LM) ||
(hw->device_id == E1000_DEV_ID_PCH_LPT_I217_V) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_LM2) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_V2) ||
(hw->dev_spec.ich8lan.ulp_state == e1000_ulp_state_off))
return 0;
@@ -1452,7 +1458,9 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
/* Work-around I218 hang issue */
if ((hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
- (hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V)) {
+ (hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_LM3) ||
+ (hw->device_id == E1000_DEV_ID_PCH_I218_V3)) {
ret_val = e1000_k1_workaround_lpt_lp(hw, link);
if (ret_val)
return ret_val;
@@ -4794,7 +4802,9 @@ void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw)
u16 phy_reg, device_id = hw->device_id;
if ((device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
- (device_id == E1000_DEV_ID_PCH_LPTLP_I218_V)) {
+ (device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||
+ (device_id == E1000_DEV_ID_PCH_I218_LM3) ||
+ (device_id == E1000_DEV_ID_PCH_I218_V3)) {
u32 fextnvm6 = E1000_READ_REG(hw, E1000_FEXTNVM6);
E1000_WRITE_REG(hw, E1000_FEXTNVM6,
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 03/36] e1000/base: fix issue with link flap on 82579
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 01/36] e1000/base: update readme and copyright Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 02/36] e1000/base: add new devices Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 04/36] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
` (33 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
Several customers have reported a link flap issue on 82579. The symptoms
are random and intermittent link losses when 82579 is connected to specific
switches. Issue has been root caused as interoperability problem between
the NIC and at least some Broadcom PHYs in the Energy Efficient Ethernet
wake mechanism.
To fix the issue, we are disabling the Phase Locked Loop shutdown in 100M
Low Power Idle. This solution will cause an increase of power in 100M EEE
link. It may cost additional 28mW in this specific mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 11 +++++++++++
drivers/net/e1000/base/e1000_ich8lan.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 6d998df..f23d810 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -935,6 +935,17 @@ s32 e1000_set_eee_pchlan(struct e1000_hw *hw)
}
}
+ if (hw->phy.type == e1000_phy_82579) {
+ ret_val = e1000_read_emi_reg_locked(hw, I82579_LPI_PLL_SHUT,
+ &data);
+ if (ret_val)
+ goto release;
+
+ data &= ~I82579_LPI_100_PLL_SHUT;
+ ret_val = e1000_write_emi_reg_locked(hw, I82579_LPI_PLL_SHUT,
+ data);
+ }
+
/* R/Clr IEEE MMD 3.1 bits 11:10 - Tx/Rx LPI Received */
ret_val = e1000_read_emi_reg_locked(hw, pcs_status, &data);
if (ret_val)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index e9b73df..c690d9e 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -262,12 +262,14 @@ POSSIBILITY OF SUCH DAMAGE.
#define I82577_MSE_THRESHOLD 0x0887 /* 82577 Mean Square Error Threshold */
#define I82579_MSE_LINK_DOWN 0x2411 /* MSE count before dropping link */
#define I82579_RX_CONFIG 0x3412 /* Receive configuration */
+#define I82579_LPI_PLL_SHUT 0x4412 /* LPI PLL Shut Enable */
#define I82579_EEE_PCS_STATUS 0x182E /* IEEE MMD Register 3.1 >> 8 */
#define I82579_EEE_CAPABILITY 0x0410 /* IEEE MMD Register 3.20 */
#define I82579_EEE_ADVERTISEMENT 0x040E /* IEEE MMD Register 7.60 */
#define I82579_EEE_LP_ABILITY 0x040F /* IEEE MMD Register 7.61 */
#define I82579_EEE_100_SUPPORTED (1 << 1) /* 100BaseTx EEE */
#define I82579_EEE_1000_SUPPORTED (1 << 2) /* 1000BaseTx EEE */
+#define I82579_LPI_100_PLL_SHUT (1 << 2) /* 100M LPI PLL Shut Enabled */
#define I217_EEE_PCS_STATUS 0x9401 /* IEEE MMD Register 3.1 */
#define I217_EEE_CAPABILITY 0x8000 /* IEEE MMD Register 3.20 */
#define I217_EEE_ADVERTISEMENT 0x8001 /* IEEE MMD Register 7.60 */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 04/36] e1000/base: fix issue with jumbo frame CRC failures in client
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (2 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 03/36] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 05/36] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
` (32 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
This is a patch to change the value of register 776.20[11:2] for jumbo
mode from 0x1A to 0x1F. This is to enlarge the gap between read and
write pointers in the TX Fifo.
And replace the magic number with a macro by the way.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_defines.h | 1 +
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 71bd2e0..79a88bb 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -468,6 +468,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define ETHERNET_FCS_SIZE 4
#define MAX_JUMBO_FRAME_SIZE 0x3F00
+#define E1000_TX_PTR_GAP 0x1F
/* Extended Configuration Control and Size */
#define E1000_EXTCNF_CTRL_MDIO_SW_OWNERSHIP 0x00000020
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index f23d810..cc6e033 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -2601,7 +2601,7 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable)
return ret_val;
hw->phy.ops.read_reg(hw, PHY_REG(776, 20), &data);
data &= ~(0x3FF << 2);
- data |= (0x1A << 2);
+ data |= (E1000_TX_PTR_GAP << 2);
ret_val = hw->phy.ops.write_reg(hw, PHY_REG(776, 20), data);
if (ret_val)
return ret_val;
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 05/36] e1000/base: redundant PHY power down for i210
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (3 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 04/36] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 06/36] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
` (31 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
The wrong bit is being used in PHYREG16 for PHY power down. In addition,
the use of PHYREG 16 is unnecessary if bit 11 of PHYREG 0 is used.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_phy.c | 15 ---------------
drivers/net/e1000/base/e1000_phy.h | 1 -
2 files changed, 16 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index 7620ecf..6bbb379 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -3498,16 +3498,10 @@ STATIC s32 e1000_access_phy_wakeup_reg_bm(struct e1000_hw *hw, u32 offset,
void e1000_power_up_phy_copper(struct e1000_hw *hw)
{
u16 mii_reg = 0;
- u16 power_reg = 0;
/* The PHY will retain its settings across a power down/up cycle */
hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);
mii_reg &= ~MII_CR_POWER_DOWN;
- if (hw->phy.type == e1000_phy_i210) {
- hw->phy.ops.read_reg(hw, GS40G_COPPER_SPEC, &power_reg);
- power_reg &= ~GS40G_CS_POWER_DOWN;
- hw->phy.ops.write_reg(hw, GS40G_COPPER_SPEC, power_reg);
- }
hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);
}
@@ -3522,17 +3516,10 @@ void e1000_power_up_phy_copper(struct e1000_hw *hw)
void e1000_power_down_phy_copper(struct e1000_hw *hw)
{
u16 mii_reg = 0;
- u16 power_reg = 0;
/* The PHY will retain its settings across a power down/up cycle */
hw->phy.ops.read_reg(hw, PHY_CONTROL, &mii_reg);
mii_reg |= MII_CR_POWER_DOWN;
- /* i210 Phy requires an additional bit for power up/down */
- if (hw->phy.type == e1000_phy_i210) {
- hw->phy.ops.read_reg(hw, GS40G_COPPER_SPEC, &power_reg);
- power_reg |= GS40G_CS_POWER_DOWN;
- hw->phy.ops.write_reg(hw, GS40G_COPPER_SPEC, power_reg);
- }
hw->phy.ops.write_reg(hw, PHY_CONTROL, mii_reg);
msec_delay(1);
}
@@ -3563,7 +3550,6 @@ STATIC s32 __e1000_read_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 *data,
if (ret_val)
return ret_val;
}
-
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, data,
@@ -3673,7 +3659,6 @@ STATIC s32 __e1000_write_phy_reg_hv(struct e1000_hw *hw, u32 offset, u16 data,
if (ret_val)
return ret_val;
}
-
/* Page 800 works differently than the rest so it has its own func */
if (page == BM_WUC_PAGE) {
ret_val = e1000_access_phy_wakeup_reg_bm(hw, offset, &data,
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index b30b36e..2b78af0 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -143,7 +143,6 @@ bool e1000_is_mphy_ready(struct e1000_hw *hw);
#define GS40G_MAC_LB 0x4140
#define GS40G_MAC_SPEED_1G 0X0006
#define GS40G_COPPER_SPEC 0x0010
-#define GS40G_CS_POWER_DOWN 0x0002
/* BM/HV Specific Registers */
#define BM_PORT_CTRL_PAGE 769
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 06/36] e1000/base: add return value to the functions of setting receive address register
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (4 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 05/36] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 07/36] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
` (30 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
Previously, the rar_set functions were of type void, and when they failed
to program an address register they would, at most, put a message into
the log and end. The fact that they failed to program an address into a
address register, if checked for, should be captured and passed back to
the caller so that the drivers can deal with the situation (or not) as
they deem best.
Drivers can ignore or use the return value. No change to base drivers
is mandated by this change unless a driver wants to handle the failure
to program an address register (e.g. evaluate the return value).
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82542.c | 6 ++++--
drivers/net/e1000/base/e1000_api.c | 6 ++++--
drivers/net/e1000/base/e1000_api.h | 2 +-
drivers/net/e1000/base/e1000_hw.h | 2 +-
drivers/net/e1000/base/e1000_ich8lan.c | 18 ++++++++++--------
drivers/net/e1000/base/e1000_mac.c | 12 +++++++-----
drivers/net/e1000/base/e1000_mac.h | 2 +-
drivers/net/e1000/base/e1000_vf.c | 6 ++++--
drivers/net/e1000/base/e1000_vf.h | 2 +-
9 files changed, 33 insertions(+), 23 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82542.c b/drivers/net/e1000/base/e1000_82542.c
index a538cba..4f1183a 100644
--- a/drivers/net/e1000/base/e1000_82542.c
+++ b/drivers/net/e1000/base/e1000_82542.c
@@ -46,7 +46,7 @@ STATIC s32 e1000_init_hw_82542(struct e1000_hw *hw);
STATIC s32 e1000_setup_link_82542(struct e1000_hw *hw);
STATIC s32 e1000_led_on_82542(struct e1000_hw *hw);
STATIC s32 e1000_led_off_82542(struct e1000_hw *hw);
-STATIC void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index);
STATIC void e1000_clear_hw_cntrs_82542(struct e1000_hw *hw);
STATIC s32 e1000_read_mac_addr_82542(struct e1000_hw *hw);
@@ -410,7 +410,7 @@ STATIC s32 e1000_led_off_82542(struct e1000_hw *hw)
* Sets the receive address array register at index to the address passed
* in by addr.
**/
-STATIC void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
@@ -431,6 +431,8 @@ STATIC void e1000_rar_set_82542(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_REG_ARRAY(hw, E1000_RA, (index << 1), rar_low);
E1000_WRITE_REG_ARRAY(hw, E1000_RA, ((index << 1) + 1), rar_high);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_api.c b/drivers/net/e1000/base/e1000_api.c
index 5ec0ad1..bbfcae8 100644
--- a/drivers/net/e1000/base/e1000_api.c
+++ b/drivers/net/e1000/base/e1000_api.c
@@ -831,10 +831,12 @@ void e1000_config_collision_dist(struct e1000_hw *hw)
*
* Sets a Receive Address Register (RAR) to the specified address.
**/
-void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)
+int e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index)
{
if (hw->mac.ops.rar_set)
- hw->mac.ops.rar_set(hw, addr, index);
+ return hw->mac.ops.rar_set(hw, addr, index);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_api.h b/drivers/net/e1000/base/e1000_api.h
index 53a641c..563d0ca 100644
--- a/drivers/net/e1000/base/e1000_api.h
+++ b/drivers/net/e1000/base/e1000_api.h
@@ -68,7 +68,7 @@ s32 e1000_setup_link(struct e1000_hw *hw);
s32 e1000_get_speed_and_duplex(struct e1000_hw *hw, u16 *speed, u16 *duplex);
s32 e1000_disable_pcie_master(struct e1000_hw *hw);
void e1000_config_collision_dist(struct e1000_hw *hw);
-void e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
+int e1000_rar_set(struct e1000_hw *hw, u8 *addr, u32 index);
u32 e1000_hash_mc_addr(struct e1000_hw *hw, u8 *mc_addr);
void e1000_update_mc_addr_list(struct e1000_hw *hw, u8 *mc_addr_list,
u32 mc_addr_count);
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index 154b9e5..f06be0c 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -699,7 +699,7 @@ struct e1000_mac_operations {
s32 (*setup_led)(struct e1000_hw *);
void (*write_vfta)(struct e1000_hw *, u32, u32);
void (*config_collision_dist)(struct e1000_hw *);
- void (*rar_set)(struct e1000_hw *, u8*, u32);
+ int (*rar_set)(struct e1000_hw *, u8*, u32);
s32 (*read_mac_addr)(struct e1000_hw *);
s32 (*validate_mdi_setting)(struct e1000_hw *);
s32 (*acquire_swfw_sync)(struct e1000_hw *, u16);
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index cc6e033..228d4c5 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -77,8 +77,8 @@ STATIC s32 e1000_acquire_nvm_ich8lan(struct e1000_hw *hw);
STATIC void e1000_release_nvm_ich8lan(struct e1000_hw *hw);
STATIC bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw);
STATIC bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw);
-STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
-STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index);
STATIC s32 e1000_sw_lcd_config_ich8lan(struct e1000_hw *hw);
#ifndef NO_NON_BLOCKING_PHY_MTA_UPDATE_SUPPORT
STATIC void e1000_update_mc_addr_list_pch2lan(struct e1000_hw *hw,
@@ -1750,7 +1750,7 @@ STATIC bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw)
* contain the MAC address but RAR[1-6] are reserved for manageability (ME).
* Use SHRA[0-3] in place of those reserved for ME.
**/
-STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
@@ -1774,7 +1774,7 @@ STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_FLUSH(hw);
E1000_WRITE_REG(hw, E1000_RAH(index), rar_high);
E1000_WRITE_FLUSH(hw);
- return;
+ return E1000_SUCCESS;
}
/* RAR[1-6] are owned by manageability. Skip those and program the
@@ -1797,7 +1797,7 @@ STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
/* verify the register updates */
if ((E1000_READ_REG(hw, E1000_SHRAL(index - 1)) == rar_low) &&
(E1000_READ_REG(hw, E1000_SHRAH(index - 1)) == rar_high))
- return;
+ return E1000_SUCCESS;
DEBUGOUT2("SHRA[%d] might be locked by ME - FWSM=0x%8.8x\n",
(index - 1), E1000_READ_REG(hw, E1000_FWSM));
@@ -1805,6 +1805,7 @@ STATIC void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index)
out:
DEBUGOUT1("Failed to write receive address at index %d\n", index);
+ return -E1000_ERR_CONFIG;
}
/**
@@ -1818,7 +1819,7 @@ out:
* contain the MAC address. SHRA[0-10] are the shared receive address
* registers that are shared between the Host and manageability engine (ME).
**/
-STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
u32 wlock_mac;
@@ -1842,7 +1843,7 @@ STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_FLUSH(hw);
E1000_WRITE_REG(hw, E1000_RAH(index), rar_high);
E1000_WRITE_FLUSH(hw);
- return;
+ return E1000_SUCCESS;
}
/* The manageability engine (ME) can lock certain SHRAR registers that
@@ -1877,12 +1878,13 @@ STATIC void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index)
/* verify the register updates */
if ((E1000_READ_REG(hw, E1000_SHRAL_PCH_LPT(index - 1)) == rar_low) &&
(E1000_READ_REG(hw, E1000_SHRAH_PCH_LPT(index - 1)) == rar_high))
- return;
+ return E1000_SUCCESS;
}
}
out:
DEBUGOUT1("Failed to write receive address at index %d\n", index);
+ return -E1000_ERR_CONFIG;
}
#ifndef NO_NON_BLOCKING_PHY_MTA_UPDATE_SUPPORT
diff --git a/drivers/net/e1000/base/e1000_mac.c b/drivers/net/e1000/base/e1000_mac.c
index 5c107c6..a0f3a99 100644
--- a/drivers/net/e1000/base/e1000_mac.c
+++ b/drivers/net/e1000/base/e1000_mac.c
@@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
STATIC s32 e1000_validate_mdi_setting_generic(struct e1000_hw *hw);
STATIC void e1000_set_lan_id_multi_port_pcie(struct e1000_hw *hw);
STATIC void e1000_config_collision_dist_generic(struct e1000_hw *hw);
-STATIC void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
+STATIC int e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index);
/**
* e1000_init_mac_ops_generic - Initialize MAC function pointers
@@ -149,15 +149,15 @@ void e1000_null_write_vfta(struct e1000_hw E1000_UNUSEDARG *hw,
}
/**
- * e1000_null_rar_set - No-op function, return void
+ * e1000_null_rar_set - No-op function, return 0
* @hw: pointer to the HW structure
**/
-void e1000_null_rar_set(struct e1000_hw E1000_UNUSEDARG *hw,
+int e1000_null_rar_set(struct e1000_hw E1000_UNUSEDARG *hw,
u8 E1000_UNUSEDARG *h, u32 E1000_UNUSEDARG a)
{
DEBUGFUNC("e1000_null_rar_set");
UNREFERENCED_3PARAMETER(hw, h, a);
- return;
+ return E1000_SUCCESS;
}
/**
@@ -469,7 +469,7 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw)
* Sets the receive address array register at index to the address passed
* in by addr.
**/
-STATIC void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
+STATIC int e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
{
u32 rar_low, rar_high;
@@ -495,6 +495,8 @@ STATIC void e1000_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index)
E1000_WRITE_FLUSH(hw);
E1000_WRITE_REG(hw, E1000_RAH(index), rar_high);
E1000_WRITE_FLUSH(hw);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_mac.h b/drivers/net/e1000/base/e1000_mac.h
index b5d0940..96a260c 100644
--- a/drivers/net/e1000/base/e1000_mac.h
+++ b/drivers/net/e1000/base/e1000_mac.h
@@ -44,7 +44,7 @@ s32 e1000_null_link_info(struct e1000_hw *hw, u16 *s, u16 *d);
bool e1000_null_mng_mode(struct e1000_hw *hw);
void e1000_null_update_mc(struct e1000_hw *hw, u8 *h, u32 a);
void e1000_null_write_vfta(struct e1000_hw *hw, u32 a, u32 b);
-void e1000_null_rar_set(struct e1000_hw *hw, u8 *h, u32 a);
+int e1000_null_rar_set(struct e1000_hw *hw, u8 *h, u32 a);
s32 e1000_blink_led_generic(struct e1000_hw *hw);
s32 e1000_check_for_copper_link_generic(struct e1000_hw *hw);
s32 e1000_check_for_fiber_link_generic(struct e1000_hw *hw);
diff --git a/drivers/net/e1000/base/e1000_vf.c b/drivers/net/e1000/base/e1000_vf.c
index 3a47d35..7845b48 100644
--- a/drivers/net/e1000/base/e1000_vf.c
+++ b/drivers/net/e1000/base/e1000_vf.c
@@ -48,7 +48,7 @@ STATIC s32 e1000_get_link_up_info_vf(struct e1000_hw *hw, u16 *speed,
STATIC s32 e1000_init_hw_vf(struct e1000_hw *hw);
STATIC s32 e1000_reset_hw_vf(struct e1000_hw *hw);
STATIC void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, u8 *, u32);
-STATIC void e1000_rar_set_vf(struct e1000_hw *, u8 *, u32);
+STATIC int e1000_rar_set_vf(struct e1000_hw *, u8 *, u32);
STATIC s32 e1000_read_mac_addr_vf(struct e1000_hw *);
/**
@@ -322,7 +322,7 @@ STATIC s32 e1000_init_hw_vf(struct e1000_hw *hw)
* @addr: pointer to the receive address
* @index receive address array register
**/
-STATIC void e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
+STATIC int e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
u32 E1000_UNUSEDARG index)
{
struct e1000_mbx_info *mbx = &hw->mbx;
@@ -345,6 +345,8 @@ STATIC void e1000_rar_set_vf(struct e1000_hw *hw, u8 *addr,
if (!ret_val &&
(msgbuf[0] == (E1000_VF_SET_MAC_ADDR | E1000_VT_MSGTYPE_NACK)))
e1000_read_mac_addr_vf(hw);
+
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_vf.h b/drivers/net/e1000/base/e1000_vf.h
index 7218212..d6216de 100644
--- a/drivers/net/e1000/base/e1000_vf.h
+++ b/drivers/net/e1000/base/e1000_vf.h
@@ -207,7 +207,7 @@ struct e1000_mac_operations {
s32 (*init_hw)(struct e1000_hw *);
s32 (*setup_link)(struct e1000_hw *);
void (*write_vfta)(struct e1000_hw *, u32, u32);
- void (*rar_set)(struct e1000_hw *, u8*, u32);
+ int (*rar_set)(struct e1000_hw *, u8*, u32);
s32 (*read_mac_addr)(struct e1000_hw *);
};
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 07/36] e1000/base: add defaults for i210 TX/RX PBSIZE
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (5 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 06/36] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 08/36] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
` (29 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
These are the defaults for the packet buffer size registers that need to
be explicitly set back if someone changes them and comes back to a normal
driver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_defines.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 79a88bb..8e40771 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -1468,6 +1468,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_RXPBS_CFG_TS_EN 0x80000000 /* Timestamp in Rx buffer */
#define E1000_RXPBS_SIZE_I210_MASK 0x0000003F /* Rx packet buffer size */
#define E1000_TXPB0S_SIZE_I210_MASK 0x0000003F /* Tx packet buffer 0 size */
+#define I210_RXPBSIZE_DEFAULT 0x000000A2 /* RXPBSIZE default */
+#define I210_TXPBSIZE_DEFAULT 0x04000014 /* TXPBSIZE default */
/* Proxy Filter Control */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 08/36] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (6 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 07/36] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 09/36] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
` (28 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
For DH89XXCC_SGMII, write flush leaves registers of this device trashed
(0xFFFFFFFF). Added check for this device.
Also, after both for Port SW Reset and Device Reset case, platform should
wait at least 3ms before reading any registers. Since waiting is
conditionally executed only for Device Reset - removed the condition.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 3dc8066..ab547ca 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -2490,11 +2490,17 @@ STATIC s32 e1000_reset_hw_82580(struct e1000_hw *hw)
ctrl |= E1000_CTRL_RST;
E1000_WRITE_REG(hw, E1000_CTRL, ctrl);
- E1000_WRITE_FLUSH(hw);
- /* Add delay to insure DEV_RST has time to complete */
- if (global_device_reset)
- msec_delay(5);
+ switch (hw->device_id) {
+ case E1000_DEV_ID_DH89XXCC_SGMII:
+ break;
+ default:
+ E1000_WRITE_FLUSH(hw);
+ break;
+ }
+
+ /* Add delay to insure DEV_RST or RST has time to complete */
+ msec_delay(5);
ret_val = e1000_get_auto_rd_done_generic(hw);
if (ret_val) {
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 09/36] e1000/base: add evaluation of e1000_nvm_read return value
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (7 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 08/36] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 10/36] e1000/base: change invariant return to not use variables Wenzhuo Lu
` (27 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
Adding code to a case where e1000_nvn_read is called, but there is no
consideration for when the read fails (returns an error code).
Also, this patch adds an error message to a base NVM reading function that
is missing it for consistency.
This patch is not covering all cases of these conditions, it only covers
the code used by the e1000e driver.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_manage.c | 5 ++++-
drivers/net/e1000/base/e1000_nvm.c | 3 +++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_manage.c b/drivers/net/e1000/base/e1000_manage.c
index ac4c08a..8564a7f 100644
--- a/drivers/net/e1000/base/e1000_manage.c
+++ b/drivers/net/e1000/base/e1000_manage.c
@@ -363,9 +363,12 @@ bool e1000_enable_mng_pass_thru(struct e1000_hw *hw)
} else if ((hw->mac.type == e1000_82574) ||
(hw->mac.type == e1000_82583)) {
u16 data;
+ s32 ret_val;
factps = E1000_READ_REG(hw, E1000_FACTPS);
- e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ ret_val = e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ if (ret_val)
+ return false;
if (!(factps & E1000_FACTPS_MNGCG) &&
((data & E1000_NVM_INIT_CTRL2_MNGM) ==
diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c
index 966a34c..01be9e4 100644
--- a/drivers/net/e1000/base/e1000_nvm.c
+++ b/drivers/net/e1000/base/e1000_nvm.c
@@ -585,6 +585,9 @@ s32 e1000_read_nvm_eerd(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
E1000_NVM_RW_REG_DATA);
}
+ if (ret_val)
+ DEBUGOUT1("NVM read error: %d\n", ret_val);
+
return ret_val;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 10/36] e1000/base: change invariant return to not use variables
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (8 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 09/36] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 11/36] e1000/base: add return value handler when check manage mode Wenzhuo Lu
` (26 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
Although this change should be optimized out by the compiler, just
return a constant directly rather than declare a variable.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index ab547ca..3bdcf69 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -891,7 +891,6 @@ out:
STATIC s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
{
struct e1000_phy_info *phy = &hw->phy;
- s32 ret_val = E1000_SUCCESS;
u32 data;
DEBUGFUNC("e1000_set_d0_lplu_state_82580");
@@ -919,7 +918,7 @@ STATIC s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
}
E1000_WRITE_REG(hw, E1000_82580_PHY_POWER_MGMT, data);
- return ret_val;
+ return E1000_SUCCESS;
}
/**
@@ -939,7 +938,6 @@ STATIC s32 e1000_set_d0_lplu_state_82580(struct e1000_hw *hw, bool active)
s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
{
struct e1000_phy_info *phy = &hw->phy;
- s32 ret_val = E1000_SUCCESS;
u32 data;
DEBUGFUNC("e1000_set_d3_lplu_state_82580");
@@ -967,7 +965,7 @@ s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
}
E1000_WRITE_REG(hw, E1000_82580_PHY_POWER_MGMT, data);
- return ret_val;
+ return E1000_SUCCESS;
}
/**
@@ -981,7 +979,7 @@ s32 e1000_set_d3_lplu_state_82580(struct e1000_hw *hw, bool active)
**/
STATIC s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
{
- s32 ret_val;
+ s32 ret_val = E1000_SUCCESS;
DEBUGFUNC("e1000_acquire_nvm_82575");
@@ -1003,6 +1001,7 @@ STATIC s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
DEBUGOUT("Nvm bit banging access error detected and cleared.\n");
}
}
+
if (hw->mac.type == e1000_82580) {
u32 eecd = E1000_READ_REG(hw, E1000_EECD);
if (eecd & E1000_EECD_BLOCKED) {
@@ -1013,7 +1012,6 @@ STATIC s32 e1000_acquire_nvm_82575(struct e1000_hw *hw)
}
}
-
ret_val = e1000_acquire_nvm_generic(hw);
if (ret_val)
e1000_release_swfw_sync_82575(hw, E1000_SWFW_EEP_SM);
@@ -1127,7 +1125,6 @@ STATIC void e1000_release_swfw_sync_82575(struct e1000_hw *hw, u16 mask)
STATIC s32 e1000_get_cfg_done_82575(struct e1000_hw *hw)
{
s32 timeout = PHY_CFG_TIMEOUT;
- s32 ret_val = E1000_SUCCESS;
u32 mask = E1000_NVM_CFG_DONE_PORT_0;
DEBUGFUNC("e1000_get_cfg_done_82575");
@@ -1152,7 +1149,7 @@ STATIC s32 e1000_get_cfg_done_82575(struct e1000_hw *hw)
(hw->phy.type == e1000_phy_igp_3))
e1000_phy_init_script_igp3(hw);
- return ret_val;
+ return E1000_SUCCESS;
}
/**
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 11/36] e1000/base: add return value handler when check manage mode
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (9 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 10/36] e1000/base: change invariant return to not use variables Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 12/36] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
` (25 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
Adding code, where missing, to handle the case when hw->nvm.ops.read returns
an error value.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82571.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_82571.c b/drivers/net/e1000/base/e1000_82571.c
index 5e0e43c..7c279db 100644
--- a/drivers/net/e1000/base/e1000_82571.c
+++ b/drivers/net/e1000/base/e1000_82571.c
@@ -1452,10 +1452,14 @@ STATIC void e1000_clear_vfta_82571(struct e1000_hw *hw)
STATIC bool e1000_check_mng_mode_82574(struct e1000_hw *hw)
{
u16 data;
+ s32 ret_val;
DEBUGFUNC("e1000_check_mng_mode_82574");
- hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ ret_val = hw->nvm.ops.read(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+ if (ret_val)
+ return false;
+
return (data & E1000_NVM_INIT_CTRL2_MNGM) != 0;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 12/36] e1000/base: add return value handler for ESB2 controller init and reset
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (10 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 11/36] e1000/base: add return value handler when check manage mode Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 13/36] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
` (24 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
Adding code where missing to handle case where calls to
e1000_read_kmrn_reg_80003es2lan and e1000_write_kmrn_reg_80003es2lan return
an error value.
Also, when accessing the E1000_KMRNCTRLSTA_INBAND_PARAM offset to disable
far-end loopback on 80003es2lan devices, make the handling of a read or
write failure consistent between hw_init and hw_reset.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_80003es2lan.c | 31 ++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_80003es2lan.c b/drivers/net/e1000/base/e1000_80003es2lan.c
index b79496b..5ac925e 100644
--- a/drivers/net/e1000/base/e1000_80003es2lan.c
+++ b/drivers/net/e1000/base/e1000_80003es2lan.c
@@ -852,11 +852,15 @@ STATIC s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw)
/* Disable IBIST slave mode (far-end loopback) */
ret_val = e1000_read_kmrn_reg_80003es2lan(hw,
E1000_KMRNCTRLSTA_INBAND_PARAM, &kum_reg_data);
- if (ret_val)
- return ret_val;
- kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
- e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- kum_reg_data);
+ if (!ret_val) {
+ kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
+ ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
+ E1000_KMRNCTRLSTA_INBAND_PARAM,
+ kum_reg_data);
+ if (ret_val)
+ DEBUGOUT("Error disabling far-end loopback\n");
+ } else
+ DEBUGOUT("Error disabling far-end loopback\n");
ret_val = e1000_get_auto_rd_done_generic(hw);
if (ret_val)
@@ -912,11 +916,18 @@ STATIC s32 e1000_init_hw_80003es2lan(struct e1000_hw *hw)
return ret_val;
/* Disable IBIST slave mode (far-end loopback) */
- e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- &kum_reg_data);
- kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
- e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
- kum_reg_data);
+ ret_val =
+ e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM,
+ &kum_reg_data);
+ if (!ret_val) {
+ kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE;
+ ret_val = e1000_write_kmrn_reg_80003es2lan(hw,
+ E1000_KMRNCTRLSTA_INBAND_PARAM,
+ kum_reg_data);
+ if (ret_val)
+ DEBUGOUT("Error disabling far-end loopback\n");
+ } else
+ DEBUGOUT("Error disabling far-end loopback\n");
/* Set the transmit descriptor write-back policy */
reg_data = E1000_READ_REG(hw, E1000_TXDCTL(0));
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 13/36] e1000/base: add support for inverted format ETrackId
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (11 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 12/36] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
@ 2015-10-16 2:50 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 14/36] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
` (23 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:50 UTC (permalink / raw)
To: dev
There are some images which contain ETrackID in inverted format. This patch
allows reading this format.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_nvm.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_nvm.c b/drivers/net/e1000/base/e1000_nvm.c
index 01be9e4..762acd1 100644
--- a/drivers/net/e1000/base/e1000_nvm.c
+++ b/drivers/net/e1000/base/e1000_nvm.c
@@ -1373,8 +1373,12 @@ etrack_id:
hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verh);
fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT)
| eeprom_verl;
+ } else if ((etrack_test & NVM_ETRACK_VALID) == 0) {
+ hw->nvm.ops.read(hw, NVM_ETRACK_WORD, 1, &eeprom_verh);
+ hw->nvm.ops.read(hw, (NVM_ETRACK_WORD + 1), 1, &eeprom_verl);
+ fw_vers->etrack_id = (eeprom_verh << NVM_ETRACK_SHIFT) |
+ eeprom_verl;
}
- return;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 14/36] e1000/base: add EEARBC_I210 for i210
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (12 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 13/36] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 15/36] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
` (22 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
EEARBC has changed on i210. It means EEARBC has a different address on
i210 than on other NICs. So, add a new entity named EEARBC_I210 to the
register list and make sure the right one is being used on i210.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_i210.c | 17 ++++++++++-------
drivers/net/e1000/base/e1000_regs.h | 1 +
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index 842e9d4..fedf88e 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -925,7 +925,7 @@ s32 e1000_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 data)
STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
{
s32 ret_val;
- u32 wuc, mdicnfg, ctrl_ext, reg_val;
+ u32 wuc, mdicnfg, ctrl, ctrl_ext, reg_val;
u16 nvm_word, phy_word, pci_word, tmp_nvm;
int i;
@@ -942,9 +942,9 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
nvm_word = E1000_INVM_DEFAULT_AL;
tmp_nvm = nvm_word | E1000_INVM_PLL_WO_VAL;
for (i = 0; i < E1000_MAX_PLL_TRIES; i++) {
- /* check current state */
- hw->phy.ops.read_reg(hw, (E1000_PHY_PLL_FREQ_PAGE |
- E1000_PHY_PLL_FREQ_REG), &phy_word);
+ /* check current state directly from internal PHY */
+ e1000_read_phy_reg_gs40g(hw, (E1000_PHY_PLL_FREQ_PAGE |
+ E1000_PHY_PLL_FREQ_REG), &phy_word);
if ((phy_word & E1000_PHY_PLL_UNCONF)
!= E1000_PHY_PLL_UNCONF) {
ret_val = E1000_SUCCESS;
@@ -952,14 +952,17 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
} else {
ret_val = -E1000_ERR_PHY;
}
- hw->phy.ops.reset(hw);
+ /* directly reset the internal PHY */
+ ctrl = E1000_READ_REG(hw, E1000_CTRL);
+ E1000_WRITE_REG(hw, E1000_CTRL, ctrl|E1000_CTRL_PHY_RST);
+
ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
ctrl_ext |= (E1000_CTRL_EXT_PHYPDEN | E1000_CTRL_EXT_SDLPE);
E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
E1000_WRITE_REG(hw, E1000_WUC, 0);
reg_val = (E1000_INVM_AUTOLOAD << 4) | (tmp_nvm << 16);
- E1000_WRITE_REG(hw, E1000_EEARBC, reg_val);
+ E1000_WRITE_REG(hw, E1000_EEARBC_I210, reg_val);
e1000_read_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
pci_word |= E1000_PCI_PMCSR_D3;
@@ -968,7 +971,7 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
pci_word &= ~E1000_PCI_PMCSR_D3;
e1000_write_pci_cfg(hw, E1000_PCI_PMCSR, &pci_word);
reg_val = (E1000_INVM_AUTOLOAD << 4) | (nvm_word << 16);
- E1000_WRITE_REG(hw, E1000_EEARBC, reg_val);
+ E1000_WRITE_REG(hw, E1000_EEARBC_I210, reg_val);
/* restore WUC register */
E1000_WRITE_REG(hw, E1000_WUC, wuc);
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 8999b5b..b9fcdea 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -110,6 +110,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PBECCSTS 0x0100C /* Packet Buffer ECC Status - RW */
#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
+#define E1000_EEARBC_I210 0x12024 /* EEPROM Auto Read Bus Control */
#define E1000_FLASHT 0x01028 /* FLASH Timer Register */
#define E1000_EEWR 0x0102C /* EEPROM Write Register - RW */
#define E1000_FLSWCTL 0x01030 /* FLASH control register */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 15/36] e1000/base: apply paranoia to macro arguments
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (13 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 14/36] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 16/36] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
` (21 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Macro arguments need to be in parens since we can pass in expressions.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_api.h | 16 ++++++++--------
drivers/net/e1000/base/e1000_hw.h | 2 +-
drivers/net/e1000/base/e1000_regs.h | 4 ++--
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_api.h b/drivers/net/e1000/base/e1000_api.h
index 563d0ca..0bc471d 100644
--- a/drivers/net/e1000/base/e1000_api.h
+++ b/drivers/net/e1000/base/e1000_api.h
@@ -124,14 +124,14 @@ u32 e1000_translate_register_82542(u32 reg);
* TBI_ACCEPT macro definition:
*
* This macro requires:
- * adapter = a pointer to struct e1000_hw
+ * a = a pointer to struct e1000_hw
* status = the 8 bit status field of the Rx descriptor with EOP set
- * error = the 8 bit error field of the Rx descriptor with EOP set
+ * errors = the 8 bit error field of the Rx descriptor with EOP set
* length = the sum of all the length fields of the Rx descriptors that
* make up the current frame
* last_byte = the last byte of the frame DMAed by the hardware
- * max_frame_length = the maximum frame length we want to accept.
- * min_frame_length = the minimum frame length we want to accept.
+ * min_frame_size = the minimum frame length we want to accept.
+ * max_frame_size = the maximum frame length we want to accept.
*
* This macro is a conditional that should be used in the interrupt
* handler's Rx processing routine when RxErrors have been detected.
@@ -157,10 +157,10 @@ u32 e1000_translate_register_82542(u32 reg);
(((errors) & E1000_RXD_ERR_FRAME_ERR_MASK) == E1000_RXD_ERR_CE) && \
((last_byte) == CARRIER_EXTENSION) && \
(((status) & E1000_RXD_STAT_VP) ? \
- (((length) > (min_frame_size - VLAN_TAG_SIZE)) && \
- ((length) <= (max_frame_size + 1))) : \
- (((length) > min_frame_size) && \
- ((length) <= (max_frame_size + VLAN_TAG_SIZE + 1)))))
+ (((length) > ((min_frame_size) - VLAN_TAG_SIZE)) && \
+ ((length) <= ((max_frame_size) + 1))) : \
+ (((length) > (min_frame_size)) && \
+ ((length) <= ((max_frame_size) + VLAN_TAG_SIZE + 1)))))
#define E1000_MAX(a, b) ((a) > (b) ? (a) : (b))
#define E1000_DIVIDE_ROUND_UP(a, b) (((a) + (b) - 1) / (b)) /* ceil(a/b) */
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index f06be0c..fd48104 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -785,7 +785,7 @@ struct e1000_mac_info {
u16 uta_reg_count;
/* Maximum size of the MTA register table in all supported adapters */
- #define MAX_MTA_REG 128
+#define MAX_MTA_REG 128
u32 mta_shadow[MAX_MTA_REG];
u16 rar_entry_count;
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index b9fcdea..2891da3 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -203,7 +203,7 @@ POSSIBILITY OF SUCH DAMAGE.
/* Queues fetch arbitration priority control register */
#define E1000_I210_TQAVARBCTRL 0x3574
/* Queues priority masks where _n and _p can be 0-3. */
-#define E1000_TQAVARBCTRL_QUEUE_PRI(_n, _p) ((_p) << (2 * _n))
+#define E1000_TQAVARBCTRL_QUEUE_PRI(_n, _p) ((_p) << (2 * (_n)))
/* QAV Tx mode control registers where _n can be 0 or 1. */
#define E1000_I210_TQAVCC(_n) (0x3004 + 0x40 * (_n))
@@ -216,7 +216,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PQGPTC(_n) (0x010014 + (0x100 * (_n)))
/* Queues packet buffer size masks where _n can be 0-3 and _s 0-63 [kB] */
-#define E1000_I210_TXPBS_SIZE(_n, _s) ((_s) << (6 * _n))
+#define E1000_I210_TXPBS_SIZE(_n, _s) ((_s) << (6 * (_n)))
#define E1000_MMDAC 13 /* MMD Access Control */
#define E1000_MMDAAD 14 /* MMD Access Address/Data */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 16/36] e1000/base: add flags to set eee advertisement modes
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (14 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 15/36] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 17/36] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
` (20 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
!!! REQUIRES DRIVER CHANGES !!!
Change e1000_set_eee_i350 and e1000_set_eee_i354 to have flags allowing
changes in the advertised EEE speeds.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 34 +++++++++++++++++++++++++++-------
drivers/net/e1000/base/e1000_82575.h | 4 ++--
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 3bdcf69..81e6011 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -2893,13 +2893,14 @@ out:
/**
* e1000_set_eee_i350 - Enable/disable EEE support
* @hw: pointer to the HW structure
+ * @adv1g: boolean flag enabling 1G EEE advertisement
+ * @adv100m: boolean flag enabling 100M EEE advertisement
*
* Enable/disable EEE based on setting in dev_spec structure.
*
**/
-s32 e1000_set_eee_i350(struct e1000_hw *hw)
+s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M)
{
- s32 ret_val = E1000_SUCCESS;
u32 ipcnfg, eeer;
DEBUGFUNC("e1000_set_eee_i350");
@@ -2914,7 +2915,16 @@ s32 e1000_set_eee_i350(struct e1000_hw *hw)
if (!(hw->dev_spec._82575.eee_disable)) {
u32 eee_su = E1000_READ_REG(hw, E1000_EEE_SU);
- ipcnfg |= (E1000_IPCNFG_EEE_1G_AN | E1000_IPCNFG_EEE_100M_AN);
+ if (adv100M)
+ ipcnfg |= E1000_IPCNFG_EEE_100M_AN;
+ else
+ ipcnfg &= ~E1000_IPCNFG_EEE_100M_AN;
+
+ if (adv1G)
+ ipcnfg |= E1000_IPCNFG_EEE_1G_AN;
+ else
+ ipcnfg &= ~E1000_IPCNFG_EEE_1G_AN;
+
eeer |= (E1000_EEER_TX_LPI_EN | E1000_EEER_RX_LPI_EN |
E1000_EEER_LPI_FC);
@@ -2932,17 +2942,19 @@ s32 e1000_set_eee_i350(struct e1000_hw *hw)
E1000_READ_REG(hw, E1000_EEER);
out:
- return ret_val;
+ return E1000_SUCCESS;
}
/**
* e1000_set_eee_i354 - Enable/disable EEE support
* @hw: pointer to the HW structure
+ * @adv1g: boolean flag enabling 1G EEE advertisement
+ * @adv100m: boolean flag enabling 100M EEE advertisement
*
* Enable/disable EEE legacy mode based on setting in dev_spec structure.
*
**/
-s32 e1000_set_eee_i354(struct e1000_hw *hw)
+s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M)
{
struct e1000_phy_info *phy = &hw->phy;
s32 ret_val = E1000_SUCCESS;
@@ -2984,8 +2996,16 @@ s32 e1000_set_eee_i354(struct e1000_hw *hw)
if (ret_val)
goto out;
- phy_data |= E1000_EEE_ADV_100_SUPPORTED |
- E1000_EEE_ADV_1000_SUPPORTED;
+ if (adv100M)
+ phy_data |= E1000_EEE_ADV_100_SUPPORTED;
+ else
+ phy_data &= ~E1000_EEE_ADV_100_SUPPORTED;
+
+ if (adv1G)
+ phy_data |= E1000_EEE_ADV_1000_SUPPORTED;
+ else
+ phy_data &= ~E1000_EEE_ADV_1000_SUPPORTED;
+
ret_val = e1000_write_xmdio_reg(hw, E1000_EEE_ADV_ADDR_I354,
E1000_EEE_ADV_DEV_I354,
phy_data);
diff --git a/drivers/net/e1000/base/e1000_82575.h b/drivers/net/e1000/base/e1000_82575.h
index 0c8a464..7a46ceb 100644
--- a/drivers/net/e1000/base/e1000_82575.h
+++ b/drivers/net/e1000/base/e1000_82575.h
@@ -494,8 +494,8 @@ void e1000_rlpml_set_vf(struct e1000_hw *, u16);
s32 e1000_promisc_set_vf(struct e1000_hw *, enum e1000_promisc_type type);
u16 e1000_rxpbs_adjust_82580(u32 data);
s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data);
-s32 e1000_set_eee_i350(struct e1000_hw *);
-s32 e1000_set_eee_i354(struct e1000_hw *);
+s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M);
+s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M);
s32 e1000_get_eee_status_i354(struct e1000_hw *, bool *);
s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw);
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 17/36] e1000/base: prevent ulp flow if cable connected
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (15 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 16/36] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 18/36] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
` (19 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Enabling ulp on link down when cable is connect caused an infinite
loop of linkup/down indications in the NDIS driver.
After discussed, correct flow is to enable ULP only when cable is
disconnected.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 228d4c5..5077a3f 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1089,6 +1089,9 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
(E1000_READ_REG(hw, E1000_FEXT) &
E1000_FEXT_PHY_CABLE_DISCONNECTED) ? "" : "not",
i * 50);
+ if (!(E1000_READ_REG(hw, E1000_FEXT) &
+ E1000_FEXT_PHY_CABLE_DISCONNECTED))
+ return 0;
}
if (E1000_READ_REG(hw, E1000_FWSM) & E1000_ICH_FWSM_FW_VALID) {
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 18/36] e1000/base: fix TIPG value for non 10 half duplex mode
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (16 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 17/36] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 19/36] e1000/base: add return value for resume workaround Wenzhuo Lu
` (18 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
TIPG value is increased when setting speed to 10 half to prevent
packet loss. However, it was never decreased again when speed
changes. This caused performance issues in the NDIS driver.
Fix this to restore TIPG to default value on non 10 half.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 49 +++++++++++++++++++---------------
1 file changed, 28 insertions(+), 21 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 5077a3f..4ffaeef 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1392,7 +1392,8 @@ out:
STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
{
struct e1000_mac_info *mac = &hw->mac;
- s32 ret_val;
+ s32 ret_val, tipg_reg = 0;
+ u16 emi_addr, emi_val = 0;
bool link = false;
u16 phy_reg;
@@ -1442,32 +1443,38 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
*/
if (((hw->mac.type == e1000_pch2lan) ||
(hw->mac.type == e1000_pch_lpt)) && link) {
- u32 reg;
- reg = E1000_READ_REG(hw, E1000_STATUS);
- if (!(reg & (E1000_STATUS_FD | E1000_STATUS_SPEED_MASK))) {
- u16 emi_addr;
+ u16 speed, duplex;
- reg = E1000_READ_REG(hw, E1000_TIPG);
- reg &= ~E1000_TIPG_IPGT_MASK;
- reg |= 0xFF;
- E1000_WRITE_REG(hw, E1000_TIPG, reg);
+ e1000_get_speed_and_duplex_copper_generic(hw, &speed, &duplex);
+ tipg_reg = E1000_READ_REG(hw, E1000_TIPG);
+ tipg_reg &= ~E1000_TIPG_IPGT_MASK;
+ if (duplex == HALF_DUPLEX && speed == SPEED_10) {
+ tipg_reg |= 0xFF;
/* Reduce Rx latency in analog PHY */
- ret_val = hw->phy.ops.acquire(hw);
- if (ret_val)
- return ret_val;
+ emi_val = 0;
+ } else {
+ /* Roll back the default values */
+ tipg_reg |= 0x08;
+ emi_val = 1;
+ }
- if (hw->mac.type == e1000_pch2lan)
- emi_addr = I82579_RX_CONFIG;
- else
- emi_addr = I217_RX_CONFIG;
- ret_val = e1000_write_emi_reg_locked(hw, emi_addr, 0);
+ E1000_WRITE_REG(hw, E1000_TIPG, tipg_reg);
- hw->phy.ops.release(hw);
+ ret_val = hw->phy.ops.acquire(hw);
+ if (ret_val)
+ return ret_val;
- if (ret_val)
- return ret_val;
- }
+ if (hw->mac.type == e1000_pch2lan)
+ emi_addr = I82579_RX_CONFIG;
+ else
+ emi_addr = I217_RX_CONFIG;
+ ret_val = e1000_write_emi_reg_locked(hw, emi_addr, emi_val);
+
+ hw->phy.ops.release(hw);
+
+ if (ret_val)
+ return ret_val;
}
/* Work-around I218 hang issue */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 19/36] e1000/base: add return value for resume workaround
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (17 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 18/36] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 20/36] e1000/base: fix link detect flow Wenzhuo Lu
` (17 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Add u32 return value to function e1000_resume_workarounds_pchlan,
so that calling function can detect PHY access failure during resuming
flow.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 11 ++++++-----
drivers/net/e1000/base/e1000_ich8lan.h | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 4ffaeef..5635dd5 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -4943,19 +4943,18 @@ out:
* the PHY.
* On i217, setup Intel Rapid Start Technology.
**/
-void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
+u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
{
s32 ret_val;
DEBUGFUNC("e1000_resume_workarounds_pchlan");
-
if (hw->mac.type < e1000_pch2lan)
- return;
+ return E1000_SUCCESS;
ret_val = e1000_init_phy_workarounds_pchlan(hw);
if (ret_val) {
DEBUGOUT1("Failed to init PHY flow ret_val=%d\n", ret_val);
- return;
+ return ret_val;
}
/* For i217 Intel Rapid Start Technology support when the system
@@ -4969,7 +4968,7 @@ void e1000_resume_workarounds_pchlan(struct e1000_hw *hw)
ret_val = hw->phy.ops.acquire(hw);
if (ret_val) {
DEBUGOUT("Failed to setup iRST\n");
- return;
+ return ret_val;
}
/* Clear Auto Enable LPI after link up */
@@ -5003,7 +5002,9 @@ release:
if (ret_val)
DEBUGOUT1("Error %d in resume workarounds\n", ret_val);
hw->phy.ops.release(hw);
+ return ret_val;
}
+ return E1000_SUCCESS;
}
/**
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index c690d9e..130627c 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -300,7 +300,7 @@ void e1000_set_kmrn_lock_loss_workaround_ich8lan(struct e1000_hw *hw,
void e1000_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw);
void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw);
void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw);
-void e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
+u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw);
s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 20/36] e1000/base: fix link detect flow
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (18 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 19/36] e1000/base: add return value for resume workaround Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 21/36] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
` (16 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
In case that auto-negotiate is not enabled, call
e1000_setup_copper_link_generic instead of e1000_phy_setup_autoneg.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 5635dd5..d10c5d8 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1254,10 +1254,15 @@ s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force)
/* Restore link speed advertisements and restart
* Auto-negotiation
*/
- ret_val = e1000_phy_setup_autoneg(hw);
- if (ret_val)
- goto out;
-
+ if (hw->mac.autoneg) {
+ ret_val = e1000_phy_setup_autoneg(hw);
+ if (ret_val)
+ goto out;
+ } else {
+ ret_val = e1000_setup_copper_link_generic(hw);
+ if (ret_val)
+ goto out;
+ }
ret_val = e1000_oem_bits_config_ich8lan(hw, true);
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 21/36] e1000/base: cleanup NAHUM6LP_HW tags
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (19 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 20/36] e1000/base: fix link detect flow Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 22/36] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
` (15 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Remove all NAHUM6LP_HW tags.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_hw.h | 6 +++---
drivers/net/e1000/base/e1000_ich8lan.c | 9 +++++----
drivers/net/e1000/base/e1000_ich8lan.h | 29 ++++++++++++++---------------
drivers/net/e1000/base/e1000_osdep.h | 1 -
drivers/net/e1000/base/e1000_regs.h | 4 ++--
5 files changed, 24 insertions(+), 25 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_hw.h b/drivers/net/e1000/base/e1000_hw.h
index fd48104..e4e4f76 100644
--- a/drivers/net/e1000/base/e1000_hw.h
+++ b/drivers/net/e1000/base/e1000_hw.h
@@ -935,7 +935,7 @@ struct e1000_shadow_ram {
#define E1000_SHADOW_RAM_WORDS 2048
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
/* I218 PHY Ultra Low Power (ULP) states */
enum e1000_ulp_state {
e1000_ulp_state_unknown,
@@ -943,7 +943,7 @@ enum e1000_ulp_state {
e1000_ulp_state_on,
};
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
struct e1000_dev_spec_ich8lan {
bool kmrn_lock_loss_workaround_enabled;
struct e1000_shadow_ram shadow_ram[E1000_SHADOW_RAM_WORDS];
@@ -952,7 +952,7 @@ struct e1000_dev_spec_ich8lan {
bool nvm_k1_enabled;
bool eee_disable;
u16 eee_lp_ability;
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
enum e1000_ulp_state ulp_state;
#endif /* NAHUM6LP_HW && ULP_SUPPORT */
u16 lat_enc;
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index d10c5d8..782da2a 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -311,13 +311,13 @@ STATIC s32 e1000_init_phy_workarounds_pchlan(struct e1000_hw *hw)
*/
e1000_gate_hw_phy_config_ich8lan(hw, true);
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
/* It is not possible to be certain of the current state of ULP
* so forcibly disable it.
*/
hw->dev_spec.ich8lan.ulp_state = e1000_ulp_state_unknown;
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
ret_val = hw->phy.ops.acquire(hw);
if (ret_val) {
DEBUGOUT("Failed to initialize PHY flow\n");
@@ -758,6 +758,7 @@ STATIC s32 e1000_init_mac_params_ich8lan(struct e1000_hw *hw)
/* multicast address update for pch2 */
mac->ops.update_mc_addr_list =
e1000_update_mc_addr_list_pch2lan;
+ /* fall-through */
#endif
case e1000_pchlan:
#if defined(QV_RELEASE) || !defined(NO_PCH_LPT_B0_SUPPORT)
@@ -1047,7 +1048,7 @@ update_fextnvm6:
return ret_val;
}
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
/**
* e1000_enable_ulp_lpt_lp - configure Ultra Low Power mode for LynxPoint-LP
* @hw: pointer to the HW structure
@@ -1385,7 +1386,7 @@ out:
return ret_val;
}
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
/**
* e1000_check_for_copper_link_ich8lan - Check for link (Copper)
* @hw: pointer to the HW structure
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index 130627c..f5d8ab1 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -69,22 +69,22 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FWSM_WLOCK_MAC_MASK 0x0380
#define E1000_FWSM_WLOCK_MAC_SHIFT 7
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FWSM_ULP_CFG_DONE 0x00000400 /* Low power cfg done */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
/* Shared Receive Address Registers */
#define E1000_SHRAL_PCH_LPT(_i) (0x05408 + ((_i) * 8))
#define E1000_SHRAH_PCH_LPT(_i) (0x0540C + ((_i) * 8))
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_H2ME 0x05B50 /* Host to ME */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_H2ME_ULP 0x00000800 /* ULP Indication Bit */
#define E1000_H2ME_ENFORCE_SETTINGS 0x00001000 /* Enforce Settings */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define ID_LED_DEFAULT_ICH8LAN ((ID_LED_DEF1_DEF2 << 12) | \
(ID_LED_OFF1_OFF2 << 8) | \
(ID_LED_OFF1_ON2 << 4) | \
@@ -97,11 +97,11 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_ICH8_LAN_INIT_TIMEOUT 1500
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
/* FEXT register bit definition */
#define E1000_FEXT_PHY_CABLE_DISCONNECTED 0x00000004
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define E1000_FEXTNVM_SW_CONFIG 1
#define E1000_FEXTNVM_SW_CONFIG_ICH8M (1 << 27) /* different on ICH8M */
@@ -115,10 +115,9 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
-
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define PCIE_ICH8_SNOOP_ALL PCIE_NO_SNOOP_ALL
#define E1000_ICH_RAR_ENTRIES 7
@@ -185,7 +184,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define CV_SMB_CTRL PHY_REG(769, 23)
#define CV_SMB_CTRL_FORCE_SMBUS 0x0001
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
/* I218 Ultra Low Power Configuration 1 Register */
#define I218_ULP_CONFIG1 PHY_REG(779, 16)
#define I218_ULP_CONFIG1_START 0x0001 /* Start auto ULP config */
@@ -196,7 +195,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define I218_ULP_CONFIG1_RESET_TO_SMBUS 0x0100 /* Reset to SMBus mode */
#define I218_ULP_CONFIG1_DISABLE_SMB_PERST 0x1000 /* Disable on PERST# */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
/* SMBus Address Phy Register */
#define HV_SMB_ADDR PHY_REG(768, 26)
#define HV_SMB_ADDR_MASK 0x007F
@@ -307,9 +306,9 @@ s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data);
s32 e1000_write_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 data);
s32 e1000_set_eee_pchlan(struct e1000_hw *hw);
-#if defined(NAHUM6LP_HW) && defined(ULP_SUPPORT)
+#ifdef ULP_SUPPORT
s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx);
s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force);
-#endif /* NAHUM6LP_HW && ULP_SUPPORT */
+#endif /* ULP_SUPPORT */
#endif /* _E1000_ICH8LAN_H_ */
void e1000_demote_ltr(struct e1000_hw *hw, bool demote, bool link);
diff --git a/drivers/net/e1000/base/e1000_osdep.h b/drivers/net/e1000/base/e1000_osdep.h
index d04ec73..b2c76e3 100644
--- a/drivers/net/e1000/base/e1000_osdep.h
+++ b/drivers/net/e1000/base/e1000_osdep.h
@@ -118,7 +118,6 @@ static inline uint32_t e1000_read_addr(volatile void* addr)
ADVERTISE_10_FULL | ADVERTISE_100_FULL | ADVERTISE_1000_FULL)
#define M88E1543_E_PHY_ID 0x01410EA0
-#define NAHUM6LP_HW
#define ULP_SUPPORT
#define E1000_RCTL_DTYP_MASK 0x00000C00 /* Descriptor type mask */
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 2891da3..5178e49 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -58,9 +58,9 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_SCTL 0x00024 /* SerDes Control - RW */
#define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */
#define E1000_FCAH 0x0002C /* Flow Control Address High -RW */
-#if !defined(EXTERNAL_RELEASE) || (defined(NAHUM6LP_HW) && defined(ULP_SUPPORT))
+#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXT 0x0002C /* Future Extended - RW */
-#endif /* !EXTERNAL_RELEASE || (NAHUM6LP_HW && ULP_SUPPORT) */
+#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
#define E1000_FEXTNVM 0x00028 /* Future Extended NVM - RW */
#define E1000_FEXTNVM3 0x0003C /* Future Extended NVM 3 - RW */
#define E1000_FEXTNVM4 0x00024 /* Future Extended NVM 4 - RW */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 22/36] e1000/base: add bit for disable packetbuffer read
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (20 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 21/36] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 23/36] e1000/base: K1 flow fixes Wenzhuo Lu
` (14 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Added bit FEXTNVM7[18], that controls disabling MAC packet buffer read.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index f5d8ab1..f7f66a4 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -115,6 +115,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
+/* bit for disabling packet buffer read */
+#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 23/36] e1000/base: K1 flow fixes
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (21 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 22/36] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 24/36] e1000/base: remove FIXME comment Wenzhuo Lu
` (13 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
This patch is for the following updates to the K1 configurations:
Tx idle period for entering K1 should be 128 ns.
Minimum Tx idle period in K1 should be 256 ns.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 47 +++++++++++++++++++++++++++++++++-
drivers/net/e1000/base/e1000_ich8lan.h | 5 +++-
drivers/net/e1000/base/e1000_phy.h | 7 +++++
drivers/net/e1000/base/e1000_regs.h | 1 +
4 files changed, 58 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 782da2a..56e20b4 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1492,10 +1492,14 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
if (ret_val)
return ret_val;
}
-
/* Clear link partner's EEE ability */
hw->dev_spec.ich8lan.eee_lp_ability = 0;
+ /* Configure K0s minimum time */
+ if (hw->mac.type == e1000_pch_lpt) {
+ e1000_configure_k0s_lpt(hw, K1_ENTRY_LATENCY, K1_MIN_TIME);
+ }
+
if (!link)
return E1000_SUCCESS; /* No link detected */
@@ -5298,3 +5302,44 @@ release:
}
}
+/**
+ * e1000_configure_k0s_lpt - Configure K0s power state
+ * @hw: pointer to the HW structure
+ * @entry_latency: Tx idle period for entering K0s - valid values are 0 to 3.
+ * 0 corresponds to 128ns, each value over 0 doubles the duration.
+ * @min_time: Minimum Tx idle period allowed - valid values are 0 to 4.
+ * 0 corresponds to 128ns, each value over 0 doubles the duration.
+ *
+ * Configure the K1 power state based on the provided parameter.
+ * Assumes semaphore already acquired.
+ *
+ * Success returns 0, Failure returns:
+ * -E1000_ERR_PHY (-2) in case of access error
+ * -E1000_ERR_PARAM (-4) in case of parameters error
+ **/
+s32 e1000_configure_k0s_lpt(struct e1000_hw *hw, u8 entry_latency, u8 min_time)
+{
+ s32 ret_val;
+ u16 kmrn_reg = 0;
+
+ DEBUGFUNC("e1000_configure_k0s_lpt");
+
+ if (entry_latency > 3 || min_time > 4)
+ return -E1000_ERR_PARAM;
+
+ ret_val = e1000_read_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K0S_CTRL,
+ &kmrn_reg);
+ if (ret_val)
+ return ret_val;
+
+ /* for now don't touch the latency */
+ kmrn_reg &= ~(E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_MASK);
+ kmrn_reg |= ((min_time << E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_SHIFT));
+
+ ret_val = e1000_write_kmrn_reg_locked(hw, E1000_KMRNCTRLSTA_K0S_CTRL,
+ kmrn_reg);
+ if (ret_val)
+ return ret_val;
+
+ return E1000_SUCCESS;
+}
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index f7f66a4..c54e4e7 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -114,7 +114,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_REQ_PLL_CLK 0x00000100
#define E1000_FEXTNVM6_ENABLE_K1_ENTRY_CONDITION 0x00000200
-
+#define E1000_FEXTNVM6_K1_OFF_ENABLE 0x80000000
/* bit for disabling packet buffer read */
#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
@@ -181,6 +181,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_NVM_K1_CONFIG 0x1B /* NVM K1 Config Word */
#define E1000_NVM_K1_ENABLE 0x1 /* NVM Enable K1 bit */
+#define K1_ENTRY_LATENCY 0
+#define K1_MIN_TIME 1
/* SMBus Control Phy Register */
#define CV_SMB_CTRL PHY_REG(769, 23)
@@ -303,6 +305,7 @@ void e1000_gig_downshift_workaround_ich8lan(struct e1000_hw *hw);
void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw);
u32 e1000_resume_workarounds_pchlan(struct e1000_hw *hw);
s32 e1000_configure_k1_ich8lan(struct e1000_hw *hw, bool k1_enable);
+s32 e1000_configure_k0s_lpt(struct e1000_hw *hw, u8 entry_latency, u8 min_time);
void e1000_copy_rx_addrs_to_phy_ich8lan(struct e1000_hw *hw);
s32 e1000_lv_jumbo_workaround_ich8lan(struct e1000_hw *hw, bool enable);
s32 e1000_read_emi_reg_locked(struct e1000_hw *hw, u16 addr, u16 *data);
diff --git a/drivers/net/e1000/base/e1000_phy.h b/drivers/net/e1000/base/e1000_phy.h
index 2b78af0..3e45a9e 100644
--- a/drivers/net/e1000/base/e1000_phy.h
+++ b/drivers/net/e1000/base/e1000_phy.h
@@ -274,6 +274,13 @@ bool e1000_is_mphy_ready(struct e1000_hw *hw);
#define E1000_KMRNCTRLSTA_K1_CONFIG 0x7
#define E1000_KMRNCTRLSTA_K1_ENABLE 0x0002 /* enable K1 */
#define E1000_KMRNCTRLSTA_HD_CTRL 0x10 /* Kumeran HD Control */
+#define E1000_KMRNCTRLSTA_K0S_CTRL 0x1E /* Kumeran K0s Control */
+#define E1000_KMRNCTRLSTA_K0S_CTRL_ENTRY_LTNCY_SHIFT 0
+#define E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_SHIFT 4
+#define E1000_KMRNCTRLSTA_K0S_CTRL_ENTRY_LTNCY_MASK \
+ (3 << E1000_KMRNCTRLSTA_K0S_CTRL_ENTRY_LTNCY_SHIFT)
+#define E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_MASK \
+ (7 << E1000_KMRNCTRLSTA_K0S_CTRL_MIN_TIME_SHIFT)
#define E1000_KMRNCTRLSTA_OP_MODES 0x1F /* Kumeran Modes of Operation */
#define E1000_KMRNCTRLSTA_OP_MODES_LSC2CSC 0x0002 /* change LSC to CSC */
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index 5178e49..e23e1e8 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -66,6 +66,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM4 0x00024 /* Future Extended NVM 4 - RW */
#define E1000_FEXTNVM6 0x00010 /* Future Extended NVM 6 - RW */
#define E1000_FEXTNVM7 0x000E4 /* Future Extended NVM 7 - RW */
+#define E1000_PCIEANACFG 0x00F18 /* PCIE Analog Config */
#define E1000_FCT 0x00030 /* Flow Control Type - RW */
#define E1000_CONNSW 0x00034 /* Copper/Fiber switch control - RW */
#define E1000_VET 0x00038 /* VLAN Ether Type - RW */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 24/36] e1000/base: remove FIXME comment
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (22 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 23/36] e1000/base: K1 flow fixes Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 25/36] e1000/base: set correct value of beacon duration Wenzhuo Lu
` (12 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
The "FIXME" comment is revomed from e1000_acquire_swfw_sync_80003es2lan
but forgotten being removed from e1000_acquire_swfw_sync_82575 while
the similar changes were made to both.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 81e6011..511636a 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -1050,7 +1050,7 @@ STATIC s32 e1000_acquire_swfw_sync_82575(struct e1000_hw *hw, u16 mask)
u32 swmask = mask;
u32 fwmask = mask << 16;
s32 ret_val = E1000_SUCCESS;
- s32 i = 0, timeout = 200; /* FIXME: find real value to use here */
+ s32 i = 0, timeout = 200;
DEBUGFUNC("e1000_acquire_swfw_sync_82575");
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 25/36] e1000/base: set correct value of beacon duration
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (23 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 24/36] e1000/base: remove FIXME comment Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 26/36] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
` (11 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Fix for I217 Packet Loss issue - The Management Engine sets the FEXTNVM4
Beacon Duration incorrectly. This fix ensures that the correct value will
always be set. Correct value for this field is 8 usec.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 56e20b4..7b7c631 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1483,6 +1483,20 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
return ret_val;
}
+ /* I217 Packet Loss issue:
+ * ensure that FEXTNVM4 Beacon Duration is set correctly
+ * on power up.
+ * Set the Beacon Duration for I217 to 8 usec
+ */
+ if (hw->mac.type == e1000_pch_lpt) {
+ u32 mac_reg;
+
+ mac_reg = E1000_READ_REG(hw, E1000_FEXTNVM4);
+ mac_reg &= ~E1000_FEXTNVM4_BEACON_DURATION_MASK;
+ mac_reg |= E1000_FEXTNVM4_BEACON_DURATION_8USEC;
+ E1000_WRITE_REG(hw, E1000_FEXTNVM4, mac_reg);
+ }
+
/* Work-around I218 hang issue */
if ((hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_LM) ||
(hw->device_id == E1000_DEV_ID_PCH_LPTLP_I218_V) ||
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 26/36] e1000/base: disable extension header parsing for IPv6
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (24 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 25/36] e1000/base: set correct value of beacon duration Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 27/36] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
` (10 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
All 1G Server products need to have IPv6 extension headers turned off.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 511636a..e170353 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -2125,7 +2125,7 @@ STATIC void e1000_clear_hw_cntrs_82575(struct e1000_hw *hw)
* e1000_rx_fifo_flush_82575 - Clean rx fifo after Rx enable
* @hw: pointer to the HW structure
*
- * After rx enable if managability is enabled then there is likely some
+ * After Rx enable, if manageability is enabled then there is likely some
* bad data at the start of the fifo and possibly in the DMA fifo. This
* function clears the fifos and flushes any packets that came in as rx was
* being enabled.
@@ -2135,7 +2135,13 @@ void e1000_rx_fifo_flush_82575(struct e1000_hw *hw)
u32 rctl, rlpml, rxdctl[4], rfctl, temp_rctl, rx_enabled;
int i, ms_wait;
- DEBUGFUNC("e1000_rx_fifo_workaround_82575");
+ DEBUGFUNC("e1000_rx_fifo_flush_82575");
+
+ /* disable IPv6 options as per hardware errata */
+ rfctl = E1000_READ_REG(hw, E1000_RFCTL);
+ rfctl |= E1000_RFCTL_IPV6_EX_DIS;
+ E1000_WRITE_REG(hw, E1000_RFCTL, rfctl);
+
if (hw->mac.type != e1000_82575 ||
!(E1000_READ_REG(hw, E1000_MANC) & E1000_MANC_RCV_TCO_EN))
return;
@@ -2163,7 +2169,6 @@ void e1000_rx_fifo_flush_82575(struct e1000_hw *hw)
* incoming packets are rejected. Set enable and wait 2ms so that
* any packet that was coming in as RCTL.EN was set is flushed
*/
- rfctl = E1000_READ_REG(hw, E1000_RFCTL);
E1000_WRITE_REG(hw, E1000_RFCTL, rfctl & ~E1000_RFCTL_LEF);
rlpml = E1000_READ_REG(hw, E1000_RLPML);
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 27/36] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (25 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 26/36] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 28/36] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
` (9 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
e1000_check_for_link_media_swap() is supposed to check PHY page 0 for
copper and PHY page 1 for "other" (fiber) link. We switched back from
page 1 to page 0 too soon, before e1000_check_for_link_82575() is
executed and we were never finding link on fiber (other).
Note: The precedence of link type is controlled by the PHY settings.
If the link is copper, as the M88E1112 page address is set to 1, it should be
set back to 0 before checking this link.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index e170353..4374eab 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -1234,7 +1234,7 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
DEBUGFUNC("e1000_check_for_link_media_swap");
- /* Check the copper medium. */
+ /* Check for copper. */
ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
if (ret_val)
return ret_val;
@@ -1246,7 +1246,7 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
if (data & E1000_M88E1112_STATUS_LINK)
port = E1000_MEDIA_PORT_COPPER;
- /* Check the other medium. */
+ /* Check for other. */
ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 1);
if (ret_val)
return ret_val;
@@ -1255,11 +1255,6 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
if (ret_val)
return ret_val;
- /* reset page to 0 */
- ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
- if (ret_val)
- return ret_val;
-
if (data & E1000_M88E1112_STATUS_LINK)
port = E1000_MEDIA_PORT_OTHER;
@@ -1267,8 +1262,20 @@ STATIC s32 e1000_check_for_link_media_swap(struct e1000_hw *hw)
if (port && (hw->dev_spec._82575.media_port != port)) {
hw->dev_spec._82575.media_port = port;
hw->dev_spec._82575.media_changed = true;
+ }
+
+ if (port == E1000_MEDIA_PORT_COPPER) {
+ /* reset page to 0 */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
+ if (ret_val)
+ return ret_val;
+ e1000_check_for_link_82575(hw);
} else {
- ret_val = e1000_check_for_link_82575(hw);
+ e1000_check_for_link_82575(hw);
+ /* reset page to 0 */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 0);
+ if (ret_val)
+ return ret_val;
}
return E1000_SUCCESS;
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 28/36] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (26 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 27/36] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 29/36] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
` (8 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Previously, in check_reset_block RSPCIPHY was polled for 100 ms before determining
that the ME veto is set. This needed to be increased to 300 ms.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 7b7c631..70eba71 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1991,7 +1991,7 @@ STATIC s32 e1000_check_reset_block_ich8lan(struct e1000_hw *hw)
continue;
}
blocked = false;
- } while (blocked && (i++ < 10));
+ } while (blocked && (i++ < 30));
return blocked ? E1000_BLK_PHY_RESET : E1000_SUCCESS;
}
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 29/36] e1000/base: implement 88E1543 PHY initialization
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (27 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 28/36] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 30/36] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
` (7 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
The initializtion process for 88E1543 PHY.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_82575.c | 106 ++++++++++++++++++++++++++++++++-
drivers/net/e1000/base/e1000_82575.h | 1 +
drivers/net/e1000/base/e1000_defines.h | 1 +
3 files changed, 107 insertions(+), 1 deletion(-)
diff --git a/drivers/net/e1000/base/e1000_82575.c b/drivers/net/e1000/base/e1000_82575.c
index 4374eab..723885d 100644
--- a/drivers/net/e1000/base/e1000_82575.c
+++ b/drivers/net/e1000/base/e1000_82575.c
@@ -277,6 +277,11 @@ STATIC s32 e1000_init_phy_params_82575(struct e1000_hw *hw)
if (ret_val)
goto out;
}
+ if (phy->id == M88E1543_E_PHY_ID) {
+ ret_val = e1000_initialize_M88E1543_phy(hw);
+ if (ret_val)
+ goto out;
+ }
break;
case IGP03E1000_E_PHY_ID:
case IGP04E1000_E_PHY_ID:
@@ -2817,7 +2822,7 @@ s32 e1000_read_emi_reg(struct e1000_hw *hw, u16 addr, u16 *data)
* e1000_initialize_M88E1512_phy - Initialize M88E1512 PHY
* @hw: pointer to the HW structure
*
- * Initialize Marverl 1512 to work correctly with Avoton.
+ * Initialize Marvell 1512 to work correctly with Avoton.
**/
s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw)
{
@@ -2903,6 +2908,105 @@ out:
}
/**
+ * e1000_initialize_M88E1543_phy - Initialize M88E1543 PHY
+ * @hw: pointer to the HW structure
+ *
+ * Initialize Marvell 1543 to work correctly with Avoton.
+ **/
+s32 e1000_initialize_M88E1543_phy(struct e1000_hw *hw)
+{
+ struct e1000_phy_info *phy = &hw->phy;
+ s32 ret_val = E1000_SUCCESS;
+
+ DEBUGFUNC("e1000_initialize_M88E1543_phy");
+
+ /* Check if this is correct PHY. */
+ if (phy->id != M88E1543_E_PHY_ID)
+ goto out;
+
+ /* Switch to PHY page 0xFF. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FF);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x214B);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2144);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0x0C28);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2146);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xB233);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x214D);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_2, 0xDC0C);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_1, 0x2159);
+ if (ret_val)
+ goto out;
+
+ /* Switch to PHY page 0xFB. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x00FB);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_CFG_REG_3, 0xC00D);
+ if (ret_val)
+ goto out;
+
+ /* Switch to PHY page 0x12. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x12);
+ if (ret_val)
+ goto out;
+
+ /* Change mode to SGMII-to-Copper */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1512_MODE, 0x8001);
+ if (ret_val)
+ goto out;
+
+ /* Switch to PHY page 1. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0x1);
+ if (ret_val)
+ goto out;
+
+ /* Change mode to 1000BASE-X/SGMII and autoneg enable; reset */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_FIBER_CTRL, 0x9140);
+ if (ret_val)
+ goto out;
+
+ /* Return the PHY to page 0. */
+ ret_val = phy->ops.write_reg(hw, E1000_M88E1543_PAGE_ADDR, 0);
+ if (ret_val)
+ goto out;
+
+ ret_val = phy->ops.commit(hw);
+ if (ret_val) {
+ DEBUGOUT("Error committing the PHY changes\n");
+ return ret_val;
+ }
+
+ msec_delay(1000);
+out:
+ return ret_val;
+}
+
+/**
* e1000_set_eee_i350 - Enable/disable EEE support
* @hw: pointer to the HW structure
* @adv1g: boolean flag enabling 1G EEE advertisement
diff --git a/drivers/net/e1000/base/e1000_82575.h b/drivers/net/e1000/base/e1000_82575.h
index 7a46ceb..c498684 100644
--- a/drivers/net/e1000/base/e1000_82575.h
+++ b/drivers/net/e1000/base/e1000_82575.h
@@ -498,6 +498,7 @@ s32 e1000_set_eee_i350(struct e1000_hw *hw, bool adv1G, bool adv100M);
s32 e1000_set_eee_i354(struct e1000_hw *hw, bool adv1G, bool adv100M);
s32 e1000_get_eee_status_i354(struct e1000_hw *, bool *);
s32 e1000_initialize_M88E1512_phy(struct e1000_hw *hw);
+s32 e1000_initialize_M88E1543_phy(struct e1000_hw *hw);
/* I2C SDA and SCL timing parameters for standard mode */
#define E1000_I2C_T_HD_STA 4
diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h
index 8e40771..69aa1f2 100644
--- a/drivers/net/e1000/base/e1000_defines.h
+++ b/drivers/net/e1000/base/e1000_defines.h
@@ -847,6 +847,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_M88E1543_PAGE_ADDR 0x16 /* Page Offset Register */
#define E1000_M88E1543_EEE_CTRL_1 0x0
#define E1000_M88E1543_EEE_CTRL_1_MS 0x0001 /* EEE Master/Slave */
+#define E1000_M88E1543_FIBER_CTRL 0x0 /* Fiber Control Register */
#define E1000_EEE_ADV_DEV_I354 7
#define E1000_EEE_ADV_ADDR_I354 60
#define E1000_EEE_ADV_100_SUPPORTED (1 << 1) /* 100BaseTx EEE Supported */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 30/36] e1000/base: use the correct i210 register for EEMNGCTL
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (28 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 29/36] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 31/36] e1000/base: move the print to the right position Wenzhuo Lu
` (6 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
The i210 has two EEPROM access registers that are located in
non-standard offsets: EEARBC and EEMNGCTL. EEARBC was fixed previously
and EEMNGCTL should also be corrected.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_i210.c | 30 ++++++++++++++++++++++++++++++
drivers/net/e1000/base/e1000_regs.h | 1 +
2 files changed, 31 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_i210.c b/drivers/net/e1000/base/e1000_i210.c
index fedf88e..277331c 100644
--- a/drivers/net/e1000/base/e1000_i210.c
+++ b/drivers/net/e1000/base/e1000_i210.c
@@ -982,6 +982,35 @@ STATIC s32 e1000_pll_workaround_i210(struct e1000_hw *hw)
}
/**
+ * e1000_get_cfg_done_i210 - Read config done bit
+ * @hw: pointer to the HW structure
+ *
+ * Read the management control register for the config done bit for
+ * completion status. NOTE: silicon which is EEPROM-less will fail trying
+ * to read the config done bit, so an error is *ONLY* logged and returns
+ * E1000_SUCCESS. If we were to return with error, EEPROM-less silicon
+ * would not be able to be reset or change link.
+ **/
+STATIC s32 e1000_get_cfg_done_i210(struct e1000_hw *hw)
+{
+ s32 timeout = PHY_CFG_TIMEOUT;
+ u32 mask = E1000_NVM_CFG_DONE_PORT_0;
+
+ DEBUGFUNC("e1000_get_cfg_done_i210");
+
+ while (timeout) {
+ if (E1000_READ_REG(hw, E1000_EEMNGCTL_I210) & mask)
+ break;
+ msec_delay(1);
+ timeout--;
+ }
+ if (!timeout)
+ DEBUGOUT("MNG configuration cycle has not completed.\n");
+
+ return E1000_SUCCESS;
+}
+
+/**
* e1000_init_hw_i210 - Init hw for I210/I211
* @hw: pointer to the HW structure
*
@@ -998,6 +1027,7 @@ s32 e1000_init_hw_i210(struct e1000_hw *hw)
if (ret_val != E1000_SUCCESS)
return ret_val;
}
+ hw->phy.ops.get_cfg_done = e1000_get_cfg_done_i210;
ret_val = e1000_init_hw_82575(hw);
return ret_val;
}
diff --git a/drivers/net/e1000/base/e1000_regs.h b/drivers/net/e1000/base/e1000_regs.h
index e23e1e8..84531a9 100644
--- a/drivers/net/e1000/base/e1000_regs.h
+++ b/drivers/net/e1000/base/e1000_regs.h
@@ -110,6 +110,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_PBS 0x01008 /* Packet Buffer Size */
#define E1000_PBECCSTS 0x0100C /* Packet Buffer ECC Status - RW */
#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
+#define E1000_EEMNGCTL_I210 0x01010 /* i210 MNG EEprom Mode Control */
#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
#define E1000_EEARBC_I210 0x12024 /* EEPROM Auto Read Bus Control */
#define E1000_FLASHT 0x01028 /* FLASH Timer Register */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 31/36] e1000/base: move the print to the right position
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (29 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 30/36] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 32/36] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
` (5 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
This info need not to be always printed. Move it into the if.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_phy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c
index 6bbb379..d43b7ce 100644
--- a/drivers/net/e1000/base/e1000_phy.c
+++ b/drivers/net/e1000/base/e1000_phy.c
@@ -1833,9 +1833,9 @@ s32 e1000_phy_force_speed_duplex_m88(struct e1000_hw *hw)
phy_data);
if (ret_val)
return ret_val;
- }
- DEBUGOUT1("M88E1000 PSCR: %X\n", phy_data);
+ DEBUGOUT1("M88E1000 PSCR: %X\n", phy_data);
+ }
ret_val = phy->ops.read_reg(hw, PHY_CONTROL, &phy_data);
if (ret_val)
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 32/36] e1000/base: synchronization of MAC-PHY interface only on non- ME systems
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (30 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 31/36] e1000/base: move the print to the right position Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 33/36] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
` (4 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
On power up, the MAC - PHY interface needs to be set to PCIe, even if
cable is disconnected. In ME systems, the ME handles this on exit from
Sx(Sticky mode) state. In non-ME, the driver handles it. Added a check
for non-ME system to the driver code that handles that.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 70eba71..6dc053f 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -234,15 +234,19 @@ STATIC bool e1000_phy_is_accessible_pchlan(struct e1000_hw *hw)
return false;
out:
if (hw->mac.type == e1000_pch_lpt) {
- /* Unforce SMBus mode in PHY */
- hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg);
- phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
- hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg);
+ /* Only unforce SMBus if ME is not active */
+ if (!(E1000_READ_REG(hw, E1000_FWSM) &
+ E1000_ICH_FWSM_FW_VALID)) {
+ /* Unforce SMBus mode in PHY */
+ hw->phy.ops.read_reg_locked(hw, CV_SMB_CTRL, &phy_reg);
+ phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS;
+ hw->phy.ops.write_reg_locked(hw, CV_SMB_CTRL, phy_reg);
- /* Unforce SMBus mode in MAC */
- mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT);
- mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
- E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg);
+ /* Unforce SMBus mode in MAC */
+ mac_reg = E1000_READ_REG(hw, E1000_CTRL_EXT);
+ mac_reg &= ~E1000_CTRL_EXT_FORCE_SMBUS;
+ E1000_WRITE_REG(hw, E1000_CTRL_EXT, mac_reg);
+ }
}
return true;
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 33/36] e1000/base: fix to enable both ulp and EEE in Sx state
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (31 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 32/36] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 34/36] e1000/base: some minor change Wenzhuo Lu
` (3 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
This patch implements a modified flow that allows both ULP and EEE
in Sx(Sticky mode).
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index 6dc053f..f62ad0b 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1154,10 +1154,15 @@ skip_smbus:
if (to_sx) {
if (E1000_READ_REG(hw, E1000_WUFC) & E1000_WUFC_LNKC)
phy_reg |= I218_ULP_CONFIG1_WOL_HOST;
+ else
+ phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST;
phy_reg |= I218_ULP_CONFIG1_STICKY_ULP;
+ phy_reg &= ~I218_ULP_CONFIG1_INBAND_EXIT;
} else {
phy_reg |= I218_ULP_CONFIG1_INBAND_EXIT;
+ phy_reg &= ~I218_ULP_CONFIG1_STICKY_ULP;
+ phy_reg &= ~I218_ULP_CONFIG1_WOL_HOST;
}
e1000_write_phy_reg_hv_locked(hw, I218_ULP_CONFIG1, phy_reg);
@@ -1178,6 +1183,7 @@ skip_smbus:
mac_reg &= ~E1000_TCTL_EN;
E1000_WRITE_REG(hw, E1000_TCTL, mac_reg);
}
+
release:
hw->phy.ops.release(hw);
out:
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 34/36] e1000/base: some minor change
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (32 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 33/36] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 35/36] e1000: add new devices Wenzhuo Lu
` (2 subsequent siblings)
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Some minor code change. No functionality impact.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
drivers/net/e1000/base/e1000_ich8lan.c | 27 ++++++++++++---------------
drivers/net/e1000/base/e1000_ich8lan.h | 1 +
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/drivers/net/e1000/base/e1000_ich8lan.c b/drivers/net/e1000/base/e1000_ich8lan.c
index f62ad0b..89d07e9 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.c
+++ b/drivers/net/e1000/base/e1000_ich8lan.c
@@ -1442,7 +1442,6 @@ STATIC s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
ret_val = e1000_disable_ulp_lpt_lp(hw, false);
else
ret_val = e1000_enable_ulp_lpt_lp(hw, false);
-
if (ret_val)
return ret_val;
}
@@ -2979,7 +2978,6 @@ STATIC s32 e1000_set_lplu_state_pchlan(struct e1000_hw *hw, bool active)
u16 oem_reg;
DEBUGFUNC("e1000_set_lplu_state_pchlan");
-
ret_val = hw->phy.ops.read_reg(hw, HV_OEM_BITS, &oem_reg);
if (ret_val)
return ret_val;
@@ -3199,6 +3197,7 @@ STATIC s32 e1000_valid_nvm_bank_detect_ich8lan(struct e1000_hw *hw, u32 *bank)
struct e1000_nvm_info *nvm = &hw->nvm;
u32 bank1_offset = nvm->flash_bank_size * sizeof(u16);
u32 act_offset = E1000_ICH_NVM_SIG_WORD * 2 + 1;
+ u32 nvm_dword = 0;
u8 sig_byte = 0;
s32 ret_val;
@@ -3506,12 +3505,10 @@ STATIC s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
hsflctl.hsf_ctrl.fldbcount = size - 1;
hsflctl.hsf_ctrl.flcycle = ICH_CYCLE_READ;
E1000_WRITE_FLASH_REG16(hw, ICH_FLASH_HSFCTL, hsflctl.regval);
-
E1000_WRITE_FLASH_REG(hw, ICH_FLASH_FADDR, flash_linear_addr);
- ret_val =
- e1000_flash_cycle_ich8lan(hw,
- ICH_FLASH_READ_COMMAND_TIMEOUT);
+ ret_val = e1000_flash_cycle_ich8lan(hw,
+ ICH_FLASH_READ_COMMAND_TIMEOUT);
/* Check if FCERR is set to 1, if set to 1, clear it
* and try the whole sequence a few more times, else
@@ -3546,6 +3543,7 @@ STATIC s32 e1000_read_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
return ret_val;
}
+
/**
* e1000_write_nvm_ich8lan - Write word(s) to the NVM
* @hw: pointer to the HW structure
@@ -3599,7 +3597,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
struct e1000_dev_spec_ich8lan *dev_spec = &hw->dev_spec.ich8lan;
u32 i, act_offset, new_bank_offset, old_bank_offset, bank;
s32 ret_val;
- u16 data;
+ u16 data = 0;
DEBUGFUNC("e1000_update_nvm_checksum_ich8lan");
@@ -3635,12 +3633,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
if (ret_val)
goto release;
}
-
for (i = 0; i < E1000_SHADOW_RAM_WORDS; i++) {
- /* Determine whether to write the value stored
- * in the other NVM bank or a modified value stored
- * in the shadow RAM
- */
if (dev_spec->shadow_ram[i].modified) {
data = dev_spec->shadow_ram[i].value;
} else {
@@ -3650,7 +3643,6 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
if (ret_val)
break;
}
-
/* If the word is 0x13, then make sure the signature bits
* (15:14) are 11b until the commit has completed.
* This will allow us to write 10b which indicates the
@@ -3665,6 +3657,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
act_offset = (i + new_bank_offset) << 1;
usec_delay(100);
+
/* Write the bytes to the new bank. */
ret_val = e1000_retry_write_flash_byte_ich8lan(hw,
act_offset,
@@ -3699,8 +3692,7 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
goto release;
data &= 0xBFFF;
- ret_val = e1000_retry_write_flash_byte_ich8lan(hw,
- act_offset * 2 + 1,
+ ret_val = e1000_retry_write_flash_byte_ich8lan(hw, act_offset * 2 + 1,
(u8)(data >> 8));
if (ret_val)
goto release;
@@ -3711,7 +3703,9 @@ STATIC s32 e1000_update_nvm_checksum_ich8lan(struct e1000_hw *hw)
* to 1's. We can write 1's to 0's without an erase
*/
act_offset = (old_bank_offset + E1000_ICH_NVM_SIG_WORD) * 2 + 1;
+
ret_val = e1000_retry_write_flash_byte_ich8lan(hw, act_offset, 0);
+
if (ret_val)
goto release;
@@ -3865,6 +3859,7 @@ STATIC s32 e1000_write_flash_data_ich8lan(struct e1000_hw *hw, u32 offset,
return ret_val;
}
+
/**
* e1000_write_flash_byte_ich8lan - Write a single byte to NVM
* @hw: pointer to the HW structure
@@ -3883,6 +3878,8 @@ STATIC s32 e1000_write_flash_byte_ich8lan(struct e1000_hw *hw, u32 offset,
return e1000_write_flash_data_ich8lan(hw, offset, 1, word);
}
+
+
/**
* e1000_retry_write_flash_byte_ich8lan - Writes a single byte to NVM
* @hw: pointer to the HW structure
diff --git a/drivers/net/e1000/base/e1000_ich8lan.h b/drivers/net/e1000/base/e1000_ich8lan.h
index c54e4e7..33e77fb 100644
--- a/drivers/net/e1000/base/e1000_ich8lan.h
+++ b/drivers/net/e1000/base/e1000_ich8lan.h
@@ -117,6 +117,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define E1000_FEXTNVM6_K1_OFF_ENABLE 0x80000000
/* bit for disabling packet buffer read */
#define E1000_FEXTNVM7_DISABLE_PB_READ 0x00040000
+#define E1000_FEXTNVM7_SIDE_CLK_UNGATE 0x00000004
#if !defined(EXTERNAL_RELEASE) || defined(ULP_SUPPORT)
#define E1000_FEXTNVM7_DISABLE_SMB_PERST 0x00000020
#endif /* !EXTERNAL_RELEASE || ULP_SUPPORT */
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 35/36] e1000: add new devices
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (33 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 34/36] e1000/base: some minor change Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 36/36] doc: update release notes for e1000 base code update Wenzhuo Lu
2015-10-27 15:34 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Thomas Monjalon
36 siblings, 0 replies; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Add the new e1000 devices to the DPDK PCI device list.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
lib/librte_eal/common/include/rte_pci_dev_ids.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index 265e66c..19892e1 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -272,6 +272,11 @@
#define E1000_DEV_ID_PCH_LPT_I217_V 0x153B
#define E1000_DEV_ID_PCH_LPTLP_I218_LM 0x155A
#define E1000_DEV_ID_PCH_LPTLP_I218_V 0x1559
+#define E1000_DEV_ID_PCH_I218_LM2 0x15A0
+#define E1000_DEV_ID_PCH_I218_V2 0x15A1
+#define E1000_DEV_ID_PCH_I218_LM3 0x15A2
+#define E1000_DEV_ID_PCH_I218_V3 0x15A3
+
/*
* Tested (supported) on VM emulated HW.
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* [dpdk-dev] [PATCH v3 36/36] doc: update release notes for e1000 base code update
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (34 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 35/36] e1000: add new devices Wenzhuo Lu
@ 2015-10-16 2:51 ` Wenzhuo Lu
2015-10-27 15:32 ` Thomas Monjalon
2015-10-27 15:34 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Thomas Monjalon
36 siblings, 1 reply; 118+ messages in thread
From: Wenzhuo Lu @ 2015-10-16 2:51 UTC (permalink / raw)
To: dev
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
doc/guides/rel_notes/release_2_2.rst | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst
index 5687676..36a9d69 100644
--- a/doc/guides/rel_notes/release_2_2.rst
+++ b/doc/guides/rel_notes/release_2_2.rst
@@ -4,6 +4,28 @@ DPDK Release 2.2
New Features
------------
+* **Updated the e1000 base driver.**
+ The e1000 base driver was updated with several changes including the
+ following:
+
+ * Add some new i218 devices
+ * Fix issue with link flap on 82579
+ * Fix issue with jumbo frame CRC failures in client
+ * Add support for inverted format ETrackId
+ * Add flags to set eee advertisement modes
+ * Prevent ulp flow if cable connected
+ * Cleanup NAHUM6LP_HW tags
+ * Use the correct i210 register for EEMNGCTL
+ * Fix to enable both ulp and EEE in Sx state
+ * Fix link detect flow
+ * Set correct value of beacon duration
+ * Disable extension header parsing for IPv6
+ * Fix for i354 88E1112 PHY using AutoMedia Detect
+ * Implement 88E1543 PHY initialization
+ * Increase timeout of polling bit RSPCIPHY in check_reset_block
+ * Synchronization of MAC-PHY interface only on non- ME systems
+
+ See the git log for full details of the e1000/base changes.
Resolved Issues
---------------
--
1.9.3
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH 00/34] update e1000 base driver
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
` (35 preceding siblings ...)
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
@ 2015-10-19 16:03 ` Thomas Monjalon
2015-10-20 0:59 ` Lu, Wenzhuo
36 siblings, 1 reply; 118+ messages in thread
From: Thomas Monjalon @ 2015-10-19 16:03 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: dev
Hi Wenzhuo,
Isn't it too late to have it included in DPDK 2.2?
For reference: http://dpdk.org/dev/roadmap
If you consider it for 2.3, please use the patchwork status "Deferred".
For older versions of the patchset, please use the status "Superseded".
Thanks
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH 00/34] update e1000 base driver
2015-10-19 16:03 ` [dpdk-dev] [PATCH 00/34] update e1000 base driver Thomas Monjalon
@ 2015-10-20 0:59 ` Lu, Wenzhuo
2015-10-21 10:21 ` Glynn, Michael J
0 siblings, 1 reply; 118+ messages in thread
From: Lu, Wenzhuo @ 2015-10-20 0:59 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
Hi Thomas,
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, October 20, 2015 12:03 AM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 00/34] update e1000 base driver
>
> Hi Wenzhuo,
>
> Isn't it too late to have it included in DPDK 2.2?
> For reference: http://dpdk.org/dev/roadmap
>
> If you consider it for 2.3, please use the patchwork status "Deferred".
> For older versions of the patchset, please use the status "Superseded".
> Thanks
Status changed. Thanks.
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH 00/34] update e1000 base driver
2015-10-20 0:59 ` Lu, Wenzhuo
@ 2015-10-21 10:21 ` Glynn, Michael J
0 siblings, 0 replies; 118+ messages in thread
From: Glynn, Michael J @ 2015-10-21 10:21 UTC (permalink / raw)
To: Lu, Wenzhuo, Thomas Monjalon; +Cc: dev
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Lu, Wenzhuo
Sent: Tuesday, October 20, 2015 2:00 AM
To: Thomas Monjalon
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 00/34] update e1000 base driver
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, October 20, 2015 12:03 AM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 00/34] update e1000 base driver
>
> Hi Wenzhuo,
>
> Isn't it too late to have it included in DPDK 2.2?
> For reference: http://dpdk.org/dev/roadmap
Hi Thomas
This is an update not a roadmap feature therefore I think it should be applied in 2.2
Regards
Mike
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH v3 36/36] doc: update release notes for e1000 base code update
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 36/36] doc: update release notes for e1000 base code update Wenzhuo Lu
@ 2015-10-27 15:32 ` Thomas Monjalon
2015-10-28 2:33 ` Lu, Wenzhuo
0 siblings, 1 reply; 118+ messages in thread
From: Thomas Monjalon @ 2015-10-27 15:32 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: dev
2015-10-16 10:51, Wenzhuo Lu:
> New Features
> ------------
>
> +* **Updated the e1000 base driver.**
> + The e1000 base driver was updated with several changes including the
> + following:
> +
> + * Add some new i218 devices
> + * Fix issue with link flap on 82579
> + * Fix issue with jumbo frame CRC failures in client
> + * Add support for inverted format ETrackId
> + * Add flags to set eee advertisement modes
> + * Prevent ulp flow if cable connected
> + * Cleanup NAHUM6LP_HW tags
Is it really a feature?
> + * Use the correct i210 register for EEMNGCTL
> + * Fix to enable both ulp and EEE in Sx state
> + * Fix link detect flow
> + * Set correct value of beacon duration
> + * Disable extension header parsing for IPv6
> + * Fix for i354 88E1112 PHY using AutoMedia Detect
> + * Implement 88E1543 PHY initialization
> + * Increase timeout of polling bit RSPCIPHY in check_reset_block
> + * Synchronization of MAC-PHY interface only on non- ME systems
Some of theses features are not easy to understand.
Please avoid to speak of the registers in the release notes.
Something more high level is expected.
> + See the git log for full details of the e1000/base changes.
This last sentence is valuable for any entry in the release notes.
Let's say it is implicit.
> Resolved Issues
> ---------------
Some of the fixes above should be in this section.
John, please could you check?
Thanks
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH v3 00/36] update e1000 base code
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
` (35 preceding siblings ...)
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 36/36] doc: update release notes for e1000 base code update Wenzhuo Lu
@ 2015-10-27 15:34 ` Thomas Monjalon
2015-10-28 1:58 ` Lu, Wenzhuo
36 siblings, 1 reply; 118+ messages in thread
From: Thomas Monjalon @ 2015-10-27 15:34 UTC (permalink / raw)
To: Wenzhuo Lu; +Cc: dev
2015-10-16 10:50, Wenzhuo Lu:
> Wenzhuo Lu (36):
> e1000/base: update readme and copyright
> e1000/base: add new devices
> e1000/base: fix issue with link flap on 82579
> e1000/base: fix issue with jumbo frame CRC failures in client
> e1000/base: redundant PHY power down for i210
> e1000/base: add return value to the functions of setting receive
> address register
> e1000/base: add defaults for i210 TX/RX PBSIZE
> e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after
> commencing HW reset
> e1000/base: add evaluation of e1000_nvm_read return value
> e1000/base: change invariant return to not use variables
> e1000/base: add return value handler when check manage mode
> e1000/base: add return value handler for ESB2 controller init and
> reset
> e1000/base: add support for inverted format ETrackId
> e1000/base: add EEARBC_I210 for i210
> e1000/base: apply paranoia to macro arguments
> e1000/base: add flags to set eee advertisement modes
> e1000/base: prevent ulp flow if cable connected
> e1000/base: fix TIPG value for non 10 half duplex mode
> e1000/base: add return value for resume workaround
> e1000/base: fix link detect flow
> e1000/base: cleanup NAHUM6LP_HW tags
> e1000/base: add bit for disable packetbuffer read
> e1000/base: K1 flow fixes
> e1000/base: remove FIXME comment
> e1000/base: set correct value of beacon duration
> e1000/base: disable extension header parsing for IPv6
> e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect
> e1000/base: increase timeout of polling bit RSPCIPHY in
> check_reset_block
> e1000/base: implement 88E1543 PHY initialization
> e1000/base: use the correct i210 register for EEMNGCTL
> e1000/base: move the print to the right position
> e1000/base: synchronization of MAC-PHY interface only on non- ME
> systems
> e1000/base: fix to enable both ulp and EEE in Sx state
> e1000/base: some minor change
> e1000: add new devices
> doc: update release notes for e1000 base code update
Applied without the release notes patch which is not ready.
The git titles have been reworded to be easier to read and understand.
It may help to reword the release notes.
Thanks
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH v3 00/36] update e1000 base code
2015-10-27 15:34 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Thomas Monjalon
@ 2015-10-28 1:58 ` Lu, Wenzhuo
0 siblings, 0 replies; 118+ messages in thread
From: Lu, Wenzhuo @ 2015-10-28 1:58 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
Hi Thomas,
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, October 27, 2015 11:34 PM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org; Mcnamara, John
> Subject: Re: [dpdk-dev] [PATCH v3 00/36] update e1000 base code
>
> 2015-10-16 10:50, Wenzhuo Lu:
> > Wenzhuo Lu (36):
> > e1000/base: update readme and copyright
> > e1000/base: add new devices
> > e1000/base: fix issue with link flap on 82579
> > e1000/base: fix issue with jumbo frame CRC failures in client
> > e1000/base: redundant PHY power down for i210
> > e1000/base: add return value to the functions of setting receive
> > address register
> > e1000/base: add defaults for i210 TX/RX PBSIZE
> > e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after
> > commencing HW reset
> > e1000/base: add evaluation of e1000_nvm_read return value
> > e1000/base: change invariant return to not use variables
> > e1000/base: add return value handler when check manage mode
> > e1000/base: add return value handler for ESB2 controller init and
> > reset
> > e1000/base: add support for inverted format ETrackId
> > e1000/base: add EEARBC_I210 for i210
> > e1000/base: apply paranoia to macro arguments
> > e1000/base: add flags to set eee advertisement modes
> > e1000/base: prevent ulp flow if cable connected
> > e1000/base: fix TIPG value for non 10 half duplex mode
> > e1000/base: add return value for resume workaround
> > e1000/base: fix link detect flow
> > e1000/base: cleanup NAHUM6LP_HW tags
> > e1000/base: add bit for disable packetbuffer read
> > e1000/base: K1 flow fixes
> > e1000/base: remove FIXME comment
> > e1000/base: set correct value of beacon duration
> > e1000/base: disable extension header parsing for IPv6
> > e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect
> > e1000/base: increase timeout of polling bit RSPCIPHY in
> > check_reset_block
> > e1000/base: implement 88E1543 PHY initialization
> > e1000/base: use the correct i210 register for EEMNGCTL
> > e1000/base: move the print to the right position
> > e1000/base: synchronization of MAC-PHY interface only on non- ME
> > systems
> > e1000/base: fix to enable both ulp and EEE in Sx state
> > e1000/base: some minor change
> > e1000: add new devices
> > doc: update release notes for e1000 base code update
>
> Applied without the release notes patch which is not ready.
> The git titles have been reworded to be easier to read and understand.
> It may help to reword the release notes.
> Thanks
Thanks for applying the patches. I'll send a patch to reword the release notes. Thanks.
^ permalink raw reply [flat|nested] 118+ messages in thread
* Re: [dpdk-dev] [PATCH v3 36/36] doc: update release notes for e1000 base code update
2015-10-27 15:32 ` Thomas Monjalon
@ 2015-10-28 2:33 ` Lu, Wenzhuo
0 siblings, 0 replies; 118+ messages in thread
From: Lu, Wenzhuo @ 2015-10-28 2:33 UTC (permalink / raw)
To: Thomas Monjalon, Mcnamara, John; +Cc: dev
Hi John,
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, October 27, 2015 11:32 PM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org; Mcnamara, John
> Subject: Re: [dpdk-dev] [PATCH v3 36/36] doc: update release notes for
> e1000 base code update
>
> 2015-10-16 10:51, Wenzhuo Lu:
> > New Features
> > ------------
> >
> > +* **Updated the e1000 base driver.**
> > + The e1000 base driver was updated with several changes including the
> > + following:
> > +
> > + * Add some new i218 devices
> > + * Fix issue with link flap on 82579
> > + * Fix issue with jumbo frame CRC failures in client
> > + * Add support for inverted format ETrackId
> > + * Add flags to set eee advertisement modes
> > + * Prevent ulp flow if cable connected
> > + * Cleanup NAHUM6LP_HW tags
>
> Is it really a feature?
>
> > + * Use the correct i210 register for EEMNGCTL
> > + * Fix to enable both ulp and EEE in Sx state
> > + * Fix link detect flow
> > + * Set correct value of beacon duration
> > + * Disable extension header parsing for IPv6
> > + * Fix for i354 88E1112 PHY using AutoMedia Detect
> > + * Implement 88E1543 PHY initialization
> > + * Increase timeout of polling bit RSPCIPHY in check_reset_block
> > + * Synchronization of MAC-PHY interface only on non- ME systems
>
> Some of theses features are not easy to understand.
> Please avoid to speak of the registers in the release notes.
> Something more high level is expected.
>
> > + See the git log for full details of the e1000/base changes.
>
> This last sentence is valuable for any entry in the release notes.
> Let's say it is implicit.
>
> > Resolved Issues
> > ---------------
>
> Some of the fixes above should be in this section.
>
> John, please could you check?
>
> Thanks
Some fixes should be moved to Resolved Issues. But not sure if the "**Updated the e1000 base driver.**" still needed or describe them separately.
John, can you comment? Thanks.
^ permalink raw reply [flat|nested] 118+ messages in thread
end of thread, other threads:[~2015-10-28 2:33 UTC | newest]
Thread overview: 118+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14 6:34 [dpdk-dev] [PATCH 00/34] update e1000 base driver Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 01/34] e1000/base: update readme and copyright Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 02/34] e1000/base: add new devices Wenzhuo Lu
2015-10-14 16:00 ` Stephen Hemminger
2015-10-14 6:34 ` [dpdk-dev] [PATCH 03/34] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 04/34] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 05/34] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 06/34] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 07/34] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 08/34] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 09/34] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 10/34] e1000/base: change invariant return to not use variables Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 11/34] e1000/base: add return value handler when check manage mode Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 12/34] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 13/34] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 14/34] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 15/34] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 16/34] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 17/34] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 18/34] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 19/34] e1000/base: add return value for resume workaround Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 20/34] e1000/base: fix link detect flow Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 21/34] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 22/34] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 23/34] e1000/base: K1 flow fixes Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 24/34] e1000/base: remove FIXME comment Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 25/34] e1000/base: set correct value of beacon duration Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 26/34] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 27/34] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 28/34] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 29/34] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 30/34] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 31/34] e1000/base: move the print to the right position Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 32/34] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 33/34] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
2015-10-14 6:34 ` [dpdk-dev] [PATCH 34/34] e1000/base: some minor change Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 00/35] update e1000 base code Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 01/35] e1000/base: update readme and copyright Wenzhuo Lu
2015-10-15 8:30 ` Mcnamara, John
2015-10-15 8:37 ` Lu, Wenzhuo
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 02/35] e1000/base: add new devices Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 03/35] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 04/35] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 05/35] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 06/35] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 07/35] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 08/35] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 09/35] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 10/35] e1000/base: change invariant return to not use variables Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 11/35] e1000/base: add return value handler when check manage mode Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 12/35] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 13/35] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 14/35] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 15/35] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 16/35] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 17/35] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 18/35] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 19/35] e1000/base: add return value for resume workaround Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 20/35] e1000/base: fix link detect flow Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 21/35] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 22/35] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 23/35] e1000/base: K1 flow fixes Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 24/35] e1000/base: remove FIXME comment Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 25/35] e1000/base: set correct value of beacon duration Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 26/35] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 27/35] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 28/35] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 29/35] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 30/35] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 31/35] e1000/base: move the print to the right position Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 32/35] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 33/35] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 34/35] e1000/base: some minor change Wenzhuo Lu
2015-10-15 2:03 ` [dpdk-dev] [PATCH v2 35/35] e1000: add new devices Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 01/36] e1000/base: update readme and copyright Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 02/36] e1000/base: add new devices Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 03/36] e1000/base: fix issue with link flap on 82579 Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 04/36] e1000/base: fix issue with jumbo frame CRC failures in client Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 05/36] e1000/base: redundant PHY power down for i210 Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 06/36] e1000/base: add return value to the functions of setting receive address register Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 07/36] e1000/base: add defaults for i210 TX/RX PBSIZE Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 08/36] e1000/base: remove E1000_WRITE_FLUSH for DH89XXCC_SGMII after commencing HW reset Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 09/36] e1000/base: add evaluation of e1000_nvm_read return value Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 10/36] e1000/base: change invariant return to not use variables Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 11/36] e1000/base: add return value handler when check manage mode Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 12/36] e1000/base: add return value handler for ESB2 controller init and reset Wenzhuo Lu
2015-10-16 2:50 ` [dpdk-dev] [PATCH v3 13/36] e1000/base: add support for inverted format ETrackId Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 14/36] e1000/base: add EEARBC_I210 for i210 Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 15/36] e1000/base: apply paranoia to macro arguments Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 16/36] e1000/base: add flags to set eee advertisement modes Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 17/36] e1000/base: prevent ulp flow if cable connected Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 18/36] e1000/base: fix TIPG value for non 10 half duplex mode Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 19/36] e1000/base: add return value for resume workaround Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 20/36] e1000/base: fix link detect flow Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 21/36] e1000/base: cleanup NAHUM6LP_HW tags Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 22/36] e1000/base: add bit for disable packetbuffer read Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 23/36] e1000/base: K1 flow fixes Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 24/36] e1000/base: remove FIXME comment Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 25/36] e1000/base: set correct value of beacon duration Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 26/36] e1000/base: disable extension header parsing for IPv6 Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 27/36] e1000/base: fix for i354 88E1112 PHY using AutoMedia Detect Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 28/36] e1000/base: increase timeout of polling bit RSPCIPHY in check_reset_block Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 29/36] e1000/base: implement 88E1543 PHY initialization Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 30/36] e1000/base: use the correct i210 register for EEMNGCTL Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 31/36] e1000/base: move the print to the right position Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 32/36] e1000/base: synchronization of MAC-PHY interface only on non- ME systems Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 33/36] e1000/base: fix to enable both ulp and EEE in Sx state Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 34/36] e1000/base: some minor change Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 35/36] e1000: add new devices Wenzhuo Lu
2015-10-16 2:51 ` [dpdk-dev] [PATCH v3 36/36] doc: update release notes for e1000 base code update Wenzhuo Lu
2015-10-27 15:32 ` Thomas Monjalon
2015-10-28 2:33 ` Lu, Wenzhuo
2015-10-27 15:34 ` [dpdk-dev] [PATCH v3 00/36] update e1000 base code Thomas Monjalon
2015-10-28 1:58 ` Lu, Wenzhuo
2015-10-19 16:03 ` [dpdk-dev] [PATCH 00/34] update e1000 base driver Thomas Monjalon
2015-10-20 0:59 ` Lu, Wenzhuo
2015-10-21 10:21 ` Glynn, Michael J
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).