<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 24, 2022 at 3:19 AM Patrick Williams <<a href="mailto:patrick@stwcx.xyz">patrick@stwcx.xyz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Sep 20, 2022 at 02:19:38PM +0530, Kumar Thangavel wrote:<br>
> Hi All,<br>
> <br>
> Whenever Rescan function is called, it is removing all fru devices and<br>
> their interfaces from dbus and scans all busses and adding all other<br>
> devices and dbus interfaces.<br>
> <br>
> If ReScan function is called, incase of removing/unplugging only one FRU<br>
> device from the system, then it will remove all fru devices from the system<br>
> and their interfaces instead of removing one device. So, all the FRU's and<br>
> associated sensors and their dbus interfaces were also removed. Then scans<br>
> all buses and adds newly scanned devices and dbus interfaces.<br>
> <br>
> Ex : If a system has 5 FRU devices, then one FRU device is<br>
> removed/unplugged, it will remove all devices and scan all buses and<br>
> recreate the 4 FRU devices.<br>
> <br>
> I think Some additional removal of other FRU devices and adding/recreating<br>
> other FRU devices is happening here. So, to avoid this issue, We can keep<br>
> both old and new scanning lists and compare the devices in the list and<br>
> remove only the unplugged FRU devices and their dbus interfaces and keep<br>
> other FRU devices as it is. This is also applicable for adding(plug) new<br>
> FRU to the system.<br>
> <br>
> Please share your thoughts on this.<br>
<br>
Isn't there a 'ReScanBus' call also? Does this do what you need?<br>
<br></blockquote><div>No. You mean rescanOneBus function ? It scans one specific bus based on the busNum parameter.</div><div>This rescanOneBus also removes that particular bus Fru and their dbus interface completely and rescanning</div><div>the bus. <br>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. </div><div><br></div><div> 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.</div><div><br></div><div> Thanks & Regards,</div><div> Kumar.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
-- <br>
Patrick Williams<br>
</blockquote></div></div>