More switchtec device IDs
Subsystems (3)
Logan Gunthorpe
maintainercover More switchtec device IDs
These patches add some missing device IDs to the PCI quirk and the dmaengine driver. The same device ID was added to the main PCI driver back in commit 5e6c21c56998 ("PCI: switchtec: Add Gen6 Device IDs").
As, like last time, these patches touch both the PCI and the dmaengine tree so I'll humbly suggest that they go through the PCI tree again.
Thanks,
Logan
--
Logan Gunthorpe (2):
dmaengine: switchtec-dma: Add Gen6 secure device IDs
PCI: switchtec: Add Gen6 secure switches to NTB DMA alias quirk
drivers/dma/switchtec_dma.c | 4 ++++ drivers/pci/quirks.c | 4 ++++ 2 files changed, 8 insertions(+)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 --
2.47.3
Logan Gunthorpe
maintainerPATCH 1/2 dmaengine: switchtec-dma: Add Gen6 secure device IDs
Add the device IDs for the Gen6 PFXs and PSXs secure switches (48XG6 and 64XG6) so switchtec-dma binds to their DMA functions.
--- drivers/dma/switchtec_dma.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/dma/switchtec_dma.c +4 -0
@@ -1455,6 +1455,10 @@ static const struct pci_device_id switchtec_dma_pci_tbl[] = {SW_ID (PCI_VENDOR_ID_MICROSEMI ,0x5452 ),/* PSXA 52XG5 */ SW_ID (PCI_VENDOR_ID_MICROSEMI ,0x5436 ),/* PSXA 36XG5 */ SW_ID (PCI_VENDOR_ID_MICROSEMI ,0x5428 ),/* PSXA 28XG5 */ +SW_ID (PCI_VENDOR_ID_MICROSEMI ,0x6064 ),/* PFXs 64XG6 */ +SW_ID (PCI_VENDOR_ID_MICROSEMI ,0x6048 ),/* PFXs 48XG6 */ +SW_ID (PCI_VENDOR_ID_MICROSEMI ,0x6164 ),/* PSXs 64XG6 */ +SW_ID (PCI_VENDOR_ID_MICROSEMI ,0x6148 ),/* PSXs 48XG6 */ SW_ID (PCI_VENDOR_ID_EFAR ,0x1001 ),/* PCI1001 16XG4 */ SW_ID (PCI_VENDOR_ID_EFAR ,0x1002 ),/* PCI1002 16XG4 */ SW_ID(PCI_VENDOR_ID_EFAR, 0x1003), /* PCI1003 16XG4 */
Signature · 1 line
2.47.3
[email protected]
AI reviewRe: [PATCH 1/2] dmaengine: switchtec-dma: Add Gen6 secure device IDs
Sashiko has reviewed this patch and found no issues.
Quoted 5 lines
Add the device IDs for the Gen6 PFXs and PSXs secure switches (48XG6 and 64XG6) so switchtec-dma binds to their DMA functions.
Based-on-a-patch-by Kelvin Cao <[email protected]>Signed-off-by Logan Gunthorpe <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Logan Gunthorpe
maintainerPATCH 2/2 PCI: switchtec: Add Gen6 secure switches to NTB DMA alias quirk
In reply to Logan GunthorpeAdd the Gen6 PFXs and PSXs secure switch device IDs (48XG6 and 64XG6) to the quirk_switchtec_ntb_dma_alias PCI fixup table. Without them, DMA transactions from these switches' NTB function are not given the correct requester ID alias, which can misdirect them under an IOMMU.
--- drivers/pci/quirks.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/pci/quirks.c +4 -0
@@ -6250,6 +6250,10 @@ SWITCHTEC_QUIRK(0x5568); /* PAXA 68XG5 */SWITCHTEC_QUIRK (0x5552 );/* PAXA 52XG5 */ SWITCHTEC_QUIRK (0x5536 );/* PAXA 36XG5 */ SWITCHTEC_QUIRK (0x5528 );/* PAXA 28XG5 */ +SWITCHTEC_QUIRK (0x6064 );/* PFXs 64XG6 */ +SWITCHTEC_QUIRK (0x6048 );/* PFXs 48XG6 */ +SWITCHTEC_QUIRK (0x6164 );/* PSXs 64XG6 */ +SWITCHTEC_QUIRK (0x6148 );/* PSXs 48XG6 */ #define SWITCHTEC_PCI100X_QUIRK (vid) \ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_EFAR, vid, \
Signature · 1 line
2.47.3
[email protected]
AI reviewRe: [PATCH 2/2] PCI: switchtec: Add Gen6 secure switches to NTB DMA alias quirk
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] PCI: switchtec: missing Gen6 device IDs in quirk_switchtec_ntb_dma_alias() --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] PCI: switchtec: missing Gen6 device IDs in quirk_switchtec_ntb_dma_alias() --
commit 17094c1753a87a229df82238fb75b9bb1b5728fe
Author: Logan Gunthorpe <[email protected]>
PCI: switchtec: Add Gen6 secure switches to NTB DMA alias quirk
This commit adds four Gen6 PFXs and PSXs secure switch device IDs to the quirk_switchtec_ntb_dma_alias() PCI fixup table so NTB DMA transactions receive the proper requester ID alias under an IOMMU.
drivers/pci/quirks.c SWITCHTEC_QUIRK(0x5568); /* PAXA 68XG5 */ · line 6256
Quoted 12 lines
drivers/pci/quirks.c +4
-0@@ -6250,6 +6250,10 @@ SWITCHTEC_QUIRK(0x5568); /* PAXA 68XG5 */SWITCHTEC_QUIRK (0x5552 );/* PAXA 52XG5 */ SWITCHTEC_QUIRK (0x5536 );/* PAXA 36XG5 */ SWITCHTEC_QUIRK (0x5528 );/* PAXA 28XG5 */ +SWITCHTEC_QUIRK (0x6064 );/* PFXs 64XG6 */ +SWITCHTEC_QUIRK (0x6048 );/* PFXs 48XG6 */ +SWITCHTEC_QUIRK (0x6164 );/* PSXs 64XG6 */ +SWITCHTEC_QUIRK (0x6148 );/* PSXs 48XG6 */
[Severity: Medium]
Should the remaining 12 Gen6 Switchtec device IDs from switchtec_pci_tbl in drivers/pci/switch/switchtec.c also be added to SWITCHTEC_QUIRK() here?
Commit 5e6c21c56998 ("PCI: switchtec: Add Gen6 Device IDs") added all 16 Gen6 Switchtec device IDs to switchtec_pci_tbl via SWITCHTEC_PCI_DEVICE(..., SWITCHTEC_GEN6), which binds both PCI_CLASS_MEMORY_OTHER and the NTB endpoint class PCI_CLASS_BRIDGE_OTHER:
drivers/pci/switch/switchtec.c:switchtec_pci_tbl[] = {
...
SWITCHTEC_PCI_DEVICE(0x6048, SWITCHTEC_GEN6), /* PFXs 48XG6 */
SWITCHTEC_PCI_DEVICE(0x6064, SWITCHTEC_GEN6), /* PFXs 64XG6 */
SWITCHTEC_PCI_DEVICE(0x6044, SWITCHTEC_GEN6), /* PFXs 144XG6 */
SWITCHTEC_PCI_DEVICE(0x6060, SWITCHTEC_GEN6), /* PFXs 160XG6 */
SWITCHTEC_PCI_DEVICE(0x6148, SWITCHTEC_GEN6), /* PSXs 48XG6 */
SWITCHTEC_PCI_DEVICE(0x6164, SWITCHTEC_GEN6), /* PSXs 64XG6 */
SWITCHTEC_PCI_DEVICE(0x6144, SWITCHTEC_GEN6), /* PSXs 144XG6 */
SWITCHTEC_PCI_DEVICE(0x6160, SWITCHTEC_GEN6), /* PSXs 160XG6 */
SWITCHTEC_PCI_DEVICE(0x6248, SWITCHTEC_GEN6), /* PFX 48XG6 */
SWITCHTEC_PCI_DEVICE(0x6264, SWITCHTEC_GEN6), /* PFX 64XG6 */
SWITCHTEC_PCI_DEVICE(0x6244, SWITCHTEC_GEN6), /* PFX 144XG6 */
SWITCHTEC_PCI_DEVICE(0x6260, SWITCHTEC_GEN6), /* PFX 160XG6 */
SWITCHTEC_PCI_DEVICE(0x6348, SWITCHTEC_GEN6), /* PSX 48XG6 */
SWITCHTEC_PCI_DEVICE(0x6364, SWITCHTEC_GEN6), /* PSX 64XG6 */
SWITCHTEC_PCI_DEVICE(0x6344, SWITCHTEC_GEN6), /* PSX 144XG6 */
SWITCHTEC_PCI_DEVICE(0x6360, SWITCHTEC_GEN6), /* PSX 160XG6 */
...
};Every Gen3, Gen4, Gen5, and PCI100x device ID in switchtec_pci_tbl has a matching SWITCHTEC_QUIRK() or SWITCHTEC_PCI100X_QUIRK() entry in drivers/pci/quirks.c for PCI_CLASS_BRIDGE_OTHER.
Without entries for the other four Gen6 PFXs/PSXs secure switch IDs (0x6044, 0x6060, 0x6144, 0x6160) and the eight non-secure Gen6 PFX/PSX switch IDs (0x6248, 0x6264, 0x6244, 0x6260, 0x6348, 0x6364, 0x6344, 0x6360), will quirk_switchtec_ntb_dma_alias() fail to run during PCI enumeration for those models, leaving their NTB proxy requester IDs unaliased under an IOMMU?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Bjorn Helgaas
AppliedQuoted 14 lines · Logan Gunthorpe
These patches add some missing device IDs to the PCI quirk and the dmaengine driver. The same device ID was added to the main PCI driver back in commit
5e6c21c56998("PCI: switchtec: Add Gen6 Device IDs").As, like last time, these patches touch both the PCI and the dmaengine tree so I'll humbly suggest that they go through the PCI tree again.
Thanks,
Logan
--
Quoted 7 lines
Logan Gunthorpe (2):
dmaengine: switchtec-dma: Add Gen6 secure device IDs
PCI: switchtec: Add Gen6 secure switches to NTB DMA alias quirkdrivers/dma/switchtec_dma.c | 4 ++++ drivers/pci/quirks.c | 4 ++++ 2 files changed, 8 insertions(+)
Applied to pci/switchtec for v7.5, thanks!