From patchwork Sun Nov 17 23:48:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dullfire X-Patchwork-Id: 13877988 Received: from sonic305-3.consmr.mail.bf2.yahoo.com (sonic305-3.consmr.mail.bf2.yahoo.com [74.6.133.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 296A81DE2A7 for ; Sun, 17 Nov 2024 23:49:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.6.133.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731887389; cv=none; b=hZP/pqSIpClPqVi/j/WQwEqt8bgOXBBz7JDZ5BVxKyPIbI5ABNtIvUad9TlhEKQ1zLu2O32eracjF79nN6kNfcysthv9Jx5ANR1hlsV13AWHxHVFXxmOGL+hC0mTosinJTvJj7dXBX01XFsNKQCg44cxpzMAtJ3YUdwwEOhI5Ls= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731887389; c=relaxed/simple; bh=ndMRqcn+KKws7ilHoWeDQsHSfQSicttbOP5PIElctZ4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:References; b=l+Wn5QyjSf00HBSS+MGOIS/HUXyIFLIPz606zuUMEJAyd7m0iNuKgO583yWmWdTxYvGHemaMq1fQRSQbnhWtN3D+GgYmM6Z+99aSZgux0bw3bnpNMcXNDEAOQiEu72YaPzcTlRYT9jFG7p2P1CXTg3nNTlpfquMCVPtpTI+cGgE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=sSe5B5HA; arc=none smtp.client-ip=74.6.133.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="sSe5B5HA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1731887387; bh=xMP8ws5QZc+Aa/3fxPa9Sb2qMMeY8KOXEJOvoTPJWsw=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=sSe5B5HABxjlhCVjJiC0oc1sGFkY8YVmM5X1OOv0GtURAaMCCv6c/qh/y2QrNrN55NabVQwYINHTS4POXr4Cx7+vHjIQrDkTmh6wDdWSMl90dbDYet20DwedqOvkzH8Rr6cJVMNZX80F+gCC+XUx1VQ6ELROsjPHlJYWEIuaym0/k0dmqEfOyayTJ0u0IHip5a0ZSW3A64hZBtE99EhST7wExeMn2r3NA+rEbOxc0YFzRn3wXZteHD9dJmH9K/k+z0qASoMHz7f/wpqtA8ZhctjaoFLrU9haVk2pcuf3sJbqYvOCINtu9YM53Z0Q5GlI6UM+eGAsF+IkQ+XeTyLbZg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1731887387; bh=MnFfQowYQGiExVazeByQxQ5OXvN+T/J8PwkfZsZxEoj=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Iv0kRp7wTnfu4/QW9TgSuVF++49zc/x3WxtiKWxE4y4NSsbq8w2n5RXaEoN7/PooUfbJREPWEIw9232Io1p+8oNtR8+2LWs8bSCmA7Z//WMCYs88wdwY3KbvhIA0dRH/tStjETNP/XmGl8l+sBFs8hjSJS2QQOMYW0/hf2rybkiA3PH66mTzKbW/IMSFap1/WYEOj21Mma7LKUuq3zxcX1C/0riO4EL+ye5EfaIzZxWQNq4N5tvxQEdLygrB5M2lOb0xV7fcB30ePQ8U5Mp8c9u2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Lnt8fGslaVI4_PHjqMc3MBG6cNJvV2XYlOLuZK3M_wd4_rPE.1wrcXzAb9CFS1RtB6 C4df9TMDwcE8SB8C67rPt5UL13MxdtoG13ZkyYd.m1PM4wcCbiybifPOm1zpli.2BdrMn.TH8e6A Q7345fUDAIwhQQtfD8mJnpZTSQEWLybtJFEJwcDP6Scy1tWgfIJo0vTLSUt.2y2TD6J5g8hV5mIq 4W.8Mp_wiFY8Auvr8Vz9Opg5p27L2Ulpkfufum_y8C3lZIU_TqoBt5x6SBf_xenDu9ja.Dic2KC5 B7U14U6MQLNwn7v.1SLrQGQ-- X-Sonic-MF: X-Sonic-ID: ab5668eb-d683-4a14-8b8b-db984e40147b Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.bf2.yahoo.com with HTTP; Sun, 17 Nov 2024 23:49:47 +0000 Received: by hermes--production-ne1-bfc75c9cd-n46s2 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c49c6779fa1a016527bc8d82f3fd465e; Sun, 17 Nov 2024 23:49:43 +0000 (UTC) From: dullfire@yahoo.com To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Bjorn Helgaas , Jacob Keller , Simon Horman , Thomas Gleixner , Mostafa Saleh , Marc Zyngier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Cc: Jonathan Currier Subject: [PATCH 0/2] Fix kernel panic on niu bind Date: Sun, 17 Nov 2024 17:48:41 -0600 Message-ID: <20241117234843.19236-1-dullfire@yahoo.com> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20241117234843.19236-1-dullfire.ref@yahoo.com> From: Jonathan Currier 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