openbmc / entity-manager

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

isDevice16bit() is not work if ReScanBus happen. #20

Closed Yung-sheng closed 1 year ago

Yung-sheng commented 2 years ago

I do ReScanBus and sometimes isDevice16bit() will detect CAT24C64 as 8bit EEPROM. Rootcause: When ReScanBus called, the address pointer of CAT24C64 is not move to first address. And it fail to detect CAT24C64 is 16bit EEPROM.

jaehyoo commented 2 years ago

The addressing type detection logic can't cover all cases because it uses non-invasive way to prevent any actual data writing on uncertain eeproms. In case the logic doesn't work and if your eeprom is at fixed address in a specific bus, add the eeprom node into device tree explicitely as an alternative way.

-Jae

On Thu, Aug 4, 2022, 11:01 PM yung-sheng @.***> wrote:

I do ReScanBus and sometimes isDevice16bit() will detect M24C64 as 8bit EEPROM. When ReScanBus called, the address pointer of M24C64 is not move to first address. And it fail to detect M24C64 is 16bit EEPROM.

— Reply to this email directly, view it on GitHub https://github.com/openbmc/entity-manager/issues/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH6AZ33ZTLUL2HBXYM4LHHDVXSU4NANCNFSM55U4J3DA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Yung-sheng commented 2 years ago

Ok, I see. Thank you.

The addressing type detection logic can't cover all cases because it uses non-invasive way to prevent any actual data writing on uncertain eeproms. In case the logic doesn't work and if your eeprom is at fixed address in a specific bus, add the eeprom node into device tree explicitely as an alternative way. -Jae On Thu, Aug 4, 2022, 11:01 PM yung-sheng @.> wrote: I do ReScanBus and sometimes isDevice16bit() will detect M24C64 as 8bit EEPROM. When ReScanBus called, the address pointer of M24C64 is not move to first address. And it fail to detect M24C64 is 16bit EEPROM. — Reply to this email directly, view it on GitHub <#20>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH6AZ33ZTLUL2HBXYM4LHHDVXSU4NANCNFSM55U4J3DA . You are receiving this because you are subscribed to this thread.Message ID: @.>