Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753297AbeAQOeX (ORCPT + 1 other); Wed, 17 Jan 2018 09:34:23 -0500 Received: from mga07.intel.com ([134.134.136.100]:38696 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753000AbeAQOeW (ORCPT ); Wed, 17 Jan 2018 09:34:22 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,372,1511856000"; d="scan'208";a="196414825" Subject: Re: [PATCH arm/aspeed/ast2500 v1] ipmi: add an Aspeed KCS IPMI BMC driver To: Avi Fishman Cc: Joel Stanley , Corey Minyard , Ed Tanous , james.mihm@intel.com, OpenBMC Maillist , tomer.maimon@nuvoton.com, openipmi-developer@lists.sourceforge.net, Linux Kernel Mailing List , andriy.shevchenko@intel.com References: <1516103023-19244-1-git-send-email-haiyue.wang@linux.intel.com> From: "Wang, Haiyue" Message-ID: <1f53dc54-b50b-7feb-0855-c05d60a008f5@linux.intel.com> Date: Wed, 17 Jan 2018 22:34:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Thanks Avi, wait for your response when new patch is ready. :-) BR, Haiyue On 2018-01-17 20:54, Avi Fishman wrote: > Sounds great for us (Nuvoton). > > Avi. > On Wed, Jan 17, 2018 at 8:32 AM, Wang, Haiyue > wrote: >> >> On 2018-01-17 07:06, Joel Stanley wrote: >>> On Tue, Jan 16, 2018 at 2:59 PM, Corey Minyard wrote: >>>> On 01/16/2018 05:43 AM, Haiyue Wang wrote: >>>>> The KCS (Keyboard Controller Style) interface is used to perform in-band >>>>> IPMI communication between a server host and its BMC (BaseBoard >>>>> Management >>>>> Controllers). >>>>> >>>>> This driver exposes the KCS interface on ASpeed SOCs (AST2400 and >>>>> AST2500) >>>>> as a character device. Such SOCs are commonly used as BMCs and this >>>>> driver >>>>> implements the BMC side of the KCS interface. >>>> >>>> I thought we were going to unify the BMC ioctl interface? My preference >>>> would be to >>>> create a file named include/uapi/linux/ipmi-bmc.h and add the following: >>>> >>>> #define __IPMI_BMC_IOCTL_MAGIC 0xb1 >>>> #define IPMI_BMC_IOCTL_SMS_SET_ATN _IO(__IPMI_BMC_IOCTL_MAGIC, 0x00) >>>> >>>> to make it the same as BT. Then in bt-bmc.h, set BT_BMC_IOCTL_SMS_ATN to >>>> IPMI_BMC_IOCTL_SMS_SET_ATN. Then add the KCS ioctls in ipmi-bmc.h and >>>> use that. That way we stay backward compatible but we are unified. >>>> >>>> Since more KCS interfaces may come around, can you make the name more >>>> specific? (I made this same error on bt-bmc,c, it should probably be >>>> renamed.) >>> Yes, we had a group of openbmc people get together recently and spoke >>> about this. Unfortunately Haiyue wasn't there (but other Intel BMC >>> people were). >>> >>> We've got code coming from another BMC vendor who will use the same >>> userspace API. The intention is to unify ASPEED's KCS and BT, along >>> with Nuvoton's KCS and BT, as you outlined above. >> Great design for common BMC code, thanks Joel & Corey. >> >> Then we need to divide the kcs-bmc.c into two files, one (still kcs-bmc.c) >> is for handling IPMI KCS state >> according to IPMI 2.0 specification, and also handing device misc >> operations; another file is called such >> as aspeed-kcs-bmc.c which handles ast2500 kcs controller. So that Nuvoton >> can define nvvoton-kcs-bmc.c >> low level API, and call the IPMI KCS function in kcs-bmc.c ? >> >> How about this idea ? If it makes sense, I will change the code for review >> in patch v2. >> >>> Cheers, >>> >>> Joel >>