]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: Add defines for PCIe Max_Read_Request_Size
authorRafał Miłecki <zajec5@gmail.com>
Mon, 26 Jan 2015 17:05:22 +0000 (18:05 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 Jan 2015 14:14:26 +0000 (08:14 -0600)
There are a few drivers using magic numbers when operating with PCIe
capabilities and PCI_EXP_DEVCTL_READRQ.  Define known values to allow
cleaning their code a bit.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
include/uapi/linux/pci_regs.h

index 4a1d0cc38ff29302cf294a220bf4526a6a7a6caf..efe3443572baa5a3650d638806fd60ef09a90f68 100644 (file)
 #define  PCI_EXP_DEVCTL_AUX_PME        0x0400  /* Auxiliary Power PM Enable */
 #define  PCI_EXP_DEVCTL_NOSNOOP_EN 0x0800  /* Enable No Snoop */
 #define  PCI_EXP_DEVCTL_READRQ 0x7000  /* Max_Read_Request_Size */
+#define  PCI_EXP_DEVCTL_READRQ_128B  0x0000 /* 128 Bytes */
+#define  PCI_EXP_DEVCTL_READRQ_256B  0x1000 /* 256 Bytes */
+#define  PCI_EXP_DEVCTL_READRQ_512B  0x2000 /* 512 Bytes */
+#define  PCI_EXP_DEVCTL_READRQ_1024B 0x3000 /* 1024 Bytes */
 #define  PCI_EXP_DEVCTL_BCR_FLR 0x8000  /* Bridge Configuration Retry / FLR */
 #define PCI_EXP_DEVSTA         10      /* Device Status */
 #define  PCI_EXP_DEVSTA_CED    0x0001  /* Correctable Error Detected */