From: Vijay Khemka <vijaykhemka@fb.com>
To: James Feist <james.feist@linux.intel.com>,
Henbin Chang <henbinchang@gmail.com>,
OpenBMC Maillist <openbmc@lists.ozlabs.org>
Subject: Re: Some problems about FruDevice in the entity-manager
Date: Fri, 22 Mar 2019 18:10:00 +0000 [thread overview]
Message-ID: <740E00DF-F233-41A1-B894-9DB98A9AD62A@fb.com> (raw)
In-Reply-To: <bee0622c-8ae6-3db3-b7f7-9d48651cf907@linux.intel.com>
On 3/22/19, 8:55 AM, "James Feist" <james.feist@linux.intel.com> wrote:
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
The issues here is eeprom index is not at 00 which was an assumption. In this case, it
is not pointing to first 8 byte header but it is pointing to garbage where all next
8 bytes are same which means my check is failing. We need better way to find if i2c device
Is eeprom and then find 8 bit or 16 bits. I will look into it. In the meanwhile there is patch
for direct reading from sysfs, please use that and see if it solves for time being. I will send gerrit
link for patch soon.
-Vijay
>
> /* 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@henbin:/var/volatile# i2ctransfer -f -y 6 w1@0x50 0 r1
> 0x00
> root@henbin:/var/volatile# i2ctransfer -f -y 6 w1@0x50 0 r1
> 0x00
> root@henbin:/var/volatile# i2ctransfer -f -y 6 w1@0x50 0 r1
> 0x00
> root@henbin:/var/volatile# i2ctransfer -f -y 6 w1@0x50 0 r1
> 0x00
> root@henbin:/var/volatile# i2ctransfer -f -y 6 w1@0x50 0 r1
> 0x00
> root@henbin:/var/volatile# i2ctransfer -f -y 6 w1@0x50 0 r1
> 0x00
> root@henbin:/var/volatile# i2ctransfer -f -y 6 w1@0x50 0 r1
> 0x00
> root@henbin:/var/volatile# i2ctransfer -f -y 6 w1@0x50 0 r1
> 0x00
> root@henbin:/var/volatile#
>
> Could you give some suggestion?
>
> Thanks.
next prev parent reply other threads:[~2019-03-22 18:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 5:41 Some problems about FruDevice in the entity-manager Henbin Chang
2019-03-22 15:54 ` James Feist
2019-03-22 18:10 ` Vijay Khemka [this message]
2019-03-25 1:39 ` Henbin Chang
2019-03-25 23:05 ` Vijay Khemka
2019-03-26 1:01 ` Henbin Chang
2019-03-26 18:44 ` Vijay Khemka
2019-03-27 6:33 ` Henbin Chang
2019-03-27 18:49 ` Vijay Khemka
2019-03-29 18:14 ` Vijay Khemka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=740E00DF-F233-41A1-B894-9DB98A9AD62A@fb.com \
--to=vijaykhemka@fb.com \
--cc=henbinchang@gmail.com \
--cc=james.feist@linux.intel.com \
--cc=openbmc@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.