lkml.org 
[lkml]   [2021]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mmc: cavium: Improve request handling by proper use of API
Date
The driver for cavium/marvell platforms uses directly mrq->done() callback
to signalize the request completion. This method to finalize request
processing is not correct.

Following fix introduces proper use of mmc_request_done() API for
all paths involved into handling MMC core requests.

Signed-off-by: Wojciech Bartczak <wbartczak@marvell.com>
---
drivers/mmc/host/cavium.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/cavium.c b/drivers/mmc/host/cavium.c
index 95a41983c6c0..7f82b5fde1f4 100644
--- a/drivers/mmc/host/cavium.c
+++ b/drivers/mmc/host/cavium.c
@@ -493,8 +493,8 @@ irqreturn_t cvm_mmc_interrupt(int irq, void *dev_id)
(rsp_sts & MIO_EMM_RSP_STS_DMA_PEND))
cleanup_dma(host, rsp_sts);

+ mmc_request_done(slot->mmc, req);
host->current_req = NULL;
- req->done(req);

no_req_done:
if (host->dmar_fixup_done)
@@ -699,8 +699,7 @@ static void cvm_mmc_dma_request(struct mmc_host *mmc,

error:
mrq->cmd->error = -EINVAL;
- if (mrq->done)
- mrq->done(mrq);
+ mmc_request_done(mmc, mrq);
host->release_bus(host);
}

--
2.17.1
\
 
 \ /
  Last update: 2021-11-16 01:11    [W:0.119 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site