[PATCH 0/2] Fix kernel panic on niu bind

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

 



From: Jonathan Currier <dullfire@xxxxxxxxx>

Currently, the niu module causes a fatal trap (tested on SPARC system)
when setting up it's MSIX interrupt vectors. A simple write to each
MSIX's vector table entries' ENTRY_DATA register is sufficient to work
around the issue for the current power cycle (note: this means booting a
working kernel, and then rebooting without power cycling will allow a
kernel without this fix to boot and work).

This series implements a struct pci_dev flag indicating ENTRY_DATA must be
written to before reads, and then sets the flag in the niu driver.

This series is based off of and tested on v6.11.5. 

Testing on next-20241115 was also done successfully with the following
caveats: On my test case (SPARC T2),
commit 03cfe0e05650 ("PCI/pwrctl: Ensure that the pwrctl drivers are probed before the PCI client drivers")
prevented all PCIe drivers from binding, including niu.
For my test case I disabled 03cfe0e05650's device_link_add().

Original mailing list discussion:
Link: https://lore.kernel.org/sparclinux/7de14cca-e2fa-49f7-b83e-5f8322cc9e56@xxxxxxxxx/T/

Jonathan Currier (2):
  PCI/MSI: Add MSIX option to write to ENTRY_DATA before any reads
  net/niu: niu requires MSIX ENTRY_DATA fields touch before entry reads

 drivers/net/ethernet/sun/niu.c | 2 ++
 drivers/pci/msi/msi.c          | 2 ++
 include/linux/pci.h            | 2 ++
 3 files changed, 6 insertions(+)


base-commit: 05b1367d372aca98a4e09c1a0e7ff0b9d721b2bc
-- 
2.45.2





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux