Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/dev/pci Pull up the following, requested by msaitoh i...
details: https://anonhg.NetBSD.org/src/rev/17d8637c28e8
branches: netbsd-8
changeset: 449463:17d8637c28e8
user: martin <martin%NetBSD.org@localhost>
date: Thu Mar 07 17:11:53 2019 +0000
description:
Pull up the following, requested by msaitoh in ticket #1206:
sys/dev/pci/if_wmreg.h 1.113
sys/dev/pci/if_wmvar.h 1.43-1.44
sys/dev/pci/if_wm.c 1.626-1.627, 1.629-1.636 via patch
- Add support for I210 SGMII Flash-less device.
- Add I219 variations for Cannon Lake.
- Add missing rnd_detach_source().
- Use do { ... } while (0) for DPRINTF(x, y).
- Swap enumeration of 82578 and 82577 PHY in if_wmvar.h. No functional
change.
- Add KASSERT.
- Update TODO list. Add comment. Fix typo in comment.
diffstat:
sys/dev/pci/if_wm.c | 65 ++++++++++++++++++++++++++++++++-----------------
sys/dev/pci/if_wmreg.h | 4 +-
sys/dev/pci/if_wmvar.h | 38 +++++++++++++++++++++++------
3 files changed, 74 insertions(+), 33 deletions(-)
diffs (227 lines):
diff -r 510c904e66c1 -r 17d8637c28e8 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c Thu Mar 07 17:05:20 2019 +0000
+++ b/sys/dev/pci/if_wm.c Thu Mar 07 17:11:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.508.4.30 2019/02/11 13:44:34 martin Exp $ */
+/* $NetBSD: if_wm.c,v 1.508.4.31 2019/03/07 17:11:53 martin Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -79,11 +79,10 @@
* - Virtual Function
* - Set LED correctly (based on contents in EEPROM)
* - Rework how parameters are loaded from the EEPROM.
- * - Image Unique ID
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.30 2019/02/11 13:44:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.31 2019/03/07 17:11:53 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -157,7 +156,7 @@
int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX | WM_DEBUG_LINK | WM_DEBUG_GMII
| WM_DEBUG_MANAGE | WM_DEBUG_NVM | WM_DEBUG_INIT | WM_DEBUG_LOCK;
-#define DPRINTF(x, y) if (wm_debug & (x)) printf y
+#define DPRINTF(x, y) do { if (wm_debug & (x)) printf y; } while (0)
#else
#define DPRINTF(x, y) __nothing
#endif /* WM_DEBUG */
@@ -1465,7 +1464,7 @@
WM_T_I210, WMP_F_COPPER },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I210_COPPER_WOF,
- "I210 Ethernet (FLASH less)",
+ "I210 Ethernet (Copper, FLASH less)",
WM_T_I210, WMP_F_COPPER },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I210_FIBER,
@@ -1477,13 +1476,17 @@
WM_T_I210, WMP_F_SERDES },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I210_SERDES_WOF,
- "I210 Gigabit Ethernet (FLASH less)",
+ "I210 Gigabit Ethernet (SERDES, FLASH less)",
WM_T_I210, WMP_F_SERDES },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I210_SGMII,
"I210 Gigabit Ethernet (SGMII)",
WM_T_I210, WMP_F_COPPER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I210_SGMII_WOF,
+ "I210 Gigabit Ethernet (SGMII, FLASH less)",
+ WM_T_I210, WMP_F_COPPER },
+
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I211_COPPER,
"I211 Ethernet (COPPER)",
WM_T_I211, WMP_F_COPPER },
@@ -1511,18 +1514,6 @@
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I218_LM3,
"I218 LM Ethernet Connection",
WM_T_PCH_LPT, WMP_F_COPPER },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V,
- "I219 V Ethernet Connection",
- WM_T_PCH_SPT, WMP_F_COPPER },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V2,
- "I219 V Ethernet Connection",
- WM_T_PCH_SPT, WMP_F_COPPER },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V4,
- "I219 V Ethernet Connection",
- WM_T_PCH_SPT, WMP_F_COPPER },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V5,
- "I219 V Ethernet Connection",
- WM_T_PCH_SPT, WMP_F_COPPER },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM,
"I219 LM Ethernet Connection",
WM_T_PCH_SPT, WMP_F_COPPER },
@@ -1538,17 +1529,41 @@
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM5,
"I219 LM Ethernet Connection",
WM_T_PCH_SPT, WMP_F_COPPER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM6,
+ "I219 LM Ethernet Connection",
+ WM_T_PCH_CNP, WMP_F_COPPER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM7,
+ "I219 LM Ethernet Connection",
+ WM_T_PCH_CNP, WMP_F_COPPER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM8,
+ "I219 LM Ethernet Connection",
+ WM_T_PCH_CNP, WMP_F_COPPER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM9,
+ "I219 LM Ethernet Connection",
+ WM_T_PCH_CNP, WMP_F_COPPER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V,
+ "I219 V Ethernet Connection",
+ WM_T_PCH_SPT, WMP_F_COPPER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V2,
+ "I219 V Ethernet Connection",
+ WM_T_PCH_SPT, WMP_F_COPPER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V4,
+ "I219 V Ethernet Connection",
+ WM_T_PCH_SPT, WMP_F_COPPER },
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V5,
+ "I219 V Ethernet Connection",
+ WM_T_PCH_SPT, WMP_F_COPPER },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V6,
"I219 V Ethernet Connection",
WM_T_PCH_CNP, WMP_F_COPPER },
{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V7,
"I219 V Ethernet Connection",
WM_T_PCH_CNP, WMP_F_COPPER },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM6,
- "I219 LM Ethernet Connection",
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V8,
+ "I219 V Ethernet Connection",
WM_T_PCH_CNP, WMP_F_COPPER },
- { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM7,
- "I219 LM Ethernet Connection",
+ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V9,
+ "I219 V Ethernet Connection",
WM_T_PCH_CNP, WMP_F_COPPER },
{ 0, 0,
NULL,
@@ -2968,6 +2983,8 @@
evcnt_detach(&sc->sc_ev_rx_macctl);
#endif /* WM_EVENT_COUNTERS */
+ rnd_detach_source(&sc->rnd_source);
+
/* Tell the firmware about the release */
WM_CORE_LOCK(sc);
wm_release_manageability(sc);
@@ -13184,7 +13201,7 @@
* 82572EI 0x5069 5.6.9?
* 82574L 0x1080 1.8.0? (the spec update notes about 2.1.4)
* 0x2013 2.1.3?
- * 82583 0x10a0 1.10.0? (document says it's default vaule)
+ * 82583 0x10a0 1.10.0? (document says it's default value)
*/
/*
@@ -14849,6 +14866,8 @@
{
uint32_t ipcnfg, eeer;
+ KASSERT(sc->sc_mediatype == WM_MEDIATYPE_COPPER);
+
ipcnfg = CSR_READ(sc, WMREG_IPCNFG);
eeer = CSR_READ(sc, WMREG_EEER);
diff -r 510c904e66c1 -r 17d8637c28e8 sys/dev/pci/if_wmreg.h
--- a/sys/dev/pci/if_wmreg.h Thu Mar 07 17:05:20 2019 +0000
+++ b/sys/dev/pci/if_wmreg.h Thu Mar 07 17:11:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wmreg.h,v 1.98.6.7 2019/01/31 06:43:48 martin Exp $ */
+/* $NetBSD: if_wmreg.h,v 1.98.6.8 2019/03/07 17:11:53 martin Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -1492,7 +1492,7 @@
#define WM_INVM_DATA_REG(reg) (0x12120 + 4*(reg))
#define INVM_SIZE 64 /* Number of INVM Data Registers */
-/* iNVM default vaule */
+/* iNVM default value */
#define NVM_INIT_CTRL_2_DEFAULT_I211 0x7243
#define NVM_INIT_CTRL_4_DEFAULT_I211 0x00c1
#define NVM_LED_1_CFG_DEFAULT_I211 0x0184
diff -r 510c904e66c1 -r 17d8637c28e8 sys/dev/pci/if_wmvar.h
--- a/sys/dev/pci/if_wmvar.h Thu Mar 07 17:05:20 2019 +0000
+++ b/sys/dev/pci/if_wmvar.h Thu Mar 07 17:11:53 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wmvar.h,v 1.33.6.4 2019/01/31 06:43:48 martin Exp $ */
+/* $NetBSD: if_wmvar.h,v 1.33.6.5 2019/03/07 17:11:53 martin Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -160,19 +160,41 @@
WM_T_PCH_CNP, /* (I219) */
} wm_chip_type;
+/*
+ * Variations of internal or external PHYs
+ *
+ * +- 82562 - 8254[17] - 8257[12] - 82566
+ * |
+ * -+------------------------------------->
+ *
+ *
+ * +---------------------------- I347 ----- E1512 ---- E1543
+ * | |
+ * | +--------------------------- I210 - I211
+ * | |
+ * | | +-------------+--- 82580 - I350
+ * | | | |
+ * | | +- 578 - 577 - 579 - I217 - I218 - I219
+ * | | |
+ * +- 56[34] -- 567 -- 573
+ * | (E1149) (E1111)
+ * |
+ * -+----------------------------------------------------------------------->
+ */
+
typedef enum {
WMPHY_UNKNOWN = 0,
WMPHY_NONE,
- WMPHY_M88,
- WMPHY_IGP,
- WMPHY_IGP_2,
- WMPHY_GG82563, /* 82563: 80003 */
+ WMPHY_M88, /* 88E1000: 8254[34], E1011: 8254[056], E1111: 82573 */
+ WMPHY_IGP, /* 8254[17] */
+ WMPHY_IGP_2, /* 8257[12] */
+ WMPHY_GG82563, /* 8256[34]: 80003 */
WMPHY_IGP_3, /* 82566: 82575, 82576, ICH8, ICH9 */
- WMPHY_IFE, /* 82562 */
+ WMPHY_IFE, /* 82562: ICH8 ICH9 */
WMPHY_BM, /* 82567: ICH8 ICH9 ICH10 */
- WMPHY_82577, /* 82577: PCH */
WMPHY_82578, /* 82578: PCH */
- WMPHY_82579, /* 82579: PCH2 */
+ WMPHY_82577, /* 82577: PCH (NOTE: functionality newer than 82578) */
+ WMPHY_82579, /* 82579 : PCH2 */
WMPHY_I217, /* I217: _LPT, I218: _LPT, I219: _SPT _CNP */
WMPHY_82580, /* 82580: 82580 or I350 */
WMPHY_VF,
Home |
Main Index |
Thread Index |
Old Index