Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35259
b: refs/heads/master
c: ce7f936
h: refs/heads/master
i:
  35257: f84c4e8
  35255: 7f4f782
v: v3
  • Loading branch information
Brice Goglin authored and Jeff Garzik committed Sep 6, 2006
1 parent fbb8911 commit 9ff6402
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 8 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: b4d01327e4c05ab555a4cf38a33f4b4fa2f75e64
refs/heads/master: ce7f93680aa1d37171c654536ae0ce9745d86a24
35 changes: 28 additions & 7 deletions trunk/drivers/net/myri10ge/myri10ge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2417,6 +2417,8 @@ static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp)
*/

#define PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE 0x0132
#define PCI_DEVICE_ID_INTEL_E5000_PCIE23 0x25f7
#define PCI_DEVICE_ID_INTEL_E5000_PCIE47 0x25fa

static void myri10ge_select_firmware(struct myri10ge_priv *mgp)
{
Expand All @@ -2426,15 +2428,34 @@ static void myri10ge_select_firmware(struct myri10ge_priv *mgp)
mgp->fw_name = myri10ge_fw_unaligned;

if (myri10ge_force_firmware == 0) {
int link_width, exp_cap;
u16 lnk;

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

myri10ge_enable_ecrc(mgp);

/* Check to see if the upstream bridge is known to
* provide aligned completions */
if (bridge
/* ServerWorks HT2000/HT1000 */
&& bridge->vendor == PCI_VENDOR_ID_SERVERWORKS
&& bridge->device ==
PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE) {
/* Check to see if Link is less than 8 or if the
* upstream bridge is known to provide aligned
* completions */
if (link_width < 8) {
dev_info(&mgp->pdev->dev, "PCIE x%d Link\n",
link_width);
mgp->tx.boundary = 4096;
mgp->fw_name = myri10ge_fw_aligned;
} else if (bridge &&
/* ServerWorks HT2000/HT1000 */
((bridge->vendor == PCI_VENDOR_ID_SERVERWORKS
&& bridge->device ==
PCI_DEVICE_ID_SERVERWORKS_HT2000_PCIE)
/* All Intel E5000 PCIE ports */
|| (bridge->vendor == PCI_VENDOR_ID_INTEL
&& bridge->device >=
PCI_DEVICE_ID_INTEL_E5000_PCIE23
&& bridge->device <=
PCI_DEVICE_ID_INTEL_E5000_PCIE47))) {
dev_info(&mgp->pdev->dev,
"Assuming aligned completions (0x%x:0x%x)\n",
bridge->vendor, bridge->device);
Expand Down

0 comments on commit 9ff6402

Please sign in to comment.