lkml.org 
[lkml]   [2008]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] mmc_block: ensure all sectors that do not have errors are read
Date
In article <494F7A02.2030302@nokia.com> you wrote:
> + /*
> + * After a read error, we redo the request one sector at a time
> + * in order to accurately determine which sectors can be read
> + * successfully.
> + */
> + if (disable_multi && brq.data.blocks > 1)
> + brq.data.blocks = 1;
> +
> if (brq.data.blocks > 1) {
> /* SPI multiblock writes terminate using a special
> * token, not a STOP_TRANSMISSION request.

We would save an comparision here if we use it like this:

...
if (brq.data.blocks > 1) {

/*
* After a read error, we redo the request one sector at a time
* in order to accurately determine which sectors can be read
* successfully.
*/
if (disable_multi)
brq.data.blocks = 1;

/* SPI multiblock writes terminate using a special
...


> + 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 */
> + printk(KERN_WARNING "%s: retrying using single "
> + "block read\n", req->rq_disk->disk_name);
> + disable_multi = 1;
> + continue;
> + }

Will this flood the logs?

Gruss
Bernd


\
 
 \ /
  Last update: 2008-12-22 14:25    [W:0.280 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site