forked from len0rd/rockbox
Check status register for error
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2400 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b0cd912f55
commit
c909b4b42e
1 changed files with 4 additions and 0 deletions
|
|
@ -62,6 +62,7 @@
|
||||||
|
|
||||||
#define STATUS_BSY 0x80
|
#define STATUS_BSY 0x80
|
||||||
#define STATUS_RDY 0x40
|
#define STATUS_RDY 0x40
|
||||||
|
#define STATUS_DF 0x20
|
||||||
#define STATUS_DRQ 0x08
|
#define STATUS_DRQ 0x08
|
||||||
#define STATUS_ERR 0x01
|
#define STATUS_ERR 0x01
|
||||||
|
|
||||||
|
|
@ -223,6 +224,9 @@ int ata_read_sectors(unsigned long start,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ATA_ALT_STATUS & (STATUS_ERR | STATUS_DF) )
|
||||||
|
continue;
|
||||||
|
|
||||||
/* if destination address is odd, use byte copying,
|
/* if destination address is odd, use byte copying,
|
||||||
otherwise use word copying */
|
otherwise use word copying */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue