netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: dullfire@yahoo.com
To: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Simon Horman <horms@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Mostafa Saleh <smostafa@google.com>,
	Marc Zyngier <maz@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org
Cc: Jonathan Currier <dullfire@yahoo.com>
Subject: [PATCH 0/2] Fix kernel panic on niu bind
Date: Sun, 17 Nov 2024 17:48:41 -0600	[thread overview]
Message-ID: <20241117234843.19236-1-dullfire@yahoo.com> (raw)
In-Reply-To: 20241117234843.19236-1-dullfire.ref@yahoo.com

From: Jonathan Currier <dullfire@yahoo.com>

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@yahoo.com/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


       reply	other threads:[~2024-11-17 23:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20241117234843.19236-1-dullfire.ref@yahoo.com>
2024-11-17 23:48 ` dullfire [this message]
2024-11-17 23:48   ` [PATCH 1/2] PCI/MSI: Add MSIX option to write to ENTRY_DATA before any reads dullfire
2024-11-21  8:55     ` Paolo Abeni
2024-11-21  9:22       ` Dullfire
2024-11-21 10:28         ` Paolo Abeni
2025-01-20 12:38           ` Dullfire
2025-04-14 16:22             ` Dullfire
2025-04-14 19:52               ` Thomas Gleixner
2024-11-17 23:48   ` [PATCH 2/2] net/niu: niu requires MSIX ENTRY_DATA fields touch before entry reads dullfire

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241117234843.19236-1-dullfire@yahoo.com \
    --to=dullfire@yahoo.com \
    --cc=bhelgaas@google.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=smostafa@google.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).