]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/pci.h
Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-artful-kernel.git] / include / linux / pci.h
index 5026f2ae86db2431df02a0a1e6e2519e317b0246..58f1ab06c4e8f645a757dca55a67bcb19ec36b62 100644 (file)
@@ -183,6 +183,11 @@ enum pci_dev_flags {
        PCI_DEV_FLAGS_BRIDGE_XLATE_ROOT = (__force pci_dev_flags_t) (1 << 9),
        /* Do not use FLR even if device advertises PCI_AF_CAP */
        PCI_DEV_FLAGS_NO_FLR_RESET = (__force pci_dev_flags_t) (1 << 10),
+       /*
+        * Resume before calling the driver's system suspend hooks, disabling
+        * the direct_complete optimization.
+        */
+       PCI_DEV_FLAGS_NEEDS_RESUME = (__force pci_dev_flags_t) (1 << 11),
 };
 
 enum pci_irq_reroute_variant {
@@ -1343,9 +1348,9 @@ 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;
+       if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1 && dev->irq)
+               return 1;
+       return -ENOSPC;
 }
 
 static inline void pci_free_irq_vectors(struct pci_dev *dev)