From: "Wang, Haiyue" <haiyue.wang@linux.intel.com>
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
Subject: Re: [PATCH arm/aspeed/ast2500 v3 1/2] ipmi: add a KCS IPMI BMC driver
Date: Fri, 2 Feb 2018 07:56:57 +0800 [thread overview]
Message-ID: <062c4b58-960a-5023-be75-9b7cd1163783@linux.intel.com> (raw)
In-Reply-To: <66b3a8f8-b477-6ada-5ced-944a5b67edd3@acm.org>
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
next prev parent reply other threads:[~2018-02-01 23:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 8:48 Haiyue Wang
2018-02-01 8:48 ` [PATCH arm/aspeed/ast2500 v3 2/2] ipmi: add an Aspeed " Haiyue Wang
2018-02-01 20:32 ` [PATCH arm/aspeed/ast2500 v3 1/2] ipmi: add a " Corey Minyard
2018-02-01 23:56 ` Wang, Haiyue [this message]
2018-02-02 0:25 ` Corey Minyard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=062c4b58-960a-5023-be75-9b7cd1163783@linux.intel.com \
--to=haiyue.wang@linux.intel.com \
--cc=andriy.shevchenko@intel.com \
--cc=joel@jms.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=openbmc@lists.ozlabs.org \
--cc=openipmi-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®