aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/tg3.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index ca3052d5c409..356b5d0f0403 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -6226,6 +6226,8 @@ static int tg3_chip_reset(struct tg3 *tp)
6226 udelay(120); 6226 udelay(120);
6227 6227
6228 if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) && tp->pcie_cap) { 6228 if ((tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) && tp->pcie_cap) {
6229 u16 val16;
6230
6229 if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A0) { 6231 if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A0) {
6230 int i; 6232 int i;
6231 u32 cfg_val; 6233 u32 cfg_val;
@@ -6239,12 +6241,22 @@ static int tg3_chip_reset(struct tg3 *tp)
6239 cfg_val | (1 << 15)); 6241 cfg_val | (1 << 15));
6240 } 6242 }
6241 6243
6242 /* Set PCIE max payload size to 128 bytes and 6244 /* Clear the "no snoop" and "relaxed ordering" bits. */
6243 * clear the "no snoop" and "relaxed ordering" bits. 6245 pci_read_config_word(tp->pdev,
6246 tp->pcie_cap + PCI_EXP_DEVCTL,
6247 &val16);
6248 val16 &= ~(PCI_EXP_DEVCTL_RELAX_EN |
6249 PCI_EXP_DEVCTL_NOSNOOP_EN);
6250 /*
6251 * Older PCIe devices only support the 128 byte
6252 * MPS setting. Enforce the restriction.
6244 */ 6253 */
6254 if (!(tp->tg3_flags & TG3_FLAG_CPMU_PRESENT) ||
6255 (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5784))
6256 val16 &= ~PCI_EXP_DEVCTL_PAYLOAD;
6245 pci_write_config_word(tp->pdev, 6257 pci_write_config_word(tp->pdev,
6246 tp->pcie_cap + PCI_EXP_DEVCTL, 6258 tp->pcie_cap + PCI_EXP_DEVCTL,
6247 0); 6259 val16);
6248 6260
6249 pcie_set_readrq(tp->pdev, 4096); 6261 pcie_set_readrq(tp->pdev, 4096);
6250 6262