From: Wolfgang Denk Date: Mon, 06 Sep 2010 10:28:25 +0200 Subject: [U-Boot] [PATCH] mmc: seperate block number into small parts for multi-write cmd In-Reply-To: <1283757567-15161-1-git-send-email-leiwen@marvell.com> References: <1283757567-15161-1-git-send-email-leiwen@marvell.com> Message-ID: <20100906082825.C092E1506AA@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Lei Wen, In message <1283757567-15161-1-git-send-email-leiwen@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.