Skip to content

Commit 0321da8

Browse files
committed
Merge branch 'pci/host/dwc'
- Restore MSI Receiver mask during resume (Jisheng Zhang) * pci/host/dwc: PCI: dwc: Restore MSI Receiver mask during resume
2 parents 7ec9ff9 + 815953d commit 0321da8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

drivers/pci/controller/dwc/pcie-designware-host.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,12 @@ int dw_pcie_host_init(struct pcie_port *pp)
362362
if (ret < 0)
363363
return ret;
364364
} else if (pp->has_msi_ctrl) {
365+
u32 ctrl, num_ctrls;
366+
367+
num_ctrls = pp->num_vectors / MAX_MSI_IRQS_PER_CTRL;
368+
for (ctrl = 0; ctrl < num_ctrls; ctrl++)
369+
pp->irq_mask[ctrl] = ~0;
370+
365371
if (!pp->msi_irq) {
366372
pp->msi_irq = platform_get_irq_byname_optional(pdev, "msi");
367373
if (pp->msi_irq < 0) {
@@ -541,7 +547,6 @@ void dw_pcie_setup_rc(struct pcie_port *pp)
541547

542548
/* Initialize IRQ Status array */
543549
for (ctrl = 0; ctrl < num_ctrls; ctrl++) {
544-
pp->irq_mask[ctrl] = ~0;
545550
dw_pcie_writel_dbi(pci, PCIE_MSI_INTR0_MASK +
546551
(ctrl * MSI_REG_CTRL_BLOCK_SIZE),
547552
pp->irq_mask[ctrl]);

0 commit comments

Comments
 (0)