From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur2nq-00025d-Ta for qemu-devel@nongnu.org; Mon, 24 Jun 2013 05:11:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ur2nm-0007LS-Rt for qemu-devel@nongnu.org; Mon, 24 Jun 2013 05:11:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ur2nm-0007LA-Ik for qemu-devel@nongnu.org; Mon, 24 Jun 2013 05:11:10 -0400 From: Stefan Hajnoczi Date: Mon, 24 Jun 2013 11:10:25 +0200 Message-Id: <1372065035-19601-14-git-send-email-stefanha@redhat.com> In-Reply-To: <1372065035-19601-1-git-send-email-stefanha@redhat.com> References: <1372065035-19601-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH 13/23] ide: Convert SEEK to ide_cmd_table handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Anthony Liguori , Stefan Hajnoczi From: Kevin Wolf Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- hw/ide/core.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 83e86aa..76a3fdf 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); -- 1.8.1.4