if_ed_rtl80x9.c (151547) | if_ed_rtl80x9.c (175006) |
---|---|
1/*- 2 * Copyright (c) 2003, David Madole 3 * All rights reserved. 4 * Copyright (c) 2005, M. Warner Losh. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 17 unchanged lines hidden (view full) --- 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * Based on patches subitted by: David Madole, edited by M. Warner Losh. 30 */ 31 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003, David Madole 3 * All rights reserved. 4 * Copyright (c) 2005, M. Warner Losh. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 17 unchanged lines hidden (view full) --- 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * Based on patches subitted by: David Madole, edited by M. Warner Losh. 30 */ 31 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/dev/ed/if_ed_rtl80x9.c 151547 2005-10-22 05:14:18Z imp $"); | 34__FBSDID("$FreeBSD: head/sys/dev/ed/if_ed_rtl80x9.c 175006 2007-12-31 03:27:21Z imp $"); |
35 36#include "opt_ed.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/sockio.h> 41#include <sys/mbuf.h> 42#include <sys/kernel.h> --- 145 unchanged lines hidden (view full) --- 188 189 190 if (IFM_SUBTYPE(imr->ifm_active) == IFM_AUTO) { 191 ED_LOCK(sc); 192 ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_3 | 193 (ed_nic_inb(sc, ED_P0_CR) & (ED_CR_STA | ED_CR_STP))); 194 195 switch (ed_nic_inb(sc, ED_RTL80X9_CONFIG0) | 35 36#include "opt_ed.h" 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/sockio.h> 41#include <sys/mbuf.h> 42#include <sys/kernel.h> --- 145 unchanged lines hidden (view full) --- 188 189 190 if (IFM_SUBTYPE(imr->ifm_active) == IFM_AUTO) { 191 ED_LOCK(sc); 192 ed_nic_outb(sc, ED_P0_CR, sc->cr_proto | ED_CR_PAGE_3 | 193 (ed_nic_inb(sc, ED_P0_CR) & (ED_CR_STA | ED_CR_STP))); 194 195 switch (ed_nic_inb(sc, ED_RTL80X9_CONFIG0) |
196 & (ED_CHIP_TYPE_RTL8029 ? ED_RTL80X9_CF0_BNC | 196 & (sc->chip_type == ED_CHIP_TYPE_RTL8029 ? ED_RTL80X9_CF0_BNC |
197 : (ED_RTL80X9_CF0_AUI | ED_RTL80X9_CF0_BNC))) { 198 case ED_RTL80X9_CF0_BNC: 199 imr->ifm_active |= IFM_10_2; 200 break; 201 case ED_RTL80X9_CF0_AUI: 202 imr->ifm_active |= IFM_10_5; 203 break; 204 default: 205 imr->ifm_active |= IFM_10_T; 206 break; 207 } 208 ED_UNLOCK(sc); 209 } 210 imr->ifm_status = 0; 211} 212 | 197 : (ED_RTL80X9_CF0_AUI | ED_RTL80X9_CF0_BNC))) { 198 case ED_RTL80X9_CF0_BNC: 199 imr->ifm_active |= IFM_10_2; 200 break; 201 case ED_RTL80X9_CF0_AUI: 202 imr->ifm_active |= IFM_10_5; 203 break; 204 default: 205 imr->ifm_active |= IFM_10_T; 206 break; 207 } 208 ED_UNLOCK(sc); 209 } 210 imr->ifm_status = 0; 211} 212 |