Received: from eggs.gnu.org ([2001:4830:134:3::10]:38870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUoOL-0002vx-5L for qemu-devel@nongnu.org; Wed, 03 Aug 2016 01:06:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUoOJ-0004AG-3U for qemu-devel@nongnu.org; Wed, 03 Aug 2016 01:06:52 -0400 References: <1470175541-19344-1-git-send-email-jsnow@redhat.com> From: Stefan Weil Message-ID: Date: Wed, 3 Aug 2016 07:06:30 +0200 MIME-Version: 1.0 In-Reply-To: <1470175541-19344-1-git-send-email-jsnow@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hu8cGWAJC94ng4pjEmUPfCOFi2XeIpn4D" Subject: Re: [Qemu-devel] [PATCH] ide: fix DMA register transitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-block@nongnu.org Cc: Kevin Wolf , Benjamin David Lunt , QEMU Developer , Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hu8cGWAJC94ng4pjEmUPfCOFi2XeIpn4D Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Am 03.08.2016 um 00:05 schrieb John Snow: > ATA8-APT defines the state transitions for both a host controller and > for the hardware device during the lifecycle of a DMA transfer, in > section 9.7 "DMA command protocol." >=20 > One of the interesting tidbits here is that when a device transitions > from DDMA0 ("Prepare state") to DDMA1 ("Data_Transfer State"), it can > choose to set either BSY or DRQ to signal this transition, but not both= =2E >=20 > as ide_sector_dma_start is the last point in our preparation process > before we begin the real data transfer process (for either AHCI or BMDM= A), > this is the correct transition point for DDMA0 to DDMA1. >=20 > I have chosen !BSY && DRQ for QEMU to make the transition from DDMA0 th= e > most obvious. >=20 > Reported-by: Benjamin David Lunt > Signed-off-by: John Snow > --- > hw/ide/core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/hw/ide/core.c b/hw/ide/core.c > index d117b7c..e961d42 100644 > --- a/hw/ide/core.c > +++ b/hw/ide/core.c > @@ -907,7 +907,7 @@ eot: > =20 > static void ide_sector_start_dma(IDEState *s, enum ide_dma_cmd dma_cmd= ) > { > - s->status =3D READY_STAT | SEEK_STAT | DRQ_STAT | BUSY_STAT; > + s->status =3D READY_STAT | SEEK_STAT | DRQ_STAT; > s->io_buffer_size =3D 0; > s->dma_cmd =3D dma_cmd; This patch fixes the reported test case, thank you. Tested-by: Stefan Weil --hu8cGWAJC94ng4pjEmUPfCOFi2XeIpn4D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXoXvhAAoJEOCMIdVndFCtoswP/2o6C4MJsnfgZVH0TLSlLZD9 E1Y8F46E7KosdqqTujWclIZpvhSvwHsaBs1cF8G7ZMUYyvSPBofkO3t+2FaN0mHw KZmSuhNc151ygmPvgJvds3pWFOlsaG8QDqhPq+c9CfsYMW2XfFf0FSA3h+qn8Z4I qfA04IZ6y8mHfHf1dh0ohu+C1BHLluHKViw2wKJZOejqkmiAWF9E9g19agTNprCN 4Ut7gKhxNshSmYP9QgFkZhYeo6WtxGdIdr7IVppJ7vKqmpdjkZ/TrqBkFxCThyyV pXFPciq4Au22Na6xIJ6x3R2/Zy31/4pOl3G9Ri4e1eINCilXm4PGpLT6tkc+q/mk XfE6qGQtbquLRQ+p+dbs7F6lxfLPvHm8E7/S0skd7O6b+NWGHvw60f5UPwh2LK52 uWptktvCw/pL55BVpKFd6PhVL8orlNq0zgq7dK5F9kBzHc/Z25Kz8OE2BS/1mZGq UcXL7Mu73muucfHmY7xtIGqeuWyr23d8eQOqF4e1VJ4Ir6AnrDJaIybraI/Q1i2F cecfLeQrzIdHRY5/LjZ/B31/DpAZ/e39CwL4SpmbUFvbFaFV5cOLZcWufQr94vo2 JOnyttu/Q7gvxdr+sp0VbR+N8aghsUqY6dilA2Iy04UNOCsonphBwxdmJXgfk5n0 xTfWtn3A56iwjG7jsbXe =RG2B -----END PGP SIGNATURE----- --hu8cGWAJC94ng4pjEmUPfCOFi2XeIpn4D--