diff mbox series

[meta-oe] android-tools-conf-configfs: handle multiple UDC controllers

Message ID 20260123094119.2665-1-shoudil@qti.qualcomm.com
State New
Headers show
Series [meta-oe] android-tools-conf-configfs: handle multiple UDC controllers | expand

Commit Message

Jose Quaresma Jan. 23, 2026, 9:41 a.m. UTC
For the boards with multiple UDC ports, adb funtion will be impacted due
to below error.

ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
ls: write error: Device or resource busy

Signed-off-by: Shoudi Li <shoudil@qti.qualcomm.com>
---
 .../android-tools-conf-configfs/android-gadget-start        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Dmitry Baryshkov Jan. 23, 2026, 5:34 p.m. UTC | #1
On Fri, Jan 23, 2026 at 09:41:19AM +0000, Shoudi Li wrote:
> For the boards with multiple UDC ports, adb funtion will be impacted due
> to below error.
> 
> ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
> ls: write error: Device or resource busy
> 
> Signed-off-by: Shoudi Li <shoudil@qti.qualcomm.com>
> ---
>  .../android-tools-conf-configfs/android-gadget-start        | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Same issues, forged From and missing SoB.
Jose Quaresma Jan. 23, 2026, 5:44 p.m. UTC | #2
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> escreveu (sexta,
23/01/2026 à(s) 17:34):

> On Fri, Jan 23, 2026 at 09:41:19AM +0000, Shoudi Li wrote:
> > For the boards with multiple UDC ports, adb funtion will be impacted due
> > to below error.
> >
> > ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
> > ls: write error: Device or resource busy
> >
> > Signed-off-by: Shoudi Li <shoudil@qti.qualcomm.com>
> > ---
> >  .../android-tools-conf-configfs/android-gadget-start        | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
>
> Same issues, forged From and missing SoB.
>

Yep in this one I forgot the --from on git send-email but I didn't notice
that the author was also wrong.


>
>
> --
> With best wishes
> Dmitry
>
Dmitry Baryshkov Jan. 23, 2026, 6:02 p.m. UTC | #3
On Fri, Jan 23, 2026 at 05:44:06PM +0000, Jose Quaresma wrote:
> Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> escreveu (sexta,
> 23/01/2026 à(s) 17:34):
> 
> > On Fri, Jan 23, 2026 at 09:41:19AM +0000, Shoudi Li wrote:
> > > For the boards with multiple UDC ports, adb funtion will be impacted due
> > > to below error.
> > >
> > > ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
> > > ls: write error: Device or resource busy
> > >
> > > Signed-off-by: Shoudi Li <shoudil@qti.qualcomm.com>
> > > ---
> > >  .../android-tools-conf-configfs/android-gadget-start        | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > Same issues, forged From and missing SoB.
> >
> 
> Yep in this one I forgot the --from on git send-email but I didn't notice
> that the author was also wrong.

Hmm, isn't it written in your ~/.gitconfig? Also please use
Qualcomm emails when sending pathches.

And, of course, please don't send HTML emails, they might be filtered
out.
diff mbox series

Patch

diff --git a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
index ca6c3df275..76b5e29624 100644
--- a/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
+++ b/meta-oe/dynamic-layers/selinux/recipes-devtool/android-tools/android-tools-conf-configfs/android-gadget-start
@@ -2,6 +2,8 @@ 
 
 set -e
 
-sleep 3
+sleep 10
 
-ls /sys/class/udc/ > /sys/kernel/config/usb_gadget/adb/UDC
+ls /sys/class/udc/ | head -n 1 | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC
+
+echo "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadget usage"