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 Fix long standing bug that 82598 SFP+ pani...



details:   https://anonhg.NetBSD.org/src/rev/d3371a4a820c
branches:  trunk
changeset: 831496:d3371a4a820c
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Apr 02 10:51:35 2018 +0000

description:
Fix long standing bug that 82598 SFP+ panics in ixgbe_handle_mod() because
hw->mac.ops.setup_sfp is NULL. This change is a part of FreeBSD r327031.

diffstat:

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

diffs (22 lines):

diff -r 048fff0e4226 -r d3371a4a820c sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Apr 02 10:44:06 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Apr 02 10:51:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.141 2018/04/02 05:02:55 knakahara Exp $ */
+/* $NetBSD: ixgbe.c,v 1.142 2018/04/02 10:51:35 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -4405,7 +4405,11 @@
                return;
        }
 
-       err = hw->mac.ops.setup_sfp(hw);
+       if (hw->mac.type == ixgbe_mac_82598EB)
+               err = hw->phy.ops.reset(hw);
+       else
+               err = hw->mac.ops.setup_sfp(hw);
+
        if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
                device_printf(dev,
                    "Setup failure - unsupported SFP+ module type.\n");



Home | Main Index | Thread Index | Old Index