mbox series

[v2,0/4] cxl/mbox: Robustify handling of mbox_cmd.return_code

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

Message

Davidlohr Bueso April 4, 2022, 2:12 a.m. UTC
Hi,

Changes from v1 (https://lore.kernel.org/all/20220317234049.69323-1-dave@stgolabs.net/):
 - Patch 1 now just removes the lock comment, instead of moving it. (Dan)
 - Modified pach 3 to use CPP hackery + misc table improvements. (Dan and Adam)
 - Dropped patch 5 per concerns about implications with FW. (Dan)
 - Picked up Adam's review tags.

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.

Applies against linux-cxl's next branch.

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

Thanks!

Davidlohr Bueso (4):
  cxl/mbox: Drop mbox_mutex comment
  cxl/pci: Use CXL_MBOX_SUCCESS to check against mbox_cmd return code
  cxl/mbox: Improve handling of mbox_cmd hw return codes
  cxl/mbox: Use new return_code handling

 drivers/cxl/core/mbox.c |  7 +++---
 drivers/cxl/cxlmem.h    | 53 ++++++++++++++++++++++++++++++++++++++++-
 drivers/cxl/pci.c       |  7 +++---
 3 files changed, 59 insertions(+), 8 deletions(-)

--
2.26.2

Comments

Dan Williams April 4, 2022, 3:39 a.m. UTC | #1
On Sun, Apr 3, 2022 at 7:12 PM Davidlohr Bueso <dave@stgolabs.net> wrote:
>
> Hi,
>
> Changes from v1 (https://lore.kernel.org/all/20220317234049.69323-1-dave@stgolabs.net/):
>  - Patch 1 now just removes the lock comment, instead of moving it. (Dan)
>  - Modified pach 3 to use CPP hackery + misc table improvements. (Dan and Adam)
>  - Dropped patch 5 per concerns about implications with FW. (Dan)
>  - Picked up Adam's review tags.
>
> 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.
>
> Applies against linux-cxl's next branch.
>
> Patches 1 and 2 are small nits.
> Patch 3 and 4 implement and use the new calls.
>
> Thanks!

Looks good to me, applied to cxl/pending for 5.19