diff options
author | imp <imp@FreeBSD.org> | 2003-11-02 20:13:39 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-11-02 20:13:39 +0000 |
commit | 3fef709f3d4e6341ae128b765428a98dd68b0d4d (patch) | |
tree | 0638c27bfd00a780c90098e5c5c46719645b6b72 /sys/dev/ep | |
parent | df6cf256ed0b852cf803c767cad95e65e628f872 (diff) | |
download | FreeBSD-src-3fef709f3d4e6341ae128b765428a98dd68b0d4d.zip FreeBSD-src-3fef709f3d4e6341ae128b765428a98dd68b0d4d.tar.gz |
MFp4:
o Remove redundant $FreeBSD$
o Better comments about ep_get_macaddr.
o remove one tab in a switch statement (style only)
o Recognize ID 0x0035 as the device ID for the 3CXEM556 that I have. This
makes the 3CXEM556 work for me. Not 100% sure this is the assigned ID,
as I don't have the datasheets for this part, but it does work and get
the correct ethrnet address.
o Comment about the whole fake IRQ 3 thing. some need it, some don't, all
work with it.
Diffstat (limited to 'sys/dev/ep')
-rw-r--r-- | sys/dev/ep/if_ep_pccard.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sys/dev/ep/if_ep_pccard.c b/sys/dev/ep/if_ep_pccard.c index e54a5eb..69b761c 100644 --- a/sys/dev/ep/if_ep_pccard.c +++ b/sys/dev/ep/if_ep_pccard.c @@ -28,9 +28,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - /* * Pccard support for 3C589 by: * HAMADA Naoki @@ -119,7 +116,8 @@ ep_pccard_probe(device_t dev) device_set_desc(dev, desc); /* - * For some reason the 3c574 needs this. + * Newer cards supported by this device need to have their + * MAC address set. */ error = ep_get_macaddr(sc, (u_char *)&sc->arpcom.ac_enaddr); @@ -132,7 +130,7 @@ ep_pccard_identify(u_short id) { /* Determine device type and associated MII capabilities */ switch (id) { - case 0x6055: /* 3C556 */ + case 0x6055: /* 3C556 */ return ("3Com 3C556"); case 0x4057: /* 3C574 */ return ("3Com 3C574"); @@ -147,7 +145,10 @@ ep_pccard_identify(u_short id) return ("3Com 3C562D/3C563D"); case 0x0010: /* 3C1 */ return ("3Com Megahertz C1"); + case 0x0035: + return ("3Com 3CCEM556"); default: + printf("Unknown ID: 0x%x\n", id); return (NULL); } } @@ -166,6 +167,7 @@ ep_pccard_card_attach(struct ep_board * epb) case 0x2056: /* 3C562D/3C563D */ case 0x9058: /* 3C589 */ case 0x0010: /* 3C1 */ + case 0x0035: /* 3C[XC]EM556 */ epb->mii_trans = 0; return (1); default: @@ -208,7 +210,13 @@ ep_pccard_attach(device_t dev) /* ROM size = 0, ROM base = 0 */ /* For now, ignore AUTO SELECT feature of 3C589B and later. */ CSR_WRITE_2(sc, EP_W0_ADDRESS_CFG, result & 0xc000); - /* Fake IRQ must be 3 */ + + /* + * Fake IRQ must be 3 for 3C589 and 3C589B. 3C589D and newer + * ignore this value. 3C589C is unknown, as are the other + * cards supported by this driver, but it appears to never hurt + * and always helps. + */ SET_IRQ(sc, 3); CSR_WRITE_2(sc, EP_W0_PRODUCT_ID, sc->epb.prod_id); |