Deleted Added
full compact
if_sf.c (49076) if_sf.c (49077)
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
30 * THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $Id: if_sf.c,v 1.11 1999/07/24 21:13:38 wpaul Exp $
32 * $Id: if_sf.c,v 1.12 1999/07/25 05:10:18 wpaul Exp $
33 */
34
35/*
36 * Adaptec AIC-6915 "Starfire" PCI fast ethernet driver for FreeBSD.
37 * Programming manual is available from www.adaptec.com.
38 *
39 * Written by Bill Paul <wpaul@ctr.columbia.edu>
40 * Department of Electical Engineering

--- 73 unchanged lines hidden (view full) ---

114#define SF_USEIOSPACE
115
116/* #define SF_BACKGROUND_AUTONEG */
117
118#include <pci/if_sfreg.h>
119
120#ifndef lint
121static const char rcsid[] =
33 */
34
35/*
36 * Adaptec AIC-6915 "Starfire" PCI fast ethernet driver for FreeBSD.
37 * Programming manual is available from www.adaptec.com.
38 *
39 * Written by Bill Paul <wpaul@ctr.columbia.edu>
40 * Department of Electical Engineering

--- 73 unchanged lines hidden (view full) ---

114#define SF_USEIOSPACE
115
116/* #define SF_BACKGROUND_AUTONEG */
117
118#include <pci/if_sfreg.h>
119
120#ifndef lint
121static const char rcsid[] =
122 "$Id: if_sf.c,v 1.11 1999/07/24 21:13:38 wpaul Exp $";
122 "$Id: if_sf.c,v 1.12 1999/07/25 05:10:18 wpaul Exp $";
123#endif
124
125static struct sf_type sf_devs[] = {
126 { AD_VENDORID, AD_DEVICEID_STARFIRE,
127 "Adaptec AIC-6915 10/100BaseTX" },
128 { 0, 0, NULL }
129};
130

--- 1584 unchanged lines hidden (view full) ---

1715
1716 return;
1717}
1718
1719static void sf_stop(sc)
1720 struct sf_softc *sc;
1721{
1722 int i;
123#endif
124
125static struct sf_type sf_devs[] = {
126 { AD_VENDORID, AD_DEVICEID_STARFIRE,
127 "Adaptec AIC-6915 10/100BaseTX" },
128 { 0, 0, NULL }
129};
130

--- 1584 unchanged lines hidden (view full) ---

1715
1716 return;
1717}
1718
1719static void sf_stop(sc)
1720 struct sf_softc *sc;
1721{
1722 int i;
1723 struct ifnet *ifp;
1723
1724
1725 ifp = &sc->arpcom.ac_if;
1726
1724 untimeout(sf_stats_update, sc, sc->sf_stat_ch);
1725
1726 csr_write_4(sc, SF_GEN_ETH_CTL, 0);
1727 csr_write_4(sc, SF_CQ_CONSIDX, 0);
1728 csr_write_4(sc, SF_CQ_PRODIDX, 0);
1729 csr_write_4(sc, SF_RXDQ_ADDR_Q1, 0);
1730 csr_write_4(sc, SF_RXDQ_CTL_1, 0);
1731 csr_write_4(sc, SF_RXDQ_PTR_Q1, 0);

--- 11 unchanged lines hidden (view full) ---

1743
1744 for (i = 0; i < SF_TX_DLIST_CNT; i++) {
1745 if (sc->sf_ldata->sf_tx_dlist[i].sf_mbuf != NULL) {
1746 m_freem(sc->sf_ldata->sf_tx_dlist[i].sf_mbuf);
1747 sc->sf_ldata->sf_tx_dlist[i].sf_mbuf = NULL;
1748 }
1749 }
1750
1727 untimeout(sf_stats_update, sc, sc->sf_stat_ch);
1728
1729 csr_write_4(sc, SF_GEN_ETH_CTL, 0);
1730 csr_write_4(sc, SF_CQ_CONSIDX, 0);
1731 csr_write_4(sc, SF_CQ_PRODIDX, 0);
1732 csr_write_4(sc, SF_RXDQ_ADDR_Q1, 0);
1733 csr_write_4(sc, SF_RXDQ_CTL_1, 0);
1734 csr_write_4(sc, SF_RXDQ_PTR_Q1, 0);

--- 11 unchanged lines hidden (view full) ---

1746
1747 for (i = 0; i < SF_TX_DLIST_CNT; i++) {
1748 if (sc->sf_ldata->sf_tx_dlist[i].sf_mbuf != NULL) {
1749 m_freem(sc->sf_ldata->sf_tx_dlist[i].sf_mbuf);
1750 sc->sf_ldata->sf_tx_dlist[i].sf_mbuf = NULL;
1751 }
1752 }
1753
1754 ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE);
1755
1751 return;
1752}
1753
1754/*
1755 * Note: it is important that this function not be interrupted. We
1756 * use a two-stage register access scheme: if we are interrupted in
1757 * between setting the indirect address register and reading from the
1758 * indirect data register, the contents of the address register could

--- 79 unchanged lines hidden ---
1756 return;
1757}
1758
1759/*
1760 * Note: it is important that this function not be interrupted. We
1761 * use a two-stage register access scheme: if we are interrupted in
1762 * between setting the indirect address register and reading from the
1763 * indirect data register, the contents of the address register could

--- 79 unchanged lines hidden ---