Received: from eggs.gnu.org ([2001:4830:134:3::10]:60475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baOFj-0006d6-HJ for qemu-devel@nongnu.org; Thu, 18 Aug 2016 10:25:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1baOFi-0005LS-Jo for qemu-devel@nongnu.org; Thu, 18 Aug 2016 10:25:03 -0400 Date: Thu, 18 Aug 2016 16:24:55 +0200 From: Kevin Wolf Message-ID: <20160818142455.GB4147@noname.redhat.com> References: <1471513714-11709-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1471513714-11709-1-git-send-email-hpoussin@reactos.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] atapi: allow 0 transfer bytes for read_cd command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Herv=E9?= Poussineau Cc: John Snow , qemu-block@nongnu.org, qemu-devel@nongnu.org Am 18.08.2016 um 11:48 hat Herv=E9 Poussineau geschrieben: > This fixes Windows NT4 startup when a cdrom is inserted. >=20 > Fixes: 9ef2e93f9b1888c7d0deb4a105149138e6ad2e98 > Signed-off-by: Herv=E9 Poussineau Hm, which of the paths in cmd_read_cd() does this hit? Is it the one that directly calls ide_atapi_cmd_ok() without doing anything? I think adding NONDATA is okay, but we may need to add explicit atapi_byte_count_limit() =3D=3D 0 checks to those paths that do transfer some data. At least at first sight I'm not sure that ide_atapi_cmd_read() can handle this. Kevin > hw/ide/atapi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c > index 6189675..63312f2 100644 > --- a/hw/ide/atapi.c > +++ b/hw/ide/atapi.c > @@ -1289,7 +1289,7 @@ static const struct AtapiCmd { > [ 0xad ] =3D { cmd_read_dvd_structure, CHECK_READY }, > [ 0xbb ] =3D { cmd_set_speed, NONDATA }, > [ 0xbd ] =3D { cmd_mechanism_status, 0 }, > - [ 0xbe ] =3D { cmd_read_cd, CHECK_READY }, > + [ 0xbe ] =3D { cmd_read_cd, CHECK_READY | NO= NDATA }, > /* [1] handler detects and reports not ready condition itself */ > };