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 Add missing core lock in ixgbe_handle_mod().



details:   https://anonhg.NetBSD.org/src/rev/fe27f211ad03
branches:  trunk
changeset: 847445:fe27f211ad03
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Dec 23 09:19:40 2019 +0000

description:
Add missing core lock in ixgbe_handle_mod().

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (47 lines):

diff -r 3d8fc34e4c59 -r fe27f211ad03 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Dec 23 06:45:36 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Dec 23 09:19:40 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.217 2019/12/17 05:49:01 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.218 2019/12/23 09:19:40 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -4608,6 +4608,7 @@
        device_t        dev = adapter->dev;
        u32             err, cage_full = 0;
 
+       IXGBE_CORE_LOCK(adapter);
        ++adapter->mod_sicount.ev_count;
        if (adapter->hw.need_crosstalk_fix) {
                switch (hw->mac.type) {
@@ -4625,14 +4626,14 @@
                }
 
                if (!cage_full)
-                       return;
+                       goto out;
        }
 
        err = hw->phy.ops.identify_sfp(hw);
        if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
                device_printf(dev,
                    "Unsupported SFP+ module type was detected.\n");
-               return;
+               goto out;
        }
 
        if (hw->mac.type == ixgbe_mac_82598EB)
@@ -4643,9 +4644,11 @@
        if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
                device_printf(dev,
                    "Setup failure - unsupported SFP+ module type.\n");
-               return;
+               goto out;
        }
        softint_schedule(adapter->msf_si);
+out:
+       IXGBE_CORE_UNLOCK(adapter);
 } /* ixgbe_handle_mod */
 
 



Home | Main Index | Thread Index | Old Index