Some problems about FruDevice in the entity-manager

Henbin Chang henbinchang at gmail.com
Wed Mar 27 17:33:25 AEDT 2019


Thanks Vijay.

We expect the patch for direct reading from sysfs you said before.

BRs,
Henbin.

Vijay Khemka <vijaykhemka at fb.com> 於 2019年3月27日 週三 上午2:44寫道:

> Hi Henbin,
>
> If you are by passing this check then you have to be careful in changing
> code. None of below changes are required. I can’t say without debugging,
> why your fru device is not getting scanned properly. Please hexdump your
> eeprom device through sys file system and verify if it has right data.
>
>
>
> Regards
>
> -Vijay
>
>
>
> *From: *Henbin Chang <henbinchang at gmail.com>
> *Date: *Monday, March 25, 2019 at 6:02 PM
> *To: *Vijay Khemka <vijaykhemka at fb.com>
> *Cc: *James Feist <james.feist at linux.intel.com>, OpenBMC Maillist <
> openbmc at lists.ozlabs.org>
> *Subject: *Re: Some problems about FruDevice in the entity-manager
>
>
>
> Hi Vijay,
>
> Currently, I bypass the 8/16bit checking to try dbus-sensor.
>
>
>
> I just followed your suggestion and only changed the one line.
>
> But I couldn't find the fru device under the tree of
> /xyz/openbmc_project/FruDevice/
>
>
>
> There was the below error message in the journal.
>
> Mar 26 08:17:56 henbin fru-device[1111]: failed to format fru for device
> at bus 6address 50
>
>
>
> Please let me know if you want to try other.
>
>
>
> BRs.
>
> Henbin.
>
>
>
> Vijay Khemka <vijaykhemka at fb.com> 於 2019年3月26日 週二 上午7:05寫道:
>
> Hi Henbin,
>
> I am assuming your device is 16 bit and in your last email you said 16bit
> check is failing. If that check fails then following code will not get
> executed. Also while loop is same as i2c_smbus_read_i2c_block_data().
>
>
>
> I would suggest one thing, if your 16bit check is passing and still you
> don’t see fru device, please make only one line change below and test.
>
>     int ret = i2c_smbus_write_byte_data(file, high_addr, low_addr);
>
>     //int ret = i2c_smbus_write_byte_data(file, 0, low_addr);
>
>
>
> Please let me know result.
>
>
>
> Regards
>
> -Vijay
>
>
>
>
>
> *From: *Henbin Chang <henbinchang at gmail.com>
> *Date: *Sunday, March 24, 2019 at 6:39 PM
> *To: *Vijay Khemka <vijaykhemka at fb.com>
> *Cc: *James Feist <james.feist at linux.intel.com>, OpenBMC Maillist <
> openbmc at lists.ozlabs.org>
> *Subject: *Re: Some problems about FruDevice in the entity-manager
>
>
>
> Thanks for your response.
>
>
>
> I also encountered another problem.
>
>
>
> That's,  I found the content of 16-bit EEPROM through the combination of
> the SMBUS APIs was not incorrect.
>
>
>
>     /* This is for 16 bit addressing EEPROM device. First an offset
>
>      * needs to be written before read data from a offset
>
>      */
>
>     int ret = i2c_smbus_write_byte_data(file, 0, low_addr);
>
>     if (ret < 0)
>
>     {
>
>         return ret;
>
>     }
>
>
>
>     return i2c_smbus_read_i2c_block_data(file, high_addr, len, buf);
>
>
>
> So I referred to i2c-tools to modify them.
>
> And then I could see my FRU under the tree of
> 'xyz/openbmc_project/FruDevice/'
>
>
>
>     int ret = i2c_smbus_write_byte_data(file, high_addr, low_addr);
>
>     //int ret = i2c_smbus_write_byte_data(file, 0, low_addr);
>
>     if (ret < 0)
>
>     {
>
>         return ret;
>
>     }
>
>     while (index < len){
>
> buf[index] = i2c_smbus_read_byte(file);
>
> index++;
>
>     }
>
>
>
>     //return i2c_smbus_read_i2c_block_data(file, high_addr, len, buf);
>
>     return len;
>
>
>
> Let me know if you have any comments.
>
>
>
> Thanks.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190327/0064c6cf/attachment.htm>


More information about the openbmc mailing list