linux-gbmc: Support MCTP retry and recover for i2c-ast2600.c

add retry mechanism for mctp over i2c-ast2600

The current aspeed in-kernel mctp i2c binding stack has two issues:
1) No retry of TX mctp packet on certain errors
2) MCTP TX patch is stuck at busy state after certain condition and
   ast2600_i2c_recover_bus is skipped because multi_master is enabled

The two patches tries try to address the two issues by:
1) In include/uapi/linux/i2c.h, define two new flags for i2c_msg.flags:
   I2C_M_IS_MCTP and I2C_M_LAST_RETRY
2) In mctp-i2c.c layer, the new mctp_i2c_transfer_with_retry function
   will perform TX mctp packet retry logic, approximately
   20 ms x 10 times = 2 seconds.
3) In i2c-ast2600.c layer, the new function ast2600_i2c_should_recover
   will decide whether we need to call ast2600_i2c_recover_bus to
   recover the bus.

Tested:
https://paste.googleplex.com/4510192766550016
https://paste.googleplex.com/5871967458033664
https://paste.googleplex.com/4694425082527744

Google-Bug-Id: 334134061
Google-Bug-Id: 334170933
Google-Bug-Id: 286397121
Fusion-Link: Won't affect presubmit platforms
Change-Id: Ie8e0d6f67339ade75b6defa1503bd50d13d95b54
Signed-off-by: Jinliang Wang <jinliangw@google.com>
(cherry picked from commit 6ba13046870843d41b7d3f5a25d97ee3365e24ce)
2 files changed
tree: f92a8758a20fe1d7517ff9cf9830061b9b7992ee
  1. conf/
  2. dynamic-layers/
  3. recipes-bsp/
  4. recipes-connectivity/
  5. recipes-core/
  6. recipes-devtools/
  7. recipes-extended/
  8. recipes-google/
  9. recipes-kernel/
  10. recipes-phosphor/
  11. recipes-tpm1/
  12. LICENSE
  13. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.