summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-09-18 20:51:42 (GMT)
committerH. Peter Anvin <hpa@linux.intel.com>2013-09-18 20:51:42 (GMT)
commitea06f7db7b789f5ceb8799fdfcbbfc7d45ef1da2 (patch)
treeca5ce5a9fd114468c05903d2140daabd57c672d8
parent1335642945b45061f9da80f166ef697f86b4dfbe (diff)
downloadabc80sim-ea06f7db7b789f5ceb8799fdfcbbfc7d45ef1da2.zip
abc80sim-ea06f7db7b789f5ceb8799fdfcbbfc7d45ef1da2.tar.gz
abc80sim-ea06f7db7b789f5ceb8799fdfcbbfc7d45ef1da2.tar.bz2
abc80sim-ea06f7db7b789f5ceb8799fdfcbbfc7d45ef1da2.tar.xz
disk.c: correct reversal of sector upload/download commands
-rw-r--r--disk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/disk.c b/disk.c
index b5b8b24..e9ceeae 100644
--- a/disk.c
+++ b/disk.c
@@ -141,15 +141,15 @@ static void do_next_command(struct ctl_state *state)
state->k[0] &= ~0x01; /* Command done */
}
if ( state->k[0] & 0x02 ) {
- /* SECTOR FROM HOST */
+ /* SECTOR TO HOST */
state->in_ptr = 0;
- state->state = disk_upload;
+ state->state = disk_download;
state->k[0] &= ~0x02; /* Command done */
return;
}
if ( state->k[0] & 0x04 ) {
- /* SECTOR TO HOST */
- state->state = disk_download;
+ /* SECTOR FROM HOST */
+ state->state = disk_upload;
state->out_ptr = 0;
state->k[0] &= ~0x04; /* Command done */
return;