Received: by 10.223.148.5 with SMTP id 5csp6779895wrq; Wed, 17 Jan 2018 18:58:54 -0800 (PST) X-Google-Smtp-Source: ACJfBoutIvNixPYofj+Efoq/E6hruq2SgIeTQdNxXOpfh04h6FbufxGssmIL5XPEPW6GzkWDlh3A X-Received: by 10.101.75.81 with SMTP id k17mr4694643pgt.335.1516244334369; Wed, 17 Jan 2018 18:58:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516244334; cv=none; d=google.com; s=arc-20160816; b=epasmBOwPZCiIeNvEDSIzYMEt6X+LVaT87NmcBc/46aH0BH9qefW/McT6gCois5CoS 6JNFmsUVC1unXpMZoZkZVbqqiy646qL+7vq+74qUEK+iL6+PLv1XcRHvRsE01CdF4fFU bPlrqBg2xnJbc0hmqJ0OP/JAEor6FFgcX0We4FDVLL6K0ZiLnl55FPT0EPllUKD5+y0T J745i/+dcgE3eZz+1N+IqKVyEntiqKXile9bxYBMkBOOldHjzvi8pKAq3y9ilkurSOnE Z/mIhdLU2rJA9XiomnFGvNVpODOpLkJ6NZayL+YOXvWGvdO7Chr7Ddt8lPKpsiQdIyNh 8C+g== 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:reply-to:dkim-signature :arc-authentication-results; bh=89dZ1hTrzONahB8VhmAsIKYq69Ui3iOqoEDdSO82LNU=; b=wXmzjUO9eywvLzQ6gZoAzYC3mEK709NZP1hDFV15+hvxStkd4dhudEmm8GiJ6k2b1l Suosbj1H1fFUj+dXdSwMT9ha+mT/47QH3dMVHXp0/J5/S6v49W0o1ocsnwNKBEvrQ5Mb 8fbrYo1mSdDgpgNNsPZ1e05UlJXF8njmWQg5cV1OMKPTfQPUCLuOmO4DhPsLVLucpDCZ 6f6/8C4GC2DYM0fk5/o5oO/BTDZjcf8YYwV3RU9J6JF/xJoTwScdB7svhMZvyWVM7enl NXIQM8+0fxueZwuwmWBDTO1dreONW2N6HdSJb0agiSxSzPa4ZvzcJ2eElhbNgfhmN86n LHYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pvena5Jq; 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 v10si6293616plo.820.2018.01.17.18.58.40; Wed, 17 Jan 2018 18:58:54 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=pvena5Jq; 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 S1753862AbeARC6N (ORCPT + 99 others); Wed, 17 Jan 2018 21:58:13 -0500 Received: from mail-pg0-f44.google.com ([74.125.83.44]:41958 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753412AbeARC6M (ORCPT ); Wed, 17 Jan 2018 21:58:12 -0500 Received: by mail-pg0-f44.google.com with SMTP id 136so12240787pgd.8 for ; Wed, 17 Jan 2018 18:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=89dZ1hTrzONahB8VhmAsIKYq69Ui3iOqoEDdSO82LNU=; b=pvena5JqmFssCgex8yElvl+O7r3WncJs0QOCkRZ9LFVHP6mH9Q4nAHMmZxA4bj6ENr oVrert+Q2A+qOiQpPg6Aer9GDxpTsL4xHJPwtd2C9EdCY0sQfJ9EcSD7DkRrRLhIh+sT SaW48GkdrmAFssuqOVDh4I133TZHSX6F4qgy2F3viuNJGtEdvvyyBUR23dNg88gTpqpb AkoF66h9wguqnHrcGgly4/HM41YTRiRDrUwrL9ZENvpVH3JRABepN4b/kYoCOxybrnt5 U0sqvigEKs8TwiSDB3mKoUJoN8Qh66aLFg4AKYkKElGpbejI5y8jHSGDrtBhmBPrD+B9 IKTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:cc:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=89dZ1hTrzONahB8VhmAsIKYq69Ui3iOqoEDdSO82LNU=; b=QJh2XbFlVwfEw8rumiPgPhjNvnQMn4juLhWgwp8yu9qk0su28vU24aH8rZkaJlwiTS 1koDeT4zeyXbv0mONZ4I4b0O1oCRw8y95Kcp75FOt+LRM8UkVIDy6TzNSf04bJQfrR/x DQM6FCA7pN4xUCvDv1N3G/aZ7ecs/wj3UKo1uvZ6HrjEANhhEhtItlt3nO1YcGj9LAE3 p8MbRQA0gddYmpLyDOtxS401Ubc69BBzAL3e04Rzt2k0/oHQz2xajEu2jHMzc6dlk2fZ Gm8JofITeDkXMZE6fhmhcbLpXHQcy8JWKFq/A16OAZluY3JdlqqgPrl/W9oHqY4TBLGd h/eQ== X-Gm-Message-State: AKGB3mJzI5HKLu5Roqjc/g9rWgLD8gkuYdiwuFBKIDQyL8ayTfqHAh/i WvbsFlq5Lkg77Rn1sf7/Sw== X-Received: by 10.159.240.138 with SMTP id p10mr43604478plr.133.1516244291014; Wed, 17 Jan 2018 18:58:11 -0800 (PST) Received: from serve.minyard.net ([47.184.168.85]) by smtp.gmail.com with ESMTPSA id o25sm9740315pgc.75.2018.01.17.18.58.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jan 2018 18:58:10 -0800 (PST) Received: from [192.168.27.3] (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPSA id 8FAFB2B9; Wed, 17 Jan 2018 20:58:08 -0600 (CST) Reply-To: minyard@acm.org Subject: Re: [PATCH arm/aspeed/ast2500 v1] ipmi: add an Aspeed KCS IPMI BMC driver To: "Wang, Haiyue" , 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: Corey Minyard Message-ID: Date: Wed, 17 Jan 2018 20:58:07 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <2fd6d4d7-39a1-f1b5-752e-e43ae2dd4cdd@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -corey > Haiyue