* [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux
@ 2014-11-07 12:22 Hannes Reinecke
2014-11-07 12:32 ` Paolo Bonzini
2014-11-09 9:44 ` Mark Cave-Ayland
0 siblings, 2 replies; 8+ messages in thread
From: Hannes Reinecke @ 2014-11-07 12:22 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, Hannes Reinecke
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 <hare@suse.de>
---
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;
}
static void esp_pci_dma_memory_read(void *opaque, uint8_t *buf, int len)
--
1.7.12.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux
2014-11-07 12:22 [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux Hannes Reinecke
@ 2014-11-07 12:32 ` Paolo Bonzini
2014-11-09 9:44 ` Mark Cave-Ayland
1 sibling, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2014-11-07 12:32 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: qemu-devel, qemu-stable
On 07/11/2014 13: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 <hare@suse.de>
Cc: qemu-stable@nongnu.org
Applied, thanks.
Paolo
> ---
> 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;
> }
>
> static void esp_pci_dma_memory_read(void *opaque, uint8_t *buf, int len)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux
2014-11-07 12:22 [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux Hannes Reinecke
2014-11-07 12:32 ` Paolo Bonzini
@ 2014-11-09 9:44 ` Mark Cave-Ayland
2014-11-10 7:02 ` Hannes Reinecke
1 sibling, 1 reply; 8+ messages in thread
From: Mark Cave-Ayland @ 2014-11-09 9:44 UTC (permalink / raw)
To: Hannes Reinecke, Paolo Bonzini; +Cc: qemu-devel
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 <hare@suse.de>
> ---
> 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?
> static void esp_pci_dma_memory_read(void *opaque, uint8_t *buf, int len)
ATB,
Mark.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux
2014-11-09 9:44 ` Mark Cave-Ayland
@ 2014-11-10 7:02 ` Hannes Reinecke
2014-11-10 7:39 ` Gonglei
2014-11-10 10:31 ` Paolo Bonzini
0 siblings, 2 replies; 8+ messages in thread
From: Hannes Reinecke @ 2014-11-10 7:02 UTC (permalink / raw)
To: Mark Cave-Ayland, Paolo Bonzini; +Cc: qemu-devel
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 <hare@suse.de>
>> ---
>> 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.
If you insist ...
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux
2014-11-10 7:02 ` Hannes Reinecke
@ 2014-11-10 7:39 ` Gonglei
2014-11-10 7:50 ` Hannes Reinecke
2014-11-10 10:31 ` Paolo Bonzini
1 sibling, 1 reply; 8+ messages in thread
From: Gonglei @ 2014-11-10 7:39 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: Paolo Bonzini, Mark Cave-Ayland, qemu-devel
On 2014/11/10 15: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 <hare@suse.de>
>>> ---
>>> 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.
>
> If you insist ...
>
> Cheers,
>
> Hannes
That's the Qemu coding style.
And you will fail ./script/checkpatch.pl.
Best regards,
-Gonglei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux
2014-11-10 7:39 ` Gonglei
@ 2014-11-10 7:50 ` Hannes Reinecke
2014-11-10 7:55 ` Gonglei
0 siblings, 1 reply; 8+ messages in thread
From: Hannes Reinecke @ 2014-11-10 7:50 UTC (permalink / raw)
To: Gonglei; +Cc: Paolo Bonzini, Mark Cave-Ayland, qemu-devel
On 11/10/2014 08:39 AM, Gonglei wrote:
> On 2014/11/10 15: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 <hare@suse.de>
>>>> ---
>>>> 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.
>>
>> If you insist ...
>>
>> Cheers,
>>
>> Hannes
>
> That's the Qemu coding style.
> And you will fail ./script/checkpatch.pl.
>
I know. After all, it's not the first patch I've sent.
But I always get the various codingstyle thingies
mixed up.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux
2014-11-10 7:50 ` Hannes Reinecke
@ 2014-11-10 7:55 ` Gonglei
0 siblings, 0 replies; 8+ messages in thread
From: Gonglei @ 2014-11-10 7:55 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: Paolo Bonzini, Mark Cave-Ayland, qemu-devel
On 2014/11/10 15:50, Hannes Reinecke wrote:
> On 11/10/2014 08:39 AM, Gonglei wrote:
>> On 2014/11/10 15: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 <hare@suse.de>
>>>>> ---
>>>>> 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.
>>>
>>> If you insist ...
>>>
>>> Cheers,
>>>
>>> Hannes
>>
>> That's the Qemu coding style.
>> And you will fail ./script/checkpatch.pl.
>>
> I know. After all, it's not the first patch I've sent.
>
> But I always get the various codingstyle thingies
> mixed up.
>
Hum. Each community has its own rules :)
Best regards,
-Gonglei
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux
2014-11-10 7:02 ` Hannes Reinecke
2014-11-10 7:39 ` Gonglei
@ 2014-11-10 10:31 ` Paolo Bonzini
1 sibling, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2014-11-10 10:31 UTC (permalink / raw)
To: Hannes Reinecke, Mark Cave-Ayland; +Cc: qemu-devel
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 <hare@suse.de>
>>> ---
>>> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-11-10 10:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-07 12:22 [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux Hannes Reinecke
2014-11-07 12:32 ` Paolo Bonzini
2014-11-09 9:44 ` Mark Cave-Ayland
2014-11-10 7:02 ` Hannes Reinecke
2014-11-10 7:39 ` Gonglei
2014-11-10 7:50 ` Hannes Reinecke
2014-11-10 7:55 ` Gonglei
2014-11-10 10:31 ` Paolo Bonzini
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.