On 3 July 2014 22:06, Rafał Miłecki <zajec5@xxxxxxxxx> wrote: > I'm dealing with Broadcom devices and it appears I need to know if the > current PCIe device is Gen 1 or Gen 2. This is because they have > slightly different registers: > #define PCI_BAR0_WIN2 0xac > #define PCIE2_BAR0_WIN2 0x70 > > Is there a way to know that? I keep starring at struct pci_dev, but > can't see "generation" field. Tried Googling, but couldn't find > anything. I've noticed that my 14e4:4360 card (PCIe Gen2) has: LNKCAP: 0x0046DC12 (hint: PCI_EXP_LNKCAP_SLS_5_0GB) Some older card 14e4:4359 (PCIe 1) has: LNKCAP: 0x00176811 (hint: PCI_EXP_LNKCAP_SLS_2_5GB) Wikipedia says 500 MB/s was added in PCIe 2.0. Could I check for this bit to determine if I'm dealing PCIe 2.0 card? -- Rafał -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html