sonic-platform-common
sonic-platform-common copied to clipboard
Enhance pcieutil to check actual presence of pcie device
pcieutil checks the sysfs entry to conclude if a pcie device is present or not. The sysfs entry won't be updated for non-hotplug pcie device if say, a downstream port of a pcie switch (to which a pcie device is connected) receives a "hot-reset". In this case the pcie device will be disconnected from the bus, but sysfs entry doesn't reflect the missing device.
Hot reset on downstream port of a pcie switch can happen when the upstream port reports a "DL_Down" state which in turn can happen when the upstream port has lost connection to the upstream device due to an error that is not recoverable by the physical layer and data link layer.