qemu-devel
[Top][All Lists]
Advanced

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

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


From: Benjamin Herrenschmidt
Subject: Re: [Qemu-devel] [PATCH] RFC: hcd-ohci: add dma error handling
Date: Wed, 17 Jul 2013 21:15:34 +1000

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 via email to

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