Received: from eggs.gnu.org ([208.118.235.92]:45043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbraB-0004pO-UU for qemu-devel@nongnu.org; Mon, 13 May 2013 08:10:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ubra8-000099-PW for qemu-devel@nongnu.org; Mon, 13 May 2013 08:10:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ubra8-00008w-IG for qemu-devel@nongnu.org; Mon, 13 May 2013 08:10:20 -0400 Date: Mon, 13 May 2013 14:10:09 +0200 From: Stefan Hajnoczi Message-ID: <20130513121009.GB21733@stefanha-thinkpad.redhat.com> References: <1368202225-45798-1-git-send-email-i.mitsyanko@gmail.com> <1368202225-45798-6-git-send-email-i.mitsyanko@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1368202225-45798-6-git-send-email-i.mitsyanko@gmail.com> Subject: Re: [Qemu-devel] [RFC 5/7] sd.c: introduce async read operation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mitsyanko Cc: peter.crosthwaite@xilinx.com, peter.maydell@linaro.org, aliguori@us.ibm.com, sw@weilnetz.de, qemu-devel@nongnu.org, blauwirbel@gmail.com, paul@codesourcery.com, pbonzini@redhat.com, afaerber@suse.de On Fri, May 10, 2013 at 08:10:23PM +0400, Igor Mitsyanko wrote: > + if (sd->state != sd_sendingdata_state) { > + DPRINTF("Transfer was aborted\n"); > + return; > + } > + > + io_len = (sd->ocr & (1 << 30)) ? 512 : sd->blk_len; If you respin, a constant would be nice instead of the 1 << 30 magic number.