Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/ixgbe On device which has SFP(+) cage and a modu...



details:   https://anonhg.NetBSD.org/src/rev/0179cfee1aa2
branches:  trunk
changeset: 827696:0179cfee1aa2
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Nov 09 09:33:28 2017 +0000

description:
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.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r eaef382d607e -r 0179cfee1aa2 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Nov 09 08:34:50 2017 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Nov 09 09:33:28 2017 +0000
@@ -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 @@
                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;



Home | Main Index | Thread Index | Old Index