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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260109181839.58ec0802@kemnade.info>
Date: Fri, 9 Jan 2026 18:18:39 +0100
From: Andreas Kemnade <andreas@...nade.info>
To: Lee Jones <lee@...nel.org>
Cc: Johan Hovold <johan@...nel.org>, Aaro Koskinen <aaro.koskinen@....fi>,
 Kevin Hilman <khilman@...libre.com>, Roger Quadros <rogerq@...nel.org>,
 Tony Lindgren <tony@...mide.com>, linux-omap@...r.kernel.org,
 linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] mfd: omap-usb-host: fix OF populate on driver rebind

On Fri, 9 Jan 2026 16:39:39 +0000
Lee Jones <lee@...nel.org> wrote:

> On Fri, 09 Jan 2026, Lee Jones wrote:
> 
> > On Fri, 19 Dec 2025, Johan Hovold wrote:
> >   
> > > Since commit c6e126de43e7 ("of: Keep track of populated platform
> > > devices") child devices will not be created by of_platform_populate()
> > > if the devices had previously been deregistered individually so that the
> > > OF_POPULATED flag is still set in the corresponding OF nodes.
> > > 
> > > Switch to using of_platform_depopulate() instead of open coding so that
> > > the child devices are created if the driver is rebound.
> > > 
> > > Fixes: c6e126de43e7 ("of: Keep track of populated platform devices")
> > > Cc: stable@...r.kernel.org	# 3.16
> > > Signed-off-by: Johan Hovold <johan@...nel.org>
> > > ---
> > >  drivers/mfd/omap-usb-host.c | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> > > index a77b6fc790f2..4d29a6e2ed87 100644
> > > --- a/drivers/mfd/omap-usb-host.c
> > > +++ b/drivers/mfd/omap-usb-host.c
> > > @@ -819,8 +819,10 @@ static void usbhs_omap_remove(struct platform_device *pdev)
> > >  {
> > >  	pm_runtime_disable(&pdev->dev);
> > >  
> > > -	/* remove children */
> > > -	device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);
> > > +	if (pdev->dev.of_node)
> > > +		of_platform_depopulate(&pdev->dev);  
> > 
> > devm_of_platform_populate()?
> >   
> > > +	else
> > > +		device_for_each_child(&pdev->dev, NULL, usbhs_omap_remove_child);  
> > 
> > What on earth is this driver even doing in MFD?
> > 
> > Nightmare - quick dig, bury it!  
> 
> Is the old platform method even supported anymore?
> 
> $ git grep \"usbhs_omap\""
> drivers/mfd/omap-usb-host.c:#define USBHS_DRIVER_NAME   "usbhs_omap"
> 
:~/linux/arch/arm/boot/dts/ti/omap$ grep ti,usbhs-host *.dtsi
omap3.dtsi:			compatible = "ti,usbhs-host";
omap4-l4.dtsi:				compatible = "ti,usbhs-host";
omap5-l4.dtsi:				compatible = "ti,usbhs-host";

So it is still in use.

Regards,
Andreas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ