Module Name: src
Committed By: rin
Date: Thu Oct 12 04:08:44 UTC 2023
Modified Files:
src/sys/dev/pci/igc: if_igc.c
Log Message:
igc(4): igc_init: Enable interrupt after everything is set up
Inspired by "ixgbe: Enable interrupt after setting IFF_RUNNING.":
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/ixgbe/ixgbe.c#rev1.337
Just for sure, callout_schedule(9) for igc_tick() is also postponed.
This is NFC for now, although.
XXX
Check other drivers.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/igc/if_igc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/igc/if_igc.c
diff -u src/sys/dev/pci/igc/if_igc.c:1.5 src/sys/dev/pci/igc/if_igc.c:1.6
--- src/sys/dev/pci/igc/if_igc.c:1.5 Wed Oct 11 18:19:43 2023
+++ src/sys/dev/pci/igc/if_igc.c Thu Oct 12 04:08:44 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: if_igc.c,v 1.5 2023/10/11 18:19:43 riastradh Exp $ */
+/* $NetBSD: if_igc.c,v 1.6 2023/10/12 04:08:44 rin Exp $ */
/* $OpenBSD: if_igc.c,v 1.13 2023/04/28 10:18:57 bluhm Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.5 2023/10/11 18:19:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.6 2023/10/12 04:08:44 rin Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -1541,17 +1541,17 @@ igc_init_locked(struct igc_softc *sc)
mutex_exit(&rxr->rxr_lock);
}
- igc_enable_intr(sc);
-
sc->sc_core_stopping = false;
- callout_schedule(&sc->sc_tick_ch, hz);
-
ifp->if_flags |= IFF_RUNNING;
/* Save last flags for the callback */
sc->sc_if_flags = ifp->if_flags;
+ callout_schedule(&sc->sc_tick_ch, hz);
+
+ igc_enable_intr(sc);
+
return 0;
}