All of lore.kernel.org
 help / color / mirror / Atom feed
* [ v01] mailbox: pcc: report errors for PCC clients
@ 2026-05-15 22:17 Adam Young
  2026-05-15 22:39 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Young @ 2026-05-15 22:17 UTC (permalink / raw)
  To: Sudeep Holla, Jassi Brar
  Cc: Rafael J . Wysocki, Len Brown, linux-acpi, Andi Shyti,
	Guenter Roeck, linux-hwmon, Huisong Li, MyungJoo Ham,
	Kyungmin Park, Chanwoo Choi

The tx_done callback function has a return code (rc) parameter
that the tx_done callback can use to determine how to handle an error.
However the IRQ handler was not setting that value if there is an error.

The following clients are affected:

drivers/acpi/cppc_acpi.c
drivers/i2c/busses/i2c-xgene-slimpro.c
drivers/hwmon/xgene-hwmon.c
drivers/soc/hisilicon/kunpeng_hccs.c
drivers/devfreq/hisi_uncore_freq.c

All of these only use the error code to report, so they
are expecting an error code to come thorugh, but they
do not modify behavior based on this code.

Fixes: c45ded7e1135 ("mailbox: pcc: Add support for PCCT extended PCC subspaces(type 3/4)")
Signed-off-by: Adam Young <admiyo@os.amperecomputing.com>

---
---
 drivers/mailbox/pcc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 636879ae1db7..25650446cd2b 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -314,6 +314,7 @@ static irqreturn_t pcc_mbox_irq(int irq, void *p)
 {
 	struct pcc_chan_info *pchan;
 	struct mbox_chan *chan = p;
+	int rc;
 
 	pchan = chan->con_priv;
 
@@ -327,8 +328,11 @@ static irqreturn_t pcc_mbox_irq(int irq, void *p)
 	if (!pcc_mbox_cmd_complete_check(pchan))
 		return IRQ_NONE;
 
-	if (pcc_mbox_error_check_and_clear(pchan))
+	rc = pcc_mbox_error_check_and_clear(pchan);
+	if (rc) {
+		mbox_chan_txdone(chan, rc);
 		return IRQ_NONE;
+	}
 
 	/*
 	 * Clear this flag after updating interrupt ack register and just
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-15 22:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-15 22:17 [ v01] mailbox: pcc: report errors for PCC clients Adam Young
2026-05-15 22:39 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.