Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270268
b: refs/heads/master
c: 7c8a282
h: refs/heads/master
v: v3
  • Loading branch information
Per Forlin authored and Chris Ball committed Oct 26, 2011
1 parent df39b7a commit a820398
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 44669034815a7ad263542ac605c581a10b22d146
refs/heads/master: 7c8a2829c22a270acadc6aa3a937e2e7956b19f5
6 changes: 6 additions & 0 deletions trunk/drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,14 @@ struct mmc_async_req *mmc_start_req(struct mmc_host *host,
mmc_wait_for_req_done(host, host->areq->mrq);
err = host->areq->err_check(host->card, host->areq);
if (err) {
/* post process the completed failed request */
mmc_post_req(host, host->areq->mrq, 0);
if (areq)
/*
* Cancel the new prepared request, because
* it can't run until the failed
* request has been properly handled.
*/
mmc_post_req(host, areq->mrq, -EINVAL);

host->areq = NULL;
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/mmc/host.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ struct mmc_host_ops {
* It is optional for the host to implement pre_req and post_req in
* order to support double buffering of requests (prepare one
* request while another request is active).
* pre_req() must always be followed by a post_req().
* To undo a call made to pre_req(), call post_req() with
* a nonzero err condition.
*/
void (*post_req)(struct mmc_host *host, struct mmc_request *req,
int err);
Expand Down

0 comments on commit a820398

Please sign in to comment.