Message ID | 20100630040959.8652.31147.stgit@localhost.localdomain |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Date: Tue, 29 Jun 2010 21:12:05 -0700 > From: Dean Nelson <dnelson@redhat.com> > > Should e1000_test_msi() fail to see an msi interrupt, it attempts to > fallback to legacy INTx interrupts. But an error in the code may prevent > this from happening correctly. ... > The solution is to have e1000_test_msi() re-read the PCI_COMMAND bits as > part of its attempt to re-enable SERR. > > During debugging/testing of this issue I found that not all the systems > I ran on had the SERR bit set to begin with. And on some of the systems > the same could be said for the INTX_DISABLE bit. Needless to say these > latter systems didn't have a problem falling back to legacy INTx > interrupts with the code as is. > > Signed-off-by: Dean Nelson <dnelson@redhat.com> > CC: stable@kernel.org > Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 71592ed..3e53ca7 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) /* disable SERR in case the MSI write causes a master abort */ pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd); - pci_write_config_word(adapter->pdev, PCI_COMMAND, - pci_cmd & ~PCI_COMMAND_SERR); + if (pci_cmd & PCI_COMMAND_SERR) + pci_write_config_word(adapter->pdev, PCI_COMMAND, + pci_cmd & ~PCI_COMMAND_SERR); err = e1000_test_msi_interrupt(adapter); - /* restore previous setting of command word */ - pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd); + /* re-enable SERR */ + if (pci_cmd & PCI_COMMAND_SERR) { + pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd); + pci_cmd |= PCI_COMMAND_SERR; + pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd); + } /* success ! */ if (!err)