diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2007-10-08 02:27:28 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:54:44 -0400 |
commit | 9974a356b204833b32173210ca25edfdc24dcdd5 (patch) | |
tree | 1b6a4d69ec46c01934fb5ff2cf4d76d57a103752 /drivers/net/tg3.h | |
parent | 8658251dc3fed54b09991a2c5e0a7084755157d7 (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 'drivers/net/tg3.h')
-rw-r--r-- | drivers/net/tg3.h | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index a6a23bbcdfee..c4f845dd1e8b 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -57,32 +57,7 @@ | |||
57 | #define TG3PCI_IRQ_PIN 0x0000003d | 57 | #define TG3PCI_IRQ_PIN 0x0000003d |
58 | #define TG3PCI_MIN_GNT 0x0000003e | 58 | #define TG3PCI_MIN_GNT 0x0000003e |
59 | #define TG3PCI_MAX_LAT 0x0000003f | 59 | #define TG3PCI_MAX_LAT 0x0000003f |
60 | #define TG3PCI_X_CAPS 0x00000040 | 60 | /* 0x40 --> 0x64 unused */ |
61 | #define PCIX_CAPS_RELAXED_ORDERING 0x00020000 | ||
62 | #define PCIX_CAPS_SPLIT_MASK 0x00700000 | ||
63 | #define PCIX_CAPS_SPLIT_SHIFT 20 | ||
64 | #define PCIX_CAPS_BURST_MASK 0x000c0000 | ||
65 | #define PCIX_CAPS_BURST_SHIFT 18 | ||
66 | #define PCIX_CAPS_MAX_BURST_CPIOB 2 | ||
67 | #define TG3PCI_PM_CAP_PTR 0x00000041 | ||
68 | #define TG3PCI_X_COMMAND 0x00000042 | ||
69 | #define TG3PCI_X_STATUS 0x00000044 | ||
70 | #define TG3PCI_PM_CAP_ID 0x00000048 | ||
71 | #define TG3PCI_VPD_CAP_PTR 0x00000049 | ||
72 | #define TG3PCI_PM_CAPS 0x0000004a | ||
73 | #define TG3PCI_PM_CTRL_STAT 0x0000004c | ||
74 | #define TG3PCI_BR_SUPP_EXT 0x0000004e | ||
75 | #define TG3PCI_PM_DATA 0x0000004f | ||
76 | #define TG3PCI_VPD_CAP_ID 0x00000050 | ||
77 | #define TG3PCI_MSI_CAP_PTR 0x00000051 | ||
78 | #define TG3PCI_VPD_ADDR_FLAG 0x00000052 | ||
79 | #define VPD_ADDR_FLAG_WRITE 0x00008000 | ||
80 | #define TG3PCI_VPD_DATA 0x00000054 | ||
81 | #define TG3PCI_MSI_CAP_ID 0x00000058 | ||
82 | #define TG3PCI_NXT_CAP_PTR 0x00000059 | ||
83 | #define TG3PCI_MSI_CTRL 0x0000005a | ||
84 | #define TG3PCI_MSI_ADDR_LOW 0x0000005c | ||
85 | #define TG3PCI_MSI_ADDR_HIGH 0x00000060 | ||
86 | #define TG3PCI_MSI_DATA 0x00000064 | 61 | #define TG3PCI_MSI_DATA 0x00000064 |
87 | /* 0x66 --> 0x68 unused */ | 62 | /* 0x66 --> 0x68 unused */ |
88 | #define TG3PCI_MISC_HOST_CTRL 0x00000068 | 63 | #define TG3PCI_MISC_HOST_CTRL 0x00000068 |
@@ -2318,6 +2293,7 @@ struct tg3 { | |||
2318 | 2293 | ||
2319 | int pm_cap; | 2294 | int pm_cap; |
2320 | int msi_cap; | 2295 | int msi_cap; |
2296 | int pcix_cap; | ||
2321 | 2297 | ||
2322 | /* PHY info */ | 2298 | /* PHY info */ |
2323 | u32 phy_id; | 2299 | u32 phy_id; |