Module Name:    src
Committed By:   msaitoh
Date:           Thu Nov  9 09:33:28 UTC 2017

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
 On device which has SFP(+) cage and a module is inserted, hw->phy.id is not
MII PHY id but SFF 8024 ID. So checking hw->phy.id with 0 doesn't work.
Print PHY ID only for copper PHY.


To generate a diff of this commit:
cvs rdiff -u -r1.109 -r1.110 src/sys/dev/pci/ixgbe/ixgbe.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.109 src/sys/dev/pci/ixgbe/ixgbe.c:1.110
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.109	Thu Nov  2 08:41:15 2017
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Nov  9 09:33:28 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.109 2017/11/02 08:41:15 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.110 2017/11/09 09:33:28 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -1069,7 +1069,11 @@ ixgbe_attach(device_t parent, device_t d
 		break;
 	}
 
-	if (hw->phy.id != 0) {
+	/*
+	 *  Print PHY ID only for copper PHY. On device which has SFP(+) cage
+	 * and a module is inserted, phy.id is not MII PHY id but SFF 8024 ID.
+	 */
+	if (hw->phy.media_type == ixgbe_media_type_copper) {
 		uint16_t id1, id2;
 		int oui, model, rev;
 		const char *descr;

Reply via email to