mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Ricardo Ribalda <ribalda@chromium.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Takashi Iwai <tiwai@suse.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xhci-pci: set the dma max_seg_size
Date: Wed, 14 Dec 2022 12:20:09 +0200	[thread overview]
Message-ID: <1fe8f8a7-c88f-0c91-e74f-4d3f2f885c89@linux.intel.com> (raw)
In-Reply-To: <20221213-xhci-max_seg_size-v1-0-608f716a3792@chromium.org>

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@suse.de>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> ---
> To: Mathias Nyman <mathias.nyman@intel.com>
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-usb@vger.kernel.org
> Cc: linux-kernel@vger.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


      reply	other threads:[~2022-12-14 10:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 15:08 Ricardo Ribalda
2022-12-14 10:20 ` Mathias Nyman [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=1fe8f8a7-c88f-0c91-e74f-4d3f2f885c89@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=ribalda@chromium.org \
    --cc=tiwai@suse.de \
    /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

all inboxes | Powered by JetHome®