Deleted Added
full compact
if_sf.c (81798) if_sf.c (84147)
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 * $FreeBSD: head/sys/dev/sf/if_sf.c 81798 2001-08-16 20:15:16Z wpaul $
32 * $FreeBSD: head/sys/dev/sf/if_sf.c 84147 2001-09-29 19:28:31Z jlemon $
33 */
34
35/*
36 * Adaptec AIC-6915 "Starfire" PCI fast ethernet driver for FreeBSD.
37 * Programming manual is available from:
38 * ftp.adaptec.com:/pub/BBS/userguides/aic6915_pg.pdf.
39 *
40 * Written by Bill Paul <wpaul@ctr.columbia.edu>

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

116#define SF_USEIOSPACE
117
118#include <pci/if_sfreg.h>
119
120MODULE_DEPEND(sf, miibus, 1, 1, 1);
121
122#ifndef lint
123static const char rcsid[] =
33 */
34
35/*
36 * Adaptec AIC-6915 "Starfire" PCI fast ethernet driver for FreeBSD.
37 * Programming manual is available from:
38 * ftp.adaptec.com:/pub/BBS/userguides/aic6915_pg.pdf.
39 *
40 * Written by Bill Paul <wpaul@ctr.columbia.edu>

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

116#define SF_USEIOSPACE
117
118#include <pci/if_sfreg.h>
119
120MODULE_DEPEND(sf, miibus, 1, 1, 1);
121
122#ifndef lint
123static const char rcsid[] =
124 "$FreeBSD: head/sys/dev/sf/if_sf.c 81798 2001-08-16 20:15:16Z wpaul $";
124 "$FreeBSD: head/sys/dev/sf/if_sf.c 84147 2001-09-29 19:28:31Z jlemon $";
125#endif
126
127static struct sf_type sf_devs[] = {
128 { AD_VENDORID, AD_DEVICEID_STARFIRE,
129 "Adaptec AIC-6915 10/100BaseTX" },
130 { 0, 0, NULL }
131};
132

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

1484 for (i = 0; i < sizeof(stats)/sizeof(u_int32_t); i++)
1485 csr_write_4(sc, SF_STATS_BASE +
1486 (i + sizeof(u_int32_t)), 0);
1487
1488 ifp->if_collisions += stats.sf_tx_single_colls +
1489 stats.sf_tx_multi_colls + stats.sf_tx_excess_colls;
1490
1491 mii_tick(mii);
125#endif
126
127static struct sf_type sf_devs[] = {
128 { AD_VENDORID, AD_DEVICEID_STARFIRE,
129 "Adaptec AIC-6915 10/100BaseTX" },
130 { 0, 0, NULL }
131};
132

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

1484 for (i = 0; i < sizeof(stats)/sizeof(u_int32_t); i++)
1485 csr_write_4(sc, SF_STATS_BASE +
1486 (i + sizeof(u_int32_t)), 0);
1487
1488 ifp->if_collisions += stats.sf_tx_single_colls +
1489 stats.sf_tx_multi_colls + stats.sf_tx_excess_colls;
1490
1491 mii_tick(mii);
1492 if (!sc->sf_link) {
1493 mii_pollstat(mii);
1494 if (mii->mii_media_status & IFM_ACTIVE &&
1495 IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)
1496 sc->sf_link++;
1497 if (ifp->if_snd.ifq_head != NULL)
1498 sf_start(ifp);
1492
1493 if (!sc->sf_link && mii->mii_media_status & IFM_ACTIVE &&
1494 IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
1495 sc->sf_link++;
1496 if (ifp->if_snd.ifq_head != NULL)
1497 sf_start(ifp);
1499 }
1500
1501 sc->sf_stat_ch = timeout(sf_stats_update, sc, hz);
1502
1503 SF_UNLOCK(sc);
1504
1505 return;
1506}

--- 36 unchanged lines hidden ---
1498 }
1499
1500 sc->sf_stat_ch = timeout(sf_stats_update, sc, hz);
1501
1502 SF_UNLOCK(sc);
1503
1504 return;
1505}

--- 36 unchanged lines hidden ---