From: Dylan MacKenzie <ecstaticmorse@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Nehal Shah <nehal-bakulchandra.shah@amd.com>,
Sandeep Singh <sandeep.singh@amd.com>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] HID: amd_sfh: Set correct DMA mask
Date: Mon, 21 Jun 2021 17:15:01 -0700 [thread overview]
Message-ID: <20210622001503.47541-2-ecstaticmorse@gmail.com> (raw)
In-Reply-To: <20210622001503.47541-1-ecstaticmorse@gmail.com>
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
next prev parent reply other threads:[~2021-06-22 0:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-22 0:15 [PATCH 0/2] HID: amd_sfh: Minor DMA mapping bugfixes Dylan MacKenzie
2021-06-22 0:15 ` Dylan MacKenzie [this message]
2021-06-22 0:15 ` [PATCH 2/2] HID: amd_sfh: Continue if fallback DMA mask is accepted Dylan MacKenzie
2021-07-28 9:28 ` [PATCH 0/2] HID: amd_sfh: Minor DMA mapping bugfixes Jiri Kosina
2021-07-28 9:33 ` Jiri Kosina
2021-07-28 19:22 ` Basavaraj Natikar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210622001503.47541-2-ecstaticmorse@gmail.com \
--to=ecstaticmorse@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nehal-bakulchandra.shah@amd.com \
--cc=sandeep.singh@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.