From 1824a487c8398ba039139d383bdf2ac3c2be0afd Mon Sep 17 00:00:00 2001 From: zhangyuyang Date: Tue, 10 Jun 2025 07:49:53 +0800 Subject: [PATCH] drivers:misc:sdma-dae: sdma fix uncorrect sleep time kunpeng inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ICEOOZ CVE: NA ---------------------------------------------------------------------- 1. sleep 1ms to query channel status again when remove sdma driver. Fixes: f8eeb3987916 ("drivers: misc: sdma-dae: support channel management") Signed-off-by: zhangyuyang --- drivers/misc/sdma-dae/hisi_sdma.h | 4 ++-- drivers/misc/sdma-dae/sdma_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/sdma-dae/hisi_sdma.h b/drivers/misc/sdma-dae/hisi_sdma.h index 6ffba9973590..c5cc92de5ffc 100644 --- a/drivers/misc/sdma-dae/hisi_sdma.h +++ b/drivers/misc/sdma-dae/hisi_sdma.h @@ -14,8 +14,8 @@ #define HISI_SDMA_MMAP_CQE 1 #define HISI_SDMA_MMAP_IO 2 #define HISI_SDMA_MMAP_SHMEM 3 -#define HISI_SDMA_FSM_INTERVAL 20 -#define HISI_SDMA_FSM_TIMEOUT 5 +#define HISI_SDMA_FSM_INTERVAL 1 +#define HISI_SDMA_FSM_TIMEOUT 100 #define HISI_SDMA_LOW_ADDR_SHIFT 32 #define HISI_SDMA_MAX_BASE_ADDR_SIZE 0x100000 diff --git a/drivers/misc/sdma-dae/sdma_main.c b/drivers/misc/sdma-dae/sdma_main.c index 5fb4a2d284c5..8b4d330e15eb 100644 --- a/drivers/misc/sdma-dae/sdma_main.c +++ b/drivers/misc/sdma-dae/sdma_main.c @@ -99,7 +99,7 @@ void sdma_channel_reset_sq_cq(struct hisi_sdma_channel *pchan) while (cq_head != cq_tail) { sdma_channel_set_cq_head(pchan, cq_tail); - msleep(SDMA_POLL_DELAY); + msleep(HISI_SDMA_FSM_INTERVAL); cq_head = sdma_channel_get_cq_head(pchan); cq_tail = sdma_channel_get_cq_tail(pchan); -- Gitee