qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] RFC: hcd-ohci: add dma error handling
Date: Wed, 17 Jul 2013 21:15:34 +1000	[thread overview]
Message-ID: <1374059734.19894.458.camel@pasglop> (raw)
In-Reply-To: <1374054365-27001-1-git-send-email-aik@ozlabs.ru>

On Wed, 2013-07-17 at 19:46 +1000, Alexey Kardashevskiy wrote:
> Current hcd-ohci does not handle DMA errors which can actually
> happen.
> 
> However it is not clear what approach should be used here -
> for example, get_dwords returns positive number saying that there
> is no error as all the callers consider the return value as fail
> if it is less than zero. Normally you would expect bool=true/int=0
> as success and bool=false/int=-1 as fail.
> 
> Any suggestion?

The right thing to do is not only to bring the error up the stack, but
essentially to set the error bits in the PCI command status and put the
whole HCI in error state (and stop operating)

That how real HW reacts.

Cheers,
Ben.

  reply	other threads:[~2013-07-17 11:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17  9:46 [Qemu-devel] [PATCH] RFC: hcd-ohci: add dma error handling Alexey Kardashevskiy
2013-07-17 11:15 ` Benjamin Herrenschmidt [this message]
2013-07-17 12:31   ` Alexander Graf
2013-07-17 12:47     ` Benjamin Herrenschmidt

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=1374059734.19894.458.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=aliguori@us.ibm.com \
    --cc=kraxel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).