Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255988
b: refs/heads/master
c: effd1ed
h: refs/heads/master
v: v3
  • Loading branch information
Jon Mason authored and David S. Miller committed Jun 29, 2011
1 parent 1c49406 commit bdcdb65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: 5dcd846712046d68020e9dfddd7ca491dc138f0d
refs/heads/master: effd1edab9fd3dc03cb87097a9da2552b940456b
11 changes: 5 additions & 6 deletions trunk/drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@ static int myri10ge_toggle_relaxed(struct pci_dev *pdev, int on)
int ret, cap, err;
u16 ctl;

cap = pci_find_capability(pdev, PCI_CAP_ID_EXP);
cap = pci_pcie_cap(pdev);
if (!cap)
return 0;

Expand Down Expand Up @@ -3191,7 +3191,7 @@ static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp)
{
struct pci_dev *bridge = mgp->pdev->bus->self;
struct device *dev = &mgp->pdev->dev;
unsigned cap;
int cap;
unsigned err_cap;
u16 val;
u8 ext_type;
Expand All @@ -3201,7 +3201,7 @@ static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp)
return;

/* check that the bridge is a root port */
cap = pci_find_capability(bridge, PCI_CAP_ID_EXP);
cap = pci_pcie_cap(bridge);
pci_read_config_word(bridge, cap + PCI_CAP_FLAGS, &val);
ext_type = (val & PCI_EXP_FLAGS_TYPE) >> 4;
if (ext_type != PCI_EXP_TYPE_ROOT_PORT) {
Expand All @@ -3219,8 +3219,7 @@ static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp)
" to force ECRC\n");
return;
}
cap =
pci_find_capability(bridge, PCI_CAP_ID_EXP);
cap = pci_pcie_cap(bridge);
pci_read_config_word(bridge,
cap + PCI_CAP_FLAGS, &val);
ext_type = (val & PCI_EXP_FLAGS_TYPE) >> 4;
Expand Down Expand Up @@ -3341,7 +3340,7 @@ static void myri10ge_select_firmware(struct myri10ge_priv *mgp)
int link_width, exp_cap;
u16 lnk;

exp_cap = pci_find_capability(mgp->pdev, PCI_CAP_ID_EXP);
exp_cap = pci_pcie_cap(mgp->pdev);
pci_read_config_word(mgp->pdev, exp_cap + PCI_EXP_LNKSTA, &lnk);
link_width = (lnk >> 4) & 0x3f;

Expand Down

0 comments on commit bdcdb65

Please sign in to comment.