Patch "igb: Allocate MSI-X vector when testing" has been added to the 4.9-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    igb: Allocate MSI-X vector when testing

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     igb-allocate-msi-x-vector-when-testing.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1129559461e417ae8f91a18bdd964a82591c80f5
Author: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>
Date:   Fri Nov 25 22:30:31 2022 +0900

    igb: Allocate MSI-X vector when testing
    
    [ Upstream commit 28e96556baca7056d11d9fb3cdd0aba4483e00d8 ]
    
    Without this change, the interrupt test fail with MSI-X environment:
    
    $ sudo ethtool -t enp0s2 offline
    [   43.921783] igb 0000:00:02.0: offline testing starting
    [   44.855824] igb 0000:00:02.0 enp0s2: igb: enp0s2 NIC Link is Down
    [   44.961249] igb 0000:00:02.0 enp0s2: igb: enp0s2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
    [   51.272202] igb 0000:00:02.0: testing shared interrupt
    [   56.996975] igb 0000:00:02.0 enp0s2: igb: enp0s2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
    The test result is FAIL
    The test extra info:
    Register test  (offline)         0
    Eeprom test    (offline)         0
    Interrupt test (offline)         4
    Loopback test  (offline)         0
    Link test   (on/offline)         0
    
    Here, "4" means an expected interrupt was not delivered.
    
    To fix this, route IRQs correctly to the first MSI-X vector by setting
    IVAR_MISC. Also, set bit 0 of EIMS so that the vector will not be
    masked. The interrupt test now runs properly with this change:
    
    $ sudo ethtool -t enp0s2 offline
    [   42.762985] igb 0000:00:02.0: offline testing starting
    [   50.141967] igb 0000:00:02.0: testing shared interrupt
    [   56.163957] igb 0000:00:02.0 enp0s2: igb: enp0s2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
    The test result is PASS
    The test extra info:
    Register test  (offline)         0
    Eeprom test    (offline)         0
    Interrupt test (offline)         0
    Loopback test  (offline)         0
    Link test   (on/offline)         0
    
    Fixes: 4eefa8f01314 ("igb: add single vector msi-x testing to interrupt test")
    Signed-off-by: Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>
    Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
    Tested-by: Gurucharan G <gurucharanx.g@xxxxxxxxx> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index b02e262ed76a..fa23c93ef740 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -1401,6 +1401,8 @@ static int igb_intr_test(struct igb_adapter *adapter, u64 *data)
 			*data = 1;
 			return -1;
 		}
+		wr32(E1000_IVAR_MISC, E1000_IVAR_VALID << 8);
+		wr32(E1000_EIMS, BIT(0));
 	} else if (adapter->flags & IGB_FLAG_HAS_MSI) {
 		shared_int = false;
 		if (request_irq(irq,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux