Retry reads/writes on the EPROTO errno 71

The code only retries hardware accesses on certain errnos.  Add EPROTO,
errno 71, to this list.

On multi-master buses when there is a lot of activity on both masters at
the same time these errors have been seen, and doing a single retry will
will succeed.

While it is possible there is some possible improvement that could be
made in the I2C device driver, there isn't really a reason not to just
do a retry here.

It could be argued a retry should be done on every failure regardless of
the errno, but that is out of the scope of this commit.

Tested:
With extra traces added to show the retry, a single retry succeeds.

Change-Id: Ibfff84171c7a5918cb6598baea6d475c5fe095ef
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
1 file changed
tree: f4cf5c7dc0ca9ad468e7093fdb12d30bb74f9d8e
  1. msl/
  2. subprojects/
  3. test/
  4. tools/
  5. .clang-format
  6. .clang-tidy
  7. .gitignore
  8. .lcovrc
  9. .shellcheck
  10. 70-hwmon.rules
  11. 70-iio.rules
  12. average.cpp
  13. average.hpp
  14. env.cpp
  15. env.hpp
  16. fan_pwm.cpp
  17. fan_pwm.hpp
  18. fan_speed.cpp
  19. fan_speed.hpp
  20. gpio_handle.cpp
  21. gpio_handle.hpp
  22. hwmon.cpp
  23. hwmon.hpp
  24. hwmonio.cpp
  25. hwmonio.hpp
  26. interface.hpp
  27. LICENSE
  28. mainloop.cpp
  29. mainloop.hpp
  30. meson.build
  31. meson.options
  32. OWNERS
  33. phosphor-hwmon.conf
  34. readd.cpp
  35. README.iio.md
  36. README.md
  37. sensor.cpp
  38. sensor.hpp
  39. sensorset.cpp
  40. sensorset.hpp
  41. start_hwmon.sh.in
  42. sysfs.cpp
  43. sysfs.hpp
  44. targets.hpp
  45. thresholds.hpp
  46. types.hpp
  47. util.hpp
  48. xyz.openbmc_project.Hwmon@.service
README.md

phosphor-hwmon

Exposes generic hwmon entries as DBus objects. More information can be found at Sensor Architecture

To Build

To build this package, do the following steps:

  1. meson setup build
  2. ninja -C build

To clean the repository run rm -rf build.

D-Bus bus names

To enable the use of Linux features like cgroups prioritization and udev/systemd control, one instance of phosphor-hwmon is intended to be run per hwmon sysfs class instance.

This requires an algorithm for selecting a stable, well-known D-Bus busname.

The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is a meson configurable prefix (BUSNAME_PREFIX=xyz.openbmc_project by default), ID is either a std::hash of the /sys/devices path backing the hwmon class instance or provided suffix value from the command line, and N is the implemented phosphor-hwmon D-Bus API version.