| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: if_et.c,v 1.34 2021/09/10 14:43:04 jakllsch Exp $ */ | | 1 | /* $NetBSD: if_et.c,v 1.35 2021/09/10 14:56:26 jakllsch Exp $ */ |
2 | /* $OpenBSD: if_et.c,v 1.12 2008/07/11 09:29:02 kevlo $ */ | | 2 | /* $OpenBSD: if_et.c,v 1.12 2008/07/11 09:29:02 kevlo $ */ |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2007 The DragonFly Project. All rights reserved. | | 4 | * Copyright (c) 2007 The DragonFly Project. All rights reserved. |
5 | * | | 5 | * |
6 | * This code is derived from software contributed to The DragonFly Project | | 6 | * This code is derived from software contributed to The DragonFly Project |
7 | * by Sepherosa Ziehau <sepherosa@gmail.com> | | 7 | * by Sepherosa Ziehau <sepherosa@gmail.com> |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * | | 12 | * |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -27,58 +27,48 @@ | | | @@ -27,58 +27,48 @@ |
27 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | | 27 | * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
28 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, | | 28 | * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, |
29 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | | 29 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
30 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED | | 30 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
31 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | | 31 | * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
33 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 33 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | * SUCH DAMAGE. | | 34 | * SUCH DAMAGE. |
35 | * | | 35 | * |
36 | * $DragonFly: src/sys/dev/netif/et/if_et.c,v 1.1 2007/10/12 14:12:42 sephe Exp $ | | 36 | * $DragonFly: src/sys/dev/netif/et/if_et.c,v 1.1 2007/10/12 14:12:42 sephe Exp $ |
37 | */ | | 37 | */ |
38 | | | 38 | |
39 | #include <sys/cdefs.h> | | 39 | #include <sys/cdefs.h> |
40 | __KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.34 2021/09/10 14:43:04 jakllsch Exp $"); | | 40 | __KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.35 2021/09/10 14:56:26 jakllsch Exp $"); |
41 | | | | |
42 | #include "opt_inet.h" | | | |
43 | | | 41 | |
44 | #include <sys/param.h> | | 42 | #include <sys/param.h> |
45 | #include <sys/endian.h> | | 43 | #include <sys/endian.h> |
46 | #include <sys/systm.h> | | 44 | #include <sys/systm.h> |
47 | #include <sys/types.h> | | 45 | #include <sys/types.h> |
48 | #include <sys/sockio.h> | | 46 | #include <sys/sockio.h> |
49 | #include <sys/mbuf.h> | | 47 | #include <sys/mbuf.h> |
50 | #include <sys/queue.h> | | 48 | #include <sys/queue.h> |
51 | #include <sys/kernel.h> | | 49 | #include <sys/kernel.h> |
52 | #include <sys/device.h> | | 50 | #include <sys/device.h> |
53 | #include <sys/callout.h> | | 51 | #include <sys/callout.h> |
54 | #include <sys/socket.h> | | 52 | #include <sys/socket.h> |
55 | | | 53 | |
56 | #include <sys/bus.h> | | 54 | #include <sys/bus.h> |
57 | | | 55 | |
58 | #include <net/if.h> | | 56 | #include <net/if.h> |
59 | #include <net/if_dl.h> | | 57 | #include <net/if_dl.h> |
60 | #include <net/if_media.h> | | 58 | #include <net/if_media.h> |
61 | #include <net/if_ether.h> | | 59 | #include <net/if_ether.h> |
62 | #include <net/if_arp.h> | | 60 | #include <net/if_arp.h> |
63 | | | 61 | |
64 | #ifdef INET | | | |
65 | #include <netinet/in.h> | | | |
66 | #include <netinet/in_systm.h> | | | |
67 | #include <netinet/in_var.h> | | | |
68 | #include <netinet/ip.h> | | | |
69 | #include <netinet/if_inarp.h> | | | |
70 | #endif | | | |
71 | | | | |
72 | #include <net/bpf.h> | | 62 | #include <net/bpf.h> |
73 | | | 63 | |
74 | #include <dev/mii/mii.h> | | 64 | #include <dev/mii/mii.h> |
75 | #include <dev/mii/miivar.h> | | 65 | #include <dev/mii/miivar.h> |
76 | | | 66 | |
77 | #include <dev/pci/pcireg.h> | | 67 | #include <dev/pci/pcireg.h> |
78 | #include <dev/pci/pcivar.h> | | 68 | #include <dev/pci/pcivar.h> |
79 | #include <dev/pci/pcidevs.h> | | 69 | #include <dev/pci/pcidevs.h> |
80 | | | 70 | |
81 | #include <dev/pci/if_etreg.h> | | 71 | #include <dev/pci/if_etreg.h> |
82 | | | 72 | |
83 | static int et_match(device_t, cfdata_t, void *); | | 73 | static int et_match(device_t, cfdata_t, void *); |
84 | static void et_attach(device_t, device_t, void *); | | 74 | static void et_attach(device_t, device_t, void *); |