Re: [PATCH] mmc: mmc_test: align max_seg_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi,
>
> On Mon, Nov 14 2011, Per Forlin wrote:
>> If max_seg_size is unaligned, mmc_test_map_sg() may create sg element
>> sizes that are not aligned with 512 byte. Fix, align max_seg_size at
>> mmc_test_area_init().
>>
>> Signed-off-by: Per Forlin <per.forlin@xxxxxxxxxxxxxx>
>> ---
>>  drivers/mmc/card/mmc_test.c |    1 +
>>  1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
>> index b038c4a..5848998 100644
>> --- a/drivers/mmc/card/mmc_test.c
>> +++ b/drivers/mmc/card/mmc_test.c
>> @@ -1581,6 +1581,7 @@ static int mmc_test_area_init(struct mmc_test_card
>> *test, int erase, int fill)
>>
>>  	t->max_segs = test->card->host->max_segs;
>>  	t->max_seg_sz = test->card->host->max_seg_size;
>> +	t->max_seg_sz -= t->max_seg_sz % 512;
>>
>>  	t->max_tfr = t->max_sz;
>>  	if (t->max_tfr >> 9 > test->card->host->max_blk_count)
>
> Thanks, pushed to mmc-next for 3.2.  (Sujit, please let us know if you
> still have worries about aligning to host->max_blk_size.)

No issues. The change looks good.

-- 
Thanks,
Sujit

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux