mbox series

[0/5] cxl/mbox: Robustify handling of mbox_cmd.return_code

Message ID 20220317234049.69323-1-dave@stgolabs.net
Headers show
Series cxl/mbox: Robustify handling of mbox_cmd.return_code | expand

Message

Davidlohr Bueso March 17, 2022, 11:40 p.m. UTC
Hello,

These are some patchlets that came up while going through the code.

Currently the return_code from a completed mbox command is handled as
either successful or not. This series teaches the driver to better deal
with the different returns from the hardware, allowing better debugging
and mapping to proper kernel errno semantics (which are left unchanged
for now) as well as more ad-hoc handling.

Patches 1 and 2 are small nits.
Patch 3, 4 and 5 implement and use the new calls.

Applies on top of linux-cxl's next branch but have not really been
very tested as I'm not sure how to actually send mbox commands but
thought I'd post regardless.

Davidlohr Bueso (5):
  cxl/mbox: Move mbox_mutex usage comment
  cxl/pci: Use CXL_MBOX_SUCCESS to check against mbox_cmd return code
  cxl/mbox: Improve handling of mbox_cmd return codes
  cxl/mbox: Use new return_code handling
  cxl/mbox: Retry sending mbox command upon RETRY return_code

 drivers/cxl/core/mbox.c | 23 +++++++----
 drivers/cxl/cxlmem.h    | 90 ++++++++++++++++++++++++++++++++++++++++-
 drivers/cxl/pci.c       |  7 ++--
 3 files changed, 108 insertions(+), 12 deletions(-)

--
2.26.2