Hot-plugging non-sensor devices on non-PnP buses (was: Re: entity-manager: SBTSI and hwmontempsensor)

Paul Fertser fercerpav at gmail.com
Tue May 9 21:26:12 AEST 2023


On Tue, May 09, 2023 at 03:35:09AM -0700, Zev Weiss wrote:
> On Tue, May 09, 2023 at 12:40:26AM PDT, Paul Fertser wrote:
> > In this specific case we tested having the driver
> > built-in, it tries binding on BMC startup, fails if the host is off,
> > then at any point of time one can do "echo 5-0019 >
> > /sys/bus/i2c/drivers/leds-pca955x/bind" and it'll re-try binding, and
> > that works if the host is on at the moment. And of course it can be
> > "unbind" later if needed. This could even almost work with current
> > entity-manager code if it was listening for host power state events,
> > if it wasn't skipping the devices that it already tried exporting, and
> > if it had something like $HexAddress for the template arguments.
> > 
> 
> Perhaps that's something worth experimenting with and posting E-M patches
> for?

I tried toying with the idea despite entity-manager code giving me
head spinning (especially after seeing how 9b86787adea3f added even
more asynchronicity without any obvious way to pass the end result of
the "exporting" back to the upper layers, and with D-Bus objects
getting added irregardless of exporting failures etc), so that
reasoning about all the possible race conditions feels beyond my
abilities) and also that current code seems to be written under
assumption either it retries the whole board or none of it
(deriveNewConfiguration() tracks only top-level objects); the news
that the functionality is moving to other daemons made me think that
it's probably not worth persuing, and that I certainly need some
feedback from the E-M maintainers to avoid wasting even more time on
this.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav at gmail.com


More information about the openbmc mailing list