[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state |
Date: |
Thu, 24 Mar 2016 12:23:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 24/03/2016 10:24, Pavel Butsykin wrote:
>> For extra points, make ide_handle_rw_error convert IDE_DMA_* to
>> IDE_RETRY_* so that the callers only need to pass in IDE_RETRY_DMA
>>
> You mean to do something like that:
>
> ide_handle_rw_error(s, -ret, s->dma_cmd | IDE_RETRY_DMA)
Just ide_handle_rw_error(s, -ret, IDE_RETRY_DMA)
and in ide_handle_rw_error
if (op == IDE_RETRY_DMA) {
if (s->dma_cmd == IDE_DMA_READ)
op |= IDE_RETRY_READ;
else if (s->dma_cmd == IDE_DMA_TRIM)
op |= IDE_RETRY_TRIM;
}
But I'm not sure anymore this is a good idea.
However, if it works, using dma_cmd would be better than using the dma_cb.
Paolo
- [Qemu-devel] [PATCH for 2.6 0/3] ide: fix loss of the dma/atapi state during migration, Denis V. Lunev, 2016/03/23
- [Qemu-devel] [PATCH 3/3] ide: really restart pending and in-flight atapi dma, Denis V. Lunev, 2016/03/23
- [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Denis V. Lunev, 2016/03/23
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Paolo Bonzini, 2016/03/23
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Pavel Butsykin, 2016/03/24
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Pavel Butsykin, 2016/03/24
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Paolo Bonzini, 2016/03/24
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Pavel Butsykin, 2016/03/24
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Paolo Bonzini, 2016/03/24
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Pavel Butsykin, 2016/03/24
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Eric Blake, 2016/03/24
- Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, Pavel Butsykin, 2016/03/24
Re: [Qemu-devel] [PATCH 1/3] ide: don't loose pending dma state, John Snow, 2016/03/30