Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102189
b: refs/heads/master
c: 979ce72
h: refs/heads/master
i:
  102187: ce82579
v: v3
  • Loading branch information
Pierre Ossman committed Jul 15, 2008
1 parent 0e07059 commit 596c6e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2134a922c6e75c779983cad5d8aae832275f5a0d
refs/heads/master: 979ce7208a679b8d012450610d5d5aa75aab3af9
13 changes: 9 additions & 4 deletions trunk/drivers/mmc/card/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Block driver for media (i.e., flash cards)
*
* Copyright 2002 Hewlett-Packard Company
* Copyright 2005-2007 Pierre Ossman
* Copyright 2005-2008 Pierre Ossman
*
* Use consistent with the GNU GPL is permitted,
* provided that this copyright notice is
Expand Down Expand Up @@ -296,22 +296,24 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)

mmc_queue_bounce_post(mq);

/*
* Check for errors here, but don't jump to cmd_err
* until later as we need to wait for the card to leave
* programming mode even when things go wrong.
*/
if (brq.cmd.error) {
printk(KERN_ERR "%s: error %d sending read/write command\n",
req->rq_disk->disk_name, brq.cmd.error);
goto cmd_err;
}

if (brq.data.error) {
printk(KERN_ERR "%s: error %d transferring data\n",
req->rq_disk->disk_name, brq.data.error);
goto cmd_err;
}

if (brq.stop.error) {
printk(KERN_ERR "%s: error %d sending stop command\n",
req->rq_disk->disk_name, brq.stop.error);
goto cmd_err;
}

if (!mmc_host_is_spi(card->host) && rq_data_dir(req) != READ) {
Expand Down Expand Up @@ -344,6 +346,9 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
#endif
}

if (brq.cmd.error || brq.data.error || brq.stop.error)
goto cmd_err;

/*
* A block was successfully transferred.
*/
Expand Down

0 comments on commit 596c6e6

Please sign in to comment.