Fri Oct 30 06:29:47 2020 UTC ()
Add WMPHY_I350. Not used yet.


(msaitoh)
diff -r1.693 -r1.694 src/sys/dev/pci/if_wm.c
diff -r1.46 -r1.47 src/sys/dev/pci/if_wmvar.h

cvs diff -r1.693 -r1.694 src/sys/dev/pci/if_wm.c (expand / switch to unified diff)

--- src/sys/dev/pci/if_wm.c 2020/10/30 06:23:39 1.693
+++ src/sys/dev/pci/if_wm.c 2020/10/30 06:29:47 1.694
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_wm.c,v 1.693 2020/10/30 06:23:39 msaitoh Exp $ */ 1/* $NetBSD: if_wm.c,v 1.694 2020/10/30 06:29:47 msaitoh Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. 4 * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -72,27 +72,27 @@ @@ -72,27 +72,27 @@
72 * 72 *
73 * TODO (in order of importance): 73 * TODO (in order of importance):
74 * 74 *
75 * - Check XXX'ed comments 75 * - Check XXX'ed comments
76 * - TX Multi queue improvement (refine queue selection logic) 76 * - TX Multi queue improvement (refine queue selection logic)
77 * - Split header buffer for newer descriptors 77 * - Split header buffer for newer descriptors
78 * - EEE (Energy Efficiency Ethernet) for I354 78 * - EEE (Energy Efficiency Ethernet) for I354
79 * - Virtual Function 79 * - Virtual Function
80 * - Set LED correctly (based on contents in EEPROM) 80 * - Set LED correctly (based on contents in EEPROM)
81 * - Rework how parameters are loaded from the EEPROM. 81 * - Rework how parameters are loaded from the EEPROM.
82 */ 82 */
83 83
84#include <sys/cdefs.h> 84#include <sys/cdefs.h>
85__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.693 2020/10/30 06:23:39 msaitoh Exp $"); 85__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.694 2020/10/30 06:29:47 msaitoh Exp $");
86 86
87#ifdef _KERNEL_OPT 87#ifdef _KERNEL_OPT
88#include "opt_net_mpsafe.h" 88#include "opt_net_mpsafe.h"
89#include "opt_if_wm.h" 89#include "opt_if_wm.h"
90#endif 90#endif
91 91
92#include <sys/param.h> 92#include <sys/param.h>
93#include <sys/systm.h> 93#include <sys/systm.h>
94#include <sys/callout.h> 94#include <sys/callout.h>
95#include <sys/mbuf.h> 95#include <sys/mbuf.h>
96#include <sys/malloc.h> 96#include <sys/malloc.h>
97#include <sys/kmem.h> 97#include <sys/kmem.h>
98#include <sys/kernel.h> 98#include <sys/kernel.h>
@@ -10257,29 +10257,32 @@ wm_gmii_setup_phytype(struct wm_softc *s @@ -10257,29 +10257,32 @@ wm_gmii_setup_phytype(struct wm_softc *s
10257 break; 10257 break;
10258 case MII_OUI_INTEL: 10258 case MII_OUI_INTEL:
10259 switch (phy_model) { 10259 switch (phy_model) {
10260 case MII_MODEL_INTEL_I82577: 10260 case MII_MODEL_INTEL_I82577:
10261 new_phytype = WMPHY_82577; 10261 new_phytype = WMPHY_82577;
10262 break; 10262 break;
10263 case MII_MODEL_INTEL_I82579: 10263 case MII_MODEL_INTEL_I82579:
10264 new_phytype = WMPHY_82579; 10264 new_phytype = WMPHY_82579;
10265 break; 10265 break;
10266 case MII_MODEL_INTEL_I217: 10266 case MII_MODEL_INTEL_I217:
10267 new_phytype = WMPHY_I217; 10267 new_phytype = WMPHY_I217;
10268 break; 10268 break;
10269 case MII_MODEL_INTEL_I82580: 10269 case MII_MODEL_INTEL_I82580:
10270 case MII_MODEL_INTEL_I350: 
10271 new_phytype = WMPHY_82580; 10270 new_phytype = WMPHY_82580;
10272 break; 10271 break;
 10272 case MII_MODEL_INTEL_I350:
 10273 new_phytype = WMPHY_I350;
 10274 break;
 10275 break;
10273 default: 10276 default:
10274 break; 10277 break;
10275 } 10278 }
10276 break; 10279 break;
10277 case MII_OUI_yyINTEL: 10280 case MII_OUI_yyINTEL:
10278 switch (phy_model) { 10281 switch (phy_model) {
10279 case MII_MODEL_yyINTEL_I82562G: 10282 case MII_MODEL_yyINTEL_I82562G:
10280 case MII_MODEL_yyINTEL_I82562EM: 10283 case MII_MODEL_yyINTEL_I82562EM:
10281 case MII_MODEL_yyINTEL_I82562ET: 10284 case MII_MODEL_yyINTEL_I82562ET:
10282 new_phytype = WMPHY_IFE; 10285 new_phytype = WMPHY_IFE;
10283 break; 10286 break;
10284 case MII_MODEL_yyINTEL_IGP01E1000: 10287 case MII_MODEL_yyINTEL_IGP01E1000:
10285 new_phytype = WMPHY_IGP; 10288 new_phytype = WMPHY_IGP;

cvs diff -r1.46 -r1.47 src/sys/dev/pci/if_wmvar.h (expand / switch to unified diff)

--- src/sys/dev/pci/if_wmvar.h 2020/09/15 08:39:04 1.46
+++ src/sys/dev/pci/if_wmvar.h 2020/10/30 06:29:47 1.47
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_wmvar.h,v 1.46 2020/09/15 08:39:04 msaitoh Exp $ */ 1/* $NetBSD: if_wmvar.h,v 1.47 2020/10/30 06:29:47 msaitoh Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. 4 * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -188,28 +188,29 @@ typedef enum { @@ -188,28 +188,29 @@ typedef enum {
188 188
189typedef enum { 189typedef enum {
190 WMPHY_UNKNOWN = 0, 190 WMPHY_UNKNOWN = 0,
191 WMPHY_NONE, 191 WMPHY_NONE,
192 WMPHY_M88, /* 88E1000: 8254[34], E1011: 8254[056], E1111: 82573 */ 192 WMPHY_M88, /* 88E1000: 8254[34], E1011: 8254[056], E1111: 82573 */
193 WMPHY_IGP, /* 8254[17] */ 193 WMPHY_IGP, /* 8254[17] */
194 WMPHY_IGP_2, /* 8257[12] */ 194 WMPHY_IGP_2, /* 8257[12] */
195 WMPHY_GG82563, /* 8256[34]: 80003 */ 195 WMPHY_GG82563, /* 8256[34]: 80003 */
196 WMPHY_IGP_3, /* 82566: 82575, 82576, ICH8, ICH9 */ 196 WMPHY_IGP_3, /* 82566: 82575, 82576, ICH8, ICH9 */
197 WMPHY_IFE, /* 82562: ICH8 ICH9 */ 197 WMPHY_IFE, /* 82562: ICH8 ICH9 */
198 WMPHY_BM, /* 82567: ICH8 ICH9 ICH10 */ 198 WMPHY_BM, /* 82567: ICH8 ICH9 ICH10 */
199 WMPHY_82578, /* 82578: PCH */ 199 WMPHY_82578, /* 82578: PCH */
200 WMPHY_82577, /* 82577: PCH (NOTE: functionality newer than 82578) */ 200 WMPHY_82577, /* 82577: PCH (NOTE: functionality newer than 82578) */
201 WMPHY_82579, /* 82579 : PCH2 */ 201 WMPHY_82579, /* 82579: PCH2 */
202 WMPHY_I217, /* I217: _LPT, I218: _LPT, I219: _SPT _CNP */ 202 WMPHY_I217, /* I217: _LPT, I218: _LPT, I219: _SPT _CNP */
203 WMPHY_82580, /* 82580: 82580 or I350 */ 203 WMPHY_82580, /* 82580 */
 204 WMPHY_I350, /* I350 */
204 WMPHY_VF, 205 WMPHY_VF,
205 WMPHY_I210 /* I210: I210 I211 */ 206 WMPHY_I210 /* I210: I210 I211 */
206} wm_phy_type; 207} wm_phy_type;
207 208
208 209
209#define WM_GEN_POLL_TIMEOUT 640 210#define WM_GEN_POLL_TIMEOUT 640
210#define WM_PHY_CFG_TIMEOUT 100 211#define WM_PHY_CFG_TIMEOUT 100
211#define WM_ICH8_LAN_INIT_TIMEOUT 1500 212#define WM_ICH8_LAN_INIT_TIMEOUT 1500
212#define WM_MDIO_OWNERSHIP_TIMEOUT 10 213#define WM_MDIO_OWNERSHIP_TIMEOUT 10
213#define WM_MAX_PLL_TRIES 5 214#define WM_MAX_PLL_TRIES 5
214 215
215#endif /* _DEV_PCI_IF_WMVAR_H_ */ 216#endif /* _DEV_PCI_IF_WMVAR_H_ */