All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] RFC v2: hcd-ohci: add dma error handling
Date: Wed, 24 Jul 2013 14:55:38 +0200	[thread overview]
Message-ID: <51EFCECA.4050805@redhat.com> (raw)
In-Reply-To: <1374654505-17755-1-git-send-email-aik@ozlabs.ru>

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

      parent reply	other threads:[~2013-07-24 12:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-24  8:28 [Qemu-devel] [PATCH] RFC v2: hcd-ohci: add dma error handling Alexey Kardashevskiy
2013-07-24  9:05 ` Benjamin Herrenschmidt
2013-07-24  9:49   ` Alexey Kardashevskiy
2013-07-24 12:55 ` Gerd Hoffmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51EFCECA.4050805@redhat.com \
    --to=kraxel@redhat.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.