summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatha Rao <skoteshwar@marvell.com>2025-01-03 18:31:35 +0300
committerMichael S. Tsirkin <mst@redhat.com>2025-01-27 17:39:25 +0300
commit59e457122982534f1c0fc1171056d0d8b1ed9f68 (patch)
tree202fd8b5f763bd3f91c8223bbb4135ea6d38e2cf
parent26f8ce06af6475b33b0bc60261e9f5027f9af58f (diff)
downloadlinux-59e457122982534f1c0fc1171056d0d8b1ed9f68.tar.xz
vdpa/octeon_ep: handle device config change events
The first interrupt of the device is used to notify the host about device configuration changes, such as link status updates. The ISR configuration area is updated to indicate a config change event when triggered. Signed-off-by: Satha Rao <skoteshwar@marvell.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Shijith Thotton <sthotton@marvell.com> Message-Id: <20250103153226.1933479-2-sthotton@marvell.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r--drivers/vdpa/octeon_ep/octep_vdpa_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/vdpa/octeon_ep/octep_vdpa_main.c b/drivers/vdpa/octeon_ep/octep_vdpa_main.c
index e9c3e57b321f..4d56be64ae56 100644
--- a/drivers/vdpa/octeon_ep/octep_vdpa_main.c
+++ b/drivers/vdpa/octeon_ep/octep_vdpa_main.c
@@ -71,6 +71,14 @@ static irqreturn_t octep_vdpa_intr_handler(int irq, void *data)
}
}
+ /* Check for config interrupt. Config uses the first interrupt */
+ if (unlikely(irq == oct_hw->irqs[0] && ioread8(oct_hw->isr))) {
+ iowrite8(0, oct_hw->isr);
+
+ if (oct_hw->config_cb.callback)
+ oct_hw->config_cb.callback(oct_hw->config_cb.private);
+ }
+
return IRQ_HANDLED;
}