From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLbbO-0004A7-Qr for qemu-devel@nongnu.org; Sat, 01 Aug 2015 14:33:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZLbbN-0000qD-Pi for qemu-devel@nongnu.org; Sat, 01 Aug 2015 14:33:46 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:51767) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZLbbN-0000q8-Ka for qemu-devel@nongnu.org; Sat, 01 Aug 2015 14:33:45 -0400 Date: Sat, 1 Aug 2015 20:33:37 +0200 From: Aurelien Jarno Message-ID: <20150801183337.GA10456@aurel32.net> References: <1438448070-32552-1-git-send-email-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438448070-32552-1-git-send-email-mark.cave-ayland@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-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 > --- Thanks for the patch, it improves things here. I don't get messages anymore, and I get less messages when mounting the CD-ROM, though I still get one: [ 307.258463] pata-macio 0.00021000:ata-4: timeout flushing DMA [ 307.262856] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0 [ 307.262919] ata2.00: BMDMA stat 0x6 [ 307.263048] sr 1:0:0:0: CDB: Get configuration: 46 00 00 28 00 00 00 00 10 00 [ 307.263289] ata2.00: cmd a0/01:00:00:10:00/00:00:00:00:00/a0 tag 0 dma 16400 in [ 307.263297] res 41/50:03:00:10:00/00:00:00:00:00/a0 Emask 0x20 (host bus error) [ 307.263407] ata2.00: status: { DRDY ERR } [ 307.271251] ata2.00: configured for MWDMA2 [ 307.271824] ata2: EH complete The CD-ROM is fully functional though. Aurelien -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net