@@ -4787,14 +4787,13 @@ static void quirk_switchtec_ntb_dma_alias(struct pci_dev *pdev)
pci_info(pdev, "Setting Switchtec proxy ID aliases\n");
mmio_ntb = mmio + SWITCHTEC_GAS_NTB_OFFSET;
- mmio_ctrl = (void * __iomem) mmio_ntb + SWITCHTEC_NTB_REG_CTRL_OFFSET;
+ mmio_ctrl = (void __iomem *) mmio_ntb + SWITCHTEC_NTB_REG_CTRL_OFFSET;
mmio_sys_info = mmio + SWITCHTEC_GAS_SYS_INFO_OFFSET;
partition = ioread8(&mmio_ntb->partition_id);
- partition_map = (u64) ioread32((void * __iomem) &mmio_ntb->ep_map);
- partition_map |=
- ((u64) ioread32((void * __iomem) &mmio_ntb->ep_map + 4)) << 32;
+ partition_map = ioread32(&mmio_ntb->ep_map);
+ partition_map |= ((u64) ioread32(&mmio_ntb->ep_map + 4)) << 32;
partition_map &= ~(1ULL << partition);
for (pp = 0; pp < (sizeof(partition_map) * 8); pp++) {
@@ -4829,7 +4828,7 @@ static void quirk_switchtec_ntb_dma_alias(struct pci_dev *pdev)
rid_entry = ioread32(&mmio_peer_ctrl->req_id_table[te]);
devfn = (rid_entry >> 1) & 0xFF;
pci_dbg(pdev,
- "Aliasing Partition %d Proxy ID %02d.%d\n",
+ "Aliasing Partition %d Proxy ID %02x.%d\n",
pp, PCI_SLOT(devfn), PCI_FUNC(devfn));
pci_add_dma_alias(pdev, devfn);
}
@@ -4838,115 +4837,59 @@ static void quirk_switchtec_ntb_dma_alias(struct pci_dev *pdev)
pci_iounmap(pdev, mmio);
pci_disable_device(pdev);
}
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFX24XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFX32XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFX48XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFX64XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFX80XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFX96XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PSX48XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PSX64XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PSX80XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PSX96XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PAX24XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PAX32XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PAX48XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PAX64XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PAX80XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PAX96XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXL24XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXL32XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXL48XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXL64XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXL80XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXL96XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXI24XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXI32XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXI48XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXI64XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXI80XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
-DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_MICROSEMI,
- PCI_DEVICE_ID_MICROSEMI_PFXI96XG3,
- PCI_CLASS_BRIDGE_OTHER, 8,
- quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8531,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8532,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8533,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8534,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8535,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8536,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8543,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8544,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8545,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8546,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8551,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8552,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8553,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8554,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8555,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8556,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8561,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8562,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8563,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8564,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8565,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8566,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8571,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8572,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8573,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8574,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8575,
+ quirk_switchtec_ntb_dma_alias);
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MICROSEMI, 0x8576,
+ quirk_switchtec_ntb_dma_alias);
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Microsemi Switchtec(tm) PCIe Management Driver
* Copyright (c) 2017, Microsemi Corporation
@@ -1668,6 +1668,7 @@
#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112
#define PCI_VENDOR_ID_PMC_Sierra 0x11f8
+#define PCI_VENDOR_ID_MICROSEMI 0x11f8
#define PCI_VENDOR_ID_RP 0x11fe
#define PCI_DEVICE_ID_RP32INTF 0x0001
@@ -3082,36 +3083,4 @@
#define PCI_VENDOR_ID_OCZ 0x1b85
-#define PCI_VENDOR_ID_MICROSEMI 0x11f8
-#define PCI_DEVICE_ID_MICROSEMI_PFX24XG3 0x8531
-#define PCI_DEVICE_ID_MICROSEMI_PFX32XG3 0x8532
-#define PCI_DEVICE_ID_MICROSEMI_PFX48XG3 0x8533
-#define PCI_DEVICE_ID_MICROSEMI_PFX64XG3 0x8534
-#define PCI_DEVICE_ID_MICROSEMI_PFX80XG3 0x8535
-#define PCI_DEVICE_ID_MICROSEMI_PFX96XG3 0x8536
-#define PCI_DEVICE_ID_MICROSEMI_PSX24XG3 0x8541
-#define PCI_DEVICE_ID_MICROSEMI_PSX32XG3 0x8542
-#define PCI_DEVICE_ID_MICROSEMI_PSX48XG3 0x8543
-#define PCI_DEVICE_ID_MICROSEMI_PSX64XG3 0x8544
-#define PCI_DEVICE_ID_MICROSEMI_PSX80XG3 0x8545
-#define PCI_DEVICE_ID_MICROSEMI_PSX96XG3 0x8546
-#define PCI_DEVICE_ID_MICROSEMI_PAX24XG3 0x8551
-#define PCI_DEVICE_ID_MICROSEMI_PAX32XG3 0x8552
-#define PCI_DEVICE_ID_MICROSEMI_PAX48XG3 0x8553
-#define PCI_DEVICE_ID_MICROSEMI_PAX64XG3 0x8554
-#define PCI_DEVICE_ID_MICROSEMI_PAX80XG3 0x8555
-#define PCI_DEVICE_ID_MICROSEMI_PAX96XG3 0x8556
-#define PCI_DEVICE_ID_MICROSEMI_PFXL24XG3 0x8561
-#define PCI_DEVICE_ID_MICROSEMI_PFXL32XG3 0x8562
-#define PCI_DEVICE_ID_MICROSEMI_PFXL48XG3 0x8563
-#define PCI_DEVICE_ID_MICROSEMI_PFXL64XG3 0x8564
-#define PCI_DEVICE_ID_MICROSEMI_PFXL80XG3 0x8565
-#define PCI_DEVICE_ID_MICROSEMI_PFXL96XG3 0x8566
-#define PCI_DEVICE_ID_MICROSEMI_PFXI24XG3 0x8571
-#define PCI_DEVICE_ID_MICROSEMI_PFXI32XG3 0x8572
-#define PCI_DEVICE_ID_MICROSEMI_PFXI48XG3 0x8573
-#define PCI_DEVICE_ID_MICROSEMI_PFXI64XG3 0x8574
-#define PCI_DEVICE_ID_MICROSEMI_PFXI80XG3 0x8575
-#define PCI_DEVICE_ID_MICROSEMI_PFXI96XG3 0x8576
-
#endif /* _LINUX_PCI_IDS_H */