Skip to content

Add MCTP-over-KCS transport binding

Konstantin Aladyshev linux-arm-kernel linux-aspeed lkml netdev oe-kbuild-all openbmc 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 2 repliesIn review
  2. v43 patches 2 repliesSuperseded
  3. v33 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches2 repliesSuperseded
v13 patches5 repliesSuperseded

Changes in v5 from the cover letter

- correct spelling errors in description
- check that rx data is big enough for binding structures
- use unsigned int type for index and len variables
- refactor mctp_kcs_rx_work() function
- arrange local variables in reverse xmas tree order

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ipmi: Move KCS headers to common include folderdrivers/char/ipmi/kcs_bmc.c drivers/char/ipmi/kcs_bmc_aspeed.c drivers/char/ipmi/kcs_bmc_cdev_ipmi.c +5 more+9 -141 reply
2/3ipmi: Create header with KCS interface definesdrivers/char/ipmi/kcs_bmc_cdev_ipmi.c include/linux/ipmi_kcs.h+81 -700 replies
3/3mctp: Add MCTP-over-KCS transport bindingdrivers/net/mctp/Kconfig drivers/net/mctp/Makefile drivers/net/mctp/mctp-kcs.c+609 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/3] Add MCTP-over-KCS transport binding

This change adds a MCTP KCS transport binding, as defined by the DMTF specificiation DSP0254 - "MCTP KCS Transport Binding".
A MCTP protocol network device is created for each KCS channel found in the system.
The interrupt code for the KCS state machine is based on the current IPMI KCS driver.
Since the KCS subsystem code is now used both in IPMI and MCTP drivers the separate patchsets move KCS subsystem includes to a common folder.

Tested:
PLDM communication between the HOST and BMC was tested with both components implemented via open-source software:
- The HOST (UEFI firmware) part was based one the edk2 [1] and edk2-platforms [2] code,
- The BMC part was based on the openbmc [3] distribution.

The testing process and all the necessary utilities are described in the [4] repository.

[1]: https://github.com/tianocore/edk2
[2]: https://github.com/tianocore/edk2-platforms
[3]: https://github.com/openbmc/openbmc
[4]: https://github.com/Kostr/PLDM

Changes v4 -> v5:
- correct spelling errors in description
- check that rx data is big enough for binding structures
- use unsigned int type for index and len variables
- refactor mctp_kcs_rx_work() function
- arrange local variables in reverse xmas tree order

Changes v3 -> v4:
- drop 'inline' keyword

Changes v2 -> v3:
- use 'dev_err_probe' correctly

Changes v1 -> v2:
- correct warning found by kernel test robot
- use 'i2c_smbus_pec' library function for PEC calculation
- several code style corrections based on Jonathan Cameron comments
Original patchset can be found here:
https://lwn.net/ml/linux-kernel/20230928123009.2913-1-aladyshev22 at gmail.com/

Konstantin Aladyshev (3):
ipmi: Move KCS headers to common include folder
ipmi: Create header with KCS interface defines
mctp: Add MCTP-over-KCS transport binding

 drivers/char/ipmi/kcs_bmc.c                   |   8 +-
 drivers/char/ipmi/kcs_bmc_aspeed.c            |   3 +-
 drivers/char/ipmi/kcs_bmc_cdev_ipmi.c         |  73 +--
 drivers/char/ipmi/kcs_bmc_npcm7xx.c           |   2 +-
 drivers/char/ipmi/kcs_bmc_serio.c             |   2 +-
 drivers/net/mctp/Kconfig                      |   8 +
 drivers/net/mctp/Makefile                     |   1 +
 drivers/net/mctp/mctp-kcs.c                   | 600 ++++++++++++++++++
 include/linux/ipmi_kcs.h                      |  80 +++
 .../char/ipmi => include/linux}/kcs_bmc.h     |   0
 .../ipmi => include/linux}/kcs_bmc_client.h   |   3 +-
 .../ipmi => include/linux}/kcs_bmc_device.h   |   3 +-
 12 files changed, 699 insertions(+), 84 deletions(-)
 create mode 100644 drivers/net/mctp/mctp-kcs.c
 create mode 100644 include/linux/ipmi_kcs.h
 rename {drivers/char/ipmi => include/linux}/kcs_bmc.h (100%)
 rename {drivers/char/ipmi => include/linux}/kcs_bmc_client.h (97%)
 rename {drivers/char/ipmi => include/linux}/kcs_bmc_device.h (96%)
Signature · 1 line
2.25.1