Deleted Added
full compact
if_rl.c (61041) if_rl.c (63090)
1/*
2 * Copyright (c) 1997, 1998
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
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_rl.c 61041 2000-05-28 16:13:43Z peter $
32 * $FreeBSD: head/sys/pci/if_rl.c 63090 2000-07-13 22:54:34Z archie $
33 */
34
35/*
36 * RealTek 8129/8139 PCI NIC driver
37 *
38 * Supports several extremely cheap PCI 10/100 adapters based on
39 * the RealTek chipset. Datasheets can be obtained from
40 * www.realtek.com.tw.

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

129 * uniprocessor systems though.
130 */
131#define RL_USEIOSPACE
132
133#include <pci/if_rlreg.h>
134
135#ifndef lint
136static const char rcsid[] =
33 */
34
35/*
36 * RealTek 8129/8139 PCI NIC driver
37 *
38 * Supports several extremely cheap PCI 10/100 adapters based on
39 * the RealTek chipset. Datasheets can be obtained from
40 * www.realtek.com.tw.

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

129 * uniprocessor systems though.
130 */
131#define RL_USEIOSPACE
132
133#include <pci/if_rlreg.h>
134
135#ifndef lint
136static const char rcsid[] =
137 "$FreeBSD: head/sys/pci/if_rl.c 61041 2000-05-28 16:13:43Z peter $";
137 "$FreeBSD: head/sys/pci/if_rl.c 63090 2000-07-13 22:54:34Z archie $";
138#endif
139
140/*
141 * Various supported device vendors/types and their names.
142 */
143static struct rl_type rl_devs[] = {
144 { RT_VENDORID, RT_DEVICEID_8129,
145 "RealTek 8129 10/100BaseTX" },

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

951 ifp->if_output = ether_output;
952 ifp->if_start = rl_start;
953 ifp->if_watchdog = rl_watchdog;
954 ifp->if_init = rl_init;
955 ifp->if_baudrate = 10000000;
956 ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
957
958 /*
138#endif
139
140/*
141 * Various supported device vendors/types and their names.
142 */
143static struct rl_type rl_devs[] = {
144 { RT_VENDORID, RT_DEVICEID_8129,
145 "RealTek 8129 10/100BaseTX" },

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

951 ifp->if_output = ether_output;
952 ifp->if_start = rl_start;
953 ifp->if_watchdog = rl_watchdog;
954 ifp->if_init = rl_init;
955 ifp->if_baudrate = 10000000;
956 ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
957
958 /*
959 * Call MI attach routines.
959 * Call MI attach routine.
960 */
960 */
961 if_attach(ifp);
962 ether_ifattach(ifp);
961 ether_ifattach(ifp, ETHER_BPF_SUPPORTED);
963
962
964 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
965
966fail:
967 splx(s);
968 return(error);
969}
970
971static int rl_detach(dev)
972 device_t dev;
973{
974 struct rl_softc *sc;
975 struct ifnet *ifp;
976 int s;
977
978 s = splimp();
979
980 sc = device_get_softc(dev);
981 ifp = &sc->arpcom.ac_if;
982
963fail:
964 splx(s);
965 return(error);
966}
967
968static int rl_detach(dev)
969 device_t dev;
970{
971 struct rl_softc *sc;
972 struct ifnet *ifp;
973 int s;
974
975 s = splimp();
976
977 sc = device_get_softc(dev);
978 ifp = &sc->arpcom.ac_if;
979
983 if_detach(ifp);
980 ether_ifdetach(ifp, ETHER_BPF_SUPPORTED);
984 rl_stop(sc);
985
986 bus_generic_detach(dev);
987 device_delete_child(dev, sc->rl_miibus);
988
989 bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand);
990 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_res);
991 bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res);

--- 667 unchanged lines hidden ---
981 rl_stop(sc);
982
983 bus_generic_detach(dev);
984 device_delete_child(dev, sc->rl_miibus);
985
986 bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand);
987 bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_res);
988 bus_release_resource(dev, RL_RES, RL_RID, sc->rl_res);

--- 667 unchanged lines hidden ---