openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/4] Add SSIF BMC driver
@ 2022-03-10 11:41 Quan Nguyen
  2022-03-10 11:41 ` [PATCH v6 1/4] ipmi: ssif_bmc: " Quan Nguyen
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Quan Nguyen @ 2022-03-10 11:41 UTC (permalink / raw)
  To: Corey Minyard, Rob Herring, Krzysztof Kozlowski, Joel Stanley,
	Andrew Jeffery, Brendan Higgins, Benjamin Herrenschmidt,
	Wolfram Sang, openipmi-developer, devicetree, linux-arm-kernel,
	linux-aspeed, linux-kernel, linux-i2c, openbmc
  Cc: Open Source Submission, Thang Q . Nguyen, Phong Vo

This series add support the SSIF BMC driver which is to perform in-band
IPMI communication with their host in management (BMC) side.

SSIF BMC driver in this series is tested with Aspeed AST2500.

Discussion for v5: https://lkml.org/lkml/2021/7/13/868

v6:
  + Drop the use of slave_enable()                             [Wolfram]
  + Make i2c-aspeed to issue RxCmdLast command on all
  I2C_SLAVE_WRITE_REQUESTED event to assert NAK when slave busy   [Quan]
  + Make i2c slave to return -EBUSY when it's busy                [Quan]
  + Drop the aborting feature as return Completion Code 0xFF may stop
  host to retry and make ipmi_ssif.so fails to load               [Quan]
  + Add timer to recover slave from busy state when no response   [Quan]
  + Clean request/response buffer appropriately                   [Quan]
  + Add some minor change on error and warning messages           [Quan]

v5:
  + Correct the patches order to fix the bisect issue found by
  kernel build robot

v4:
  + Fix recursive spinlock                                      [Graeme]
  + Send response with Completion code 0xFF when aborting         [Quan]
  + Fix warning with dt_binding_check                              [Rob]
  + Change aspeed-ssif-bmc.yaml to ssif-bmc.yaml                  [Quan]
  + Added bounding check on SMBus writes and the whole request     [Dan]
  + Moved buffer to end of struct ssif_bmc_ctx to avoid context
    corruption if somehow buffer is written past the end           [Dan]
  + Return -EINVAL if userspace buffer too small, dont
    silence truncate                                       [Corey, Joel]
  + Not necessary to check NONBLOCK in lock                      [Corey]
  + Enforce one user at a time                                    [Joel]
  + Reject write with invalid response length from userspace     [Corey]
  + Add state machines for better ssif bmc state handling         [Quan]
  + Drop ssif_bmc_aspeed.c and make ssif_bmc.c is generic
    SSIF BMC driver                                               [Quan]
  + Change compatible string "aspeed,ast2500-ssif-bmc" to
    "ampere,ssif-bmc"                                             [Quan]
  + Toggle Slave enable in i2c-aspeed to turn on/off slave mode   [Ryan]
  + Added slave_enable() to struct i2c_algorithm to control
    slave mode and to address the recursive spinlock      [Graeme, Ryan]
  + Abort current request with invalid SMBus write or
    invalid command                                               [Quan]
  + Abort all request if there is pending response                [Quan]
  + Changed validate_pec() to validate_request()                  [Quan]
  + Add unsupported_smbus_cmd() to handle unknown SMBus command   [Quan]
  + Print internal state string for ease investigating issue      [Quan]
  + Move to READY state on SLAVE_STOP event                       [Quan]
  + Change initilize_transfer() to process_smbus_cmd()            [Quan]
  + Introduce functions for each slave event                      [Quan]

v3:
  + Switched binding doc to use DT schema format                   [Rob]
  + Splited into generic ssif_bmc and aspeed-specific      [Corey, Joel]
  + Removed redundant license info                                [Joel]
  + Switched to use traditional if-else                           [Joel]
  + Removed unused ssif_bmc_ioctl()                               [Joel]
  + Made handle_request()/complete_response() to return void      [Joel]
  + Refactored send_ssif_bmc_response() and
  receive_ssif_bmc_request()                                     [Corey]
  + Remove mutex                                                 [Corey]
  + Use spin_lock/unlock_irqsave/restore in callback             [Corey]
  + Removed the unnecessary memset                               [Corey]
  + Switch to use dev_err()                                      [Corey]
  + Combine mask/unmask two interrupts together                  [Corey]
  + Fixed unhandled Tx done with NAK                              [Quan]
  + Late ack'ed Tx done w/wo Ack irq                              [Quan]
  + Use aspeed-specific exported aspeed_set_slave_busy() when
  slave busy to fix the deadlock                 [Graeme, Philipp, Quan]
  + Clean buffer for last multipart read                          [Quan]
  + Handle unknown incoming command                               [Quan]

v2:
  + Fixed compiling error with COMPILE_TEST for arc

Dan Carpenter (1):
  ipmi: ssif_bmc: Return -EFAULT if copy_from_user() fails

Quan Nguyen (3):
  ipmi: ssif_bmc: Add SSIF BMC driver
  bindings: ipmi: Add binding for SSIF BMC driver
  i2c: aspeed: Assert NAK when slave is busy

 .../devicetree/bindings/ipmi/ssif-bmc.yaml    |  38 +
 drivers/char/ipmi/Kconfig                     |  11 +
 drivers/char/ipmi/Makefile                    |   1 +
 drivers/char/ipmi/ssif_bmc.c                  | 790 ++++++++++++++++++
 drivers/char/ipmi/ssif_bmc.h                  | 102 +++
 drivers/i2c/busses/i2c-aspeed.c               |   5 +-
 6 files changed, 946 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/ipmi/ssif-bmc.yaml
 create mode 100644 drivers/char/ipmi/ssif_bmc.c
 create mode 100644 drivers/char/ipmi/ssif_bmc.h

-- 
2.35.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-04-08  4:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10 11:41 [PATCH v6 0/4] Add SSIF BMC driver Quan Nguyen
2022-03-10 11:41 ` [PATCH v6 1/4] ipmi: ssif_bmc: " Quan Nguyen
2022-03-11  1:19   ` Corey Minyard
2022-03-17  8:30     ` Quan Nguyen
2022-03-17 13:13       ` Corey Minyard
2022-04-08  4:40         ` Quan Nguyen
2022-03-11  6:20   ` kernel test robot
2022-03-14 18:15   ` Jae Hyun Yoo
2022-03-17  9:00     ` Quan Nguyen
2022-03-10 11:41 ` [PATCH v6 2/4] bindings: ipmi: Add binding for " Quan Nguyen
2022-03-10 11:41 ` [PATCH v6 3/4] ipmi: ssif_bmc: Return -EFAULT if copy_from_user() fails Quan Nguyen
2022-03-11  6:58   ` Wolfram Sang
2022-03-17  7:45     ` Quan Nguyen
2022-03-17  8:38       ` Dan Carpenter
2022-03-10 11:41 ` [PATCH v6 4/4] i2c: aspeed: Assert NAK when slave is busy Quan Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).