[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YvBK/8yeohLhu2Za@google.com>
Date: Mon, 8 Aug 2022 09:30:07 +1000
From: Daniil Lunev <dlunev@...omium.org>
To: Arthur Simchaev <Arthur.Simchaev@....com>
Cc: James@...r.kernel.org, E.J.Bottomley@...r.kernel.org,
jejb@...ux.vnet.ibm.com, Martin@...r.kernel.org,
K.Petersen@...r.kernel.org, martin.petersen@...cle.com,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
Bean@...r.kernel.org, Huo@...r.kernel.org, beanhuo@...ron.com
Subject: Re: [PATCH] scsi: ufs-bsg: Remove ufs_bsg_get_query_desc_size
function
On Mon, Jun 20, 2022 at 03:26:06PM +0300, Arthur Simchaev wrote:
> The bsg driver allows user space to send device management commands.
> As such, it is often used by field application engineers to debug various problems,
> and as a test bed for new features as well.
>
> Let's not bound ourself to hard coded descriptor sizes, as the new
> Descriptors that supports new features are not defined yet.
Can you clarify what you mean "hard-coded"? The descriptor size is initialized
as QUERY_DESC_MAX_SIZE, and updated in `ufshcd_update_desc_length`, which is
called with the actual size upon finishing `ufshcd_read_desc_param`.
The function you are removing - `ufs_bsg_get_query_desc_size` - doesn't seem to
reject requests on incompatible size, only to restrict the size of the query.
The way the code is written - if I read it right - will lead to truncation of
the response if the size of the requested response is less than the actual
descriptor size, but otherwise you should get full descriptor back.
Can you provide a specific example where you see the problem to arise?
Thanks,
Daniil
Powered by blists - more mailing lists