From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Elson Serrao <elson.serrao@oss.qualcomm.com>,
sashiko-reviews@lists.linux.dev
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v9 5/8] usb: misc: qcom_eud: improve enable_store API
Date: Thu, 15 Oct 2026 16:33:37 +0200 [thread overview]
Message-ID: <df64e5e3-0585-43c2-b6bd-844abcc4ea9d@oss.qualcomm.com> (raw)
In-Reply-To: <547e3087-cf24-4071-a9e1-5740113fe613@oss.qualcomm.com>
On 9/30/26 12:45 AM, Elson Serrao wrote:
>
>
> On 9/29/2026 2:43 PM, sashiko-bot@kernel.org wrote:
>> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>> - [Medium] usb: qcom_eud: uninitialized software state blocks disabling EUD on boot
>> --
>>
>> commit 16556b4a5664eacf6eb75fc1fe5031d31c087dc0
>> Author: Elson Serrao <elson.serrao@oss.qualcomm.com>
>>
>> usb: misc: qcom_eud: improve enable_store API
>>
>> This commit adds a state check in enable_store() to skip redundant hardware
>> operations when the EUD is already in the desired state. It also improves
>> error handling and logging when enabling or disabling the EUD.
>>
>>> diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c
>>> index 48e474bdf818c..e227d05cfecd4 100644
>>> --- a/drivers/usb/misc/qcom_eud.c
>>> +++ b/drivers/usb/misc/qcom_eud.c
>> [ ... ]
>>> @@ -164,18 +164,27 @@ static ssize_t enable_store(struct device *dev,
>>> if (kstrtobool(buf, &enable))
>>> return -EINVAL;
>>>
>>> + /* Skip operation if already in desired state */
>>> + if (chip->enabled == enable)
>>> + return count;
>>
>> [Severity: Medium]
>> Will this early exit prevent users from disabling the hardware if the
>> bootloader left the EUD enabled?
>>
>
> A bootloader-enabled EUD has never been supported; the driver has
> always assumed EUD is disabled at probe. Supporting it would need more
> than syncing chip->enabled from the register. The driver would also have
> to take the PHY votes and bring the role-switch state into line for the
> active path. That is a separate feature and outside the scope of this
> series.
We definitely want that usecase to be supported too at some point, but
clearly outside the scope of this series
Konrad
next prev parent reply other threads:[~2026-10-15 14:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 21:35 [PATCH v9 0/8] Improve Qualcomm EUD driver and platform support Elson Serrao
2026-09-29 21:35 ` [PATCH v9 1/8] dt-bindings: soc: qcom: eud: Add per-path child nodes for UTMI routing Elson Serrao
2026-09-29 21:35 ` [PATCH v9 2/8] usb: misc: qcom_eud: add sysfs attribute for port selection Elson Serrao
2026-09-29 21:35 ` [PATCH v9 3/8] usb: misc: qcom_eud: add per-path High-Speed PHY control Elson Serrao
2026-09-29 21:35 ` [PATCH v9 4/8] usb: misc: qcom_eud: add per-path role switch support Elson Serrao
2026-10-15 14:42 ` Konrad Dybcio
2026-10-15 14:43 ` Konrad Dybcio
2026-10-17 1:16 ` Elson Serrao
2026-10-15 14:44 ` Konrad Dybcio
2026-10-17 1:14 ` Elson Serrao
2026-09-29 21:35 ` [PATCH v9 5/8] usb: misc: qcom_eud: improve enable_store API Elson Serrao
2026-09-29 21:43 ` sashiko-bot
2026-09-29 22:45 ` Elson Serrao
2026-10-15 14:33 ` Konrad Dybcio [this message]
2026-09-29 21:35 ` [PATCH v9 6/8] usb: misc: qcom_eud: add role-based EUD control Elson Serrao
2026-09-29 21:47 ` sashiko-bot
2026-09-29 22:48 ` Elson Serrao
2026-09-29 21:35 ` [PATCH v9 7/8] usb: misc: qcom_eud: fix virtual attach/detach event handling Elson Serrao
2026-09-29 21:35 ` [PATCH v9 8/8] arm64: dts: qcom: kodiak: Desribe EUD UTMI routing and connector mapping Elson Serrao
2026-10-13 11:01 ` Konrad Dybcio
2026-10-07 10:44 ` [PATCH v9 0/8] Improve Qualcomm EUD driver and platform support Gopikrishna Garmidi
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=df64e5e3-0585-43c2-b6bd-844abcc4ea9d@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=elson.serrao@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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