[PATCH] usb: xhci-mtk: set the dma max_seg_size

Robin Murphy robin.murphy at arm.com
Thu Jun 29 04:40:03 PDT 2023


On 2023-06-29 09:40, Greg Kroah-Hartman wrote:
> On Thu, Jun 29, 2023 at 09:13:23AM +0200, Ricardo Ribalda wrote:
>> Hi Zubin
>>
>> On Wed, 28 Jun 2023 at 23:57, Zubin Mithra <zsm at chromium.org> wrote:
>>>
>>> On Wed, Jun 28, 2023 at 11:04:20PM +0200, Ricardo Ribalda wrote:
>>>> On Wed, 28 Jun 2023 at 23:00, Ricardo Ribalda <ribalda at chromium.org> wrote:
>>>>>
>>>>> Allow devices to have dma operations beyond 64K, and avoid warnings such
>>>>> as:
>>>>>
>>>>> DMA-API: xhci-mtk 11200000.usb: mapping sg segment longer than device claims to support [len=98304] [max=65536]
>>>>>
>>>>> Signed-off-by: Ricardo Ribalda <ribalda at chromium.org>
>>>> Reported-by: Zubin Mithra <zsm at chromium.org>
>>>
>>> Should this be cc'd to stable@ as well?
>>
>> Not sure, in most of the cases this is "just" a warning fix. Let the
>> maintainer decide:
> 
> Warnings can cause reboots as the majority of the linux systems in the
> world run panic-on-warn, so yes, it should be backported.

Although in this particular case, running DMA_API_DEBUG=y on production 
systems is a pretty inadvisable thing to do anyway ;)

However I'm glad I looked, since I think this also points to a bug in 
dma_alloc_noncontiguous() - it's one thing to blame a driver for trying 
to map a malformed scatterlist of its own, but if the DMA API is 
generating one internally without respecting the device's (claimed) 
parameters, then that's on us. I'll have a look into it...

Thanks,
Robin.



More information about the linux-arm-kernel mailing list