From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: chalianis1@gmail.com, Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH RFT 2/2] usb: xhci: pass hardware device to dma_alloc_coherent
Date: Mon, 1 Dec 2025 22:18:54 +0100 [thread overview]
Message-ID: <20251201211911.1402617-2-a.fatoum@barebox.org> (raw)
In-Reply-To: <20251201211911.1402617-1-a.fatoum@barebox.org>
We already pass the hardware device to dma_map_single in xhci-ring.c, do
the same for the coherent allocation, so dma-ranges is taken into
account.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
drivers/usb/host/xhci-mem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index aca3920427f4..6324bab730ad 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -86,7 +86,7 @@ static void *xhci_malloc(struct xhci_ctrl *ctrl, unsigned int size, dma_addr_t *
{
void *ptr;
- ptr = dma_alloc_coherent(DMA_DEVICE_BROKEN, size, dma_addr);
+ ptr = dma_alloc_coherent(ctrl->host.hw_dev, size, dma_addr);
if (!ptr)
return NULL;
--
2.47.3
prev parent reply other threads:[~2025-12-01 21:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 21:18 [PATCH RFT 1/2] ARM: mmu: take DMA offset into account for coherent memory Ahmad Fatoum
2025-12-01 21:18 ` Ahmad Fatoum [this message]
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=20251201211911.1402617-2-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
--cc=chalianis1@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox