lkml.org 
[lkml]   [2008]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] mmc_block: ensure all sectors that do not have errors are read
On Fri, 05 Dec 2008 13:09:11 +0200
Adrian Hunter <ext-adrian.hunter@nokia.com> wrote:

> @@ -281,6 +289,16 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
> brq.data.sg = mq->sg;
> brq.data.sg_len = mmc_queue_map_sg(mq);
>
> + /*
> + * Some drivers expect the sg list to be the same size as the
> + * request, which it won't be if we have fallen back to do
> + * one sector at a time.
> + */
> + if (disable_multi) {
> + brq.data.sg->length = 512;
> + brq.data.sg_len = 1;
> + }
> +
> mmc_queue_bounce_pre(mq);
>
> mmc_wait_for_req(card->host, &brq.mrq);

Unfortunately, there is no guarantee that the sg list will be sector
aligned. Look at the code removed in f3eb0aaa02 for how to handle this
properly.

Other than that, the patch looks ready to go.

Rgds
--
-- Pierre Ossman

WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2008-12-21 15:31    [W:0.099 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site