forked from len0rd/rockbox
imx233: fix sdmmc driver bug when sector count is 0
Since the driver will read count-1 sectors, this will stuck the card. Change-Id: Ib80484044acd1fad2914d3ffeb3940a13d2480c4
This commit is contained in:
parent
532b8141ab
commit
54dd77a5f8
1 changed files with 3 additions and 0 deletions
|
@ -596,6 +596,9 @@ static int __xfer_sectors(int drive, unsigned long start, int count, void *buf,
|
||||||
static int transfer_sectors(int drive, unsigned long start, int count, void *buf, bool read)
|
static int transfer_sectors(int drive, unsigned long start, int count, void *buf, bool read)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
// the function doesn't work when count is 0
|
||||||
|
if(count == 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
/* update disk activity */
|
/* update disk activity */
|
||||||
disk_last_activity[drive] = current_tick;
|
disk_last_activity[drive] = current_tick;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue