From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Anjelique Melendez <anjelique.melendez@oss.qualcomm.com>
Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org,
lumag@kernel.org, neil.armstrong@linaro.org,
johan+linaro@kernel.org, quic_bjorande@quicinc.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v4 2/2] usb: typec: ucsi_glink: Increase buffer size to support UCSI v2
Date: Wed, 1 Oct 2025 11:42:46 +0200 [thread overview]
Message-ID: <a31ac6fd-929f-4001-8199-1b8730ccbadd@oss.qualcomm.com> (raw)
In-Reply-To: <6kbkkiwsp3hzu2u6uezelwufooeeh7efrcc2buydpbziuhr5px@xdp24rhfjqyf>
On 9/27/25 12:07 AM, Dmitry Baryshkov wrote:
> On Fri, Sep 26, 2025 at 11:19:13AM -0700, Anjelique Melendez wrote:
>>
>>
>> On 9/25/2025 2:43 PM, Dmitry Baryshkov wrote:
>>> On Wed, Sep 24, 2025 at 04:26:31PM -0700, Anjelique Melendez wrote:
>>>> UCSI v2 specification has increased the MSG_IN and MSG_OUT size from
>>>> 16 bytes to 256 bytes each for the message exchange between OPM and PPM
>>>> This makes the total buffer size increase from 48 bytes to 528 bytes.
>>>> Update the buffer size to support this increase.
>>>>
>>>> Signed-off-by: Anjelique Melendez <anjelique.melendez@oss.qualcomm.com>
>>>> ---
[...]
>>> I'd prefer it to be more explicit. Define an union of v1 and v2, fill
>>> common parts and version-specific parts separately.
>> Konrad also left a similar comment in this function "This code keeps the
>> 'reserved' field zeored out for v1, but it does so in a fragile and implicit
>> way :/" (https://lore.kernel.org/all/df671650-a5af-4453-a11d-e8e2a32bd1ab@oss.qualcomm.com/#t)
>>
>> So I figured I would try to get thoughts from the both of you :)
>>
>> We could have a union defined like so:
>> struct __packed ucsi_write_buf_req_msg {
>> struct pmic_glink_hdr hdr;
>> union {
>> u8 v2_buf[UCSI_BUF_V2_SIZE];
>> u8 v1_buf[UCSI_BUF_V1_SIZE];
>> } buf;
>> u32 reserved;
>> };
>
> LGTM.
+1
Konrad
next prev parent reply other threads:[~2025-10-01 9:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-24 23:26 [PATCH v4 0/2] usb: typec: ucsi_glink: Add support UCSI v2 Anjelique Melendez
2025-09-24 23:26 ` [PATCH v4 1/2] usb: typec: ucsi_glink: Update request/response buffers to be packed Anjelique Melendez
2025-09-24 23:26 ` [PATCH v4 2/2] usb: typec: ucsi_glink: Increase buffer size to support UCSI v2 Anjelique Melendez
2025-09-25 12:07 ` Konrad Dybcio
2025-09-25 21:43 ` Dmitry Baryshkov
2025-09-26 18:19 ` Anjelique Melendez
2025-09-26 22:07 ` Dmitry Baryshkov
2025-10-01 9:42 ` Konrad Dybcio [this message]
2025-09-26 0:50 ` kernel test robot
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=a31ac6fd-929f-4001-8199-1b8730ccbadd@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=anjelique.melendez@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=johan+linaro@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_bjorande@quicinc.com \
/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