linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: set the dma max_seg_size
@ 2023-10-26 12:28 Ricardo Ribalda
  2023-10-27 10:51 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Ribalda @ 2023-10-26 12:28 UTC (permalink / raw)
  To: Zubin Mithra, Thinh Nguyen, Greg Kroah-Hartman
  Cc: linux-usb, linux-kernel, Ricardo Ribalda

Allow devices to have dma operations beyond 4K, and avoid warnings such
as:

DMA-API: dwc3 a600000.usb: mapping sg segment longer than device claims to support [len=86016] [max=65536]

Reported-by: Zubin Mithra <zsm@chromium.org>
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
Found while running 
yavta -f YUYV -s 1280x720 -c  /dev/video0

with:

CONFIG_DMA_API_DEBUG=y
---
 drivers/usb/dwc3/core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 343d2570189f..65f73dd8ef47 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1918,6 +1918,8 @@ static int dwc3_probe(struct platform_device *pdev)
 
 	pm_runtime_put(dev);
 
+	dma_set_max_seg_size(dev, UINT_MAX);
+
 	return 0;
 
 err_exit_debugfs:

---
base-commit: 611da07b89fdd53f140d7b33013f255bf0ed8f34
change-id: 20231026-dwc3-fac74fcb3b2a

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: dwc3: set the dma max_seg_size
  2023-10-26 12:28 [PATCH] usb: dwc3: set the dma max_seg_size Ricardo Ribalda
@ 2023-10-27 10:51 ` Greg Kroah-Hartman
  2023-10-27 10:56   ` Ricardo Ribalda
  0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-10-27 10:51 UTC (permalink / raw)
  To: Ricardo Ribalda; +Cc: Zubin Mithra, Thinh Nguyen, linux-usb, linux-kernel

On Thu, Oct 26, 2023 at 12:28:36PM +0000, Ricardo Ribalda wrote:
> Allow devices to have dma operations beyond 4K, and avoid warnings such
> as:
> 
> DMA-API: dwc3 a600000.usb: mapping sg segment longer than device claims to support [len=86016] [max=65536]
> 
> Reported-by: Zubin Mithra <zsm@chromium.org>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> ---
> Found while running 
> yavta -f YUYV -s 1280x720 -c  /dev/video0
> 
> with:
> 
> CONFIG_DMA_API_DEBUG=y
> ---
>  drivers/usb/dwc3/core.c | 2 ++
>  1 file changed, 2 insertions(+)

What commit id does this fix?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: dwc3: set the dma max_seg_size
  2023-10-27 10:51 ` Greg Kroah-Hartman
@ 2023-10-27 10:56   ` Ricardo Ribalda
  2023-10-27 11:24     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Ricardo Ribalda @ 2023-10-27 10:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Zubin Mithra, Thinh Nguyen, linux-usb, linux-kernel

Hi Greg

On Fri, 27 Oct 2023 at 12:51, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> What commit id does this fix?
Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")

Shall I send v2? or you can pick the tag?

Thanks!



-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: dwc3: set the dma max_seg_size
  2023-10-27 10:56   ` Ricardo Ribalda
@ 2023-10-27 11:24     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-10-27 11:24 UTC (permalink / raw)
  To: Ricardo Ribalda; +Cc: Zubin Mithra, Thinh Nguyen, linux-usb, linux-kernel

On Fri, Oct 27, 2023 at 12:56:49PM +0200, Ricardo Ribalda wrote:
> Hi Greg
> 
> On Fri, 27 Oct 2023 at 12:51, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > What commit id does this fix?
> Fixes: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")
> 
> Shall I send v2? or you can pick the tag?

Please send a v2 as you now obviously will also have to add a proper
"cc: stable..." tag as well, right?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-27 11:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-26 12:28 [PATCH] usb: dwc3: set the dma max_seg_size Ricardo Ribalda
2023-10-27 10:51 ` Greg Kroah-Hartman
2023-10-27 10:56   ` Ricardo Ribalda
2023-10-27 11:24     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).