From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCpOj-0005UQ-S5 for qemu-devel@nongnu.org; Thu, 31 Jul 2014 08:24:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCpOY-0001xI-Nl for qemu-devel@nongnu.org; Thu, 31 Jul 2014 08:23:53 -0400 Received: from mail-wg0-x232.google.com ([2a00:1450:400c:c00::232]:46053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCpOY-0001wf-Ft for qemu-devel@nongnu.org; Thu, 31 Jul 2014 08:23:42 -0400 Received: by mail-wg0-f50.google.com with SMTP id n12so2624801wgh.21 for ; Thu, 31 Jul 2014 05:23:39 -0700 (PDT) Date: Thu, 31 Jul 2014 13:23:36 +0100 From: Stefan Hajnoczi Message-ID: <20140731122336.GR25929@stefanha-thinkpad.redhat.com> References: <1404757089-4836-1-git-send-email-jsnow@redhat.com> <1404757089-4836-16-git-send-email-jsnow@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kJZGYML2m3vFaueA" Content-Disposition: inline In-Reply-To: <1404757089-4836-16-git-send-email-jsnow@redhat.com> Subject: Re: [Qemu-devel] [PATCH 15/28] ide: stop PIO transfer on errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com --kJZGYML2m3vFaueA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 07, 2014 at 02:17:56PM -0400, John Snow wrote: > From: Paolo Bonzini >=20 > This will provide a hook for sending the result of the command via the > FIS receive area. >=20 > Signed-off-by: Paolo Bonzini > Signed-off-by: John Snow > --- > hw/ide/core.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) >=20 > diff --git a/hw/ide/core.c b/hw/ide/core.c > index bd3bd34..d900ba0 100644 > --- a/hw/ide/core.c > +++ b/hw/ide/core.c > @@ -422,6 +422,9 @@ static inline void ide_abort_command(IDEState *s) > { > s->status =3D READY_STAT | ERR_STAT; > s->error =3D ABRT_ERR; > + if (s->end_transfer_func !=3D ide_transfer_stop) { > + ide_transfer_stop(s); > + } > } I don't understand this. ide_transfer_stop() sets s->send_transfer_func =3D ide_transfer_stop. This has the side-effect of making ide_is_pio_out() return true (not sure if that poses a problem). Why can't we call ide_transfer_stop() when s->end_transfer_func =3D=3D ide_transfer_stop? Stefan --kJZGYML2m3vFaueA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT2jVIAAoJEJykq7OBq3PIWkUIAIkp6jOEKTyM5ur7bIbkI27p Z2b46Yt0nHo8X5TpkgRnEwCPPrONUCZvHGJ281q6l++Q7iHKXLeswZ0e3n4qrOSF MvU19+4SQd9qx4G70s5J1U7uh/2WcI8sEXskV+o2yULmDfY0czwYZzgdQlL0l6Zs bV4E3r3pnhqRkxti6Bi7v3VWnVYY1co1juwduvigqS87QjgcSce84AKP3ETSbq6P R0QBka0OxzNxvN1padmFs51ZEVV5vAPa0R8k2IdsbOAxFuzloo/8nEMf8nY3mRp9 MX+u/ekmcu4/UP35CZWheWfaUGKHN5KIRAitj5BJxVF6XkApgBwvezqSrRu8kds= =KZIA -----END PGP SIGNATURE----- --kJZGYML2m3vFaueA--