From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57811) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX7dY-0001Qj-Kx for qemu-devel@nongnu.org; Wed, 23 May 2012 05:13:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX7dO-0001ZH-KP for qemu-devel@nongnu.org; Wed, 23 May 2012 05:13:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX7dO-0001YK-Cy for qemu-devel@nongnu.org; Wed, 23 May 2012 05:13:34 -0400 Message-ID: <4FBCAA38.2090908@redhat.com> Date: Wed, 23 May 2012 11:13:28 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1337729202-26850-1-git-send-email-daniel@drv.nu> In-Reply-To: <1337729202-26850-1-git-send-email-daniel@drv.nu> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ahci: SATA FIS is 20 bytes, not 0x20 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Daniel Verkamp Cc: "Stefan Weil (commit_signer:2/19=11%)" , "Anthony Liguori (commit_signer:6/19=32%)" , qemu-devel@nongnu.org, Alexander Graf , =?ISO-8859-15?Q?=22Andreas_F=E4rber_=28commit=5Fsigner=3A2/19=3D11=25?= =?ISO-8859-15?Q?=29=22?= Am 23.05.2012 01:26, schrieb Daniel Verkamp: > As in the SATA and AHCI specifications, a FIS is 5 Dwords of 4 bytes > each, which comes to 20 bytes (decimal), not 0x20. > > Signed-off-by: Daniel Verkamp > --- > hw/ide/ahci.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c > index a883a92..2d7d03d 100644 > --- a/hw/ide/ahci.c > +++ b/hw/ide/ahci.c > @@ -462,7 +462,7 @@ static void ahci_check_cmd_bh(void *opaque) > > static void ahci_init_d2h(AHCIDevice *ad) > { > - uint8_t init_fis[0x20]; > + uint8_t init_fis[20]; > IDEState *ide_state = &ad->port.ifs[0]; > > memset(init_fis, 0, sizeof(init_fis)); > @@ -619,7 +619,7 @@ static void ahci_write_fis_d2h(AHCIDevice *ad, uint8_t *cmd_fis) > d2h_fis[11] = cmd_fis[11]; > d2h_fis[12] = cmd_fis[12]; > d2h_fis[13] = cmd_fis[13]; > - for (i = 14; i < 0x20; i++) { > + for (i = 14; i < 20; i++) { > d2h_fis[i] = 0; > } > Alex or Andreas, can you please ack/nack? Kevin