Skip to content

Commit cb9b6f9

Browse files
dramforeverThomas Gleixner
authored andcommitted
ALSA: hda/intel: Make MSI address limit based on the device DMA limit
The hda/intel driver restricts the MSI message address for devices which do not advertise full 64-bit DMA address space support to 32-bit due to the former restrictions of the PCI/MSI code which only allowed either 32-bit or a full 64-bit address range. This does not work on platforms which have a MSI doorbell address above the 32-bit boundary but do not support the full 64 bit address range. The PCI/MSI core converted this binary decision to a DMA_BIT_MASK() based decision, which allows to describe the device limitations precisely. Convert the driver to provide the exact DMA address limitations to the PCI/MSI core. That allows devices which do not support the full 64-bit address space to work on platforms which have a MSI doorbell address above the 32-bit limit as long as it is within the hardware's addressable range. [ tglx: Massage changelog ] Signed-off-by: Vivian Wang <wangruikang@iscas.ac.cn> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Acked-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260129-pci-msi-addr-mask-v4-4-70da998f2750@iscas.ac.cn
1 parent 617562b commit cb9b6f9

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

sound/hda/controllers/intel.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,11 +1903,6 @@ static int azx_first_init(struct azx *chip)
19031903
chip->gts_present = true;
19041904
#endif
19051905

1906-
if (chip->msi && chip->driver_caps & AZX_DCAPS_NO_MSI64) {
1907-
dev_dbg(card->dev, "Disabling 64bit MSI\n");
1908-
pci->msi_addr_mask = DMA_BIT_MASK(32);
1909-
}
1910-
19111906
pci_set_master(pci);
19121907

19131908
gcap = azx_readw(chip, GCAP);
@@ -1958,6 +1953,11 @@ static int azx_first_init(struct azx *chip)
19581953
dma_set_mask_and_coherent(&pci->dev, DMA_BIT_MASK(32));
19591954
dma_set_max_seg_size(&pci->dev, UINT_MAX);
19601955

1956+
if (chip->msi && chip->driver_caps & AZX_DCAPS_NO_MSI64) {
1957+
dev_dbg(card->dev, "Restricting MSI to %u-bit\n", dma_bits);
1958+
pci->msi_addr_mask = DMA_BIT_MASK(dma_bits);
1959+
}
1960+
19611961
/* read number of streams from GCAP register instead of using
19621962
* hardcoded value
19631963
*/

0 commit comments

Comments
 (0)