Received: by 10.223.148.5 with SMTP id 5csp6791093wrq; Wed, 17 Jan 2018 19:11:27 -0800 (PST) X-Google-Smtp-Source: ACJfBosfwoVhhNmnIHmdZJiHu5nB4bqcXAMS5skzyZ/ZTItMWL7fCFdChyneRuVe3tdbRvu1FeGm X-Received: by 10.99.111.10 with SMTP id k10mr29578838pgc.421.1516245087072; Wed, 17 Jan 2018 19:11:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516245087; cv=none; d=google.com; s=arc-20160816; b=W+poecun1OPvJTwpQAlDSLOvfKmwwgnCEP9wJq8xe1lUme2QeI2wgvIMV4QjWDqJqY a10v+aBpEgwky8s0RRxFVVdz8KEph8Z/hOhlbaaNgmaTwC2GS7y55c/USVD3Uk4Ivg2f Wdy93qe3G80B2PV0Yz5VjduKLoE1TowTjJJHcI8rwCLAs/wFWu5HQIhXodUn8VL4L+Cw pMyGiX/2dHnsTRSo4K+eXhv7wfsM3zQW5RAMnNGvP/lWNkdtgYtRTVmtFaliZ66RDcad nGcfGNSXgEv08Bf9KWSlcW3AiWVSUpaiyw5ZFLhhwU6yHZ2OBysbczwT6WAIgHpr9Yz0 tbzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=SPumK6OYfV7HXNFepXRHKyZ54V3MuqrGos2p7pLvHM4=; b=Vk4XiV0s/t0ETloXARdPI2jM3c6Y/yMegWBYOT54SvhLokFc1+tKZOFyTrdG2edPWO VJGwuA5R1Bqy73IaUSiru650sDdWKj60KLjh5EiVBmuwaGDtplRpTWvZNOJ1A5cq5V4g 7tRiNymvDpl4AuHb47RieIYqMahXytmQZrhzjYiOrQWWFnzMSxKXL3angoitBI8nwtDm A1iWvFFWWn3Mnw8AvqeKjMFE1+vpjaQdpVywxu94hi0C9KfHdsRZ7JC8mXHYziklb2EY KoVa4dnlIQVRozZdR6GmpvxkbWIVtjBaJ4HdGsJeLuzMB4eNY0TeXz5FMncPaS4y31Ls z1ZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z21si3241269plo.453.2018.01.17.19.11.13; Wed, 17 Jan 2018 19:11:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753764AbeARDKV (ORCPT + 99 others); Wed, 17 Jan 2018 22:10:21 -0500 Received: from mga03.intel.com ([134.134.136.65]:50413 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753285AbeARDKU (ORCPT ); Wed, 17 Jan 2018 22:10:20 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2018 19:10:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,375,1511856000"; d="scan'208";a="22598580" Received: from haiyuewa-mobl1.ccr.corp.intel.com (HELO [10.239.196.40]) ([10.239.196.40]) by fmsmga004.fm.intel.com with ESMTP; 17 Jan 2018 19:10:18 -0800 Subject: Re: [PATCH arm/aspeed/ast2500 v1] ipmi: add an Aspeed KCS IPMI BMC driver To: minyard@acm.org, joel@jms.id.au, openbmc@lists.ozlabs.org, openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org Cc: andriy.shevchenko@intel.com References: <1516103023-19244-1-git-send-email-haiyue.wang@linux.intel.com> <54c6562b-f35a-c616-b6c2-a2eadf6937da@acm.org> <2fd6d4d7-39a1-f1b5-752e-e43ae2dd4cdd@linux.intel.com> From: "Wang, Haiyue" Message-ID: Date: Thu, 18 Jan 2018 11:10:17 +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: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-01-18 10:58, Corey Minyard wrote: > On 01/17/2018 06:16 PM, Wang, Haiyue wrote: >> >> >> On 2018-01-17 23:59, Corey Minyard wrote: >>> On 01/17/2018 08:31 AM, Wang, Haiyue wrote: >>>> >>>> >>>> On 2018-01-17 06:12, Corey Minyard wrote: >>>>> On 01/16/2018 02: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.) >>>>>> >>>> How about these IOCTL definitions ? Is it more specific ? >>>> >>>> #define IPMI_BMC_IOCTL_SET_SMS_ATN _IO(__IPMI_BMC_IOCTL_MAGIC, 0x00) >>>> #define IPMI_BMC_IOCTL_CLEAR_SMS_ATN _IO(__IPMI_BMC_IOCTL_MAGIC, 0x01) >>>> #define IPMI_BMC_IOCTL_FORCE_ABORT _IO(__IPMI_BMC_IOCTL_MAGIC, 0x02) >>>> >>> >>> Those look good to me.  If you could do the switchover to ipmi-bmc.h >>> in a separate >>> patch, that would be cleaner.  Then add the clear atn and force >>> abort ioctls in the >>> patch to add the new driver. >>> >>> Sound good? >>> >>> -corey >>> >> If I understood correctly, still use KCS_BMC_IOCTL_xxx in kcs_bmc.h >> currently, then add a >> patch for ipmi-bmc.h, and modify the bt_bmc.h together. Right ? >> > > No, not exactly.  Just add ipmi-bmc.h and put the ioctls you define > above in it.  No need for > kcs_bmc.h at all.  We can then switch bt-bmc.c over to use the new > ioctls later and remove > bt_bmc.h when all the software gets switched over. > Understood. Will use the new ioctls for kcs_bmc firstly. > -corey > >> Haiyue > >