qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] RFC v2: hcd-ohci: add dma error handling


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] RFC v2: hcd-ohci: add dma error handling
Date: Wed, 24 Jul 2013 14:55:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130621 Thunderbird/17.0.7

> +/** 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]