if_fxp.c (33676) | if_fxp.c (34014) |
---|---|
1/* 2 * Copyright (c) 1995, David Greenman 3 * All rights reserved. 4 * 5 * Modifications to support NetBSD and media selection: 6 * Copyright (c) 1997 Jason R. Thorpe. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * | 1/* 2 * Copyright (c) 1995, David Greenman 3 * All rights reserved. 4 * 5 * Modifications to support NetBSD and media selection: 6 * Copyright (c) 1997 Jason R. Thorpe. All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 13 unchanged lines hidden (view full) --- 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * |
30 * $Id: if_fxp.c,v 1.48 1998/02/09 06:10:51 eivind Exp $ | 30 * $Id: if_fxp.c,v 1.49 1998/02/20 13:11:53 bde Exp $ |
31 */ 32 33/* 34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver 35 */ 36 37#include "bpfilter.h" 38 --- 147 unchanged lines hidden (view full) --- 186 187static const struct fxp_supported_media fxp_media[] = { 188 { FXP_PHY_DP83840, fxp_media_standard, 189 sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), 190 FXP_MEDIA_STANDARD_DEFMEDIA }, 191 { FXP_PHY_DP83840A, fxp_media_standard, 192 sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), 193 FXP_MEDIA_STANDARD_DEFMEDIA }, | 31 */ 32 33/* 34 * Intel EtherExpress Pro/100B PCI Fast Ethernet driver 35 */ 36 37#include "bpfilter.h" 38 --- 147 unchanged lines hidden (view full) --- 186 187static const struct fxp_supported_media fxp_media[] = { 188 { FXP_PHY_DP83840, fxp_media_standard, 189 sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), 190 FXP_MEDIA_STANDARD_DEFMEDIA }, 191 { FXP_PHY_DP83840A, fxp_media_standard, 192 sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), 193 FXP_MEDIA_STANDARD_DEFMEDIA }, |
194 { FXP_PHY_82553A, fxp_media_standard, 195 sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), 196 FXP_MEDIA_STANDARD_DEFMEDIA }, 197 { FXP_PHY_82553C, fxp_media_standard, 198 sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), 199 FXP_MEDIA_STANDARD_DEFMEDIA }, |
|
194 { FXP_PHY_82555, fxp_media_standard, 195 sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), 196 FXP_MEDIA_STANDARD_DEFMEDIA }, | 200 { FXP_PHY_82555, fxp_media_standard, 201 sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), 202 FXP_MEDIA_STANDARD_DEFMEDIA }, |
203 { FXP_PHY_82555B, fxp_media_standard, 204 sizeof(fxp_media_standard) / sizeof(fxp_media_standard[0]), 205 FXP_MEDIA_STANDARD_DEFMEDIA }, |
|
197 { FXP_PHY_80C24, fxp_media_default, 198 sizeof(fxp_media_default) / sizeof(fxp_media_default[0]), 199 FXP_MEDIA_DEFAULT_DEFMEDIA }, 200}; 201#define NFXPMEDIA (sizeof(fxp_media) / sizeof(fxp_media[0])) 202 203static int fxp_mediachange __P((struct ifnet *)); 204static void fxp_mediastatus __P((struct ifnet *, struct ifmediareq *)); --- 1160 unchanged lines hidden (view full) --- 1365 case FXP_PHY_DP83840: 1366 case FXP_PHY_DP83840A: 1367 fxp_mdi_write(sc, sc->phy_primary_addr, FXP_DP83840_PCR, 1368 fxp_mdi_read(sc, sc->phy_primary_addr, FXP_DP83840_PCR) | 1369 FXP_DP83840_PCR_LED4_MODE | /* LED4 always indicates duplex */ 1370 FXP_DP83840_PCR_F_CONNECT | /* force link disconnect bypass */ 1371 FXP_DP83840_PCR_BIT10); /* XXX I have no idea */ 1372 /* fall through */ | 206 { FXP_PHY_80C24, fxp_media_default, 207 sizeof(fxp_media_default) / sizeof(fxp_media_default[0]), 208 FXP_MEDIA_DEFAULT_DEFMEDIA }, 209}; 210#define NFXPMEDIA (sizeof(fxp_media) / sizeof(fxp_media[0])) 211 212static int fxp_mediachange __P((struct ifnet *)); 213static void fxp_mediastatus __P((struct ifnet *, struct ifmediareq *)); --- 1160 unchanged lines hidden (view full) --- 1374 case FXP_PHY_DP83840: 1375 case FXP_PHY_DP83840A: 1376 fxp_mdi_write(sc, sc->phy_primary_addr, FXP_DP83840_PCR, 1377 fxp_mdi_read(sc, sc->phy_primary_addr, FXP_DP83840_PCR) | 1378 FXP_DP83840_PCR_LED4_MODE | /* LED4 always indicates duplex */ 1379 FXP_DP83840_PCR_F_CONNECT | /* force link disconnect bypass */ 1380 FXP_DP83840_PCR_BIT10); /* XXX I have no idea */ 1381 /* fall through */ |
1382 case FXP_PHY_82553A: 1383 case FXP_PHY_82553C: /* untested */ |
|
1373 case FXP_PHY_82555: | 1384 case FXP_PHY_82555: |
1385 case FXP_PHY_82555B: |
|
1374 if (IFM_SUBTYPE(media) != IFM_AUTO) { 1375 int flags; 1376 1377 flags = (IFM_SUBTYPE(media) == IFM_100_TX) ? 1378 FXP_PHY_BMCR_SPEED_100M : 0; 1379 flags |= (media & IFM_FDX) ? 1380 FXP_PHY_BMCR_FULLDUPLEX : 0; 1381 fxp_mdi_write(sc, sc->phy_primary_addr, --- 370 unchanged lines hidden --- | 1386 if (IFM_SUBTYPE(media) != IFM_AUTO) { 1387 int flags; 1388 1389 flags = (IFM_SUBTYPE(media) == IFM_100_TX) ? 1390 FXP_PHY_BMCR_SPEED_100M : 0; 1391 flags |= (media & IFM_FDX) ? 1392 FXP_PHY_BMCR_FULLDUPLEX : 0; 1393 fxp_mdi_write(sc, sc->phy_primary_addr, --- 370 unchanged lines hidden --- |