From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnizM-0003Hp-Nr for qemu-devel@nongnu.org; Mon, 10 Nov 2014 02:02:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnizF-0001fY-Rm for qemu-devel@nongnu.org; Mon, 10 Nov 2014 02:02:12 -0500 Received: from cantor2.suse.de ([195.135.220.15]:54635 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnizF-0001fB-MS for qemu-devel@nongnu.org; Mon, 10 Nov 2014 02:02:05 -0500 Message-ID: <546062EB.5080409@suse.de> Date: Mon, 10 Nov 2014 08:02:03 +0100 From: Hannes Reinecke MIME-Version: 1.0 References: <1415362952-16047-1-git-send-email-hare@suse.de> <545F3794.2010200@ilande.co.uk> In-Reply-To: <545F3794.2010200@ilande.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] esp-pci: fixup deadlock with linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland , Paolo Bonzini Cc: qemu-devel@nongnu.org On 11/09/2014 10:44 AM, Mark Cave-Ayland wrote: > On 07/11/14 12:22, Hannes Reinecke wrote: >=20 >> A linux guest will be issuing messages: >> >> [ 32.124042] DC390: Deadlock in DataIn_0: DMA aborted unfinished: 00= 0000 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 >> --- >> 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] -=3D len; >> pci->dma_regs[DMA_WAC] +=3D len; >> + if (pci->dma_regs[DMA_WBC] =3D=3D 0) >> + pci->dma_regs[DMA_STAT] |=3D DMA_STAT_DONE; >> } >=20 > Missing braces on the if statement here? >=20 Sigh. If you insist ... Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 21284 (AG N=FCrnberg)