Some problems about FruDevice in the entity-manager

James Feist james.feist at linux.intel.com
Sat Mar 23 02:54:47 AEDT 2019


On 3/21/19 10:41 PM, Henbin Chang wrote:
> Hi James,
> 
> There is EEPROM (AT24C64) with the valid FRU data on my board.
> 
> But the FruDevice would fail to format it.
> 
> I added some debug information to determine what's wrong with it.
> 
> Then I found the flag variable returned by isDevice16Bit() was equal 0.
> That's, the FruDevice could think it's 8-bit EEPROM.
> /* Check for Device type if it is 8 bit or 16 bit */
> int flag = isDevice16Bit(file);
> 
> There is the below comment in the isDevice16Bit().

Vijay, can you comment on this?

I believe the logic here was that the 16bit eeproms Vijay was using 
auto-increment the address, so reading twice over the header should give 
different answers, as the checksum is in the header. That being said I 
don't have any 16bit eeproms in my system so I haven't tried this 
branch. Vijay authored this so he might have a better idea of what is 
going on.

Thanks,

James


> 
> /* Read 7 more bytes, it will read same first byte in case of
>   * 8 bit but it will read next byte in case of 16 bit
> */
> But the rule isn't applicable to my EEPROM (AT24C64) .
> root at henbin:/var/volatile# i2ctransfer -f -y 6 w1 at 0x50 0 r1
> 0x00
> root at henbin:/var/volatile# i2ctransfer -f -y 6 w1 at 0x50 0 r1
> 0x00
> root at henbin:/var/volatile# i2ctransfer -f -y 6 w1 at 0x50 0 r1
> 0x00
> root at henbin:/var/volatile# i2ctransfer -f -y 6 w1 at 0x50 0 r1
> 0x00
> root at henbin:/var/volatile# i2ctransfer -f -y 6 w1 at 0x50 0 r1
> 0x00
> root at henbin:/var/volatile# i2ctransfer -f -y 6 w1 at 0x50 0 r1
> 0x00
> root at henbin:/var/volatile# i2ctransfer -f -y 6 w1 at 0x50 0 r1
> 0x00
> root at henbin:/var/volatile# i2ctransfer -f -y 6 w1 at 0x50 0 r1
> 0x00
> root at henbin:/var/volatile#
> 
> Could you give some suggestion?
> 
> Thanks.


More information about the openbmc mailing list