aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Carlson <mcarlson@broadcom.com>2012-02-27 04:44:48 -0500
committerDavid S. Miller <davem@davemloft.net>2012-03-04 20:54:01 -0500
commit0b471506712dd734964b3270d2aa88160712c262 (patch)
tree52f04bbb15c1ede47ced10c1f48a9ff71a0a90fb
parente19a82c18f0e6360ee9fd431721794eb0036c0cd (diff)
tg3: Recode PCI MRRS adjustment as a PCI quirk
This patch recodes the MRRS cap for 5719 A0 devices as a PCI quirk. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c6
-rw-r--r--drivers/pci/quirks.c18
-rw-r--r--include/linux/pci_ids.h1
3 files changed, 19 insertions, 6 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index a8490a473a1c..bc236b6a7a91 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -14242,12 +14242,6 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
14242 14242
14243 tg3_flag_set(tp, PCI_EXPRESS); 14243 tg3_flag_set(tp, PCI_EXPRESS);
14244 14244
14245 if (tp->pci_chip_rev_id == CHIPREV_ID_5719_A0) {
14246 int readrq = pcie_get_readrq(tp->pdev);
14247 if (readrq > 2048)
14248 pcie_set_readrq(tp->pdev, 2048);
14249 }
14250
14251 pci_read_config_word(tp->pdev, 14245 pci_read_config_word(tp->pdev,
14252 pci_pcie_cap(tp->pdev) + PCI_EXP_LNKCTL, 14246 pci_pcie_cap(tp->pdev) + PCI_EXP_LNKCTL,
14253 &lnkctl); 14247 &lnkctl);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 64765474676f..f722c5f6951a 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2161,6 +2161,24 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_BROADCOM,
2161 PCI_DEVICE_ID_NX2_5709S, 2161 PCI_DEVICE_ID_NX2_5709S,
2162 quirk_brcm_570x_limit_vpd); 2162 quirk_brcm_570x_limit_vpd);
2163 2163
2164static void __devinit quirk_brcm_5719_limit_mrrs(struct pci_dev *dev)
2165{
2166 u32 rev;
2167
2168 pci_read_config_dword(dev, 0xf4, &rev);
2169
2170 /* Only CAP the MRRS if the device is a 5719 A0 */
2171 if (rev == 0x05719000) {
2172 int readrq = pcie_get_readrq(dev);
2173 if (readrq > 2048)
2174 pcie_set_readrq(dev, 2048);
2175 }
2176}
2177
2178DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
2179 PCI_DEVICE_ID_TIGON3_5719,
2180 quirk_brcm_5719_limit_mrrs);
2181
2164/* Originally in EDAC sources for i82875P: 2182/* Originally in EDAC sources for i82875P:
2165 * Intel tells BIOS developers to hide device 6 which 2183 * Intel tells BIOS developers to hide device 6 which
2166 * configures the overflow device access containing 2184 * configures the overflow device access containing
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 31d77af2ef42..3329965ed63f 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2105,6 +2105,7 @@
2105#define PCI_DEVICE_ID_NX2_57711E 0x1650 2105#define PCI_DEVICE_ID_NX2_57711E 0x1650
2106#define PCI_DEVICE_ID_TIGON3_5705 0x1653 2106#define PCI_DEVICE_ID_TIGON3_5705 0x1653
2107#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 2107#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654
2108#define PCI_DEVICE_ID_TIGON3_5719 0x1657
2108#define PCI_DEVICE_ID_TIGON3_5721 0x1659 2109#define PCI_DEVICE_ID_TIGON3_5721 0x1659
2109#define PCI_DEVICE_ID_TIGON3_5722 0x165a 2110#define PCI_DEVICE_ID_TIGON3_5722 0x165a
2110#define PCI_DEVICE_ID_TIGON3_5723 0x165b 2111#define PCI_DEVICE_ID_TIGON3_5723 0x165b