Merge tag 'pci-v4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Dec 2016 20:46:48 +0000 (12:46 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Dec 2016 20:46:48 +0000 (12:46 -0800)
Pull PCI updates from Bjorn Helgaas:
 "PCI changes:

   - add support for PCI on ARM64 boxes with ACPI. We already had this
     for theoretical spec-compliant hardware; now we're adding quirks
     for the actual hardware (Cavium, HiSilicon, Qualcomm, X-Gene)

   - add runtime PM support for hotplug ports

   - enable runtime suspend for Intel UHCI that uses platform-specific
     wakeup signaling

   - add yet another host bridge registration interface. We hope this is
     extensible enough to subsume the others

   - expose device revision in sysfs for DRM

   - to avoid device conflicts, make sure any VF BAR updates are done
     before enabling the VF

   - avoid unnecessary link retrains for ASPM

   - allow INTx masking on Mellanox devices that support it

   - allow access to non-standard VPD for Chelsio devices

   - update Broadcom iProc support for PAXB v2, PAXC v2, inbound DMA,
     etc

   - update Rockchip support for max-link-speed

   - add NVIDIA Tegra210 support

   - add Layerscape LS1046a support

   - update R-Car compatibility strings

   - add Qualcomm MSM8996 support

   - remove some uninformative bootup messages"

* tag 'pci-v4.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (115 commits)
  PCI: Enable access to non-standard VPD for Chelsio devices (cxgb3)
  PCI: Expand "VPD access disabled" quirk message
  PCI: pciehp: Remove loading message
  PCI: hotplug: Remove hotplug core message
  PCI: Remove service driver load/unload messages
  PCI/AER: Log AER IRQ when claiming Root Port
  PCI/AER: Log errors with PCI device, not PCIe service device
  PCI/AER: Remove unused version macros
  PCI/PME: Log PME IRQ when claiming Root Port
  PCI/PME: Drop unused support for PMEs from Root Complex Event Collectors
  PCI: Move config space size macros to pci_regs.h
  x86/platform/intel-mid: Constify mid_pci_platform_pm
  PCI/ASPM: Don't retrain link if ASPM not possible
  PCI: iproc: Skip check for legacy IRQ on PAXC buses
  PCI: pciehp: Leave power indicator on when enabling already-enabled slot
  PCI: pciehp: Prioritize data-link event over presence detect
  PCI: rcar: Add gen3 fallback compatibility string for pcie-rcar
  PCI: rcar: Use gen2 fallback compatibility last
  PCI: rcar-gen2: Use gen2 fallback compatibility last
  PCI: rockchip: Move the deassert of pm/aclk/pclk after phy_init()
  ..

1  2 
drivers/net/ethernet/mellanox/mlx4/main.c
drivers/pci/msi.c
drivers/pci/pci-mid.c
drivers/pci/probe.c
drivers/vfio/pci/vfio_pci_config.c
include/linux/acpi.h
include/linux/pci.h
include/linux/pci_ids.h

@@@ -1102,14 -1102,6 +1102,14 @@@ static int __set_port_type(struct mlx4_
        int i;
        int err = 0;
  
 +      if ((port_type & mdev->caps.supported_type[info->port]) != port_type) {
 +              mlx4_err(mdev,
 +                       "Requested port type for port %d is not supported on this HCA\n",
 +                       info->port);
 +              err = -EINVAL;
 +              goto err_sup;
 +      }
 +
        mlx4_stop_sense(mdev);
        mutex_lock(&priv->port_mutex);
        info->tmp_type = port_type;
  out:
        mlx4_start_sense(mdev);
        mutex_unlock(&priv->port_mutex);
 -
 +err_sup:
        return err;
  }
  
@@@ -4020,49 -4012,51 +4020,51 @@@ int mlx4_restart_one(struct pci_dev *pd
        return err;
  }
  
+ #define MLX_SP(id) { PCI_VDEVICE(MELLANOX, id), MLX4_PCI_DEV_FORCE_SENSE_PORT }
+ #define MLX_VF(id) { PCI_VDEVICE(MELLANOX, id), MLX4_PCI_DEV_IS_VF }
+ #define MLX_GN(id) { PCI_VDEVICE(MELLANOX, id), 0 }
  static const struct pci_device_id mlx4_pci_table[] = {
-       /* MT25408 "Hermon" SDR */
-       { PCI_VDEVICE(MELLANOX, 0x6340), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT25408 "Hermon" DDR */
-       { PCI_VDEVICE(MELLANOX, 0x634a), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT25408 "Hermon" QDR */
-       { PCI_VDEVICE(MELLANOX, 0x6354), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT25408 "Hermon" DDR PCIe gen2 */
-       { PCI_VDEVICE(MELLANOX, 0x6732), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT25408 "Hermon" QDR PCIe gen2 */
-       { PCI_VDEVICE(MELLANOX, 0x673c), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT25408 "Hermon" EN 10GigE */
-       { PCI_VDEVICE(MELLANOX, 0x6368), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT25408 "Hermon" EN 10GigE PCIe gen2 */
-       { PCI_VDEVICE(MELLANOX, 0x6750), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT25458 ConnectX EN 10GBASE-T 10GigE */
-       { PCI_VDEVICE(MELLANOX, 0x6372), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT25458 ConnectX EN 10GBASE-T+Gen2 10GigE */
-       { PCI_VDEVICE(MELLANOX, 0x675a), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT26468 ConnectX EN 10GigE PCIe gen2*/
-       { PCI_VDEVICE(MELLANOX, 0x6764), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT26438 ConnectX EN 40GigE PCIe gen2 5GT/s */
-       { PCI_VDEVICE(MELLANOX, 0x6746), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT26478 ConnectX2 40GigE PCIe gen2 */
-       { PCI_VDEVICE(MELLANOX, 0x676e), MLX4_PCI_DEV_FORCE_SENSE_PORT },
-       /* MT25400 Family [ConnectX-2 Virtual Function] */
-       { PCI_VDEVICE(MELLANOX, 0x1002), MLX4_PCI_DEV_IS_VF },
+       /* MT25408 "Hermon" */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_HERMON_SDR),      /* SDR */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_HERMON_DDR),      /* DDR */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_HERMON_QDR),      /* QDR */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_HERMON_DDR_GEN2), /* DDR Gen2 */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_HERMON_QDR_GEN2), /* QDR Gen2 */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_HERMON_EN),       /* EN 10GigE */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_HERMON_EN_GEN2),  /* EN 10GigE Gen2 */
+       /* MT25458 ConnectX EN 10GBASE-T */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_CONNECTX_EN),
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_T_GEN2),      /* Gen2 */
+       /* MT26468 ConnectX EN 10GigE PCIe Gen2*/
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_GEN2),
+       /* MT26438 ConnectX EN 40GigE PCIe Gen2 5GT/s */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_5_GEN2),
+       /* MT26478 ConnectX2 40GigE PCIe Gen2 */
+       MLX_SP(PCI_DEVICE_ID_MELLANOX_CONNECTX2),
+       /* MT25400 Family [ConnectX-2] */
+       MLX_VF(0x1002),                                 /* Virtual Function */
        /* MT27500 Family [ConnectX-3] */
-       { PCI_VDEVICE(MELLANOX, 0x1003), 0 },
-       /* MT27500 Family [ConnectX-3 Virtual Function] */
-       { PCI_VDEVICE(MELLANOX, 0x1004), MLX4_PCI_DEV_IS_VF },
-       { PCI_VDEVICE(MELLANOX, 0x1005), 0 }, /* MT27510 Family */
-       { PCI_VDEVICE(MELLANOX, 0x1006), 0 }, /* MT27511 Family */
-       { PCI_VDEVICE(MELLANOX, 0x1007), 0 }, /* MT27520 Family */
-       { PCI_VDEVICE(MELLANOX, 0x1008), 0 }, /* MT27521 Family */
-       { PCI_VDEVICE(MELLANOX, 0x1009), 0 }, /* MT27530 Family */
-       { PCI_VDEVICE(MELLANOX, 0x100a), 0 }, /* MT27531 Family */
-       { PCI_VDEVICE(MELLANOX, 0x100b), 0 }, /* MT27540 Family */
-       { PCI_VDEVICE(MELLANOX, 0x100c), 0 }, /* MT27541 Family */
-       { PCI_VDEVICE(MELLANOX, 0x100d), 0 }, /* MT27550 Family */
-       { PCI_VDEVICE(MELLANOX, 0x100e), 0 }, /* MT27551 Family */
-       { PCI_VDEVICE(MELLANOX, 0x100f), 0 }, /* MT27560 Family */
-       { PCI_VDEVICE(MELLANOX, 0x1010), 0 }, /* MT27561 Family */
+       MLX_GN(PCI_DEVICE_ID_MELLANOX_CONNECTX3),
+       MLX_VF(0x1004),                                 /* Virtual Function */
+       MLX_GN(0x1005),                                 /* MT27510 Family */
+       MLX_GN(0x1006),                                 /* MT27511 Family */
+       MLX_GN(PCI_DEVICE_ID_MELLANOX_CONNECTX3_PRO),   /* MT27520 Family */
+       MLX_GN(0x1008),                                 /* MT27521 Family */
+       MLX_GN(0x1009),                                 /* MT27530 Family */
+       MLX_GN(0x100a),                                 /* MT27531 Family */
+       MLX_GN(0x100b),                                 /* MT27540 Family */
+       MLX_GN(0x100c),                                 /* MT27541 Family */
+       MLX_GN(0x100d),                                 /* MT27550 Family */
+       MLX_GN(0x100e),                                 /* MT27551 Family */
+       MLX_GN(0x100f),                                 /* MT27560 Family */
+       MLX_GN(0x1010),                                 /* MT27561 Family */
+       /*
+        * See the mellanox_check_broken_intx_masking() quirk when
+        * adding devices
+        */
        { 0, }
  };
  
@@@ -4147,8 -4141,11 +4149,8 @@@ static void mlx4_shutdown(struct pci_de
  
        mlx4_info(persist->dev, "mlx4_shutdown was called\n");
        mutex_lock(&persist->interface_state_mutex);
 -      if (persist->interface_state & MLX4_INTERFACE_STATE_UP) {
 -              /* Notify mlx4 clients that the kernel is being shut down */
 -              persist->interface_state |= MLX4_INTERFACE_STATE_SHUTDOWN;
 +      if (persist->interface_state & MLX4_INTERFACE_STATE_UP)
                mlx4_unload_one(pdev);
 -      }
        mutex_unlock(&persist->interface_state_mutex);
  }
  
diff --combined drivers/pci/msi.c
@@@ -551,14 -551,14 +551,14 @@@ error_attrs
  }
  
  static struct msi_desc *
 -msi_setup_entry(struct pci_dev *dev, int nvec, bool affinity)
 +msi_setup_entry(struct pci_dev *dev, int nvec, const struct irq_affinity *affd)
  {
        struct cpumask *masks = NULL;
        struct msi_desc *entry;
        u16 control;
  
 -      if (affinity) {
 -              masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
 +      if (affd) {
 +              masks = irq_create_affinity_masks(nvec, affd);
                if (!masks)
                        pr_err("Unable to allocate affinity masks, ignoring\n");
        }
@@@ -610,7 -610,6 +610,7 @@@ static int msi_verify_entries(struct pc
   * msi_capability_init - configure device's MSI capability structure
   * @dev: pointer to the pci_dev data structure of MSI device function
   * @nvec: number of interrupts to allocate
 + * @affinity: flag to indicate cpu irq affinity mask should be set
   *
   * Setup the MSI capability structure of the device with the requested
   * number of interrupts.  A return value of zero indicates the successful
   * an error, and a positive return value indicates the number of interrupts
   * which could have been allocated.
   */
 -static int msi_capability_init(struct pci_dev *dev, int nvec, bool affinity)
 +static int msi_capability_init(struct pci_dev *dev, int nvec,
 +                             const struct irq_affinity *affd)
  {
        struct msi_desc *entry;
        int ret;
  
        pci_msi_set_enable(dev, 0);     /* Disable MSI during set up */
  
 -      entry = msi_setup_entry(dev, nvec, affinity);
 +      entry = msi_setup_entry(dev, nvec, affd);
        if (!entry)
                return -ENOMEM;
  
@@@ -691,14 -689,14 +691,14 @@@ static void __iomem *msix_map_region(st
  
  static int msix_setup_entries(struct pci_dev *dev, void __iomem *base,
                              struct msix_entry *entries, int nvec,
 -                            bool affinity)
 +                            const struct irq_affinity *affd)
  {
        struct cpumask *curmsk, *masks = NULL;
        struct msi_desc *entry;
        int ret, i;
  
 -      if (affinity) {
 -              masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
 +      if (affd) {
 +              masks = irq_create_affinity_masks(nvec, affd);
                if (!masks)
                        pr_err("Unable to allocate affinity masks, ignoring\n");
        }
@@@ -754,14 -752,13 +754,14 @@@ static void msix_program_entries(struc
   * @dev: pointer to the pci_dev data structure of MSI-X device function
   * @entries: pointer to an array of struct msix_entry entries
   * @nvec: number of @entries
 + * @affd: Optional pointer to enable automatic affinity assignement
   *
   * Setup the MSI-X capability structure of device function with a
   * single MSI-X irq. A return of zero indicates the successful setup of
   * requested MSI-X entries with allocated irqs or non-zero for otherwise.
   **/
  static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,
 -                              int nvec, bool affinity)
 +                              int nvec, const struct irq_affinity *affd)
  {
        int ret;
        u16 control;
        if (!base)
                return -ENOMEM;
  
 -      ret = msix_setup_entries(dev, base, entries, nvec, affinity);
 +      ret = msix_setup_entries(dev, base, entries, nvec, affd);
        if (ret)
                return ret;
  
@@@ -957,7 -954,7 +957,7 @@@ int pci_msix_vec_count(struct pci_dev *
  EXPORT_SYMBOL(pci_msix_vec_count);
  
  static int __pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries,
 -                           int nvec, bool affinity)
 +                           int nvec, const struct irq_affinity *affd)
  {
        int nr_entries;
        int i, j;
                dev_info(&dev->dev, "can't enable MSI-X (MSI IRQ already assigned)\n");
                return -EINVAL;
        }
 -      return msix_capability_init(dev, entries, nvec, affinity);
 +      return msix_capability_init(dev, entries, nvec, affd);
  }
  
  /**
   **/
  int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec)
  {
 -      return __pci_enable_msix(dev, entries, nvec, false);
 +      return __pci_enable_msix(dev, entries, nvec, NULL);
  }
  EXPORT_SYMBOL(pci_enable_msix);
  
@@@ -1060,8 -1057,9 +1060,8 @@@ int pci_msi_enabled(void
  EXPORT_SYMBOL(pci_msi_enabled);
  
  static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,
 -              unsigned int flags)
 +                                const struct irq_affinity *affd)
  {
 -      bool affinity = flags & PCI_IRQ_AFFINITY;
        int nvec;
        int rc;
  
                nvec = maxvec;
  
        for (;;) {
 -              if (affinity) {
 -                      nvec = irq_calc_affinity_vectors(dev->irq_affinity,
 -                                      nvec);
 +              if (affd) {
 +                      nvec = irq_calc_affinity_vectors(nvec, affd);
                        if (nvec < minvec)
                                return -ENOSPC;
                }
  
 -              rc = msi_capability_init(dev, nvec, affinity);
 +              rc = msi_capability_init(dev, nvec, affd);
                if (rc == 0)
                        return nvec;
  
   **/
  int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec)
  {
 -      return __pci_enable_msi_range(dev, minvec, maxvec, 0);
 +      return __pci_enable_msi_range(dev, minvec, maxvec, NULL);
  }
  EXPORT_SYMBOL(pci_enable_msi_range);
  
  static int __pci_enable_msix_range(struct pci_dev *dev,
 -              struct msix_entry *entries, int minvec, int maxvec,
 -              unsigned int flags)
 +                                 struct msix_entry *entries, int minvec,
 +                                 int maxvec, const struct irq_affinity *affd)
  {
 -      bool affinity = flags & PCI_IRQ_AFFINITY;
        int rc, nvec = maxvec;
  
        if (maxvec < minvec)
                return -ERANGE;
  
        for (;;) {
 -              if (affinity) {
 -                      nvec = irq_calc_affinity_vectors(dev->irq_affinity,
 -                                      nvec);
 +              if (affd) {
 +                      nvec = irq_calc_affinity_vectors(nvec, affd);
                        if (nvec < minvec)
                                return -ENOSPC;
                }
  
 -              rc = __pci_enable_msix(dev, entries, nvec, affinity);
 +              rc = __pci_enable_msix(dev, entries, nvec, affd);
                if (rc == 0)
                        return nvec;
  
  int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries,
                int minvec, int maxvec)
  {
 -      return __pci_enable_msix_range(dev, entries, minvec, maxvec, 0);
 +      return __pci_enable_msix_range(dev, entries, minvec, maxvec, NULL);
  }
  EXPORT_SYMBOL(pci_enable_msix_range);
  
  /**
 - * pci_alloc_irq_vectors - allocate multiple IRQs for a device
 + * pci_alloc_irq_vectors_affinity - allocate multiple IRQs for a device
   * @dev:              PCI device to operate on
   * @min_vecs:         minimum number of vectors required (must be >= 1)
   * @max_vecs:         maximum (desired) number of vectors
   * @flags:            flags or quirks for the allocation
 + * @affd:             optional description of the affinity requirements
   *
   * Allocate up to @max_vecs interrupt vectors for @dev, using MSI-X or MSI
   * vectors if available, and fall back to a single legacy vector
   * To get the Linux IRQ number used for a vector that can be passed to
   * request_irq() use the pci_irq_vector() helper.
   */
 -int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
 -              unsigned int max_vecs, unsigned int flags)
 +int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs,
 +                                 unsigned int max_vecs, unsigned int flags,
 +                                 const struct irq_affinity *affd)
  {
 +      static const struct irq_affinity msi_default_affd;
        int vecs = -ENOSPC;
  
 +      if (flags & PCI_IRQ_AFFINITY) {
 +              if (!affd)
 +                      affd = &msi_default_affd;
 +      } else {
 +              if (WARN_ON(affd))
 +                      affd = NULL;
 +      }
 +
        if (flags & PCI_IRQ_MSIX) {
                vecs = __pci_enable_msix_range(dev, NULL, min_vecs, max_vecs,
 -                              flags);
 +                              affd);
                if (vecs > 0)
                        return vecs;
        }
  
        if (flags & PCI_IRQ_MSI) {
 -              vecs = __pci_enable_msi_range(dev, min_vecs, max_vecs, flags);
 +              vecs = __pci_enable_msi_range(dev, min_vecs, max_vecs, affd);
                if (vecs > 0)
                        return vecs;
        }
  
        return vecs;
  }
 -EXPORT_SYMBOL(pci_alloc_irq_vectors);
 +EXPORT_SYMBOL(pci_alloc_irq_vectors_affinity);
  
  /**
   * pci_free_irq_vectors - free previously allocated IRQs for a device
@@@ -1302,7 -1292,8 +1302,8 @@@ const struct cpumask *pci_irq_get_affin
        } else if (dev->msi_enabled) {
                struct msi_desc *entry = first_pci_msi_entry(dev);
  
-               if (WARN_ON_ONCE(!entry || nr >= entry->nvec_used))
+               if (WARN_ON_ONCE(!entry || !entry->affinity ||
+                                nr >= entry->nvec_used))
                        return NULL;
  
                return &entry->affinity[nr];
diff --combined drivers/pci/pci-mid.c
@@@ -29,11 -29,6 +29,11 @@@ static int mid_pci_set_power_state(stru
        return intel_mid_pci_set_power_state(pdev, state);
  }
  
 +static pci_power_t mid_pci_get_power_state(struct pci_dev *pdev)
 +{
 +      return intel_mid_pci_get_power_state(pdev);
 +}
 +
  static pci_power_t mid_pci_choose_state(struct pci_dev *pdev)
  {
        return PCI_D3hot;
@@@ -54,10 -49,9 +54,10 @@@ static bool mid_pci_need_resume(struct 
        return false;
  }
  
- static struct pci_platform_pm_ops mid_pci_platform_pm = {
+ static const struct pci_platform_pm_ops mid_pci_platform_pm = {
        .is_manageable  = mid_pci_power_manageable,
        .set_state      = mid_pci_set_power_state,
 +      .get_state      = mid_pci_get_power_state,
        .choose_state   = mid_pci_choose_state,
        .sleep_wake     = mid_pci_sleep_wake,
        .run_wake       = mid_pci_run_wake,
diff --combined drivers/pci/probe.c
@@@ -227,7 -227,8 +227,8 @@@ int __pci_read_base(struct pci_dev *dev
                        mask64 = (u32)PCI_BASE_ADDRESS_MEM_MASK;
                }
        } else {
-               res->flags |= (l & IORESOURCE_ROM_ENABLE);
+               if (l & PCI_ROM_ADDRESS_ENABLE)
+                       res->flags |= IORESOURCE_ROM_ENABLE;
                l64 = l & PCI_ROM_ADDRESS_MASK;
                sz64 = sz & PCI_ROM_ADDRESS_MASK;
                mask64 = (u32)PCI_ROM_ADDRESS_MASK;
@@@ -521,18 -522,19 +522,19 @@@ static void pci_release_host_bridge_dev
        kfree(bridge);
  }
  
- static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b)
+ struct pci_host_bridge *pci_alloc_host_bridge(size_t priv)
  {
        struct pci_host_bridge *bridge;
  
-       bridge = kzalloc(sizeof(*bridge), GFP_KERNEL);
+       bridge = kzalloc(sizeof(*bridge) + priv, GFP_KERNEL);
        if (!bridge)
                return NULL;
  
        INIT_LIST_HEAD(&bridge->windows);
-       bridge->bus = b;
        return bridge;
  }
+ EXPORT_SYMBOL(pci_alloc_host_bridge);
  
  static const unsigned char pcix_bus_speed[] = {
        PCI_SPEED_UNKNOWN,              /* 0 */
@@@ -717,6 -719,123 +719,123 @@@ static void pci_set_bus_msi_domain(stru
        dev_set_msi_domain(&bus->dev, d);
  }
  
+ int pci_register_host_bridge(struct pci_host_bridge *bridge)
+ {
+       struct device *parent = bridge->dev.parent;
+       struct resource_entry *window, *n;
+       struct pci_bus *bus, *b;
+       resource_size_t offset;
+       LIST_HEAD(resources);
+       struct resource *res;
+       char addr[64], *fmt;
+       const char *name;
+       int err;
+       bus = pci_alloc_bus(NULL);
+       if (!bus)
+               return -ENOMEM;
+       bridge->bus = bus;
+       /* temporarily move resources off the list */
+       list_splice_init(&bridge->windows, &resources);
+       bus->sysdata = bridge->sysdata;
+       bus->msi = bridge->msi;
+       bus->ops = bridge->ops;
+       bus->number = bus->busn_res.start = bridge->busnr;
+ #ifdef CONFIG_PCI_DOMAINS_GENERIC
+       bus->domain_nr = pci_bus_find_domain_nr(bus, parent);
+ #endif
+       b = pci_find_bus(pci_domain_nr(bus), bridge->busnr);
+       if (b) {
+               /* If we already got to this bus through a different bridge, ignore it */
+               dev_dbg(&b->dev, "bus already known\n");
+               err = -EEXIST;
+               goto free;
+       }
+       dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(bus),
+                    bridge->busnr);
+       err = pcibios_root_bridge_prepare(bridge);
+       if (err)
+               goto free;
+       err = device_register(&bridge->dev);
+       if (err)
+               put_device(&bridge->dev);
+       bus->bridge = get_device(&bridge->dev);
+       device_enable_async_suspend(bus->bridge);
+       pci_set_bus_of_node(bus);
+       pci_set_bus_msi_domain(bus);
+       if (!parent)
+               set_dev_node(bus->bridge, pcibus_to_node(bus));
+       bus->dev.class = &pcibus_class;
+       bus->dev.parent = bus->bridge;
+       dev_set_name(&bus->dev, "%04x:%02x", pci_domain_nr(bus), bus->number);
+       name = dev_name(&bus->dev);
+       err = device_register(&bus->dev);
+       if (err)
+               goto unregister;
+       pcibios_add_bus(bus);
+       /* Create legacy_io and legacy_mem files for this bus */
+       pci_create_legacy_files(bus);
+       if (parent)
+               dev_info(parent, "PCI host bridge to bus %s\n", name);
+       else
+               pr_info("PCI host bridge to bus %s\n", name);
+       /* Add initial resources to the bus */
+       resource_list_for_each_entry_safe(window, n, &resources) {
+               list_move_tail(&window->node, &bridge->windows);
+               offset = window->offset;
+               res = window->res;
+               if (res->flags & IORESOURCE_BUS)
+                       pci_bus_insert_busn_res(bus, bus->number, res->end);
+               else
+                       pci_bus_add_resource(bus, res, 0);
+               if (offset) {
+                       if (resource_type(res) == IORESOURCE_IO)
+                               fmt = " (bus address [%#06llx-%#06llx])";
+                       else
+                               fmt = " (bus address [%#010llx-%#010llx])";
+                       snprintf(addr, sizeof(addr), fmt,
+                                (unsigned long long)(res->start - offset),
+                                (unsigned long long)(res->end - offset));
+               } else
+                       addr[0] = '\0';
+               dev_info(&bus->dev, "root bus resource %pR%s\n", res, addr);
+       }
+       down_write(&pci_bus_sem);
+       list_add_tail(&bus->node, &pci_root_buses);
+       up_write(&pci_bus_sem);
+       return 0;
+ unregister:
+       put_device(&bridge->dev);
+       device_unregister(&bridge->dev);
+ free:
+       kfree(bus);
+       return err;
+ }
+ EXPORT_SYMBOL(pci_register_host_bridge);
  static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
                                           struct pci_dev *bridge, int busnr)
  {
@@@ -1439,21 -1558,6 +1558,21 @@@ static void program_hpp_type1(struct pc
                dev_warn(&dev->dev, "PCI-X settings not supported\n");
  }
  
 +static bool pcie_root_rcb_set(struct pci_dev *dev)
 +{
 +      struct pci_dev *rp = pcie_find_root_port(dev);
 +      u16 lnkctl;
 +
 +      if (!rp)
 +              return false;
 +
 +      pcie_capability_read_word(rp, PCI_EXP_LNKCTL, &lnkctl);
 +      if (lnkctl & PCI_EXP_LNKCTL_RCB)
 +              return true;
 +
 +      return false;
 +}
 +
  static void program_hpp_type2(struct pci_dev *dev, struct hpp_type2 *hpp)
  {
        int pos;
                        ~hpp->pci_exp_devctl_and, hpp->pci_exp_devctl_or);
  
        /* Initialize Link Control Register */
 -      if (pcie_cap_has_lnkctl(dev))
 +      if (pcie_cap_has_lnkctl(dev)) {
 +
 +              /*
 +               * If the Root Port supports Read Completion Boundary of
 +               * 128, set RCB to 128.  Otherwise, clear it.
 +               */
 +              hpp->pci_exp_lnkctl_and |= PCI_EXP_LNKCTL_RCB;
 +              hpp->pci_exp_lnkctl_or &= ~PCI_EXP_LNKCTL_RCB;
 +              if (pcie_root_rcb_set(dev))
 +                      hpp->pci_exp_lnkctl_or |= PCI_EXP_LNKCTL_RCB;
 +
                pcie_capability_clear_and_set_word(dev, PCI_EXP_LNKCTL,
                        ~hpp->pci_exp_lnkctl_and, hpp->pci_exp_lnkctl_or);
 +      }
  
        /* Find Advanced Error Reporting Enhanced Capability */
        pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
@@@ -1764,7 -1857,8 +1883,7 @@@ static void pci_dma_configure(struct pc
                if (attr == DEV_DMA_NOT_SUPPORTED)
                        dev_warn(&dev->dev, "DMA not supported.\n");
                else
 -                      arch_setup_dma_ops(&dev->dev, 0, 0, NULL,
 -                                         attr == DEV_DMA_COHERENT);
 +                      acpi_dma_configure(&dev->dev, attr);
        }
  
        pci_put_host_bridge_device(bridge);
@@@ -2155,113 -2249,43 +2274,43 @@@ void __weak pcibios_remove_bus(struct p
  {
  }
  
- struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
-               struct pci_ops *ops, void *sysdata, struct list_head *resources)
+ static struct pci_bus *pci_create_root_bus_msi(struct device *parent,
+               int bus, struct pci_ops *ops, void *sysdata,
+               struct list_head *resources, struct msi_controller *msi)
  {
        int error;
        struct pci_host_bridge *bridge;
-       struct pci_bus *b, *b2;
-       struct resource_entry *window, *n;
-       struct resource *res;
-       resource_size_t offset;
-       char bus_addr[64];
-       char *fmt;
-       b = pci_alloc_bus(NULL);
-       if (!b)
-               return NULL;
  
-       b->sysdata = sysdata;
-       b->ops = ops;
-       b->number = b->busn_res.start = bus;
- #ifdef CONFIG_PCI_DOMAINS_GENERIC
-       b->domain_nr = pci_bus_find_domain_nr(b, parent);
- #endif
-       b2 = pci_find_bus(pci_domain_nr(b), bus);
-       if (b2) {
-               /* If we already got to this bus through a different bridge, ignore it */
-               dev_dbg(&b2->dev, "bus already known\n");
-               goto err_out;
-       }
-       bridge = pci_alloc_host_bridge(b);
+       bridge = pci_alloc_host_bridge(0);
        if (!bridge)
-               goto err_out;
+               return NULL;
  
        bridge->dev.parent = parent;
        bridge->dev.release = pci_release_host_bridge_dev;
-       dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(b), bus);
-       error = pcibios_root_bridge_prepare(bridge);
-       if (error) {
-               kfree(bridge);
-               goto err_out;
-       }
-       error = device_register(&bridge->dev);
-       if (error) {
-               put_device(&bridge->dev);
-               goto err_out;
-       }
-       b->bridge = get_device(&bridge->dev);
-       device_enable_async_suspend(b->bridge);
-       pci_set_bus_of_node(b);
-       pci_set_bus_msi_domain(b);
-       if (!parent)
-               set_dev_node(b->bridge, pcibus_to_node(b));
-       b->dev.class = &pcibus_class;
-       b->dev.parent = b->bridge;
-       dev_set_name(&b->dev, "%04x:%02x", pci_domain_nr(b), bus);
-       error = device_register(&b->dev);
-       if (error)
-               goto class_dev_reg_err;
-       pcibios_add_bus(b);
-       /* Create legacy_io and legacy_mem files for this bus */
-       pci_create_legacy_files(b);
-       if (parent)
-               dev_info(parent, "PCI host bridge to bus %s\n", dev_name(&b->dev));
-       else
-               printk(KERN_INFO "PCI host bridge to bus %s\n", dev_name(&b->dev));
  
-       /* Add initial resources to the bus */
-       resource_list_for_each_entry_safe(window, n, resources) {
-               list_move_tail(&window->node, &bridge->windows);
-               res = window->res;
-               offset = window->offset;
-               if (res->flags & IORESOURCE_BUS)
-                       pci_bus_insert_busn_res(b, bus, res->end);
-               else
-                       pci_bus_add_resource(b, res, 0);
-               if (offset) {
-                       if (resource_type(res) == IORESOURCE_IO)
-                               fmt = " (bus address [%#06llx-%#06llx])";
-                       else
-                               fmt = " (bus address [%#010llx-%#010llx])";
-                       snprintf(bus_addr, sizeof(bus_addr), fmt,
-                                (unsigned long long) (res->start - offset),
-                                (unsigned long long) (res->end - offset));
-               } else
-                       bus_addr[0] = '\0';
-               dev_info(&b->dev, "root bus resource %pR%s\n", res, bus_addr);
-       }
+       list_splice_init(resources, &bridge->windows);
+       bridge->sysdata = sysdata;
+       bridge->busnr = bus;
+       bridge->ops = ops;
+       bridge->msi = msi;
  
-       down_write(&pci_bus_sem);
-       list_add_tail(&b->node, &pci_root_buses);
-       up_write(&pci_bus_sem);
+       error = pci_register_host_bridge(bridge);
+       if (error < 0)
+               goto err_out;
  
-       return b;
+       return bridge->bus;
  
- class_dev_reg_err:
-       put_device(&bridge->dev);
-       device_unregister(&bridge->dev);
  err_out:
-       kfree(b);
+       kfree(bridge);
        return NULL;
  }
+ struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
+               struct pci_ops *ops, void *sysdata, struct list_head *resources)
+ {
+       return pci_create_root_bus_msi(parent, bus, ops, sysdata, resources,
+                                      NULL);
+ }
  EXPORT_SYMBOL_GPL(pci_create_root_bus);
  
  int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int bus_max)
@@@ -2342,12 -2366,10 +2391,10 @@@ struct pci_bus *pci_scan_root_bus_msi(s
                        break;
                }
  
-       b = pci_create_root_bus(parent, bus, ops, sysdata, resources);
+       b = pci_create_root_bus_msi(parent, bus, ops, sysdata, resources, msi);
        if (!b)
                return NULL;
  
-       b->msi = msi;
        if (!found) {
                dev_info(&b->dev,
                 "No busn resource found for root bus, will use [bus %02x-ff]\n",
@@@ -31,8 -31,6 +31,6 @@@
  
  #include "vfio_pci_private.h"
  
- #define PCI_CFG_SPACE_SIZE    256
  /* Fake capability ID for standard config space */
  #define PCI_CAP_ID_BASIC      0
  
@@@ -152,7 -150,7 +150,7 @@@ static int vfio_user_config_read(struc
  
        *val = cpu_to_le32(tmp_val);
  
 -      return pcibios_err_to_errno(ret);
 +      return ret;
  }
  
  static int vfio_user_config_write(struct pci_dev *pdev, int offset,
                break;
        }
  
 -      return pcibios_err_to_errno(ret);
 +      return ret;
  }
  
  static int vfio_default_config_read(struct vfio_pci_device *vdev, int pos,
@@@ -257,7 -255,7 +255,7 @@@ static int vfio_direct_config_read(stru
  
        ret = vfio_user_config_read(vdev->pdev, pos, val, count);
        if (ret)
 -              return pcibios_err_to_errno(ret);
 +              return ret;
  
        if (pos >= PCI_CFG_SPACE_SIZE) { /* Extended cap header mangling */
                if (offset < 4)
@@@ -295,7 -293,7 +293,7 @@@ static int vfio_raw_config_read(struct 
  
        ret = vfio_user_config_read(vdev->pdev, pos, val, count);
        if (ret)
 -              return pcibios_err_to_errno(ret);
 +              return ret;
  
        return count;
  }
@@@ -1089,7 -1087,7 +1087,7 @@@ static int vfio_msi_config_write(struc
                                                 start + PCI_MSI_FLAGS,
                                                 flags);
                if (ret)
 -                      return pcibios_err_to_errno(ret);
 +                      return ret;
        }
  
        return count;
diff --combined include/linux/acpi.h
@@@ -56,27 -56,6 +56,27 @@@ static inline acpi_handle acpi_device_h
        acpi_fwnode_handle(adev) : NULL)
  #define ACPI_HANDLE(dev)              acpi_device_handle(ACPI_COMPANION(dev))
  
 +static inline struct fwnode_handle *acpi_alloc_fwnode_static(void)
 +{
 +      struct fwnode_handle *fwnode;
 +
 +      fwnode = kzalloc(sizeof(struct fwnode_handle), GFP_KERNEL);
 +      if (!fwnode)
 +              return NULL;
 +
 +      fwnode->type = FWNODE_ACPI_STATIC;
 +
 +      return fwnode;
 +}
 +
 +static inline void acpi_free_fwnode_static(struct fwnode_handle *fwnode)
 +{
 +      if (WARN_ON(!fwnode || fwnode->type != FWNODE_ACPI_STATIC))
 +              return;
 +
 +      kfree(fwnode);
 +}
 +
  /**
   * ACPI_DEVICE_CLASS - macro used to describe an ACPI device with
   * the PCI-defined class-code information
@@@ -241,6 -220,10 +241,6 @@@ int __init acpi_table_parse_entries(cha
                              int entry_id,
                              acpi_tbl_entry_handler handler,
                              unsigned int max_entries);
 -int __init acpi_table_parse_entries(char *id, unsigned long table_size,
 -                            int entry_id,
 -                            acpi_tbl_entry_handler handler,
 -                            unsigned int max_entries);
  int __init acpi_table_parse_entries_array(char *id, unsigned long table_size,
                              struct acpi_subtable_proc *proc, int proc_num,
                              unsigned int max_entries);
@@@ -343,7 -326,6 +343,7 @@@ struct pci_dev
  int acpi_pci_irq_enable (struct pci_dev *dev);
  void acpi_penalize_isa_irq(int irq, int active);
  bool acpi_isa_irq_available(int irq);
 +void acpi_penalize_sci_irq(int irq, int trigger, int polarity);
  void acpi_pci_irq_disable (struct pci_dev *dev);
  
  extern int ec_read(u8 addr, u8 *val);
@@@ -437,6 -419,8 +437,8 @@@ static inline int acpi_dev_filter_resou
        return acpi_dev_filter_resource_type(ares, (unsigned long)arg);
  }
  
+ struct acpi_device *acpi_resource_consumer(struct resource *res);
  int acpi_check_resource_conflict(const struct resource *res);
  
  int acpi_check_region(resource_size_t start, resource_size_t n,
@@@ -486,7 -470,6 +488,7 @@@ acpi_status acpi_run_osc(acpi_handle ha
  #define OSC_SB_CPCV2_SUPPORT                  0x00000040
  #define OSC_SB_PCLPI_SUPPORT                  0x00000080
  #define OSC_SB_OSLPI_SUPPORT                  0x00000100
 +#define OSC_SB_CPC_DIVERSE_HIGH_SUPPORT               0x00001000
  
  extern bool osc_sb_apei_support_acked;
  extern bool osc_pc_lpi_support_confirmed;
@@@ -573,8 -556,7 +575,8 @@@ int acpi_device_uevent_modalias(struct 
  int acpi_device_modalias(struct device *, char *, int);
  void acpi_walk_dep_device_list(acpi_handle handle);
  
 -struct platform_device *acpi_create_platform_device(struct acpi_device *);
 +struct platform_device *acpi_create_platform_device(struct acpi_device *,
 +                                                  struct property_entry *);
  #define ACPI_PTR(_ptr)        (_ptr)
  
  static inline void acpi_device_set_enumerated(struct acpi_device *adev)
@@@ -762,11 -744,6 +764,11 @@@ static inline enum dev_dma_attr acpi_ge
        return DEV_DMA_NOT_SUPPORTED;
  }
  
 +static inline void acpi_dma_configure(struct device *dev,
 +                                    enum dev_dma_attr attr) { }
 +
 +static inline void acpi_dma_deconfigure(struct device *dev) { }
 +
  #define ACPI_PTR(_ptr)        (NULL)
  
  static inline void acpi_device_set_enumerated(struct acpi_device *adev)
@@@ -787,6 -764,11 +789,11 @@@ static inline int acpi_reconfig_notifie
        return -EINVAL;
  }
  
+ static inline struct acpi_device *acpi_resource_consumer(struct resource *res)
+ {
+       return NULL;
+ }
  #endif        /* !CONFIG_ACPI */
  
  #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC
diff --combined include/linux/pci.h
@@@ -244,7 -244,6 +244,7 @@@ struct pci_cap_saved_state 
        struct pci_cap_saved_data cap;
  };
  
 +struct irq_affinity;
  struct pcie_link_state;
  struct pci_vpd;
  struct pci_sriov;
@@@ -333,6 -332,7 +333,6 @@@ struct pci_dev 
         * directly, use the values stored here. They might be different!
         */
        unsigned int    irq;
 -      struct cpumask  *irq_affinity;
        struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
  
        bool match_driver;              /* Skip attaching driver */
@@@ -420,9 -420,13 +420,13 @@@ static inline int pci_channel_offline(s
  struct pci_host_bridge {
        struct device dev;
        struct pci_bus *bus;            /* root bus */
+       struct pci_ops *ops;
+       void *sysdata;
+       int busnr;
        struct list_head windows;       /* resource_entry */
        void (*release_fn)(struct pci_host_bridge *);
        void *release_data;
+       struct msi_controller *msi;
        unsigned int ignore_reset_delay:1;      /* for entire hierarchy */
        /* Resource alignment requirements */
        resource_size_t (*align_resource)(struct pci_dev *dev,
                        resource_size_t start,
                        resource_size_t size,
                        resource_size_t align);
+       unsigned long private[0] ____cacheline_aligned;
  };
  
  #define       to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev)
  
+ static inline void *pci_host_bridge_priv(struct pci_host_bridge *bridge)
+ {
+       return (void *)bridge->private;
+ }
+ static inline struct pci_host_bridge *pci_host_bridge_from_priv(void *priv)
+ {
+       return container_of(priv, struct pci_host_bridge, private);
+ }
+ struct pci_host_bridge *pci_alloc_host_bridge(size_t priv);
+ int pci_register_host_bridge(struct pci_host_bridge *bridge);
  struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus);
  
  void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
@@@ -1310,10 -1327,8 +1327,10 @@@ static inline int pci_enable_msix_exact
                return rc;
        return 0;
  }
 -int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
 -              unsigned int max_vecs, unsigned int flags);
 +int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs,
 +                                 unsigned int max_vecs, unsigned int flags,
 +                                 const struct irq_affinity *affd);
 +
  void pci_free_irq_vectors(struct pci_dev *dev);
  int pci_irq_vector(struct pci_dev *dev, unsigned int nr);
  const struct cpumask *pci_irq_get_affinity(struct pci_dev *pdev, int vec);
@@@ -1341,17 -1356,14 +1358,17 @@@ static inline int pci_enable_msix_range
  static inline int pci_enable_msix_exact(struct pci_dev *dev,
                      struct msix_entry *entries, int nvec)
  { return -ENOSYS; }
 -static inline int pci_alloc_irq_vectors(struct pci_dev *dev,
 -              unsigned int min_vecs, unsigned int max_vecs,
 -              unsigned int flags)
 +
 +static inline int
 +pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs,
 +                             unsigned int max_vecs, unsigned int flags,
 +                             const struct irq_affinity *aff_desc)
  {
        if (min_vecs > 1)
                return -EINVAL;
        return 1;
  }
 +
  static inline void pci_free_irq_vectors(struct pci_dev *dev)
  {
  }
@@@ -1369,14 -1381,6 +1386,14 @@@ static inline const struct cpumask *pci
  }
  #endif
  
 +static inline int
 +pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
 +                    unsigned int max_vecs, unsigned int flags)
 +{
 +      return pci_alloc_irq_vectors_affinity(dev, min_vecs, max_vecs, flags,
 +                                            NULL);
 +}
 +
  #ifdef CONFIG_PCIEPORTBUS
  extern bool pcie_ports_disabled;
  extern bool pcie_ports_auto;
@@@ -1941,20 -1945,6 +1958,20 @@@ static inline int pci_pcie_type(const s
        return (pcie_caps_reg(dev) & PCI_EXP_FLAGS_TYPE) >> 4;
  }
  
 +static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
 +{
 +      while (1) {
 +              if (!pci_is_pcie(dev))
 +                      break;
 +              if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
 +                      return dev;
 +              if (!dev->bus->self)
 +                      break;
 +              dev = dev->bus->self;
 +      }
 +      return NULL;
 +}
 +
  void pci_request_acs(void);
  bool pci_acs_enabled(struct pci_dev *pdev, u16 acs_flags);
  bool pci_acs_path_enabled(struct pci_dev *start,
diff --combined include/linux/pci_ids.h
  #define PCI_CLASS_STORAGE_SATA                0x0106
  #define PCI_CLASS_STORAGE_SATA_AHCI   0x010601
  #define PCI_CLASS_STORAGE_SAS         0x0107
 +#define PCI_CLASS_STORAGE_EXPRESS     0x010802
  #define PCI_CLASS_STORAGE_OTHER               0x0180
  
 +
  #define PCI_BASE_CLASS_NETWORK                0x02
  #define PCI_CLASS_NETWORK_ETHERNET    0x0200
  #define PCI_CLASS_NETWORK_TOKEN_RING  0x0201
  #define PCI_DEVICE_ID_RASTEL_2PORT    0x2000
  
  #define PCI_VENDOR_ID_VMWARE          0x15ad
 +#define PCI_DEVICE_ID_VMWARE_VMXNET3  0x07b0
  
  #define PCI_VENDOR_ID_ZOLTRIX         0x15b0
  #define PCI_DEVICE_ID_ZOLTRIX_2BD0    0x2bd0
  
  #define PCI_VENDOR_ID_MELLANOX                0x15b3
- #define PCI_DEVICE_ID_MELLANOX_TAVOR  0x5a44
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTX3      0x1003
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTX3_PRO  0x1007
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTIB      0x1011
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTX4      0x1013
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTX4_LX   0x1015
+ #define PCI_DEVICE_ID_MELLANOX_TAVOR          0x5a44
  #define PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE   0x5a46
- #define PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT 0x6278
- #define PCI_DEVICE_ID_MELLANOX_ARBEL  0x6282
- #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD 0x5e8c
- #define PCI_DEVICE_ID_MELLANOX_SINAI  0x6274
+ #define PCI_DEVICE_ID_MELLANOX_SINAI_OLD      0x5e8c
+ #define PCI_DEVICE_ID_MELLANOX_SINAI          0x6274
+ #define PCI_DEVICE_ID_MELLANOX_ARBEL_COMPAT   0x6278
+ #define PCI_DEVICE_ID_MELLANOX_ARBEL          0x6282
+ #define PCI_DEVICE_ID_MELLANOX_HERMON_SDR     0x6340
+ #define PCI_DEVICE_ID_MELLANOX_HERMON_DDR     0x634a
+ #define PCI_DEVICE_ID_MELLANOX_HERMON_QDR     0x6354
+ #define PCI_DEVICE_ID_MELLANOX_HERMON_EN      0x6368
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTX_EN    0x6372
+ #define PCI_DEVICE_ID_MELLANOX_HERMON_DDR_GEN2        0x6732
+ #define PCI_DEVICE_ID_MELLANOX_HERMON_QDR_GEN2        0x673c
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_5_GEN2 0x6746
+ #define PCI_DEVICE_ID_MELLANOX_HERMON_EN_GEN2 0x6750
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_T_GEN2 0x675a
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTX_EN_GEN2       0x6764
+ #define PCI_DEVICE_ID_MELLANOX_CONNECTX2      0x676e
  
  #define PCI_VENDOR_ID_DFI             0x15bd