summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-09-24 17:10:03 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-09-24 17:10:03 +0000
commitc909b4b42e88a8e797e58a5e3e5ecf3716ae4783 (patch)
tree7e9df1d64ce091deb4abb541268fa8e49a0f4c6b
parentb0cd912f55d6d04bc2871cbb7b2c97452ba5d41b (diff)
downloadrockbox-c909b4b42e88a8e797e58a5e3e5ecf3716ae4783.tar.gz
rockbox-c909b4b42e88a8e797e58a5e3e5ecf3716ae4783.zip
Check status register for error
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2400 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/ata.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index d547692b56..8e9ec942cd 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -62,6 +62,7 @@
62 62
63#define STATUS_BSY 0x80 63#define STATUS_BSY 0x80
64#define STATUS_RDY 0x40 64#define STATUS_RDY 0x40
65#define STATUS_DF 0x20
65#define STATUS_DRQ 0x08 66#define STATUS_DRQ 0x08
66#define STATUS_ERR 0x01 67#define STATUS_ERR 0x01
67 68
@@ -223,6 +224,9 @@ int ata_read_sectors(unsigned long start,
223 continue; 224 continue;
224 } 225 }
225 226
227 if ( ATA_ALT_STATUS & (STATUS_ERR | STATUS_DF) )
228 continue;
229
226 /* if destination address is odd, use byte copying, 230 /* if destination address is odd, use byte copying,
227 otherwise use word copying */ 231 otherwise use word copying */
228 232