From Chocolate Sheep, 1 Week ago, written in Plain Text.
This paste will run down the curtain in 2 Weeks.
Embed
  1.  There are a few paths for e1000_down to be called in e1000 where RTNL is
  2.     not currently being held:
  3.       - e1000_shutdown (pci shutdown)
  4.       - e1000_suspend (power management)
  5.       - e1000_reinit_locked (via e1000_reset_task delayed work)
  6.       - e1000_io_error_detected (via pci error handler)
  7.    
  8.     Hold RTNL in three places to fix this issue:
  9.       - e1000_reset_task: igc, igb, and e100e all hold rtnl in this path.
  10.       - e1000_io_error_detected (pci error handler): e1000e and ixgbe hold
  11.         rtnl in this path. A patch has been posted for igc to do the same
  12.         [1].
  13.       - __e1000_shutdown (which is called from both e1000_shutdown and
  14.         e1000_suspend): igb, ixgbe, and e1000e all hold rtnl in the same
  15.         path.
  16.    
  17.     The other paths which call e1000_down seemingly hold RTNL and are OK:
  18.       - e1000_close (ndo_stop)
  19.       - e1000_change_mtu (ndo_change_mtu)
  20.      
  21.      
  22.      
  23.         Intel Wired LAN Driver Updates 2024-10-08 (ice, iavf, igb, e1000e, e1000)
  24.    
  25.     This series contains updates to ice, iavf, igb, e1000e, and e1000
  26.     drivers.
  27.    
  28.     For ice:
  29.    
  30.     Wojciech adds support for ethtool reset.
  31.    
  32.     Paul adds support for hardware based VF mailbox limits for E830 devices.
  33.    
  34.     Jake adjusts to a common iterator in ice_vc_cfg_qs_msg() and moves
  35.     storing of max_frame and rx_buf_len from VSI struct to the ring
  36.     structure.
  37.    
  38.     Hongbo Li uses assign_bit() to replace an open-coded instance.
  39.    
  40.     Markus Elfring adjusts a couple of PTP error paths to use a common,
  41.     shared exit point.
  42.    
  43.     Yue Haibing removes unused declarations.
  44.    
  45.     For iavf:
  46.    
  47.     Yue Haibing removes unused declarations.
  48.    
  49.     For igb:
  50.    
  51.     Yue Haibing removes unused declarations.
  52.    
  53.     For e1000e:
  54.    
  55.     Takamitsu Iwai removes unneccessary writel() calls.
  56.    
  57.     Joe Damato adds support for netdev-genl support to query IRQ, NAPI,
  58.     and queue information.
  59.    
  60.     For e1000:
  61.    
  62.     Joe Damato adds support for netdev-genl support to query IRQ, NAPI,
  63.     and queue information.
  64.    
  65.     * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue:
  66.       e1000: Link NAPI instances to queues and IRQs
  67.       e1000e: Link NAPI instances to queues and IRQs
  68.       e1000e: Remove duplicated writel() in e1000_configure_tx/rx()
  69.       igb: Cleanup unused declarations
  70.       iavf: Remove unused declarations
  71.       ice: Cleanup unused declarations
  72.       ice: Use common error handling code in two functions
  73.       ice: Make use of assign_bit() API
  74.       ice: store max_frame and rx_buf_len only in ice_rx_ring
  75.       ice: consistently use q_idx in ice_vc_cfg_qs_msg()
  76.       ice: add E830 HW VF mailbox message limit support
  77.       ice: Implement ethtool reset support
  78.     ====================
  79.    
  80.    
  81.    
  82.      e1000e: Link NAPI instances to queues and IRQs
  83.    
  84.     Add support for netdev-genl, allowing users to query IRQ, NAPI, and queue
  85.     information.
  86.    
  87.     After this patch is applied, note the IRQs assigned to my NIC:
  88.    
  89.     $ cat /proc/interrupts | grep ens | cut -f1 --delimiter=':'
  90.      50
  91.      51
  92.      52
  93.    
  94.     While e1000e allocates 3 IRQs (RX, TX, and other), it looks like e1000e
  95.     only has a single NAPI, so I've associated the NAPI with the RX IRQ (50
  96.     on my system, seen above).
  97.    
  98.    
  99.    
  100.      e1000e: Remove duplicated writel() in e1000_configure_tx/rx()
  101.    
  102.     Duplicated register initialization codes exist in e1000_configure_tx()
  103.     and e1000_configure_rx().
  104.    
  105.     For example, writel(0, tx_ring->head) writes 0 to tx_ring->head, which
  106.     is adapter->hw.hw_addr + E1000_TDH(0).
  107.    
  108.     This initialization is already done in ew32(TDH(0), 0).
  109.    
  110.     ew32(TDH(0), 0) is equivalent to __ew32(hw, E1000_TDH(0), 0). It
  111.     executes writel(0, hw->hw_addr + E1000_TDH(0)). Since variable hw is
  112.     set to &adapter->hw, it is equal to writel(0, tx_ring->head).
  113.    
  114.     We can remove similar four writel() in e1000_configure_tx() and
  115.     e1000_configure_rx().
  116.    
  117.     commit 0845d45e900c ("e1000e: Modify Tx/Rx configurations to avoid
  118.     null pointer dereferences in e1000_open") has introduced these
  119.     writel(). This commit moved register writing to
  120.     e1000_configure_tx/rx(), and as result, it caused duplication in
  121.     e1000_configure_tx/rx().
  122.    
  123.     This patch modifies the sequence of register writing, but removing
  124.     these writes is safe because the same writes were already there before
  125.     the commit.
  126.    
  127.     I also have checked the datasheets [0] [1] and have not found any
  128.     description that we need to write RDH, RDT, TDH and TDT registers
  129.     twice at initialization. Furthermore, we have tested this patch on an
  130.     I219-V device physically.
  131.    
  132.    
  133.    
  134.    
  135.    
captcha