From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbWDv-00086Y-FK for qemu-devel@nongnu.org; Mon, 14 Sep 2015 12:03:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbWDu-0003F4-DO for qemu-devel@nongnu.org; Mon, 14 Sep 2015 12:03:19 -0400 References: <1441927256-24625-1-git-send-email-jsnow@redhat.com> <1441927256-24625-2-git-send-email-jsnow@redhat.com> <20150911031141.GA2592@ad.nay.redhat.com> From: John Snow Message-ID: <55F6EFC0.3090501@redhat.com> Date: Mon, 14 Sep 2015 12:03:12 -0400 MIME-Version: 1.0 In-Reply-To: <20150911031141.GA2592@ad.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/1] atapi: abort transfers with 0 byte limits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, armbru@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org On 09/10/2015 11:11 PM, Fam Zheng wrote: > On Thu, 09/10 19:20, John Snow wrote: >> >> + /* Nondata commands permit the byte_count_limit to be 0. >> + * If this is a data-transferring PIO command and BCL is 0, >> + * we abort at the /ATA/ level, not the ATAPI level. >> + * See ATA8 ACS3 section 7.17.6.49 and 7.21.5 */ >> + if (!(atapi_cmd_table[s->io_buffer[0]].flags & NONDATA)) { >> + /* TODO: Check IDENTIFY data word 125 for default BCL (currently 0) */ >> + uint16_t byte_count_limit = s->lcyl | (s->hcyl << 8); >> + if !(byte_count_limit || s->atapi_dma) { > > !( ? > > Fam > Ugh. Thinko'd the outer (), and didn't apparently rebuild. :(