openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Rescan busses for FRU device removal/unplug
@ 2022-09-20  8:49 Kumar Thangavel
  2022-09-23 21:49 ` Patrick Williams
  0 siblings, 1 reply; 3+ messages in thread
From: Kumar Thangavel @ 2022-09-20  8:49 UTC (permalink / raw)
  To: OpenBMC Maillist
  Cc: Jae Hyun Yoo, Vernon Mauery, Ed Tanous, Amithash Prasad,
	velumani.hcl, garnermic, velumanit, patrickw3

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

Hi All,

Whenever Rescan function is called, it is removing all fru devices and
their interfaces from dbus and scans all busses and adding all other
devices and dbus interfaces.

If ReScan function is called, incase of removing/unplugging only one FRU
device from the system, then it will remove all fru devices from the system
and their interfaces instead of removing one device. So, all the FRU's and
associated sensors and their dbus interfaces were also removed. Then scans
all buses and adds newly scanned devices and dbus interfaces.

Ex : If a system has 5 FRU devices, then one FRU device is
removed/unplugged, it will remove all devices and scan all buses and
recreate the 4 FRU devices.

I think Some additional removal of other FRU devices and adding/recreating
other FRU devices is happening here. So, to avoid this issue, We can keep
both old and new scanning lists and compare the devices in the list and
remove only the unplugged FRU devices and their dbus interfaces and keep
other FRU devices as it is. This is also applicable for adding(plug) new
FRU to the system.

Please share your thoughts on this.

[-- Attachment #2: Type: text/html, Size: 1201 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Rescan busses for FRU device removal/unplug
  2022-09-20  8:49 Rescan busses for FRU device removal/unplug Kumar Thangavel
@ 2022-09-23 21:49 ` Patrick Williams
  2022-09-26  8:46   ` Kumar Thangavel
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Williams @ 2022-09-23 21:49 UTC (permalink / raw)
  To: Kumar Thangavel
  Cc: Jae Hyun Yoo, Vernon Mauery, OpenBMC Maillist, Ed Tanous,
	Amithash Prasad, velumani.hcl, garnermic, velumanit, patrickw3

[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]

On Tue, Sep 20, 2022 at 02:19:38PM +0530, Kumar Thangavel wrote:
> Hi All,
> 
> Whenever Rescan function is called, it is removing all fru devices and
> their interfaces from dbus and scans all busses and adding all other
> devices and dbus interfaces.
> 
> If ReScan function is called, incase of removing/unplugging only one FRU
> device from the system, then it will remove all fru devices from the system
> and their interfaces instead of removing one device. So, all the FRU's and
> associated sensors and their dbus interfaces were also removed. Then scans
> all buses and adds newly scanned devices and dbus interfaces.
> 
> Ex : If a system has 5 FRU devices, then one FRU device is
> removed/unplugged, it will remove all devices and scan all buses and
> recreate the 4 FRU devices.
> 
> I think Some additional removal of other FRU devices and adding/recreating
> other FRU devices is happening here. So, to avoid this issue, We can keep
> both old and new scanning lists and compare the devices in the list and
> remove only the unplugged FRU devices and their dbus interfaces and keep
> other FRU devices as it is. This is also applicable for adding(plug) new
> FRU to the system.
> 
> Please share your thoughts on this.

Isn't there a 'ReScanBus' call also?  Does this do what you need?

-- 
Patrick Williams

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Rescan busses for FRU device removal/unplug
  2022-09-23 21:49 ` Patrick Williams
@ 2022-09-26  8:46   ` Kumar Thangavel
  0 siblings, 0 replies; 3+ messages in thread
From: Kumar Thangavel @ 2022-09-26  8:46 UTC (permalink / raw)
  To: Patrick Williams
  Cc: Jae Hyun Yoo, Vernon Mauery, OpenBMC Maillist, Ed Tanous,
	Amithash Prasad, velumani.hcl, garnermic, velumanit, patrickw3

[-- Attachment #1: Type: text/plain, Size: 2153 bytes --]

On Sat, Sep 24, 2022 at 3:19 AM Patrick Williams <patrick@stwcx.xyz> wrote:

> On Tue, Sep 20, 2022 at 02:19:38PM +0530, Kumar Thangavel wrote:
> > Hi All,
> >
> > Whenever Rescan function is called, it is removing all fru devices and
> > their interfaces from dbus and scans all busses and adding all other
> > devices and dbus interfaces.
> >
> > If ReScan function is called, incase of removing/unplugging only one FRU
> > device from the system, then it will remove all fru devices from the
> system
> > and their interfaces instead of removing one device. So, all the FRU's
> and
> > associated sensors and their dbus interfaces were also removed. Then
> scans
> > all buses and adds newly scanned devices and dbus interfaces.
> >
> > Ex : If a system has 5 FRU devices, then one FRU device is
> > removed/unplugged, it will remove all devices and scan all buses and
> > recreate the 4 FRU devices.
> >
> > I think Some additional removal of other FRU devices and
> adding/recreating
> > other FRU devices is happening here. So, to avoid this issue, We can keep
> > both old and new scanning lists and compare the devices in the list and
> > remove only the unplugged FRU devices and their dbus interfaces and keep
> > other FRU devices as it is. This is also applicable for adding(plug) new
> > FRU to the system.
> >
> > Please share your thoughts on this.
>
> Isn't there a 'ReScanBus' call also?  Does this do what you need?
>
> No. You mean rescanOneBus function ?  It scans one specific bus based on
the busNum parameter.
This rescanOneBus also removes that particular bus Fru and their dbus
interface completely and rescanning
the bus.
What I am proposing is, Instead of removing already scanned devices and
dbus operations and rescan the bus and devices,          The already
scanned devices list and its information is not to be cleared and it would
be compared with new scan information and      updated in the dbus
accordingly.

    This saves some additional removal of scanned devices and dbus
operations. we may need to refactor some portions of code in the
FruDevice.cpp file.

 Thanks & Regards,
 Kumar.


> --
> Patrick Williams
>

[-- Attachment #2: Type: text/html, Size: 2891 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-26  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  8:49 Rescan busses for FRU device removal/unplug Kumar Thangavel
2022-09-23 21:49 ` Patrick Williams
2022-09-26  8:46   ` Kumar Thangavel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).