Received: from eggs.gnu.org ([140.186.70.92]:46150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qof2K-0004ur-Pc for qemu-devel@nongnu.org; Wed, 03 Aug 2011 13:15:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qof2J-0001wy-UD for qemu-devel@nongnu.org; Wed, 03 Aug 2011 13:15:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qof2J-0001wm-IT for qemu-devel@nongnu.org; Wed, 03 Aug 2011 13:15:15 -0400 From: Markus Armbruster References: <1312376904-16115-1-git-send-email-armbru@redhat.com> <1312376904-16115-8-git-send-email-armbru@redhat.com> Date: Wed, 03 Aug 2011 19:15:06 +0200 In-Reply-To: (Blue Swirl's message of "Wed, 3 Aug 2011 16:53:42 +0000") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 07/45] ide: Use a table to declare which drive kinds accept each command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: kwolf@redhat.com, stefano.stabellini@eu.citrix.com, quintela@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, hare@suse.de, amit.shah@redhat.com, hch@lst.de Blue Swirl writes: > On Wed, Aug 3, 2011 at 1:07 PM, Markus Armbruster wro= te: >> No functional change. >> >> It would be nice to have handler functions in the table, like commit >> e1a064f9 did for ATAPI. =C2=A0Left for another day. >> >> Signed-off-by: Markus Armbruster >> --- >> =C2=A0hw/ide/core.c | =C2=A0104 ++++++++++++++++++++++++++++++++++++++++= +++-------------- >> =C2=A01 files changed, 79 insertions(+), 25 deletions(-) >> >> diff --git a/hw/ide/core.c b/hw/ide/core.c >> index 1c4dc2f..a25c175 100644 >> --- a/hw/ide/core.c >> +++ b/hw/ide/core.c >> @@ -876,6 +876,77 @@ void ide_ioport_write(void *opaque, uint32_t addr, = uint32_t val) >> =C2=A0 =C2=A0 } >> =C2=A0} >> >> +#define HD_OK (1u << IDE_HD) >> +#define CD_OK (1u << IDE_CD) >> +#define CFA_OK (1u << IDE_CFATA) >> +#define HD_CFA_OK (HD_OK | CFA_OK) >> +#define ALL_OK (HD_OK | CD_OK | CFA_OK) >> + >> +/* See ACS-2 T13/2015-D Table B.2 Command codes */ >> +uint8_t ide_cmd_table[0x100] =3D { > > Missing 'static'. Thanks, will fix. [...]