Thu Aug 6 04:58:48 2009 UTC ()
Later generation 82566 IGP PHYs have problems with media changes to 100Mb and
10Mb; it appears that the SmartSpeed workaround and dspcode in this PHY are
aimed at earlier generation IGPs.  Remove reference to 82566s, allowing
them to fall through to choose other PHYs.


(kml)
diff -r1.17 -r1.18 src/sys/dev/mii/igphy.c

cvs diff -r1.17 -r1.18 src/sys/dev/mii/igphy.c (expand / switch to unified diff)

--- src/sys/dev/mii/igphy.c 2008/11/17 03:04:27 1.17
+++ src/sys/dev/mii/igphy.c 2009/08/06 04:58:48 1.18
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: igphy.c,v 1.17 2008/11/17 03:04:27 dyoung Exp $ */ 1/* $NetBSD: igphy.c,v 1.18 2009/08/06 04:58:48 kml Exp $ */
2 2
3/* 3/*
4 * The Intel copyright applies to the analog register setup, and the 4 * The Intel copyright applies to the analog register setup, and the
5 * (currently disabled) SmartSpeed workaround code. 5 * (currently disabled) SmartSpeed workaround code.
6 */ 6 */
7 7
8/******************************************************************************* 8/*******************************************************************************
9 9
10 Copyright (c) 2001-2003, Intel Corporation 10 Copyright (c) 2001-2003, Intel Corporation
11 All rights reserved. 11 All rights reserved.
12 12
13 Redistribution and use in source and binary forms, with or without 13 Redistribution and use in source and binary forms, with or without
14 modification, are permitted provided that the following conditions are met: 14 modification, are permitted provided that the following conditions are met:
@@ -60,27 +60,27 @@ @@ -60,27 +60,27 @@
60 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 60 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
61 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 61 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
62 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 62 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
63 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 63 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
64 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 64 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
65 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 65 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
66 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 66 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
67 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 67 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
68 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 68 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
69 * POSSIBILITY OF SUCH DAMAGE. 69 * POSSIBILITY OF SUCH DAMAGE.
70 */ 70 */
71 71
72#include <sys/cdefs.h> 72#include <sys/cdefs.h>
73__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.17 2008/11/17 03:04:27 dyoung Exp $"); 73__KERNEL_RCSID(0, "$NetBSD: igphy.c,v 1.18 2009/08/06 04:58:48 kml Exp $");
74 74
75#include "opt_mii.h" 75#include "opt_mii.h"
76 76
77#include <sys/param.h> 77#include <sys/param.h>
78#include <sys/systm.h> 78#include <sys/systm.h>
79#include <sys/kernel.h> 79#include <sys/kernel.h>
80#include <sys/device.h> 80#include <sys/device.h>
81#include <sys/socket.h> 81#include <sys/socket.h>
82#include <sys/errno.h> 82#include <sys/errno.h>
83 83
84#include <net/if.h> 84#include <net/if.h>
85#include <net/if_media.h> 85#include <net/if_media.h>
86 86
@@ -106,29 +106,26 @@ CFATTACH_DECL_NEW(igphy, sizeof(struct i @@ -106,29 +106,26 @@ CFATTACH_DECL_NEW(igphy, sizeof(struct i
106 igphymatch, igphyattach, mii_phy_detach, mii_phy_activate); 106 igphymatch, igphyattach, mii_phy_detach, mii_phy_activate);
107 107
108static int igphy_service(struct mii_softc *, struct mii_data *, int); 108static int igphy_service(struct mii_softc *, struct mii_data *, int);
109static void igphy_status(struct mii_softc *); 109static void igphy_status(struct mii_softc *);
110 110
111static const struct mii_phy_funcs igphy_funcs = { 111static const struct mii_phy_funcs igphy_funcs = {
112 igphy_service, igphy_status, igphy_reset, 112 igphy_service, igphy_status, igphy_reset,
113}; 113};
114 114
115static const struct mii_phydesc igphys[] = { 115static const struct mii_phydesc igphys[] = {
116 { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_IGP01E1000, 116 { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_IGP01E1000,
117 MII_STR_yyINTEL_IGP01E1000 }, 117 MII_STR_yyINTEL_IGP01E1000 },
118 118
119 { MII_OUI_yyINTEL, MII_MODEL_yyINTEL_I82566, 
120 MII_STR_yyINTEL_I82566 }, 
121 
122 {0, 0, 119 {0, 0,
123 NULL }, 120 NULL },
124}; 121};
125 122
126static int 123static int
127igphymatch(device_t parent, cfdata_t match, void *aux) 124igphymatch(device_t parent, cfdata_t match, void *aux)
128{ 125{
129 struct mii_attach_args *ma = aux; 126 struct mii_attach_args *ma = aux;
130 127
131 if (mii_phy_match(ma, igphys) != NULL) 128 if (mii_phy_match(ma, igphys) != NULL)
132 return 10; 129 return 10;
133 130
134 return 0; 131 return 0;