Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255969
b: refs/heads/master
c: 6532e9c
h: refs/heads/master
i:
  255967: 2858b46
v: v3
  • Loading branch information
Jon Mason authored and David S. Miller committed Jun 28, 2011
1 parent 2bd8ee3 commit 1c84383
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 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: a875a4c7404c8e259236b650136b8a603923daf9
refs/heads/master: 6532e9cb33221a31c8514441a972486af713ad6e
1 change: 0 additions & 1 deletion trunk/drivers/net/cxgb3/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ struct vpd_params {

struct pci_params {
unsigned int vpd_cap_addr;
unsigned int pcie_cap_addr;
unsigned short speed;
unsigned char width;
unsigned char variant;
Expand Down
11 changes: 4 additions & 7 deletions trunk/drivers/net/cxgb3/t3_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3290,22 +3290,20 @@ static void config_pcie(struct adapter *adap)
unsigned int fst_trn_rx, fst_trn_tx, acklat, rpllmt;

pci_read_config_word(adap->pdev,
adap->params.pci.pcie_cap_addr + PCI_EXP_DEVCTL,
adap->pdev->pcie_cap + PCI_EXP_DEVCTL,
&val);
pldsize = (val & PCI_EXP_DEVCTL_PAYLOAD) >> 5;

pci_read_config_word(adap->pdev, 0x2, &devid);
if (devid == 0x37) {
pci_write_config_word(adap->pdev,
adap->params.pci.pcie_cap_addr +
PCI_EXP_DEVCTL,
adap->pdev->pcie_cap + PCI_EXP_DEVCTL,
val & ~PCI_EXP_DEVCTL_READRQ &
~PCI_EXP_DEVCTL_PAYLOAD);
pldsize = 0;
}

pci_read_config_word(adap->pdev,
adap->params.pci.pcie_cap_addr + PCI_EXP_LNKCTL,
pci_read_config_word(adap->pdev, adap->pdev->pcie_cap + PCI_EXP_LNKCTL,
&val);

fst_trn_tx = G_NUMFSTTRNSEQ(t3_read_reg(adap, A_PCIE_PEX_CTRL0));
Expand Down Expand Up @@ -3429,12 +3427,11 @@ static void get_pci_mode(struct adapter *adapter, struct pci_params *p)
static unsigned short speed_map[] = { 33, 66, 100, 133 };
u32 pci_mode, pcie_cap;

pcie_cap = pci_find_capability(adapter->pdev, PCI_CAP_ID_EXP);
pcie_cap = pci_pcie_cap(adapter->pdev);
if (pcie_cap) {
u16 val;

p->variant = PCI_VARIANT_PCIE;
p->pcie_cap_addr = pcie_cap;
pci_read_config_word(adapter->pdev, pcie_cap + PCI_EXP_LNKSTA,
&val);
p->width = (val >> 4) & 0x3f;
Expand Down

0 comments on commit 1c84383

Please sign in to comment.