if_ed_3c503.c (257176) | if_ed_3c503.c (260050) |
---|---|
1/*- 2 * Copyright (c) 2005, M. Warner Losh 3 * All rights reserved. 4 * Copyright (c) 1995, David Greenman 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 --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005, M. Warner Losh 3 * All rights reserved. 4 * Copyright (c) 1995, David Greenman 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 --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/ed/if_ed_3c503.c 257176 2013-10-26 17:58:36Z glebius $"); | 31__FBSDID("$FreeBSD: head/sys/dev/ed/if_ed_3c503.c 260050 2013-12-29 19:21:59Z marius $"); |
32 33#include "opt_ed.h" 34 35#ifdef ED_3C503 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/sockio.h> --- 172 unchanged lines hidden (view full) --- 212 213 /* 214 * Determine if this is an 8bit or 16bit board 215 */ 216 217 /* 218 * select page 0 registers 219 */ | 32 33#include "opt_ed.h" 34 35#ifdef ED_3C503 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/sockio.h> --- 172 unchanged lines hidden (view full) --- 212 213 /* 214 * Determine if this is an 8bit or 16bit board 215 */ 216 217 /* 218 * select page 0 registers 219 */ |
220 ed_nic_outb(sc, ED_P0_CR, ED_CR_RD2 | ED_CR_STP); | 220 ed_nic_barrier(sc, ED_P0_CR, 1, 221 BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); 222 ed_nic_outb(sc, ED_P0_CR, ED_CR_PAGE_0 | ED_CR_RD2 | ED_CR_STP); 223 ed_nic_barrier(sc, ED_P0_CR, 1, 224 BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); |
221 222 /* 223 * Attempt to clear WTS bit. If it doesn't clear, then this is a 16bit 224 * board. 225 */ 226 ed_nic_outb(sc, ED_P0_DCR, 0); 227 228 /* 229 * select page 2 registers 230 */ | 225 226 /* 227 * Attempt to clear WTS bit. If it doesn't clear, then this is a 16bit 228 * board. 229 */ 230 ed_nic_outb(sc, ED_P0_DCR, 0); 231 232 /* 233 * select page 2 registers 234 */ |
235 ed_nic_barrier(sc, ED_P0_CR, 1, 236 BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); |
|
231 ed_nic_outb(sc, ED_P0_CR, ED_CR_PAGE_2 | ED_CR_RD2 | ED_CR_STP); | 237 ed_nic_outb(sc, ED_P0_CR, ED_CR_PAGE_2 | ED_CR_RD2 | ED_CR_STP); |
238 ed_nic_barrier(sc, ED_P0_CR, 1, 239 BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); |
|
232 233 /* 234 * The 3c503 forces the WTS bit to a one if this is a 16bit board 235 */ 236 if (ed_nic_inb(sc, ED_P2_DCR) & ED_DCR_WTS) 237 isa16bit = 1; 238 else 239 isa16bit = 0; --- 125 unchanged lines hidden --- | 240 241 /* 242 * The 3c503 forces the WTS bit to a one if this is a 16bit board 243 */ 244 if (ed_nic_inb(sc, ED_P2_DCR) & ED_DCR_WTS) 245 isa16bit = 1; 246 else 247 isa16bit = 0; --- 125 unchanged lines hidden --- |