2

Similar to what IPMI is querying, how will I access VPD of every device in a target server via SMBus/I2C? Do I need a driver for this or the i2c-dev module is enough? How to verify which is which on a target bus if I have several storage devices connected to a server?

I am using i2cdetect to verify i2c bus, however, I can't verify which bus my device is connected or does it have a bus in the first place. I know for a fact that I need an i2c bus/adapter to determine the actual i2c device. Creating an i2c client can do so but I still need to verify its bus connection and, creating an i2c client makes it limited to define i2c devices as enumerated in the id_table. As much as possible I want it to detect all storage devices regardless if it does have an i2c device or not.

Any replies will be appreciated. Thank you very much.

0

Partial answer (as the question is old, asking for details is difficult):

If the VPD of your devices is stored in a standard EEPROM, then likely the standard EEPROM drivers will suffice. (And if it's accessed in a different way, then I don't know).

modprobe i2c-dev will allow I2C access from userspace, which you'll probably already have done if you can use i2cdetect. modprobe eeprom will install the standard EEPROM driver, probe all busses for devices supported by it, and allow access to the EEPROM's data in /sys/bus/i2c/drivers/eeprom.

However, I can't verify which bus my device is connected or does it have a bus in the first place.

Yes, this is a bit of a pain, and you'll have to know your hardware well and make some guesses based on what devices you can see on the busses.

Looking at

/sys/bus/i2c/devices/i2c-*/name
/sys/bus/i2c/devices/i2c-*/device/driver/

will also help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.