Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278001
b: refs/heads/master
c: 2c55a3d
h: refs/heads/master
i:
  277999: ded7090
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Nov 29, 2011
1 parent f7c7ddd commit 3d20ac0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf9ecf4b631f649a964fa611f1a5e8874f2a76db
refs/heads/master: 2c55a3d08ade44a778c182c220a7907ec65d5fb8
27 changes: 10 additions & 17 deletions trunk/drivers/net/ethernet/broadcom/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -7615,15 +7615,11 @@ static void tg3_restore_pci_state(struct tg3 *tp)

pci_write_config_word(tp->pdev, PCI_COMMAND, tp->pci_cmd);

if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5785) {
if (tg3_flag(tp, PCI_EXPRESS))
pcie_set_readrq(tp->pdev, tp->pcie_readrq);
else {
pci_write_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE,
tp->pci_cacheline_sz);
pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER,
tp->pci_lat_timer);
}
if (!tg3_flag(tp, PCI_EXPRESS)) {
pci_write_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE,
tp->pci_cacheline_sz);
pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER,
tp->pci_lat_timer);
}

/* Make sure PCI-X relaxed ordering bit is clear. */
Expand Down Expand Up @@ -7808,8 +7804,6 @@ static int tg3_chip_reset(struct tg3 *tp)
pci_pcie_cap(tp->pdev) + PCI_EXP_DEVCTL,
val16);

pcie_set_readrq(tp->pdev, tp->pcie_readrq);

/* Clear error status */
pci_write_config_word(tp->pdev,
pci_pcie_cap(tp->pdev) + PCI_EXP_DEVSTA,
Expand Down Expand Up @@ -14053,12 +14047,11 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)

tg3_flag_set(tp, PCI_EXPRESS);

tp->pcie_readrq = 4096;
if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5719 ||
GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5720)
tp->pcie_readrq = 2048;

pcie_set_readrq(tp->pdev, tp->pcie_readrq);
if (tp->pci_chip_rev_id == CHIPREV_ID_5719_A0) {
int readrq = pcie_get_readrq(tp->pdev);
if (readrq > 2048)
pcie_set_readrq(tp->pdev, 2048);
}

pci_read_config_word(tp->pdev,
pci_pcie_cap(tp->pdev) + PCI_EXP_LNKCTL,
Expand Down

0 comments on commit 3d20ac0

Please sign in to comment.