mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
Vijendar Mukunda <Vijendar.Mukunda@amd.com> says:
This series contains three bug fixes for the AMD common ACP PCI driver (pci-ps.c) covering ACP6.3, ACP7.0, ACP7.1 and ACP7.2 platforms. Link: https://patch.msgid.link/20260707060130.2514138-1-Vijendar.Mukunda@amd.com
This commit is contained in:
commit
f21d74ef0c
|
|
@ -248,7 +248,7 @@ static irqreturn_t acp63_irq_handler(int irq, void *dev_id)
|
|||
if (sdw_dma_irq_flag)
|
||||
return IRQ_WAKE_THREAD;
|
||||
|
||||
if (irq_flag | wake_irq_flag)
|
||||
if (irq_flag || wake_irq_flag)
|
||||
return IRQ_HANDLED;
|
||||
else
|
||||
return IRQ_NONE;
|
||||
|
|
@ -602,7 +602,7 @@ static int snd_acp63_probe(struct pci_dev *pci,
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
ret = pci_request_regions(pci, "AMD ACP6.2 audio");
|
||||
ret = pci_request_regions(pci, "AMD ACP6.3 audio");
|
||||
if (ret < 0) {
|
||||
dev_err(&pci->dev, "pci_request_regions failed\n");
|
||||
goto disable_pci;
|
||||
|
|
@ -693,8 +693,37 @@ static int snd_acp_runtime_resume(struct device *dev)
|
|||
return acp_hw_runtime_resume(dev);
|
||||
}
|
||||
|
||||
static void acp_disable_msi_on_resume(struct pci_dev *pdev)
|
||||
{
|
||||
u16 control;
|
||||
|
||||
if (!pdev->msi_cap)
|
||||
return;
|
||||
|
||||
pci_read_config_word(pdev, pdev->msi_cap + PCI_MSI_FLAGS, &control);
|
||||
if (control & PCI_MSI_FLAGS_ENABLE) {
|
||||
dev_warn(&pdev->dev,
|
||||
"ACP: MSI unexpectedly enabled after resume (flags=0x%04x), disabling\n",
|
||||
control);
|
||||
control &= ~PCI_MSI_FLAGS_ENABLE;
|
||||
pci_write_config_word(pdev, pdev->msi_cap + PCI_MSI_FLAGS, control);
|
||||
}
|
||||
}
|
||||
|
||||
static int snd_acp_resume(struct device *dev)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(dev);
|
||||
|
||||
/*
|
||||
* BIOS/firmware may re-enable MSI in PCI config space during
|
||||
* system resume even though this driver only uses legacy INTx
|
||||
* interrupts. If MSI is left enabled with stale address/data
|
||||
* registers, the device will write interrupts to a bogus address
|
||||
* causing IOMMU IO_PAGE_FAULT and interrupt delivery failure.
|
||||
* Explicitly clear the MSI Enable bit before reinitializing
|
||||
* the ACP hardware.
|
||||
*/
|
||||
acp_disable_msi_on_resume(pdev);
|
||||
return acp_hw_resume(dev);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user