[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux |
Date: |
Mon, 10 Nov 2014 11:31:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 10/11/2014 08:02, Hannes Reinecke wrote:
> On 11/09/2014 10:44 AM, Mark Cave-Ayland wrote:
>> On 07/11/14 12:22, Hannes Reinecke wrote:
>>
>>> A linux guest will be issuing messages:
>>>
>>> [ 32.124042] DC390: Deadlock in DataIn_0: DMA aborted unfinished: 000000
>>> bytes remain!!
>>> [ 32.126348] DC390: DataIn_0: DMA State: 0
>>>
>>> and the HBA will fail to work properly.
>>> Reason is the emulation is not setting the 'DMA transfer done'
>>> status correctly.
>>>
>>> Signed-off-by: Hannes Reinecke <address@hidden>
>>> ---
>>> hw/scsi/esp-pci.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/hw/scsi/esp-pci.c b/hw/scsi/esp-pci.c
>>> index 82795e6..77b8647 100644
>>> --- a/hw/scsi/esp-pci.c
>>> +++ b/hw/scsi/esp-pci.c
>>> @@ -268,6 +268,8 @@ static void esp_pci_dma_memory_rw(PCIESPState *pci,
>>> uint8_t *buf, int len,
>>> /* update status registers */
>>> pci->dma_regs[DMA_WBC] -= len;
>>> pci->dma_regs[DMA_WAC] += len;
>>> + if (pci->dma_regs[DMA_WBC] == 0)
>>> + pci->dma_regs[DMA_STAT] |= DMA_STAT_DONE;
>>> }
>>
>> Missing braces on the if statement here?
>>
> Sigh.
I'll fix this, no need to resend.
Paolo