diff options
author | wpaul <wpaul@FreeBSD.org> | 1998-05-22 15:32:22 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1998-05-22 15:32:22 +0000 |
commit | 3e376801df781d96466739ca0d0345c2e39e5de2 (patch) | |
tree | f5fd83ffce2eed7cab5bf1c500db9fb648b7a565 /sys | |
parent | ff464ca1d1760c4897767f9a311935e69448ad40 (diff) | |
download | FreeBSD-src-3e376801df781d96466739ca0d0345c2e39e5de2.zip FreeBSD-src-3e376801df781d96466739ca0d0345c2e39e5de2.tar.gz |
Remove 2.2.x compatibility code and #ifdefs. Once the shakedown period
in -current is over, I'll put a 2.2.x specific version in the RELENG_2_2
branch. If somebody wants a 2.2 version of this driver now, they can check
out the previous version from CVS or ask me via e-mail.
Gee people, I didn't mean to stir up such a controversy. I just wanted
to make sure I could get this thing to work with both kernel versions
and didn't want to have to maintain two separate copies. All ya hadda
do was ask. :)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pci/if_tl.c | 72 | ||||
-rw-r--r-- | sys/pci/if_tlreg.h | 5 |
2 files changed, 5 insertions, 72 deletions
diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c index c2677a3..faca0a1 100644 --- a/sys/pci/if_tl.c +++ b/sys/pci/if_tl.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_tl.c,v 1.2 1998/05/21 16:24:04 jkh Exp $ + * $Id: if_tl.c,v 1.3 1998/05/21 17:05:32 jkh Exp $ */ /* @@ -240,7 +240,7 @@ #ifndef lint static char rcsid[] = - "$Id: if_tl.c,v 1.2 1998/05/21 16:24:04 jkh Exp $"; + "$Id: if_tl.c,v 1.3 1998/05/21 17:05:32 jkh Exp $"; #endif /* @@ -1040,12 +1040,7 @@ static void tl_setmulti(sc) struct tl_csr *csr; u_int32_t hashes[2] = { 0, 0 }; int h; -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 struct ifmultiaddr *ifma; -#else - struct ether_multi *enm; - struct ether_multistep step; -#endif csr = sc->csr; ifp = &sc->arpcom.ac_if; @@ -1054,7 +1049,6 @@ static void tl_setmulti(sc) hashes[0] = 0xFFFFFFFF; hashes[1] = 0xFFFFFFFF; } else { -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 for (ifma = ifp->if_multiaddrs.lh_first; ifma != NULL; ifma = ifma->ifma_link.le_next) { if (ifma->ifma_addr->sa_family != AF_LINK) @@ -1066,24 +1060,6 @@ static void tl_setmulti(sc) else hashes[1] |= (1 << (h - 31)); } -#else - ETHER_FIRST_MULTI(step, &sc->arpcom, enm); - while(enm != NULL) { - if (bcmp(enm->enm_addrlo, enm->enm_addrhi, - ETHER_ADDR_LEN)) { - hashes[0] = 0xFFFFFFFF; - hashes[1] = 0xFFFFFFFF; - break; - } else { - h = tl_calchash(enm->enm_addrlo); - if (h < 32) - hashes[0] |= (1 << h); - else - hashes[1] |= (1 << (h - 31)); - } - ETHER_NEXT_MULTI(step, enm); - } -#endif } DIO_SEL(TL_HASH1); @@ -1322,9 +1298,7 @@ static int tl_attach_phy(csr, tl_unit, eaddr, tl_phy, ilist) sc->tl_unit = tl_unit; sc->tl_phy_addr = tl_phy; sc->tl_iflist = ilist; -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 callout_handle_init(&sc->tl_stat_ch); -#endif frame.mii_regaddr = TL_PHY_VENID; tl_mii_readreg(csr, &frame); @@ -1495,11 +1469,7 @@ tl_attach_ctlr(config_id, unit) s = splimp(); for (ilist = tl_iflist; ilist != NULL; ilist = ilist->tl_next) -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 if (ilist->tl_config_id == config_id) -#else - if (sametag(ilist->tl_config_id, config_id)) -#endif break; if (ilist == NULL) { @@ -1510,7 +1480,6 @@ tl_attach_ctlr(config_id, unit) /* * Map control/status registers. */ -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 pci_conf_write(config_id, PCI_COMMAND_STATUS_REG, PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN); @@ -1520,18 +1489,6 @@ tl_attach_ctlr(config_id, unit) printf("tlc%d: failed to enable memory mapping!\n", unit); goto fail; } -#else - pci_conf_write(config_id, PCI_COMMAND_STATUS_REG, - PCI_COMMAND_MEM_ENABLE| - PCI_COMMAND_MASTER_ENABLE); - - command = pci_conf_read(config_id, PCI_COMMAND_STATUS_REG); - - if (!(command & PCI_COMMAND_MEM_ENABLE)) { - printf("tlc%d: failed to enable memory mapping!\n", unit); - goto fail; - } -#endif if (!pci_map_mem(config_id, TL_PCI_LOMEM, &vbase, &pbase)) { printf ("tlc%d: couldn't map memory\n", unit); @@ -2102,11 +2059,9 @@ static void tl_stats_update(xsc) tl_rx_overrun(tl_stats); ifp->if_oerrors += tl_tx_underrun(tl_stats); -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 sc->tl_stat_ch = timeout(tl_stats_update, sc, hz); -#else - timeout(tl_stats_update, sc, hz); -#endif + + return; } /* @@ -2383,11 +2338,7 @@ static void tl_init(xsc) (void)splx(s); /* Start the stats update counter */ -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 sc->tl_stat_ch = timeout(tl_stats_update, sc, hz); -#else - timeout(tl_stats_update, sc, hz); -#endif return; } @@ -2502,19 +2453,8 @@ static int tl_ioctl(ifp, command, data) break; case SIOCADDMULTI: case SIOCDELMULTI: -#if defined(__FreeBSD__) && __FreeBSD__ < 3 - if (command == SIOCADDMULTI) - error = ether_addmulti(ifr, &sc->arpcom); - else - error = ether_delmulti(ifr, &sc->arpcom); - if (error == ENETRESET) { - tl_setmulti(sc); - error = 0; - } -#else tl_setmulti(sc); error = 0; -#endif break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: @@ -2575,11 +2515,7 @@ static void tl_stop(sc) ifp = &sc->arpcom.ac_if; /* Stop the stats updater. */ -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 untimeout(tl_stats_update, sc, sc->tl_stat_ch); -#else - untimeout(tl_stats_update, sc); -#endif /* Stop the transmitter */ sc->csr->tl_host_cmd &= TL_CMD_RT; diff --git a/sys/pci/if_tlreg.h b/sys/pci/if_tlreg.h index 344ac95..e774385 100644 --- a/sys/pci/if_tlreg.h +++ b/sys/pci/if_tlreg.h @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_tlreg.h,v 1.1 1998/05/21 03:19:56 wpaul Exp $ + * $Id: if_tlreg.h,v 1.2 1998/05/21 16:24:05 jkh Exp $ */ @@ -122,10 +122,7 @@ struct tl_softc { struct tl_list_data *tl_ldata; /* TX/RX lists and mbufs */ struct tl_chain_data tl_cdata; int tl_txeoc; -#if defined(__FreeBSD__) && __FreeBSD__ >= 3 struct callout_handle tl_stat_ch; -#endif - }; #define TX_THR 0x00000007 |