git: 57d879534096 - stable/13 - igc: Remove a bogus register write in igc_if_queues_free()

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Sat, 02 Nov 2024 14:29:53 UTC
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=57d879534096d8b49d0e6ba72dae1783e9a1cccc

commit 57d879534096d8b49d0e6ba72dae1783e9a1cccc
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-10-26 21:04:59 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-11-02 14:29:46 +0000

    igc: Remove a bogus register write in igc_if_queues_free()
    
    As explained in PR 277038, iflib calls IFDI_DETACH() and then
    IFDI_QUEUES_FREE().  With igc, the latter writes to a register after it
    has been unmapped.
    
    igc_if_detach() already calls igc_release_hw_control(), and looking at
    callers of igc_if_queues_free(), that appears to be sufficient.  So,
    just remove the igc_release_hw_control() call.
    
    PR:             277038
    Reported by:    Mike Belanger <mibelanger@qnx.com>
    Reviewed by:    kbowling
    Tested by:      kbowling
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D47293
    
    (cherry picked from commit 35d05a14ed7e9935be1ed0fe965b91aaaa4c92ef)
---
 sys/dev/igc/if_igc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c
index 1daec6e09694..5851b715b932 100644
--- a/sys/dev/igc/if_igc.c
+++ b/sys/dev/igc/if_igc.c
@@ -2051,8 +2051,6 @@ igc_if_queues_free(if_ctx_t ctx)
 		sc->rx_queues = NULL;
 	}
 
-	igc_release_hw_control(sc);
-
 	if (sc->mta != NULL) {
 		free(sc->mta, M_DEVBUF);
 	}