Deleted Added
full compact
pnphy.c (67365) pnphy.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/pnphy.c 67365 2000-10-20 07:58:15Z jhb $
32 * $FreeBSD: head/sys/dev/dc/pnphy.c 74914 2001-03-28 09:17:56Z jhb $
33 */
34
35/*
36 * Pseudo-driver for media selection on the Lite-On PNIC 82c168
37 * chip. The NWAY support on this chip is horribly broken, so we
38 * only support manual mode selection. This is lame, but getting
39 * NWAY to work right is amazingly difficult.
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>
45#include <sys/socket.h>
46#include <sys/errno.h>
33 */
34
35/*
36 * Pseudo-driver for media selection on the Lite-On PNIC 82c168
37 * chip. The NWAY support on this chip is horribly broken, so we
38 * only support manual mode selection. This is lame, but getting
39 * NWAY to work right is amazingly difficult.
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>
45#include <sys/socket.h>
46#include <sys/errno.h>
47#include <sys/lock.h>
47#include <sys/module.h>
48#include <sys/mutex.h>
49#include <sys/bus.h>
50
51#include <net/if.h>
52#include <net/if_arp.h>
53#include <net/if_media.h>
54

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

63#include <sys/bus.h>
64
65#include <pci/if_dcreg.h>
66
67#include "miibus_if.h"
68
69#if !defined(lint)
70static const char rcsid[] =
48#include <sys/module.h>
49#include <sys/mutex.h>
50#include <sys/bus.h>
51
52#include <net/if.h>
53#include <net/if_arp.h>
54#include <net/if_media.h>
55

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

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

--- 231 unchanged lines hidden ---
73#endif
74
75#define DC_SETBIT(sc, reg, x) \
76 CSR_WRITE_4(sc, reg, \
77 CSR_READ_4(sc, reg) | x)
78
79#define DC_CLRBIT(sc, reg, x) \
80 CSR_WRITE_4(sc, reg, \

--- 231 unchanged lines hidden ---