[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 10/24] ide: add trigger_irq callback
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 10/24] ide: add trigger_irq callback |
Date: |
Wed, 30 Oct 2013 15:33:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 30/10/2013 14:34, Kevin Wolf ha scritto:
>> >
>> > The problem is that the IRQ ack is done differently in AHCI (using the
>> > write-1-clears register PORT_IRQ_STAT; PORT_IRQ_MASK can also modify the
>> > status of the interrupt line) and PATA (reading 0x1f7).
> I don't understand how this is related; I'm really talking about
> internal interfaces here. ide_set_irq() and .trigger_irq() are really
> two different ways for the IDE core to communicate that an IRQ should be
> triggered. They can in theory be used for the same things, but are used
> inconsistently.
Looking at the history of BM_STATUS_INT, I found this commit of yours:
ide/core: Remove explicit setting of BM_STATUS_INT
BM_STATUS_INT is automatically set during ide_set_irq(), there's no reason
to
set it manually in addition.
There is even one case where the interrupt status bit was set, but no IRQ
was
raised. This is when the PRD table was reached but there is more data to
transfer. The correct behaviour for this case is not to set BM_STATUS_INT.
Signed-off-by: Kevin Wolf <address@hidden>
(commit 69c38b8fcec823da05f98f6ea98ec2b0013d64e2).
It seems to me that the remaining use of BM_STATUS_INT, which this
patch changes to trigger_irq, is also due to a short PRD. So the trigger_irq
callback can go away altogether.
Paolo
- Re: [Qemu-devel] [PATCH 06/24] ide: simplify set_inactive callbacks, (continued)
[Qemu-devel] [PATCH 11/24] ide: fold add_status callback into set_inactive, Paolo Bonzini, 2013/10/28
[Qemu-devel] [PATCH 12/24] ide: move BM_STATUS bits to pci.[ch], Paolo Bonzini, 2013/10/28
[Qemu-devel] [PATCH 13/24] ide: move retry constants out of BM_STATUS_* namespace, Paolo Bonzini, 2013/10/28
[Qemu-devel] [PATCH 14/24] ide: start extracting ide_restart_dma out of bmdma_restart_dma, Paolo Bonzini, 2013/10/28
[Qemu-devel] [PATCH 15/24] ide: prepare to move restart to common code, Paolo Bonzini, 2013/10/28
[Qemu-devel] [PATCH 16/24] ide: introduce ide_register_restart_cb, Paolo Bonzini, 2013/10/28