linux-mips
[Top] [All Lists]

Re: [PATCH] ide: New libata driver for OCTEON SOC Compact Flash interfac

To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Subject: Re: [PATCH] ide: New libata driver for OCTEON SOC Compact Flash interface.
From: Chad Reese <kreese@caviumnetworks.com>
Date: Sat, 22 Nov 2008 10:38:50 -0800
Cc: David Daney <ddaney@caviumnetworks.com>, linux-ide@vger.kernel.org, linux-mips <linux-mips@linux-mips.org>
In-reply-to: <49282187.8090602@ru.mvista.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <49261BE5.2010406@caviumnetworks.com> <49280FC5.3040608@ru.mvista.com> <49282187.8090602@ru.mvista.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17) Gecko/20080829 Iceape/1.1.12 (Debian-1.1.12-1)
Sergei Shtylyov wrote:
>    Also, this fragment of octeon_cf_bmdma_status() looks doubtful to me:
> 
>> +    else if (mio_boot_dma_cfg.s.size != 0xfffff)
>> +        result |= ATA_DMA_ERR; 
> 
>    I suppose this only makes sense when DMA interrupt is active. What 
> does this bitfield mean?

When you start the Octeon DMA engine, you program
mio_boot_dma_cfg.s.size with the number of 16bit words to transfer. As
the DMA runs, the hardware decrements this field. At the end it ends up
decrementing past 0 to -1. The above check is simply checking if the DMA
completed. Since this specific interrupt can only be generated by the
DMA engine, it must have been caused by an error condition if the size
is not -1.

Chad

<Prev in Thread] Current Thread [Next in Thread>