diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 71592ed2e686..3e53ca723435 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -3439,13 +3439,18 @@ static int e1000_test_msi(struct e1000_adapter *adapter) | |||
3439 | 3439 | ||
3440 | /* disable SERR in case the MSI write causes a master abort */ | 3440 | /* disable SERR in case the MSI write causes a master abort */ |
3441 | pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd); | 3441 | pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd); |
3442 | pci_write_config_word(adapter->pdev, PCI_COMMAND, | 3442 | if (pci_cmd & PCI_COMMAND_SERR) |
3443 | pci_cmd & ~PCI_COMMAND_SERR); | 3443 | pci_write_config_word(adapter->pdev, PCI_COMMAND, |
3444 | pci_cmd & ~PCI_COMMAND_SERR); | ||
3444 | 3445 | ||
3445 | err = e1000_test_msi_interrupt(adapter); | 3446 | err = e1000_test_msi_interrupt(adapter); |
3446 | 3447 | ||
3447 | /* restore previous setting of command word */ | 3448 | /* re-enable SERR */ |
3448 | pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd); | 3449 | if (pci_cmd & PCI_COMMAND_SERR) { |
3450 | pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd); | ||
3451 | pci_cmd |= PCI_COMMAND_SERR; | ||
3452 | pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd); | ||
3453 | } | ||
3449 | 3454 | ||
3450 | /* success ! */ | 3455 | /* success ! */ |
3451 | if (!err) | 3456 | if (!err) |