Skip to content

Commit abad2ec

Browse files
committed
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: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
1 parent cb3952b commit abad2ec

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/pci/msi.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,8 @@ static void __pci_restore_msi_state(struct pci_dev *dev)
308308
entry->msi_attrib.masked);
309309

310310
pci_read_config_word(dev, pos + PCI_MSI_FLAGS, &control);
311-
control &= ~(PCI_MSI_FLAGS_QSIZE | PCI_MSI_FLAGS_ENABLE);
312-
if (entry->msi_attrib.maskbit || !entry->msi_attrib.masked)
313-
control |= PCI_MSI_FLAGS_ENABLE;
311+
control &= ~PCI_MSI_FLAGS_QSIZE;
312+
control |= PCI_MSI_FLAGS_ENABLE;
314313
pci_write_config_word(dev, pos + PCI_MSI_FLAGS, control);
315314
}
316315

0 commit comments

Comments
 (0)