[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1fe8f8a7-c88f-0c91-e74f-4d3f2f885c89@linux.intel.com>
Date: Wed, 14 Dec 2022 12:20:09 +0200
From: Mathias Nyman <mathias.nyman@...ux.intel.com>
To: Ricardo Ribalda <ribalda@...omium.org>,
Mathias Nyman <mathias.nyman@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Takashi Iwai <tiwai@...e.de>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xhci-pci: set the dma max_seg_size
On 13.12.2022 17.08, Ricardo Ribalda wrote:
> Allow devices to have dma operations beyond 64K, and avoid warnings such
> as:
>
> xhci_hcd 0000:00:14.0: mapping sg segment longer than device claims to support [len=98304] [max=65536]
>
> Cc: Takashi Iwai <tiwai@...e.de>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
> To: Mathias Nyman <mathias.nyman@...el.com>
> To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: linux-usb@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> ---
> drivers/usb/host/xhci-pci.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index 7bccbe50bab1..116a2f328772 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -453,6 +453,8 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
> if (xhci->quirks & XHCI_DEFAULT_PM_RUNTIME_ALLOW)
> pm_runtime_allow(&dev->dev);
>
> + dma_set_max_seg_size(&dev->dev, UINT_MAX);
> +
Thanks, this should be ok.
Preferred max segment size of sg list would be 64k as xHC hardware has 64k TRB payload size
limit, but xhci driver will take care of larger segments, splitting them into 64k chunks.
-Mathias
Powered by blists - more mailing lists