提交 abad2ec9 编写于 作者: J Jesse Barnes

PCI: fully restore MSI state at resume time

With the recent change to avoid masking MSIs using the MSI enable bit, devices
without an MSI mask bit will have their MSI capability always enabled when MSI
is in use, so we need to restore it regardless of the mask bit state.

Fixes kernel bz 11178.
Acked-by: NMatthew Wilcox <willy@linux.intel.com>
Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 cb3952bf
...@@ -308,8 +308,7 @@ static void __pci_restore_msi_state(struct pci_dev *dev) ...@@ -308,8 +308,7 @@ static void __pci_restore_msi_state(struct pci_dev *dev)
entry->msi_attrib.masked); entry->msi_attrib.masked);
pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control); pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control);
control &= ~(PCI_MSI_FLAGS_QSIZE | PCI_MSI_FLAGS_ENABLE); control &= ~PCI_MSI_FLAGS_QSIZE;
if (entry->msi_attrib.maskbit || !entry->msi_attrib.masked)
control |= PCI_MSI_FLAGS_ENABLE; control |= PCI_MSI_FLAGS_ENABLE;
pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control); pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册