Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/xen move IFNET_UNLOCK() immediatelly after xenn...



details:   https://anonhg.NetBSD.org/src/rev/4fc41bd6bc0b
branches:  trunk
changeset: 971056:4fc41bd6bc0b
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sun Apr 12 13:57:07 2020 +0000

description:
move IFNET_UNLOCK() immediatelly after xennet_stop() call in detach,
doesn't need to be held for the disestablish

diffstat:

 sys/arch/xen/xen/if_xennet_xenbus.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 6ce3bff883c4 -r 4fc41bd6bc0b sys/arch/xen/xen/if_xennet_xenbus.c
--- a/sys/arch/xen/xen/if_xennet_xenbus.c       Sun Apr 12 13:55:06 2020 +0000
+++ b/sys/arch/xen/xen/if_xennet_xenbus.c       Sun Apr 12 13:57:07 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: if_xennet_xenbus.c,v 1.113 2020/04/12 13:55:06 jdolecek Exp $      */
+/*      $NetBSD: if_xennet_xenbus.c,v 1.114 2020/04/12 13:57:07 jdolecek Exp $      */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -81,7 +81,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.113 2020/04/12 13:55:06 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xennet_xenbus.c,v 1.114 2020/04/12 13:57:07 jdolecek Exp $");
 
 #include "opt_xen.h"
 #include "opt_nfs_boot.h"
@@ -413,11 +413,11 @@
        /* stop interface */
        IFNET_LOCK(ifp);
        xennet_stop(ifp, 1);
+       IFNET_UNLOCK(ifp);
        if (sc->sc_ih != NULL) {
                xen_intr_disestablish(sc->sc_ih);
                sc->sc_ih = NULL;
        }
-       IFNET_UNLOCK(ifp);
 
        /* collect any outstanding TX responses */
        mutex_enter(&sc->sc_tx_lock);



Home | Main Index | Thread Index | Old Index