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 disable preemption while scheduling the so...



details:   https://anonhg.NetBSD.org/src/rev/7b44afc876b3
branches:  trunk
changeset: 336013:7b44afc876b3
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Feb 07 00:02:09 2015 +0000

description:
disable preemption while scheduling the softint to configure the link.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r e5a293bc130b -r 7b44afc876b3 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Fri Feb 06 22:24:15 2015 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Sat Feb 07 00:02:09 2015 +0000
@@ -59,7 +59,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 /*$FreeBSD: src/sys/dev/ixgbe/ixgbe.c,v 1.51 2011/04/25 23:34:21 jfv Exp $*/
-/*$NetBSD: ixgbe.c,v 1.18 2015/02/04 09:05:53 msaitoh Exp $*/
+/*$NetBSD: ixgbe.c,v 1.19 2015/02/07 00:02:09 christos Exp $*/
 
 #include "opt_inet.h"
 
@@ -2710,13 +2710,19 @@
        sfp = ixgbe_is_sfp(hw);
 
        if (sfp) { 
+               void *ip;
+
                if (hw->phy.multispeed_fiber) {
                        hw->mac.ops.setup_sfp(hw);
                        ixgbe_enable_tx_laser(hw);
-                       softint_schedule(adapter->msf_si);
+                       ip = adapter->msf_si;
                } else {
-                       softint_schedule(adapter->mod_si);
+                       ip = adapter->mod_si;
                }
+
+               kpreempt_disable();
+               softint_schedule(ip);
+               kpreempt_enable();
        } else {
                if (hw->mac.ops.check_link)
                        err = ixgbe_check_link(hw, &autoneg,



Home | Main Index | Thread Index | Old Index