On Mon, Jan 07, 2013 at 03:58:27PM +0100, Ulf Hansson wrote:
> @@ -374,19 +415,12 @@ static void mmci_dma_unmap(struct mmci_host *host, 
> struct mmc_data *data)
>        * contiguous buffers.  On TX, we'll get a FIFO underrun error.
>        */
>       if (status & MCI_RXDATAAVLBLMASK) {
> -             dmaengine_terminate_all(chan);
> -             if (!data->error)
> -                     data->error = -EIO;
> -     }
> -
> -     if (data->flags & MMC_DATA_WRITE) {
> -             dir = DMA_TO_DEVICE;
> -     } else {
> -             dir = DMA_FROM_DEVICE;
> +             data->error = -EIO;
> +             mmci_dma_data_error(host);

Please explain the change of behaviour here.  Before your change, we _only_
set data->error if the error is not set.  Here, we overwrite the error code
no matter what.  What is the reasoning for that change?

The reason the code is like it _was_ is so that any bytes remaining in the
FIFO are _only_ reported as an error if there wasn't a preceding error.
That is the behaviour I desired when I wrote this code.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to