From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRRBj-0000qx-EE for qemu-devel@nongnu.org; Mon, 17 Aug 2015 16:39:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRRBg-0003AF-QQ for qemu-devel@nongnu.org; Mon, 17 Aug 2015 16:39:23 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:34927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRRBg-00039O-L0 for qemu-devel@nongnu.org; Mon, 17 Aug 2015 16:39:20 -0400 Date: Mon, 17 Aug 2015 22:39:05 +0200 From: Aurelien Jarno Message-ID: <20150817203905.GA20321@aurel32.net> References: <1438448070-32552-1-git-send-email-mark.cave-ayland@ilande.co.uk> <20150801183337.GA10456@aurel32.net> <55CD1430.5060107@ilande.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55CD1430.5060107@ilande.co.uk> Subject: Re: [Qemu-devel] [PATCHv2] macio: handle non-block ATAPI DMA transfers the same as block DMA transfers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland Cc: jsnow@redhat.com, agraf@suse.de, qemu-devel@nongnu.org On 2015-08-13 23:03, Mark Cave-Ayland wrote: > On 01/08/15 19:33, Aurelien Jarno wrote: > > > On 2015-08-01 17:54, Mark Cave-Ayland wrote: > >> The existing code incorrectly changes the dma_active flag when a non-block > >> transfer has completed leading to a hang on newer versions of Linux because the > >> IDE and DMA engines deadlock waiting for each other. > >> > >> Instead copy the buffer directly to RAM, set the remaining transfer size to 0 and > >> then invoke the ATAPI callback manually once again to correctly finish the > >> transfer in an identical manner to a block transfer. > >> > >> Signed-off-by: Mark Cave-Ayland > >> --- [snip] > For some reason pmac_ide_dma_end() was being called without an active > DMA request and so the RUN bit was clear on entry which was causing the > error flag to be set. Given that this doesn't occur on lenny and wheezy, > I'm inclined to believe that this is a bug in the squeeze kernel. > > Anyhow if this survives your testing then I'll repost as 2 separate > patches with a CC to qemu-stable so that this also gets picked up in the > next 2.4 release. Thanks for working on that. I don't feel I have enough knowledge of this part of QEMU to review the patch, that said, I have been able to test it and I confirm it fixes the issue. Reviewed-by: Aurelien Jarno -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net