Source-Changes archive

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

CVS commit: src/sys/dev/pci/ixgbe



Module Name:    src
Committed By:   knakahara
Date:           Tue Nov 17 04:50:29 UTC 2020

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

Log Message:
Add new spin mutex to avoid race between ixgbe_msix_admin() and ixgbe_handle_admin().

At first, it seems "IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_OTHER)"
cannot stop interrupts, because 31th bit is reserved for 82598, 82599,
X540 and X550.  So, the current following design
    (1) ixgbe_msix_admin() disables interrupts
    (2) ixgbe_msix_admin() calls workqueue_enqueue() for ixgbe_handle_admin()
    (3) ixgbe_handle_admin() does interrupt processing
    (4) after ixgbe_handle_admin() has done all interrupt processings,
        ixgbe_handle_admin() enables interrupts
does not work correctly, that is, interrupts can be lost while
ixgbe_handle_admin() is running.

To fix that, add new spin mutex(adapter->admmin_mtx) which protects
atomically the following two members.
    - adapter->admin_pending
    - adapter->task_requests

The unnecessary "IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_EIMC_OTHER)"
code will be removed later.

Reviewed and tested by hikaru@n.o and msaitoh@n.o, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.259 -r1.260 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index