| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: makphy.c,v 1.37 2012/01/21 16:48:08 chs Exp $ */ | | 1 | /* $NetBSD: makphy.c,v 1.38 2013/12/21 15:20:39 kiyohara Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, |
9 | * NASA Ames Research Center. | | 9 | * NASA Ames Research Center. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -49,27 +49,27 @@ | | | @@ -49,27 +49,27 @@ |
49 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | | 49 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
50 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 50 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
51 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 51 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
52 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 52 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
53 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | | 53 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
54 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 54 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
55 | */ | | 55 | */ |
56 | | | 56 | |
57 | /* | | 57 | /* |
58 | * Driver for the Marvell 88E1000 ``Alaska'' 10/100/1000 PHY. | | 58 | * Driver for the Marvell 88E1000 ``Alaska'' 10/100/1000 PHY. |
59 | */ | | 59 | */ |
60 | | | 60 | |
61 | #include <sys/cdefs.h> | | 61 | #include <sys/cdefs.h> |
62 | __KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.37 2012/01/21 16:48:08 chs Exp $"); | | 62 | __KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.38 2013/12/21 15:20:39 kiyohara Exp $"); |
63 | | | 63 | |
64 | #include <sys/param.h> | | 64 | #include <sys/param.h> |
65 | #include <sys/systm.h> | | 65 | #include <sys/systm.h> |
66 | #include <sys/kernel.h> | | 66 | #include <sys/kernel.h> |
67 | #include <sys/device.h> | | 67 | #include <sys/device.h> |
68 | #include <sys/socket.h> | | 68 | #include <sys/socket.h> |
69 | #include <sys/errno.h> | | 69 | #include <sys/errno.h> |
70 | | | 70 | |
71 | #include <net/if.h> | | 71 | #include <net/if.h> |
72 | #include <net/if_media.h> | | 72 | #include <net/if_media.h> |
73 | | | 73 | |
74 | #include <dev/mii/mii.h> | | 74 | #include <dev/mii/mii.h> |
75 | #include <dev/mii/miivar.h> | | 75 | #include <dev/mii/miivar.h> |
| @@ -112,26 +112,29 @@ static const struct mii_phydesc makphys[ | | | @@ -112,26 +112,29 @@ static const struct mii_phydesc makphys[ |
112 | | | 112 | |
113 | { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116, | | 113 | { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116, |
114 | MII_STR_xxMARVELL_E1116 }, | | 114 | MII_STR_xxMARVELL_E1116 }, |
115 | | | 115 | |
116 | { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1145, | | 116 | { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1145, |
117 | MII_STR_xxMARVELL_E1145 }, | | 117 | MII_STR_xxMARVELL_E1145 }, |
118 | | | 118 | |
119 | { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R, | | 119 | { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R, |
120 | MII_STR_xxMARVELL_E1116R }, | | 120 | MII_STR_xxMARVELL_E1116R }, |
121 | | | 121 | |
122 | { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R_29, | | 122 | { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1116R_29, |
123 | MII_STR_xxMARVELL_E1116R_29 }, | | 123 | MII_STR_xxMARVELL_E1116R_29 }, |
124 | | | 124 | |
| | | 125 | { MII_OUI_xxMARVELL, MII_MODEL_xxMARVELL_E1543, |
| | | 126 | MII_STR_xxMARVELL_E1543 }, |
| | | 127 | |
125 | { 0, 0, | | 128 | { 0, 0, |
126 | NULL }, | | 129 | NULL }, |
127 | }; | | 130 | }; |
128 | | | 131 | |
129 | static int | | 132 | static int |
130 | makphymatch(device_t parent, cfdata_t match, void *aux) | | 133 | makphymatch(device_t parent, cfdata_t match, void *aux) |
131 | { | | 134 | { |
132 | struct mii_attach_args *ma = aux; | | 135 | struct mii_attach_args *ma = aux; |
133 | | | 136 | |
134 | if (mii_phy_match(ma, makphys) != NULL) | | 137 | if (mii_phy_match(ma, makphys) != NULL) |
135 | return (10); | | 138 | return (10); |
136 | | | 139 | |
137 | return (0); | | 140 | return (0); |