Deleted Added
full compact
if_xl.c (61041) if_xl.c (63090)
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/pci/if_xl.c 61041 2000-05-28 16:13:43Z peter $
32 * $FreeBSD: head/sys/pci/if_xl.c 63090 2000-07-13 22:54:34Z archie $
33 */
34
35/*
36 * 3Com 3c90x Etherlink XL PCI NIC driver
37 *
38 * Supports the 3Com "boomerang", "cyclone" and "hurricane" PCI
39 * bus-master chips (3c90x cards and embedded controllers) including
40 * the following:

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

140 * might not work on some devices.
141 */
142#define XL_USEIOSPACE
143
144#include <pci/if_xlreg.h>
145
146#if !defined(lint)
147static const char rcsid[] =
33 */
34
35/*
36 * 3Com 3c90x Etherlink XL PCI NIC driver
37 *
38 * Supports the 3Com "boomerang", "cyclone" and "hurricane" PCI
39 * bus-master chips (3c90x cards and embedded controllers) including
40 * the following:

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

140 * might not work on some devices.
141 */
142#define XL_USEIOSPACE
143
144#include <pci/if_xlreg.h>
145
146#if !defined(lint)
147static const char rcsid[] =
148 "$FreeBSD: head/sys/pci/if_xl.c 61041 2000-05-28 16:13:43Z peter $";
148 "$FreeBSD: head/sys/pci/if_xl.c 63090 2000-07-13 22:54:34Z archie $";
149#endif
150
151/*
152 * Various supported device vendors/types and their names.
153 */
154static struct xl_type xl_devs[] = {
155 { TC_VENDORID, TC_DEVICEID_BOOMERANG_10BT,
156 "3Com 3c900-TPO Etherlink XL" },

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

1486 }
1487
1488 if (sc->xl_miibus == NULL)
1489 ifmedia_set(&sc->ifmedia, media);
1490
1491done:
1492
1493 /*
149#endif
150
151/*
152 * Various supported device vendors/types and their names.
153 */
154static struct xl_type xl_devs[] = {
155 { TC_VENDORID, TC_DEVICEID_BOOMERANG_10BT,
156 "3Com 3c900-TPO Etherlink XL" },

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

1486 }
1487
1488 if (sc->xl_miibus == NULL)
1489 ifmedia_set(&sc->ifmedia, media);
1490
1491done:
1492
1493 /*
1494 * Call MI attach routines.
1494 * Call MI attach routine.
1495 */
1495 */
1496 if_attach(ifp);
1497 ether_ifattach(ifp);
1496 ether_ifattach(ifp, ETHER_BPF_SUPPORTED);
1498
1497
1499 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
1500
1501fail:
1502 splx(s);
1503 return(error);
1504}
1505
1506static int xl_detach(dev)
1507 device_t dev;
1508{
1509 struct xl_softc *sc;
1510 struct ifnet *ifp;
1511 int s;
1512
1513 s = splimp();
1514
1515 sc = device_get_softc(dev);
1516 ifp = &sc->arpcom.ac_if;
1517
1518 xl_reset(sc);
1519 xl_stop(sc);
1498fail:
1499 splx(s);
1500 return(error);
1501}
1502
1503static int xl_detach(dev)
1504 device_t dev;
1505{
1506 struct xl_softc *sc;
1507 struct ifnet *ifp;
1508 int s;
1509
1510 s = splimp();
1511
1512 sc = device_get_softc(dev);
1513 ifp = &sc->arpcom.ac_if;
1514
1515 xl_reset(sc);
1516 xl_stop(sc);
1520 if_detach(ifp);
1517 ether_ifdetach(ifp, ETHER_BPF_SUPPORTED);
1521
1522 /* Delete any miibus and phy devices attached to this interface */
1523 if (sc->xl_miibus != NULL) {
1524 bus_generic_detach(dev);
1525 device_delete_child(dev, sc->xl_miibus);
1526 }
1527
1528 bus_teardown_intr(dev, sc->xl_irq, sc->xl_intrhand);

--- 1339 unchanged lines hidden ---
1518
1519 /* Delete any miibus and phy devices attached to this interface */
1520 if (sc->xl_miibus != NULL) {
1521 bus_generic_detach(dev);
1522 device_delete_child(dev, sc->xl_miibus);
1523 }
1524
1525 bus_teardown_intr(dev, sc->xl_irq, sc->xl_intrhand);

--- 1339 unchanged lines hidden ---