forked from len0rd/rockbox
SD AMSv2: fix r29169
Restore access to the last AMS_OF_SIZE == 0xF000 sectors of internal drive Mostly visible when using USB (or database?) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29625 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1675e98925
commit
82f2bb99ae
1 changed files with 6 additions and 6 deletions
|
@ -845,6 +845,12 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
|
|||
goto sd_transfer_error_no_dma;
|
||||
}
|
||||
|
||||
if((start+count) > card_info[drive].numblocks)
|
||||
{
|
||||
ret = -19;
|
||||
goto sd_transfer_error_no_dma;
|
||||
}
|
||||
|
||||
/* skip SanDisk OF */
|
||||
if (drive == INTERNAL_AS3525)
|
||||
start += AMS_OF_SIZE;
|
||||
|
@ -861,12 +867,6 @@ sd_transfer_retry_with_reinit:
|
|||
goto sd_transfer_error_no_dma;
|
||||
}
|
||||
|
||||
if((start+count) > card_info[drive].numblocks)
|
||||
{
|
||||
ret = -19;
|
||||
goto sd_transfer_error_no_dma;
|
||||
}
|
||||
|
||||
/* CMD7 w/rca: Select card to put it in TRAN state */
|
||||
if(!send_cmd(drive, SD_SELECT_CARD, card_info[drive].rca, MCI_NO_RESP, NULL))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue