From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55522) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSoNg-0001mb-RN for qemu-devel@nongnu.org; Mon, 08 Feb 2016 11:09:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSoNf-0000ta-US for qemu-devel@nongnu.org; Mon, 08 Feb 2016 11:09:40 -0500 Date: Mon, 8 Feb 2016 16:09:32 +0000 From: Stefan Hajnoczi Message-ID: <20160208160932.GE31586@stefanha-x1.localdomain> References: <1453225191-11871-1-git-send-email-jsnow@redhat.com> <1453225191-11871-6-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="n+lFg1Zro7sl44OB" Content-Disposition: inline In-Reply-To: <1453225191-11871-6-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 5/6] ide: Add silent DRQ cancellation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org --n+lFg1Zro7sl44OB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 19, 2016 at 12:39:50PM -0500, John Snow wrote: > Split apart the ide_transfer_stop function into two versions: one that > interrupts and one that doesn't. The one that doesn't can be used to > halt any PIO transfers that are in the DRQ phase. It will not halt > any PIO transfers that are currently in the process of buffering data > for the guest to read. >=20 > Signed-off-by: John Snow > --- > hw/ide/core.c | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) >=20 > diff --git a/hw/ide/core.c b/hw/ide/core.c > index cf0b5ec..9bc8e58 100644 > --- a/hw/ide/core.c > +++ b/hw/ide/core.c > @@ -486,13 +486,26 @@ static void ide_cmd_done(IDEState *s) > } > } > =20 > -void ide_transfer_stop(IDEState *s) > +static void ide_transfer_halt(IDEState *s, void(*etf)(IDEState *), bool = notify) > { > - s->end_transfer_func =3D ide_transfer_stop; > + s->end_transfer_func =3D etf; Please keep using full names so the code is easier to understand: s/etc/end_transfer_func/ --n+lFg1Zro7sl44OB Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJWuL2iAAoJEJykq7OBq3PIAJUH/R3BvNReX31vMENc3mJ7K1cG M+ASVeoYG4wRinI5XEdddmidpUrVOpEj1ufZ6+5Sy3OiqJhLAaph7dpwf/NKf9W/ 3uDhtmtnzHOrw01Cud9g99AsIZAQVoE9q8CfjKw8qP26gRAvdzkTSlTHhds/PQc3 0avkFJXBYGQCdgu31wuxcaYJw1uc1J5Y+2Q2zJwpzSkdjPJlir4X7+U64J1IA7BX Hhk9Wxj4EzcLeUYBLBtfFBFdldXEYoTwgk1gClezjKoHQtaRhsTAz2kTnMgCGKTC 15AO4Z9WYi5y9Vq/5jDPQY5FlvEzWbI2vXMKQqQ0n6FXtnfae3Wy6SKYeE2J5s0= =CFY+ -----END PGP SIGNATURE----- --n+lFg1Zro7sl44OB--