openbmc / entity-manager

Run-time JSON driven system configuration manager
Other
26 stars 48 forks source link

Add-in card FRU behind MUX will be skipped in one situation #3

Closed IvanLi1 closed 3 years ago

IvanLi1 commented 4 years ago

Commit : 7972bb95e4c9816217c025416701e48dae5b4f05 (Stop reading devices that don't like it)

Found that this commit will cause add-in card FRU behind MUX to be skipped when the EEPROM address on add-in card is the same as the address on root bus.

e.g. There's an address 0x80 on root bus(bus 0) and there's an EEPROM address 0x80(bus 31) on add-in card behind MUX. When failed to read bus 0 address 0x80 occurred, the address 0x80 on bus 31 won't be created on DBus and then cause user cannot read FRU content in add-on card via ipmitool fru print XX.

Could you help to comment on this issue.

feistjj commented 4 years ago

Haven't run into this situation before. So the device locks up when you try to read it through the root bus, but is ok if you read it through a mux bus? Shouldn't the EEPROM not be visible until you turn on the MUX?

IvanLi1 commented 4 years ago

This issue happens in the following situation while FruDevice is creating object path for EEPROM on DBus: e.g.

  1. If MUX bus is 14 and the root bus of this MUX is 0
  2. There's one EEPROM address 0x80 behind this MUX and there's one non-eeprom address 0x80 on root bus.
  3. In "getBusFrus" function(https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L477) , root bus will be scanned first and 0x80 address on root bus will be added in failed item list(https://github.com/openbmc/entity-manager/blob/master/src/FruDevice.cpp#L551) due to this is non-eeprom address.
  4. In "getBusFrus" function(https://github.com/openbmc/entity-manager/blob/0c3980a748f145672e800c718318f761da3c56a5/src/FruDevice.cpp#L539), the EEPROM address 0x80 behind this MUX will be skipped while scanning MUX bus 14 due to failed item 0x80 on root bus 0 has been added to failed item set, and it will cause eeprom object path on MUX bus 14 cannot be created on DBus.
feistjj commented 4 years ago

Interesting, I'd be fine with a change having the failure check be 1:1 with busnum, instead of root busnum. Obviously the assumption that there wouldn't be a re-use of a address on a root bus, that is on a mux bus, doesn't seem to work in your cases.

edtanous commented 3 years ago

Is this still an issue?

edtanous commented 3 years ago

Closing due to lack of response.