From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1ybe-0002pi-UU for qemu-devel@nongnu.org; Wed, 24 Jul 2013 08:55:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1yba-0003Dd-V4 for qemu-devel@nongnu.org; Wed, 24 Jul 2013 08:55:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1yba-0003DP-F3 for qemu-devel@nongnu.org; Wed, 24 Jul 2013 08:55:46 -0400 Message-ID: <51EFCECA.4050805@redhat.com> Date: Wed, 24 Jul 2013 14:55:38 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1374654505-17755-1-git-send-email-aik@ozlabs.ru> In-Reply-To: <1374654505-17755-1-git-send-email-aik@ozlabs.ru> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] RFC v2: hcd-ohci: add dma error handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Anthony Liguori , qemu-devel@nongnu.org, Alexander Graf > +/** A typical O/EHCI will stop operating, set itself into error state > + * (which can be queried by MMIO) and will set PERR in its config > + * space to signal that it got an error > + */ > +static void ohci_stop(OHCIState *ohci) > +{ > + OHCIPCIState *dev = container_of(ohci, OHCIPCIState, state); > + > + fprintf(stderr, "%s: DMA error\n", __func__); > + > + ohci_set_interrupt(ohci, OHCI_INTR_UE); > + pci_set_word(dev->parent_obj.config + PCI_STATUS, > + PCI_STATUS_DETECTED_PARITY); > +} I think you want add a ohci_bus_stop() call here to make sure the ohci emulation stops processing. Also while being at it: ohci_bus_start() has a TODO item where you can fill in a call to the new ohci_stop function. cheers, Gerd