| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: brgphy.c,v 1.59 2011/06/07 10:10:44 cegger Exp $ */ | | 1 | /* $NetBSD: brgphy.c,v 1.60 2012/09/17 11:45:56 tsutsui 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 |
| @@ -52,27 +52,27 @@ | | | @@ -52,27 +52,27 @@ |
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 Broadcom BCM5400 and BCM5700 Gig-E PHYs. | | 58 | * driver for the Broadcom BCM5400 and BCM5700 Gig-E PHYs. |
59 | * | | 59 | * |
60 | * Programming information for this PHY was gleaned from FreeBSD | | 60 | * Programming information for this PHY was gleaned from FreeBSD |
61 | * (they were apparently able to get a datasheet from Broadcom). | | 61 | * (they were apparently able to get a datasheet from Broadcom). |
62 | */ | | 62 | */ |
63 | | | 63 | |
64 | #include <sys/cdefs.h> | | 64 | #include <sys/cdefs.h> |
65 | __KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.59 2011/06/07 10:10:44 cegger Exp $"); | | 65 | __KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.60 2012/09/17 11:45:56 tsutsui Exp $"); |
66 | | | 66 | |
67 | #include <sys/param.h> | | 67 | #include <sys/param.h> |
68 | #include <sys/systm.h> | | 68 | #include <sys/systm.h> |
69 | #include <sys/kernel.h> | | 69 | #include <sys/kernel.h> |
70 | #include <sys/device.h> | | 70 | #include <sys/device.h> |
71 | #include <sys/socket.h> | | 71 | #include <sys/socket.h> |
72 | #include <sys/errno.h> | | 72 | #include <sys/errno.h> |
73 | #include <prop/proplib.h> | | 73 | #include <prop/proplib.h> |
74 | | | 74 | |
75 | #include <net/if.h> | | 75 | #include <net/if.h> |
76 | #include <net/if_media.h> | | 76 | #include <net/if_media.h> |
77 | | | 77 | |
78 | #include <dev/mii/mii.h> | | 78 | #include <dev/mii/mii.h> |
| @@ -195,26 +195,29 @@ static const struct mii_phydesc brgphys[ | | | @@ -195,26 +195,29 @@ static const struct mii_phydesc brgphys[ |
195 | | | 195 | |
196 | { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5755, | | 196 | { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5755, |
197 | MII_STR_BROADCOM2_BCM5755 }, | | 197 | MII_STR_BROADCOM2_BCM5755 }, |
198 | | | 198 | |
199 | { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5761, | | 199 | { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5761, |
200 | MII_STR_BROADCOM2_BCM5761 }, | | 200 | MII_STR_BROADCOM2_BCM5761 }, |
201 | | | 201 | |
202 | { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5784, | | 202 | { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5784, |
203 | MII_STR_BROADCOM2_BCM5784 }, | | 203 | MII_STR_BROADCOM2_BCM5784 }, |
204 | | | 204 | |
205 | { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5785, | | 205 | { MII_OUI_BROADCOM2, MII_MODEL_BROADCOM2_BCM5785, |
206 | MII_STR_BROADCOM2_BCM5785 }, | | 206 | MII_STR_BROADCOM2_BCM5785 }, |
207 | | | 207 | |
| | | 208 | { MII_OUI_BROADCOM3, MII_MODEL_BROADCOM3_BCM57765, |
| | | 209 | MII_STR_BROADCOM3_BCM57765 }, |
| | | 210 | |
208 | { MII_OUI_xxBROADCOM_ALT1, MII_MODEL_xxBROADCOM_ALT1_BCM5906, | | 211 | { MII_OUI_xxBROADCOM_ALT1, MII_MODEL_xxBROADCOM_ALT1_BCM5906, |
209 | MII_STR_xxBROADCOM_ALT1_BCM5906 }, | | 212 | MII_STR_xxBROADCOM_ALT1_BCM5906 }, |
210 | | | 213 | |
211 | { 0, 0, | | 214 | { 0, 0, |
212 | NULL }, | | 215 | NULL }, |
213 | }; | | 216 | }; |
214 | | | 217 | |
215 | static int | | 218 | static int |
216 | brgphymatch(device_t parent, cfdata_t match, void *aux) | | 219 | brgphymatch(device_t parent, cfdata_t match, void *aux) |
217 | { | | 220 | { |
218 | struct mii_attach_args *ma = aux; | | 221 | struct mii_attach_args *ma = aux; |
219 | | | 222 | |
220 | if (mii_phy_match(ma, brgphys) != NULL) | | 223 | if (mii_phy_match(ma, brgphys) != NULL) |