diff options
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index 9165a55f8111..6526214f69d9 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -2657,13 +2657,14 @@ static void myri10ge_enable_ecrc(struct myri10ge_priv *mgp) | |||
2657 | ext_type = (val & PCI_EXP_FLAGS_TYPE) >> 4; | 2657 | ext_type = (val & PCI_EXP_FLAGS_TYPE) >> 4; |
2658 | if (ext_type != PCI_EXP_TYPE_ROOT_PORT) { | 2658 | if (ext_type != PCI_EXP_TYPE_ROOT_PORT) { |
2659 | if (myri10ge_ecrc_enable > 1) { | 2659 | if (myri10ge_ecrc_enable > 1) { |
2660 | struct pci_dev *old_bridge = bridge; | 2660 | struct pci_dev *prev_bridge, *old_bridge = bridge; |
2661 | 2661 | ||
2662 | /* Walk the hierarchy up to the root port | 2662 | /* Walk the hierarchy up to the root port |
2663 | * where ECRC has to be enabled */ | 2663 | * where ECRC has to be enabled */ |
2664 | do { | 2664 | do { |
2665 | prev_bridge = bridge; | ||
2665 | bridge = bridge->bus->self; | 2666 | bridge = bridge->bus->self; |
2666 | if (!bridge) { | 2667 | if (!bridge || prev_bridge == bridge) { |
2667 | dev_err(dev, | 2668 | dev_err(dev, |
2668 | "Failed to find root port" | 2669 | "Failed to find root port" |
2669 | " to force ECRC\n"); | 2670 | " to force ECRC\n"); |