From: Corey Minyard <tcminyard@gmail.com>
To: "Wang, Haiyue" <haiyue.wang@linux.intel.com>,
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: Thu, 1 Feb 2018 18:25:24 -0600 [thread overview]
Message-ID: <af22ee18-3b8c-0c47-72bc-053d2b7e738e@gmail.com> (raw)
In-Reply-To: <062c4b58-960a-5023-be75-9b7cd1163783@linux.intel.com>
On 02/01/2018 05:56 PM, Wang, Haiyue wrote:
>
>
> 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;
>
Yes, that should be good. Sorry about the confusion.
prev parent reply other threads:[~2018-02-02 0:25 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
2018-02-02 0:25 ` Corey Minyard [this message]
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=af22ee18-3b8c-0c47-72bc-053d2b7e738e@gmail.com \
--to=tcminyard@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=haiyue.wang@linux.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®