[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <88b2fb4b-96a4-4d29-bf92-4064d3572fa4@linuxfoundation.org>
Date: Fri, 21 Feb 2025 09:37:25 -0700
From: Shuah Khan <skhan@...uxfoundation.org>
To: Zongmin Zhou <min_halo@....com>, valentina.manea.m@...il.com,
shuah@...nel.org, i@...ithal.me, gregkh@...uxfoundation.org
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Zongmin Zhou <zhouzongmin@...inos.cn>, Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] usbip: Fix the error limitation on max_hw_sectors for
usbip device
On 2/19/25 02:25, Zongmin Zhou wrote:
> From: Zongmin Zhou <zhouzongmin@...inos.cn>
>
> This patch fixes an issue that usb device through usbip protocol,
> the max_hw_sectors will be limited to 512,and then
> read/write rate of high speed USB devices will be limited.
>
> After the commit d74ffae8b8dd ("usb-storage: Add a limitation
> for blk_queue_max_hw_sectors()") is applied,
> This issue happened on the swiotlb enabled environment.
> This commit will checks the maximum size of a mapping for the device,
> and adjusts the max_hw_sectors.On vhci-hcd driver,
> the dma mask setting follows the platform device default setting(32-bit).
> So dma_addressing_limited() will be true,then the maximum mapping size
> use the swiotlb max mapping size(512).The max_hw_sectors reset to 512.
>
> To fix this issue,have to get the dma mask bit that
> the real USB controllers support,and set this value on vhci-hcd driver,
> usbip device will get the correct max_hw_sectors.
I don't have objections to this change. This does change
the API between the kernel and user-space and requires more
testing with mispatched kernel and user-space.
Can you give me more details on testing you have done with
the revision mismatches environments?
Also this would require bumping up the version on kernel and
user-space sides.
thanks,
-- Shuah
Powered by blists - more mailing lists