Re: [PATCH] tx4939ide: remove wmb()

From: Grant Grundler
Date: Tue Mar 31 2009 - 12:36:33 EST


On Tue, Mar 31, 2009 at 9:15 AM, Atsushi Nemoto <anemo@xxxxxxxxxxxxx> wrote:
> * define CHECK_DMA_MASK
> * remove use of wmb()
>
> Suggested-by: Grant Grundler <grundler@xxxxxxxxxx>

Thank you for the attribution!

But I think proper header would be:
Reported-by: Grant Grundler <grundler@xxxxxxxxxx>

But in this case, since i've looked at the code and am under the
illusion I understand it, I'm comfortable with:
Reviewed-by: Grant Grundler <grundler@xxxxxxxxxx>

thanks!
grant

> Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
> ---
> This patch is against linux-next 20090331.
>
> Âdrivers/ide/tx4939ide.c | Â Â6 +++---
> Â1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
> index cc269c0..48186ae 100644
> --- a/drivers/ide/tx4939ide.c
> +++ b/drivers/ide/tx4939ide.c
> @@ -327,15 +327,15 @@ static int tx4939ide_dma_end(ide_drive_t *drive)
> Â Â Â Â/* read and clear the INTR & ERROR bits */
> Â Â Â Âdma_stat = tx4939ide_clear_dma_status(base);
>
> - Â Â Â wmb();
> +#define CHECK_DMA_MASK (ATA_DMA_ACTIVE | ATA_DMA_ERR | ATA_DMA_INTR)
>
> Â Â Â Â/* verify good DMA status */
> - Â Â Â if ((dma_stat & (ATA_DMA_INTR | ATA_DMA_ERR | ATA_DMA_ACTIVE)) == 0 &&
> + Â Â Â if ((dma_stat & CHECK_DMA_MASK) == 0 &&
> Â Â Â Â Â Â(ctl & (TX4939IDE_INT_XFEREND | TX4939IDE_INT_HOST)) ==
> Â Â Â Â Â Â(TX4939IDE_INT_XFEREND | TX4939IDE_INT_HOST))
> Â Â Â Â Â Â Â Â/* INT_IDE lost... bug? */
> Â Â Â Â Â Â Â Âreturn 0;
> - Â Â Â return ((dma_stat & (ATA_DMA_INTR | ATA_DMA_ERR | ATA_DMA_ACTIVE)) !=
> + Â Â Â return ((dma_stat & CHECK_DMA_MASK) !=
> Â Â Â Â Â Â Â ÂATA_DMA_INTR) ? 0x10 | dma_stat : 0;
> Â}
>
> --
> 1.5.6.3
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/