[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <062c4b58-960a-5023-be75-9b7cd1163783@linux.intel.com>
Date: Fri, 2 Feb 2018 07:56:57 +0800
From: "Wang, Haiyue" <haiyue.wang@...ux.intel.com>
To: minyard@....org, joel@....id.au, openbmc@...ts.ozlabs.org,
openipmi-developer@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Cc: andriy.shevchenko@...el.com
Subject: Re: [PATCH arm/aspeed/ast2500 v3 1/2] ipmi: add a KCS IPMI BMC driver
On 2018-02-02 04:32, Corey Minyard wrote:
>> +static void kcs_bmc_handle_cmd(struct kcs_bmc *kcs_bmc)
>> +{
>> + u8 cmd;
>> +
>> + set_state(kcs_bmc, WRITE_STATE);
>> + write_data(kcs_bmc, KCS_ZERO_DATA);
>> +
>> + cmd = read_data(kcs_bmc);
>> + switch (cmd) {
>> + case KCS_CMD_WRITE_START:
>> + if (kcs_bmc->phase != KCS_PHASE_IDLE &&
>> + kcs_bmc->phase != KCS_PHASE_ERROR) {
>> + kcs_force_abort(kcs_bmc);
>> + break;
>> + }
>> +
>
> The spec says you can do a write start basically any time and the
> state machine starts over. I know I kind of went back and forth on
> this in my previous email, but what you had before is correct, I think.
>
So change it to the bellowing code is OK now? :-)
+ case KCS_CMD_WRITE_START:
+ kcs_bmc->data_in_avail = false;
+ kcs_bmc->data_in_idx = 0;
+ kcs_bmc->phase = KCS_PHASE_WRITE;
+ kcs_bmc->error = KCS_NO_ERROR;
+ break;
> -corey
Powered by blists - more mailing lists