lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <000001dc44c0$b02d2330$10876990$@samsung.com>
Date: Fri, 24 Oct 2025 14:02:03 +0530
From: "Pritam Manohar Sutar" <pritam.sutar@...sung.com>
To: "'Thinh Nguyen'" <Thinh.Nguyen@...opsys.com>
Cc: <gregkh@...uxfoundation.org>, <linux-usb@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <rosa.pila@...sung.com>,
	<dev.tailor@...sung.com>, <faraz.ata@...sung.com>,
	<muhammed.ali@...sung.com>, <selvarasu.g@...sung.com>
Subject: RE: [PATCH] usb: dwc3: Allow usb role swich control from userspace

Hi Thinh,

> -----Original Message-----
> From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
> Sent: 24 October 2025 04:15 AM
> To: Pritam Manohar Sutar <pritam.sutar@...sung.com>
> Cc: Thinh Nguyen <Thinh.Nguyen@...opsys.com>;
> gregkh@...uxfoundation.org; linux-usb@...r.kernel.org; linux-
> kernel@...r.kernel.org; rosa.pila@...sung.com; dev.tailor@...sung.com;
> faraz.ata@...sung.com; muhammed.ali@...sung.com;
> selvarasu.g@...sung.com
> Subject: Re: [PATCH] usb: dwc3: Allow usb role swich control from userspace
> 
> On Thu, Oct 23, 2025, Pritam Manohar Sutar wrote:
> > Hi Thinh,
> >
> > > -----Original Message-----
> > > From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
> > > Sent: 22 October 2025 03:40 AM
> > > To: Pritam Manohar Sutar <pritam.sutar@...sung.com>
> > > Cc: Thinh Nguyen <Thinh.Nguyen@...opsys.com>;
> > > gregkh@...uxfoundation.org; linux-usb@...r.kernel.org; linux-
> > > kernel@...r.kernel.org; rosa.pila@...sung.com;
> > > dev.tailor@...sung.com; faraz.ata@...sung.com;
> > > muhammed.ali@...sung.com; selvarasu.g@...sung.com
> > > Subject: Re: [PATCH] usb: dwc3: Allow usb role swich control from
> > > userspace
> > >
> > > On Mon, Oct 20, 2025, Pritam Manohar Sutar wrote:
> > > > There is a possibility of user needs for USB mode switching on
> > > > boards that lack external hardware support for dynamic host/device
> > > > role detection.
> > >
> > > It's fine to enable this. But base on this change log, it sounds
> > > like there's no use case at the moment? If there is one, even if
> > > it's only for debugging purpose, please note it so. I'm hesitant to
> > > accept changes base on use case speculation only.
> > >
> >
> > Thank you for your comments.
> >
> > Yes, a use case exists, especially in automotive, where this feature
> > is needed to allow user-space applications to switch modes (host to
> > device or vice-versa) at runtime during CarPlay or Android Auto
> > operations.
> >
> > Can you please confirm updated commit message with usecase added as
> below?
> >
> > "
> > usb: dwc3: Allow usb role swich control from userspace
> >
> > There is a possibility of user needs for USB mode switching on boards
> > that lack external hardware support for dynamic host/device role
> > detection. This is particularly relevant in automotive applications
> > where userspace applications need to switch USB roles (host to device)
> > at runtime for CarPlay/Android Auto integration.
> >
> > Add an `allow_userspace_control` flag to handle such cases. When
> > enabled, it exposes a sysfs attribute that allows userspace to switch
> > the USB role manually between host and device. This provides
> > flexibility for platforms that cannot rely on hardware-based mode detection.
> >
> > The role switch can be done as below
> > echo host > /sys/class/usb_role/<ADDR>.usb-role-switch/role
> > echo device > /sys/class/usb_role/<ADDR>.usb-role-switch/role
> > "
> >
> 
> Yes, can you update the patch with this new info? Thank you.
> 

Will update it and share v2 patch soon. 

> Acked-by: Thinh Nguyen <Thinh.Nguyen@...opsys.com>

Thank you.

> 
> BR,
> Thinh

Regards,
Pritam


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ