[U-Boot] [PATCH] mmc: seperate block number into small parts for multi-write cmd

Wolfgang Denk wd at denx.de
Mon Sep 6 10:28:25 CEST 2010


Dear Lei Wen,

In message <1283757567-15161-1-git-send-email-leiwen at marvell.com> you wrote:
> As mmc host limitation, the max number of block in one go
> should be limited to 65535, and the max buffer size should
> not excceed 512k bytes.

There is a typo in the Subject ("separate"), and actually I think the
Subject is a bit misleading. How about "limit block count for
multi-block write commands" or so?


> -	data.blocks = blkcnt;
> +	data.blocks = blocknum;

Be careful with your variable names. Most people will read "blocknum"
as "block number" (and interpret it as an index, i. e. as the logical
block address on the device), while you probably mean "number of
block" - the old name "blkcnt" was more appropriate.


Why is mmc_write_block() not static?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
SW engineering is a race between programmers trying  to  make  better
idiot-proof programs and the universe producing greater idiots.


More information about the U-Boot mailing list