The Intel i82547EI gigabit ethernet controller isn't really a PCI

device. So instead trying to find and print out the PCI bus properties
mark it as a CSA device.
This commit is contained in:
tron 2004-07-13 07:29:37 +00:00
parent b7a4e5de32
commit 742e1a4221
1 changed files with 13 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_wm.c,v 1.72 2004/07/12 14:04:36 tron Exp $ */
/* $NetBSD: if_wm.c,v 1.73 2004/07/13 07:29:37 tron Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.72 2004/07/12 14:04:36 tron Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.73 2004/07/13 07:29:37 tron Exp $");
#include "bpfilter.h"
#include "rnd.h"
@ -337,6 +337,7 @@ do { \
#define WM_F_IOH_VALID 0x10 /* I/O handle is valid */
#define WM_F_BUS64 0x20 /* bus is 64-bit */
#define WM_F_PCIX 0x40 /* bus is PCI-X */
#define WM_F_CSA 0x80 /* bus is CSA */
#ifdef WM_EVENT_COUNTERS
#define WM_EVCNT_INCR(ev) (ev)->ev_count++
@ -862,6 +863,15 @@ wm_attach(struct device *parent, struct device *self, void *aux)
if (sc->sc_type < WM_T_82543) {
/* We don't really know the bus characteristics here. */
sc->sc_bus_speed = 33;
} else if (sc->sc_type == WM_T_82547 || sc->sc_type == WM_T_82547_2) {
/*
* CSA (Communication Streaming Architecture) is about as fast
* a 32-bit 66MHz PCI Bus.
*/
sc->sc_flags |= WM_F_CSA;
sc->sc_bus_speed = 66;
aprint_verbose("%s: Communication Streaming Architecture\n",
sc->sc_dev.dv_xname);
} else {
reg = CSR_READ(sc, WMREG_STATUS);
if (reg & STATUS_BUS64)