sd-as3525v2: check the (supposedly) card data line for business when writing

Fix panics when deleting large files from µSD
Tested on problematic Transcend 4GB Class 6

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26631 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-06-06 13:47:30 +00:00
parent a1a9084160
commit 5c9e76a1e0

View file

@ -878,6 +878,12 @@ static int sd_transfer_sectors(IF_MD2(int drive,) unsigned long start,
last_disk_activity = current_tick;
if(write)
{
/* wait for the card to exit programming state */
while(MCI_STATUS & DATA_BUSY) ;
}
if(!send_cmd(drive, SD_STOP_TRANSMISSION, 0, MCI_NO_RESP, NULL))
{
ret = -666;