Re: [PATCH arm/aspeed/ast2500 v3 1/2] ipmi: add a KCS IPMI BMC driver

2018-02-01 Thread Corey Minyard
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) { +

Re: [PATCH arm/aspeed/ast2500 v3 1/2] ipmi: add a KCS IPMI BMC driver

2018-02-01 Thread Wang, Haiyue
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 (kc

Re: [PATCH arm/aspeed/ast2500 v3 1/2] ipmi: add a KCS IPMI BMC driver

2018-02-01 Thread Corey Minyard
On 02/01/2018 02:48 AM, Haiyue Wang wrote: --- v2->v3 - Update the KCS phase state machine. - Fix the race condition of read/write. v1->v2 - Divide the driver into two parts, one handles the BMC KCS IPMI 2.0 state; the other handles the BMC KCS controller such as AST2500 IO accessing. - Use

[PATCH arm/aspeed/ast2500 v3 1/2] ipmi: add a KCS IPMI BMC driver

2018-02-01 Thread Haiyue Wang
--- v2->v3 - Update the KCS phase state machine. - Fix the race condition of read/write. v1->v2 - Divide the driver into two parts, one handles the BMC KCS IPMI 2.0 state; the other handles the BMC KCS controller such as AST2500 IO accessing. - Use the spin lock APIs to handle the device file