Module Name:    src
Committed By:   msaitoh
Date:           Wed Jun 17 09:11:13 UTC 2020

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe.c

Log Message:
Add missing callout_stop() for recovery_mode_timer.

NOTE: One of the difference between the local_timer and recovery_mode_timer
is that local_timer runs only when IFF_UP and recovery_mode_timer always runs
(it's enabled on attach).


To generate a diff of this commit:
cvs rdiff -u -r1.230 -r1.231 src/sys/dev/pci/ixgbe/ixgbe.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.230 src/sys/dev/pci/ixgbe/ixgbe.c:1.231
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.230	Fri Jun 12 09:28:48 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Jun 17 09:11:13 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.230 2020/06/12 09:28:48 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.231 2020/06/17 09:11:13 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -3593,8 +3593,10 @@ ixgbe_detach(device_t dev, int flags)
 	IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT, ctrl_ext);
 
 	callout_halt(&adapter->timer, NULL);
-	if (adapter->feat_en & IXGBE_FEATURE_RECOVERY_MODE)
+	if (adapter->feat_en & IXGBE_FEATURE_RECOVERY_MODE) {
+		callout_stop(&adapter->recovery_mode_timer);
 		callout_halt(&adapter->recovery_mode_timer, NULL);
+	}
 
 	if (adapter->feat_en & IXGBE_FEATURE_NETMAP)
 		netmap_detach(adapter->ifp);
@@ -3917,6 +3919,8 @@ ixgbe_init_locked(struct adapter *adapte
 	hw->adapter_stopped = FALSE;
 	ixgbe_stop_adapter(hw);
 	callout_stop(&adapter->timer);
+	if (adapter->feat_en & IXGBE_FEATURE_RECOVERY_MODE)
+		callout_stop(&adapter->recovery_mode_timer);
 	for (i = 0, que = adapter->queues; i < adapter->num_queues; i++, que++)
 		que->disabled_count = 0;
 
@@ -4062,6 +4066,9 @@ ixgbe_init_locked(struct adapter *adapte
 	ixgbe_enable_rx_dma(hw, rxctrl);
 
 	callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter);
+	if (adapter->feat_en & IXGBE_FEATURE_RECOVERY_MODE)
+		callout_reset(&adapter->recovery_mode_timer, hz,
+		    ixgbe_recovery_mode_timer, adapter);
 
 	/* Set up MSI/MSI-X routing */
 	if (adapter->feat_en & IXGBE_FEATURE_MSIX) {

Reply via email to