From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: jsnow@redhat.com, agraf@suse.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv2] macio: handle non-block ATAPI DMA transfers the same as block DMA transfers
Date: Sat, 01 Aug 2015 19:54:47 +0100 [thread overview]
Message-ID: <55BD15F7.5090400@ilande.co.uk> (raw)
In-Reply-To: <20150801183337.GA10456@aurel32.net>
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 <mark.cave-ayland@ilande.co.uk>
>> ---
>
> 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.
Hmmmm yes I can recreate that here - must be another transition between
the non-block and the block transfer code (I was working on eliminating
the boot messages) caused by reading the disc metadata upon mount.
Unfortunately I don't have much time to work on this right now so maybe
it's a 2.4.1/2.5 thing unless John can take a look?
ATB,
Mark.
next prev parent reply other threads:[~2015-08-01 18:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-01 16:54 [Qemu-devel] [PATCHv2] macio: handle non-block ATAPI DMA transfers the same as block DMA transfers Mark Cave-Ayland
2015-08-01 18:33 ` Aurelien Jarno
2015-08-01 18:54 ` Mark Cave-Ayland [this message]
2015-08-03 17:01 ` John Snow
2015-08-13 22:03 ` Mark Cave-Ayland
2015-08-13 22:59 ` John Snow
2015-08-17 20:39 ` Aurelien Jarno
2015-08-21 19:04 ` John Snow
2015-08-22 1:11 ` Mark Cave-Ayland
2015-08-24 18:43 ` John Snow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55BD15F7.5090400@ilande.co.uk \
--to=mark.cave-ayland@ilande.co.uk \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=jsnow@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.