Deleted Added
full compact
if_sf.c (67164) if_sf.c (69583)
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 67164 2000-10-15 14:19:01Z phk $
32 * $FreeBSD: head/sys/dev/sf/if_sf.c 69583 2000-12-04 22:46:50Z wpaul $
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 67164 2000-10-15 14:19:01Z phk $";
124 "$FreeBSD: head/sys/dev/sf/if_sf.c 69583 2000-12-04 22:46:50Z wpaul $";
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

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

674 struct sf_softc *sc;
675 struct ifnet *ifp;
676 int unit, rid, error = 0;
677
678 sc = device_get_softc(dev);
679 unit = device_get_unit(dev);
680 bzero(sc, sizeof(struct sf_softc));
681
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

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

674 struct sf_softc *sc;
675 struct ifnet *ifp;
676 int unit, rid, error = 0;
677
678 sc = device_get_softc(dev);
679 unit = device_get_unit(dev);
680 bzero(sc, sizeof(struct sf_softc));
681
682 mtx_init(&sc->sf_mtx, device_get_nameunit(dev), MTX_DEF);
683 SF_LOCK(sc);
682 /*
683 * Handle power management nonsense.
684 */
685 command = pci_read_config(dev, SF_PCI_CAPID, 4) & 0x000000FF;
686 if (command == 0x01) {
687
688 command = pci_read_config(dev, SF_PCI_PWRMGMTCTRL, 4);
689 if (command & SF_PSTATE_MASK) {

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

760 if (error) {
761 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sf_res);
762 bus_release_resource(dev, SF_RES, SF_RID, sc->sf_res);
763 printf("sf%d: couldn't set up irq\n", unit);
764 goto fail;
765 }
766
767 callout_handle_init(&sc->sf_stat_ch);
684 /*
685 * Handle power management nonsense.
686 */
687 command = pci_read_config(dev, SF_PCI_CAPID, 4) & 0x000000FF;
688 if (command == 0x01) {
689
690 command = pci_read_config(dev, SF_PCI_PWRMGMTCTRL, 4);
691 if (command & SF_PSTATE_MASK) {

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

762 if (error) {
763 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sf_res);
764 bus_release_resource(dev, SF_RES, SF_RID, sc->sf_res);
765 printf("sf%d: couldn't set up irq\n", unit);
766 goto fail;
767 }
768
769 callout_handle_init(&sc->sf_stat_ch);
768 mtx_init(&sc->sf_mtx, device_get_nameunit(dev), MTX_DEF);
769 SF_LOCK(sc);
770 /* Reset the adapter. */
771 sf_reset(sc);
772
773 /*
774 * Get station address from the EEPROM.
775 */
776 for (i = 0; i < ETHER_ADDR_LEN; i++)
777 sc->arpcom.ac_enaddr[i] =

--- 727 unchanged lines hidden ---
770 /* Reset the adapter. */
771 sf_reset(sc);
772
773 /*
774 * Get station address from the EEPROM.
775 */
776 for (i = 0; i < ETHER_ADDR_LEN; i++)
777 sc->arpcom.ac_enaddr[i] =

--- 727 unchanged lines hidden ---