diff options
author | Kevin Wolf <kwolf@redhat.com> | 2013-06-18 10:26:07 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-06-24 10:25:16 +0200 |
commit | 61fdda377a7e8f05dc1171504405647131148d80 (patch) | |
tree | 3b5c068bb8c80c6c710189e08737cc75c2b5accd | |
parent | 9afce42903b3f8af1f9c158b411c73e41cf95df7 (diff) |
ide: Convert SEEK to ide_cmd_table handler
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | hw/ide/core.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index 83e86aa320..76a3fdfbfa 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1190,6 +1190,12 @@ static bool cmd_flush_cache(IDEState *s, uint8_t cmd) return false; } +static bool cmd_seek(IDEState *s, uint8_t cmd) +{ + /* XXX: Check that seek is within bounds */ + return true; +} + static bool cmd_read_native_max(IDEState *s, uint8_t cmd) { bool lba48 = (cmd == WIN_READ_NATIVE_MAX_EXT); @@ -1322,7 +1328,7 @@ static const struct { [WIN_VERIFY] = { cmd_verify, HD_CFA_OK | SET_DSC }, [WIN_VERIFY_ONCE] = { cmd_verify, HD_CFA_OK | SET_DSC }, [WIN_VERIFY_EXT] = { cmd_verify, HD_CFA_OK | SET_DSC }, - [WIN_SEEK] = { NULL, HD_CFA_OK }, + [WIN_SEEK] = { cmd_seek, HD_CFA_OK | SET_DSC }, [CFA_TRANSLATE_SECTOR] = { NULL, CFA_OK }, [WIN_DIAGNOSE] = { NULL, ALL_OK }, [WIN_SPECIFY] = { cmd_nop, HD_CFA_OK | SET_DSC }, @@ -1409,11 +1415,6 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) } switch(val) { - case WIN_SEEK: - /* XXX: Check that seek is within bounds */ - s->status = READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); - break; /* ATAPI commands */ case WIN_PIDENTIFY: ide_atapi_identify(s); |