Skip to content

Commit

Permalink
[COMMON] Modified exception handler for block & disable logs for fat …
Browse files Browse the repository at this point in the history
…error.

Signed-off-by: cleaneye <cleaneye.kim@lge.com>
  • Loading branch information
fred.cho authored and cleaneye committed Nov 3, 2010
1 parent 460c03c commit cd73e3c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
17 changes: 16 additions & 1 deletion drivers/mmc/card/block.c
Expand Up @@ -377,6 +377,14 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
* until later as we need to wait for the card to leave
* programming mode even when things go wrong.
*/
// LGE_CHANGE [dojip.kim@lge.com] 2010-08-29,
// don't redo I/O when nomedium error

#if defined(CONFIG_MACH_LGE)
if (brq.cmd.error == -ENOMEDIUM) {
goto cmd_err;
}
#endif
if (brq.cmd.error || brq.data.error || brq.stop.error) {
if (brq.data.blocks > 1 && rq_data_dir(req) == READ) {
/* Redo read one sector at a time */
Expand Down Expand Up @@ -466,7 +474,14 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
spin_lock_irq(&md->lock);
ret = __blk_end_request(req, 0, brq.data.bytes_xfered);
spin_unlock_irq(&md->lock);
} while (ret);
} while (ret) {
// LGE_CHANGE [dojip.kim@lge.com] 2010-08-29,
// supressed the error message
#if defined(CONFIG_MACH_LGE)
req->cmd_flags |= REQ_QUIET;
#endif
ret = __blk_end_request(req, -EIO, blk_rq_cur_bytes(req));
}

mmc_release_host(card->host);

Expand Down
8 changes: 7 additions & 1 deletion fs/fat/dir.c
Expand Up @@ -98,8 +98,14 @@ static int fat__get_entry(struct inode *dir, loff_t *pos,

*bh = sb_bread(sb, phys);
if (*bh == NULL) {
// LGE_CHANGE [dojip.kim@lge.com] 2010-08-29,
// suppressed the message
#if defined(CONFIG_MACH_LGE)
// nothing
#else
printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n",
(llu)phys);
(llu)phys);
#endif
/* skip this block */
*pos = (iblock + 1) << sb->s_blocksize_bits;
goto next;
Expand Down

0 comments on commit cd73e3c

Please sign in to comment.