diff options
author | imp <imp@FreeBSD.org> | 2009-04-11 04:30:38 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2009-04-11 04:30:38 +0000 |
commit | 66be48ef8d10d34872de501bf489edaa11e2ebc4 (patch) | |
tree | 35630024766fa6bbc72f766d3bbed0cdb55e2533 /sys/dev/ep/if_ep_pccard.c | |
parent | 9cde3e407409ecc37e023b3d0a53c121ffb1cfc7 (diff) | |
download | FreeBSD-src-66be48ef8d10d34872de501bf489edaa11e2ebc4.zip FreeBSD-src-66be48ef8d10d34872de501bf489edaa11e2ebc4.tar.gz |
Two refinements to the 3c1 support:
1) Flag it and only access that command on the 3c1
2) The TX PLL appears to power down when not in use, so we have to power
it back up when we've been idle. Do this at the start of ifstart.
Otherwise we fall off the net.
Diffstat (limited to 'sys/dev/ep/if_ep_pccard.c')
-rw-r--r-- | sys/dev/ep/if_ep_pccard.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/ep/if_ep_pccard.c b/sys/dev/ep/if_ep_pccard.c index 4309358..98ebaf4 100644 --- a/sys/dev/ep/if_ep_pccard.c +++ b/sys/dev/ep/if_ep_pccard.c @@ -68,9 +68,10 @@ struct ep_pccard_product #define EP_CHIP_589 1 /* Classic 3c5x9 chipset */ #define EP_CHIP_574 2 /* Roadrunner */ +#define EP_CHIP_C1 3 /* 3c1 */ static const struct ep_pccard_product ep_pccard_products[] = { - { PCMCIA_CARD(3COM, 3C1), EP_CHIP_589 }, + { PCMCIA_CARD(3COM, 3C1), EP_CHIP_C1 }, { PCMCIA_CARD(3COM, 3C562), EP_CHIP_589 }, { PCMCIA_CARD(3COM, 3C589), EP_CHIP_589 }, { PCMCIA_CARD(3COM, 3CXEM556), EP_CHIP_589 }, @@ -144,19 +145,21 @@ ep_pccard_attach(device_t dev) if ((pp = ep_pccard_lookup(dev)) == NULL) panic("ep_pccard_attach: can't find product in attach."); - if (pp->chipset == EP_CHIP_589) { - sc->epb.mii_trans = 0; - sc->epb.cmd_off = 0; - } else { + if (pp->chipset == EP_CHIP_574) { sc->epb.mii_trans = 1; sc->epb.cmd_off = 2; + } else { + sc->epb.mii_trans = 0; + sc->epb.cmd_off = 0; } - if ((error = ep_alloc(dev))) { device_printf(dev, "ep_alloc() failed! (%d)\n", error); goto bad; } + if (pp->chipset == EP_CHIP_C1) + sc->stat |= F_HAS_TX_PLL; + /* ROM size = 0, ROM base = 0 */ /* For now, ignore AUTO SELECT feature of 3C589B and later. */ error = ep_get_e(sc, EEPROM_ADDR_CFG, &result); |