aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2007-10-08 02:27:28 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:54:44 -0400
commit9974a356b204833b32173210ca25edfdc24dcdd5 (patch)
tree1b6a4d69ec46c01934fb5ff2cf4d76d57a103752 /include/linux
parent8658251dc3fed54b09991a2c5e0a7084755157d7 (diff)
[TG3]: Walk PCI capability lists.
Newer tg3 devices shuffle around the registers in PCI configuration space. This patch changes the way the driver accesses the PCI capabilities registers. Hardcoded register locations are replaced with offsets from pci_find_capability() return values. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci_regs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index 495d368390e0..423d592c55d5 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -316,7 +316,20 @@
316#define PCI_X_CMD 2 /* Modes & Features */ 316#define PCI_X_CMD 2 /* Modes & Features */
317#define PCI_X_CMD_DPERR_E 0x0001 /* Data Parity Error Recovery Enable */ 317#define PCI_X_CMD_DPERR_E 0x0001 /* Data Parity Error Recovery Enable */
318#define PCI_X_CMD_ERO 0x0002 /* Enable Relaxed Ordering */ 318#define PCI_X_CMD_ERO 0x0002 /* Enable Relaxed Ordering */
319#define PCI_X_CMD_READ_512 0x0000 /* 512 byte maximum read byte count */
320#define PCI_X_CMD_READ_1K 0x0004 /* 1Kbyte maximum read byte count */
321#define PCI_X_CMD_READ_2K 0x0008 /* 2Kbyte maximum read byte count */
322#define PCI_X_CMD_READ_4K 0x000c /* 4Kbyte maximum read byte count */
319#define PCI_X_CMD_MAX_READ 0x000c /* Max Memory Read Byte Count */ 323#define PCI_X_CMD_MAX_READ 0x000c /* Max Memory Read Byte Count */
324 /* Max # of outstanding split transactions */
325#define PCI_X_CMD_SPLIT_1 0x0000 /* Max 1 */
326#define PCI_X_CMD_SPLIT_2 0x0010 /* Max 2 */
327#define PCI_X_CMD_SPLIT_3 0x0020 /* Max 3 */
328#define PCI_X_CMD_SPLIT_4 0x0030 /* Max 4 */
329#define PCI_X_CMD_SPLIT_8 0x0040 /* Max 8 */
330#define PCI_X_CMD_SPLIT_12 0x0050 /* Max 12 */
331#define PCI_X_CMD_SPLIT_16 0x0060 /* Max 16 */
332#define PCI_X_CMD_SPLIT_32 0x0070 /* Max 32 */
320#define PCI_X_CMD_MAX_SPLIT 0x0070 /* Max Outstanding Split Transactions */ 333#define PCI_X_CMD_MAX_SPLIT 0x0070 /* Max Outstanding Split Transactions */
321#define PCI_X_CMD_VERSION(x) (((x) >> 12) & 3) /* Version */ 334#define PCI_X_CMD_VERSION(x) (((x) >> 12) & 3) /* Version */
322#define PCI_X_STATUS 4 /* PCI-X capabilities */ 335#define PCI_X_STATUS 4 /* PCI-X capabilities */