aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.h
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2011-06-27 08:56:50 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-28 00:38:45 -0400
commit708ebb3a51489e70bc2b67b2772deea336eba849 (patch)
treec828b1e143ad95e0c5c8c83bedae9225db34dd01 /drivers/net/tg3.h
parentec0d75518cb06261f1823fa2713fe52b9b26455e (diff)
tg3: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking. Use the value from pci_dev instead of checking in the driver and saving it off the the driver specific structure. It will remove an unnecessary search in the PCI configuration space if this value is referenced instead of reacquiring it. v2 of the patch re-adds the PCI_EXPRESS flag and adds comments describing why it is necessary. [ pdev->pcie_cap --> pci_pcie_cap(pdev) -DaveM ] Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.h')
-rw-r--r--drivers/net/tg3.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index bedc3b4557b5..5f250aef7c92 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -2857,7 +2857,7 @@ enum TG3_FLAGS {
2857 TG3_FLAG_IS_5788, 2857 TG3_FLAG_IS_5788,
2858 TG3_FLAG_MAX_RXPEND_64, 2858 TG3_FLAG_MAX_RXPEND_64,
2859 TG3_FLAG_TSO_CAPABLE, 2859 TG3_FLAG_TSO_CAPABLE,
2860 TG3_FLAG_PCI_EXPRESS, 2860 TG3_FLAG_PCI_EXPRESS, /* BCM5785 + pci_is_pcie() */
2861 TG3_FLAG_ASF_NEW_HANDSHAKE, 2861 TG3_FLAG_ASF_NEW_HANDSHAKE,
2862 TG3_FLAG_HW_AUTONEG, 2862 TG3_FLAG_HW_AUTONEG,
2863 TG3_FLAG_IS_NIC, 2863 TG3_FLAG_IS_NIC,
@@ -3022,10 +3022,7 @@ struct tg3 {
3022 3022
3023 int pm_cap; 3023 int pm_cap;
3024 int msi_cap; 3024 int msi_cap;
3025 union {
3026 int pcix_cap; 3025 int pcix_cap;
3027 int pcie_cap;
3028 };
3029 int pcie_readrq; 3026 int pcie_readrq;
3030 3027
3031 struct mii_bus *mdio_bus; 3028 struct mii_bus *mdio_bus;