Deleted Added
full compact
dcphy.c (67365) dcphy.c (74914)
1/*
2 * Copyright (c) 1997, 1998, 1999
3 * Bill Paul <wpaul@ee.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@ee.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/dc/dcphy.c 67365 2000-10-20 07:58:15Z jhb $
32 * $FreeBSD: head/sys/dev/dc/dcphy.c 74914 2001-03-28 09:17:56Z jhb $
33 */
34
35/*
36 * Pseudo-driver for internal NWAY support on DEC 21143 and workalike
37 * controllers. Technically we're abusing the miibus code to handle
38 * media selection and NWAY support here since there is no MII
39 * interface. However the logical operations are roughly the same,
40 * and the alternative is to create a fake MII interface in the driver,
41 * which is harder to do.
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/kernel.h>
47#include <sys/socket.h>
48#include <sys/errno.h>
33 */
34
35/*
36 * Pseudo-driver for internal NWAY support on DEC 21143 and workalike
37 * controllers. Technically we're abusing the miibus code to handle
38 * media selection and NWAY support here since there is no MII
39 * interface. However the logical operations are roughly the same,
40 * and the alternative is to create a fake MII interface in the driver,
41 * which is harder to do.
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/kernel.h>
47#include <sys/socket.h>
48#include <sys/errno.h>
49#include <sys/lock.h>
49#include <sys/module.h>
50#include <sys/mutex.h>
51#include <sys/bus.h>
52
53#include <net/if.h>
54#include <net/if_arp.h>
55#include <net/if_media.h>
56

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

67#include <pci/pcivar.h>
68
69#include <pci/if_dcreg.h>
70
71#include "miibus_if.h"
72
73#if !defined(lint)
74static const char rcsid[] =
50#include <sys/module.h>
51#include <sys/mutex.h>
52#include <sys/bus.h>
53
54#include <net/if.h>
55#include <net/if_arp.h>
56#include <net/if_media.h>
57

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

68#include <pci/pcivar.h>
69
70#include <pci/if_dcreg.h>
71
72#include "miibus_if.h"
73
74#if !defined(lint)
75static const char rcsid[] =
75 "$FreeBSD: head/sys/dev/dc/dcphy.c 67365 2000-10-20 07:58:15Z jhb $";
76 "$FreeBSD: head/sys/dev/dc/dcphy.c 74914 2001-03-28 09:17:56Z jhb $";
76#endif
77
78#define DC_SETBIT(sc, reg, x) \
79 CSR_WRITE_4(sc, reg, \
80 CSR_READ_4(sc, reg) | x)
81
82#define DC_CLRBIT(sc, reg, x) \
83 CSR_WRITE_4(sc, reg, \

--- 429 unchanged lines hidden ---
77#endif
78
79#define DC_SETBIT(sc, reg, x) \
80 CSR_WRITE_4(sc, reg, \
81 CSR_READ_4(sc, reg) | x)
82
83#define DC_CLRBIT(sc, reg, x) \
84 CSR_WRITE_4(sc, reg, \

--- 429 unchanged lines hidden ---