mbox series

[v2,0/3] Add Aspeed SSIF BMC driver

Message ID 20210330141029.20412-1-quan@os.amperecomputing.com
Headers show
Series Add Aspeed SSIF BMC driver | expand

Message

Quan Nguyen March 30, 2021, 2:10 p.m. UTC
This series add support for the Aspeed specific SSIF BMC driver which
is to perform in-band IPMI communication with the host in management
(BMC) side.

v2:
  + Fixed compiling error with COMPILE_TEST for arc

Quan Nguyen (3):
  i2c: i2c-core-smbus: Expose PEC calculate function for generic use
  drivers: char: ipmi: Add Aspeed SSIF BMC driver
  bindings: ipmi: Add binding for Aspeed SSIF BMC driver

 .../bindings/ipmi/aspeed-ssif-bmc.txt         |  18 +
 drivers/char/ipmi/Kconfig                     |  22 +
 drivers/char/ipmi/Makefile                    |   2 +
 drivers/char/ipmi/ssif_bmc.c                  | 645 ++++++++++++++++++
 drivers/char/ipmi/ssif_bmc.h                  |  92 +++
 drivers/char/ipmi/ssif_bmc_aspeed.c           | 132 ++++
 drivers/i2c/i2c-core-smbus.c                  |  12 +-
 include/linux/i2c.h                           |   1 +
 8 files changed, 922 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ipmi/aspeed-ssif-bmc.txt
 create mode 100644 drivers/char/ipmi/ssif_bmc.c
 create mode 100644 drivers/char/ipmi/ssif_bmc.h
 create mode 100644 drivers/char/ipmi/ssif_bmc_aspeed.c

Comments

Corey Minyard April 2, 2021, 2:21 p.m. UTC | #1
On Tue, Mar 30, 2021 at 09:10:26PM +0700, Quan Nguyen wrote:
> This series add support for the Aspeed specific SSIF BMC driver which

> is to perform in-band IPMI communication with the host in management

> (BMC) side.


I don't have any specific feedback for this, but I'm wondering if it's
really necessary.

Why can't the BMC just open the I2C device and use it?  Is there any
functionality that this provides that cannot be accomplished from
userland access to the I2C device?  I don't see any.

If it tied into some existing framework to give abstract access to a BMC
slave side interface, I'd be ok with this.  But I don't see that.

Unless there is a big need to have this in the kernel, I'm against
including this and would suggest you do all this work in userland.
Perhaps write a library.  Sorry, but I'm trying to do my part to reduce
unnecessary things in the kernel.

Thanks,

-corey

> 

> v2:

>   + Fixed compiling error with COMPILE_TEST for arc

> 

> Quan Nguyen (3):

>   i2c: i2c-core-smbus: Expose PEC calculate function for generic use

>   drivers: char: ipmi: Add Aspeed SSIF BMC driver

>   bindings: ipmi: Add binding for Aspeed SSIF BMC driver

> 

>  .../bindings/ipmi/aspeed-ssif-bmc.txt         |  18 +

>  drivers/char/ipmi/Kconfig                     |  22 +

>  drivers/char/ipmi/Makefile                    |   2 +

>  drivers/char/ipmi/ssif_bmc.c                  | 645 ++++++++++++++++++

>  drivers/char/ipmi/ssif_bmc.h                  |  92 +++

>  drivers/char/ipmi/ssif_bmc_aspeed.c           | 132 ++++

>  drivers/i2c/i2c-core-smbus.c                  |  12 +-

>  include/linux/i2c.h                           |   1 +

>  8 files changed, 922 insertions(+), 2 deletions(-)

>  create mode 100644 Documentation/devicetree/bindings/ipmi/aspeed-ssif-bmc.txt

>  create mode 100644 drivers/char/ipmi/ssif_bmc.c

>  create mode 100644 drivers/char/ipmi/ssif_bmc.h

>  create mode 100644 drivers/char/ipmi/ssif_bmc_aspeed.c

> 

> -- 

> 2.28.0

>
Quan Nguyen April 7, 2021, 1:09 p.m. UTC | #2
Hi Corey,

Thank you for reviewing
I'll put my respond inline below.

-Quan

On 02/04/2021 21:21, Corey Minyard wrote:
> On Tue, Mar 30, 2021 at 09:10:26PM +0700, Quan Nguyen wrote:
>> This series add support for the Aspeed specific SSIF BMC driver which
>> is to perform in-band IPMI communication with the host in management
>> (BMC) side.
> 
> I don't have any specific feedback for this, but I'm wondering if it's
> really necessary.
> 
> Why can't the BMC just open the I2C device and use it?  Is there any
> functionality that this provides that cannot be accomplished from
> userland access to the I2C device?  I don't see any.
>
> If it tied into some existing framework to give abstract access to a BMC
> slave side interface, I'd be ok with this.  But I don't see that.
> 

The SSIF at the BMC side acts as an I2C slave and we think that the 
kernel driver is unavoidable to handle the I2c slave events 
(https://www.kernel.org/doc/html/latest/i2c/slave-interface.html)

And to make it works with existing OpenBMC IPMI stack, a userspace part, 
ssifbridge, is needed (https://github.com/openbmc/ssifbridge). This 
ssifbridge is to connect this driver with the OpenBMC IPMI stack so the 
IPMI stack can communicate via SSIF channel in similar way that was 
implemented with BT and KCS (ie: btbridge/kcsbridge and its corespondent 
kernel drivers (https://github.com/openbmc/btbridge and 
https://github.com/openbmc/kcsbridge))

> Unless there is a big need to have this in the kernel, I'm against
> including this and would suggest you do all this work in userland.
> Perhaps write a library.  Sorry, but I'm trying to do my part to reduce
> unnecessary things in the kernel.
> 
> Thanks,
> 
> -corey
>
Corey Minyard April 7, 2021, 2:28 p.m. UTC | #3
On Wed, Apr 07, 2021 at 08:09:50PM +0700, Quan Nguyen wrote:
> Hi Corey,
> 
> Thank you for reviewing
> I'll put my respond inline below.
> 
> -Quan
> 
> On 02/04/2021 21:21, Corey Minyard wrote:
> > On Tue, Mar 30, 2021 at 09:10:26PM +0700, Quan Nguyen wrote:
> > > This series add support for the Aspeed specific SSIF BMC driver which
> > > is to perform in-band IPMI communication with the host in management
> > > (BMC) side.
> > 
> > I don't have any specific feedback for this, but I'm wondering if it's
> > really necessary.
> > 
> > Why can't the BMC just open the I2C device and use it?  Is there any
> > functionality that this provides that cannot be accomplished from
> > userland access to the I2C device?  I don't see any.
> > 
> > If it tied into some existing framework to give abstract access to a BMC
> > slave side interface, I'd be ok with this.  But I don't see that.
> > 
> 
> The SSIF at the BMC side acts as an I2C slave and we think that the kernel
> driver is unavoidable to handle the I2c slave events
> (https://www.kernel.org/doc/html/latest/i2c/slave-interface.html)
> 
> And to make it works with existing OpenBMC IPMI stack, a userspace part,
> ssifbridge, is needed (https://github.com/openbmc/ssifbridge). This
> ssifbridge is to connect this driver with the OpenBMC IPMI stack so the IPMI
> stack can communicate via SSIF channel in similar way that was implemented
> with BT and KCS (ie: btbridge/kcsbridge and its corespondent kernel drivers
> (https://github.com/openbmc/btbridge and
> https://github.com/openbmc/kcsbridge))

Dang, I don't know why there's not a generic userland interface for
the slave.  And I've made this mistake before :(.

Anyway, you are right, you need a driver.  I'll review.

-corey

> 
> > Unless there is a big need to have this in the kernel, I'm against
> > including this and would suggest you do all this work in userland.
> > Perhaps write a library.  Sorry, but I'm trying to do my part to reduce
> > unnecessary things in the kernel.
> > 
> > Thanks,
> > 
> > -corey
> >