sort the models, and add several more variants; data found in OpenBSD eephy.c trunk
authorjdolecek <jdolecek@NetBSD.org>
Wed, 13 Jun 2018 23:27:48 +0000
branchtrunk
changeset 319846 1e15eae476bf
parent 319845 bdf9b04a2a75
child 319847 72b3b2c6ad42
sort the models, and add several more variants; data found in OpenBSD eephy.c this also makes makphy match model 88E3016, which adresses PR kern/53301 by Chris Humphries
sys/dev/mii/makphy.c
--- a/sys/dev/mii/makphy.c	Wed Jun 13 23:25:41 2018 +0000
+++ b/sys/dev/mii/makphy.c	Wed Jun 13 23:27:48 2018 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: makphy.c,v 1.42 2016/11/08 08:48:35 msaitoh Exp $	*/
+/*	$NetBSD: makphy.c,v 1.43 2018/06/13 23:27:48 jdolecek Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.42 2016/11/08 08:48:35 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: makphy.c,v 1.43 2018/06/13 23:27:48 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -92,15 +92,51 @@
 };
 
 static const struct mii_phydesc makphys[] = {
+	{ MII_OUI_MARVELL,		MII_MODEL_MARVELL_E1000_0,
+	  MII_STR_MARVELL_E1000_0 },
+
+	{ MII_OUI_MARVELL,		MII_MODEL_MARVELL_E1000_3,
+	  MII_STR_MARVELL_E1000_3 },
+
+	{ MII_OUI_MARVELL,		MII_MODEL_MARVELL_E1000_5,
+	  MII_STR_MARVELL_E1000_5 },
+
+	{ MII_OUI_MARVELL,		MII_MODEL_MARVELL_E1000_6,
+	  MII_STR_MARVELL_E1000_6 },
+
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1000_3,
 	  MII_STR_xxMARVELL_E1000_3 },
 
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1000_5,
 	  MII_STR_xxMARVELL_E1000_5 },
 
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1000S,
+	  MII_STR_xxMARVELL_E1000S },
+
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1011,
 	  MII_STR_xxMARVELL_E1011 },
 
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1111,
+	  MII_STR_xxMARVELL_E1111 },
+
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1112,
+	  MII_STR_xxMARVELL_E1112 },
+
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1116,
+	  MII_STR_xxMARVELL_E1116 },
+
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1116R,
+	  MII_STR_xxMARVELL_E1116R },
+
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1116R_29,
+	  MII_STR_xxMARVELL_E1116R_29 },
+
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1118,
+	  MII_STR_xxMARVELL_E1118 },
+
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1145,
+	  MII_STR_xxMARVELL_E1145 },
+
 	/* XXX: reported not to work on eg. HP XW9400 */
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1149,
 	  MII_STR_xxMARVELL_E1149 },
@@ -108,24 +144,17 @@
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1149R,
 	  MII_STR_xxMARVELL_E1149R },
 
-	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1111,
-	  MII_STR_xxMARVELL_E1111 },
-
-	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1116,
-	  MII_STR_xxMARVELL_E1116 },
-
-	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1145,
-	  MII_STR_xxMARVELL_E1145 },
-
-	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1116R,
-	  MII_STR_xxMARVELL_E1116R },
-
-	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1116R_29,
-	  MII_STR_xxMARVELL_E1116R_29 },
-
 	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E1543,
 	  MII_STR_xxMARVELL_E1543 },
 
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E3016,
+	  MII_STR_xxMARVELL_E3016 },
+
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_E3082,
+	  MII_STR_xxMARVELL_E3082 },
+
+	{ MII_OUI_xxMARVELL,		MII_MODEL_xxMARVELL_PHYG65G,
+	  MII_STR_xxMARVELL_PHYG65G },
 	{ 0,				0,
 	  NULL },
 };