diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-04 15:19:37 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-02-04 15:19:37 +0100 |
commit | ed5551279c9100aff6adf337d809057a7532b6f7 (patch) | |
tree | 32835b919718c82f7a414041d7951971733c2dfe /drivers/firmware/arm_scmi/mailbox.c | |
parent | usb: typec: qcom-pmic-typec: allow different implementations for the port bac... (diff) | |
parent | Linux 6.8-rc3 (diff) | |
download | linux-ed5551279c9100aff6adf337d809057a7532b6f7.tar.xz linux-ed5551279c9100aff6adf337d809057a7532b6f7.zip |
Merge 6.8-rc3 into usb-next
We need the USB fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/firmware/arm_scmi/mailbox.c')
-rw-r--r-- | drivers/firmware/arm_scmi/mailbox.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/mailbox.c b/drivers/firmware/arm_scmi/mailbox.c index 19246ed1f01f..b8d470417e8f 100644 --- a/drivers/firmware/arm_scmi/mailbox.c +++ b/drivers/firmware/arm_scmi/mailbox.c @@ -45,6 +45,20 @@ static void rx_callback(struct mbox_client *cl, void *m) { struct scmi_mailbox *smbox = client_to_scmi_mailbox(cl); + /* + * An A2P IRQ is NOT valid when received while the platform still has + * the ownership of the channel, because the platform at first releases + * the SMT channel and then sends the completion interrupt. + * + * This addresses a possible race condition in which a spurious IRQ from + * a previous timed-out reply which arrived late could be wrongly + * associated with the next pending transaction. + */ + if (cl->knows_txdone && !shmem_channel_free(smbox->shmem)) { + dev_warn(smbox->cinfo->dev, "Ignoring spurious A2P IRQ !\n"); + return; + } + scmi_rx_callback(smbox->cinfo, shmem_read_header(smbox->shmem), NULL); } |