lkml.org 
[lkml]   [2021]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] HID: amd_sfh: Set correct DMA mask
Date
The AMDSFH driver uses coherent DMA allocations, but only sets the
streaming DMA mask. As a result, the kernel can't make use of the full
address space supported by the device.

Signed-off-by: Dylan MacKenzie <ecstaticmorse@gmail.com>
---
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
index ddecc84fd6f..c2de650cd8e 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
@@ -155,9 +155,9 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i

privdata->mmio = pcim_iomap_table(pdev)[2];
pci_set_master(pdev);
- rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
+ rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
if (rc) {
- rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
+ rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
return rc;
}
rc = devm_add_action_or_reset(&pdev->dev, amd_mp2_pci_remove, privdata);
--
2.31.1
\
 
 \ /
  Last update: 2021-06-22 02:16    [W:0.059 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site