lkml.org 
[lkml]   [2013]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/7] mmc: core: handling polling more gracefully
Date
In case threads "race" to harvest async req completions, just return.

Signed-off-by: Grant Grundler <grundler@chromium.org>
---
drivers/mmc/core/core.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index deb0ee5..36cfe91 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -531,6 +531,10 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
int start_err = 0;
struct mmc_async_req *saved_areq = host->areq;

+ if (!saved_areq && !areq)
+ /* Nothing to do...some code is polling. */
+ goto set_error;
+
/* Prepare a new request */
if (areq)
mmc_pre_req(host, areq->mrq, !saved_areq);
--
1.8.4


\
 
 \ /
  Last update: 2013-09-26 21:41    [W:0.093 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site