Merge branch 'ofed' of git://flatbed.openfabrics.org/~tnikolova/compat/ into ofed
authorVladimir Sokolovsky <vlad@mellanox.com>
Wed, 5 Nov 2014 12:07:45 +0000 (14:07 +0200)
committerVladimir Sokolovsky <vlad@mellanox.com>
Wed, 5 Nov 2014 12:07:45 +0000 (14:07 +0200)
Conflicts:
include/linux/compat-3.12.h

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
1  2 
include/linux/compat-3.12.h

@@@ -18,9 -17,46 +18,49 @@@ static inline struct inode *file_inode(
        return f->f_dentry->d_inode;
  }
  
 +int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,
 +              enum pcie_link_width *width);
 +
+ /* These values come from the PCI Express Spec */
+ enum pcie_link_width {
+       PCIE_LNK_WIDTH_RESRV    = 0x00,
+       PCIE_LNK_X1             = 0x01,
+       PCIE_LNK_X2             = 0x02,
+       PCIE_LNK_X4             = 0x04,
+       PCIE_LNK_X8             = 0x08,
+       PCIE_LNK_X12            = 0x0C,
+       PCIE_LNK_X16            = 0x10,
+       PCIE_LNK_X32            = 0x20,
+       PCIE_LNK_WIDTH_UNKNOWN  = 0xFF,
+ };
+ /* Based on the PCI Hotplug Spec, but some values are made up by us */
+ enum pci_bus_speed {
+       PCI_SPEED_33MHz                 = 0x00,
+       PCI_SPEED_66MHz                 = 0x01,
+       PCI_SPEED_66MHz_PCIX            = 0x02,
+       PCI_SPEED_100MHz_PCIX           = 0x03,
+       PCI_SPEED_133MHz_PCIX           = 0x04,
+       PCI_SPEED_66MHz_PCIX_ECC        = 0x05,
+       PCI_SPEED_100MHz_PCIX_ECC       = 0x06,
+       PCI_SPEED_133MHz_PCIX_ECC       = 0x07,
+       PCI_SPEED_66MHz_PCIX_266        = 0x09,
+       PCI_SPEED_100MHz_PCIX_266       = 0x0a,
+       PCI_SPEED_133MHz_PCIX_266       = 0x0b,
+       AGP_UNKNOWN                     = 0x0c,
+       AGP_1X                          = 0x0d,
+       AGP_2X                          = 0x0e,
+       AGP_4X                          = 0x0f,
+       AGP_8X                          = 0x10,
+       PCI_SPEED_66MHz_PCIX_533        = 0x11,
+       PCI_SPEED_100MHz_PCIX_533       = 0x12,
+       PCI_SPEED_133MHz_PCIX_533       = 0x13,
+       PCIE_SPEED_2_5GT                = 0x14,
+       PCIE_SPEED_5_0GT                = 0x15,
+       PCIE_SPEED_8_0GT                = 0x16,
+       PCI_SPEED_UNKNOWN               = 0xff,
+ };
  #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)) */
  
  #endif /* LINUX_3_12_COMPAT_H */