2022-09-20 10:05:58

by Huisong Li

[permalink] [raw]
Subject: [PATCH 2/2] ACPI: PCC: fix Tx done interface in handler

A error, "Client can't run the TX ticker", is printed even if PCC command
executed successfully. This root cause is that PCC handler calls
'mbox_client_txdone()' which depands on the client can received 'ACK'
packet. But PCC handler detects whether the command is complete through
the Tx ACK interrupt. So this patch fix it.

Fixes: 77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler for the PCC Type 3 subtype")

Signed-off-by: Huisong Li <[email protected]>
---
drivers/acpi/acpi_pcc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpi_pcc.c b/drivers/acpi/acpi_pcc.c
index a1052fe998bf..95d2dc274bd9 100644
--- a/drivers/acpi/acpi_pcc.c
+++ b/drivers/acpi/acpi_pcc.c
@@ -118,7 +118,7 @@ acpi_pcc_address_space_handler(u32 function, acpi_physical_address addr,
}
}

- mbox_client_txdone(data->pcc_chan->mchan, ret);
+ mbox_chan_txdone(data->pcc_chan->mchan, ret);

memcpy_fromio(value, data->pcc_comm_addr, data->ctx.length);

--
2.33.0


2022-09-21 15:48:52

by Sudeep Holla

[permalink] [raw]
Subject: Re: [PATCH 2/2] ACPI: PCC: fix Tx done interface in handler

On Tue, Sep 20, 2022 at 05:45:00PM +0800, Huisong Li wrote:
> A error, "Client can't run the TX ticker", is printed even if PCC command
> executed successfully. This root cause is that PCC handler calls
> 'mbox_client_txdone()' which depands on the client can received 'ACK'
> packet. But PCC handler detects whether the command is complete through
> the Tx ACK interrupt. So this patch fix it.
>

Thanks for fixing this. Someone mentioned about the error and it was in
my TODO list.

I would prefer to reword the subject and commit message as below:
"
ACPI: PCC: Fix Tx acknowledge in the PCC address space handler

Currently, mbox_client_txdone() is called from the PCC address space
handler and that expects the user the Tx state machine to be controlled
by the client which is not the case and the below warning is thrown:

| PCCT: Client can't run the TX ticker

Let the controller run the state machine and the end of Tx can be
acknowledge by calling mbox_chan_txdone() instead.
"

With that:

Reviewed-by: Sudeep Holla <[email protected]>

--
Regards,
Sudeep

2022-09-22 02:51:08

by Huisong Li

[permalink] [raw]
Subject: Re: [PATCH 2/2] ACPI: PCC: fix Tx done interface in handler


在 2022/9/21 23:43, Sudeep Holla 写道:
> On Tue, Sep 20, 2022 at 05:45:00PM +0800, Huisong Li wrote:
>> A error, "Client can't run the TX ticker", is printed even if PCC command
>> executed successfully. This root cause is that PCC handler calls
>> 'mbox_client_txdone()' which depands on the client can received 'ACK'
>> packet. But PCC handler detects whether the command is complete through
>> the Tx ACK interrupt. So this patch fix it.
>>
> Thanks for fixing this. Someone mentioned about the error and it was in
> my TODO list.
Great minds think alike????
>
> I would prefer to reword the subject and commit message as below:
> "
> ACPI: PCC: Fix Tx acknowledge in the PCC address space handler
>
> Currently, mbox_client_txdone() is called from the PCC address space
> handler and that expects the user the Tx state machine to be controlled
> by the client which is not the case and the below warning is thrown:
>
> | PCCT: Client can't run the TX ticker
>
> Let the controller run the state machine and the end of Tx can be
> acknowledge by calling mbox_chan_txdone() instead.
> "
Thank you for your suggestion. I will fix it in V2.
> With that:
>
> Reviewed-by: Sudeep Holla <[email protected]>
>

2022-09-22 19:54:15

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 2/2] ACPI: PCC: fix Tx done interface in handler

On Wed, Sep 21, 2022 at 5:43 PM Sudeep Holla <[email protected]> wrote:
>
> On Tue, Sep 20, 2022 at 05:45:00PM +0800, Huisong Li wrote:
> > A error, "Client can't run the TX ticker", is printed even if PCC command
> > executed successfully. This root cause is that PCC handler calls
> > 'mbox_client_txdone()' which depands on the client can received 'ACK'
> > packet. But PCC handler detects whether the command is complete through
> > the Tx ACK interrupt. So this patch fix it.
> >
>
> Thanks for fixing this. Someone mentioned about the error and it was in
> my TODO list.
>
> I would prefer to reword the subject and commit message as below:
> "
> ACPI: PCC: Fix Tx acknowledge in the PCC address space handler
>
> Currently, mbox_client_txdone() is called from the PCC address space
> handler and that expects the user the Tx state machine to be controlled
> by the client which is not the case and the below warning is thrown:
>
> | PCCT: Client can't run the TX ticker
>
> Let the controller run the state machine and the end of Tx can be
> acknowledge by calling mbox_chan_txdone() instead.
> "
>
> With that:
>
> Reviewed-by: Sudeep Holla <[email protected]>

Applied as 6.1 material along with the [1/2].

I used the above text in quotes as the subject and changelog instead
of the original pieces.

Thanks!