linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tx4939ide: remove wmb()
@ 2009-03-31 16:15 Atsushi Nemoto
  2009-03-31 16:36 ` Grant Grundler
  2009-04-02 19:11 ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 4+ messages in thread
From: Atsushi Nemoto @ 2009-03-31 16:15 UTC (permalink / raw)
  To: Grant Grundler
  Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-mips, linux-kernel

* define CHECK_DMA_MASK
* remove use of wmb()

Suggested-by: Grant Grundler <grundler@google.com>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
---
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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tx4939ide: remove wmb()
  2009-03-31 16:15 [PATCH] tx4939ide: remove wmb() Atsushi Nemoto
@ 2009-03-31 16:36 ` Grant Grundler
  2009-04-02 19:18   ` Bartlomiej Zolnierkiewicz
  2009-04-02 19:11 ` Bartlomiej Zolnierkiewicz
  1 sibling, 1 reply; 4+ messages in thread
From: Grant Grundler @ 2009-03-31 16:36 UTC (permalink / raw)
  To: Atsushi Nemoto
  Cc: Bartlomiej Zolnierkiewicz, linux-ide, linux-mips, linux-kernel

On Tue, Mar 31, 2009 at 9:15 AM, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> * define CHECK_DMA_MASK
> * remove use of wmb()
>
> Suggested-by: Grant Grundler <grundler@google.com>

Thank you for the attribution!

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

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@google.com>

thanks!
grant

> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> ---
> 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
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tx4939ide: remove wmb()
  2009-03-31 16:15 [PATCH] tx4939ide: remove wmb() Atsushi Nemoto
  2009-03-31 16:36 ` Grant Grundler
@ 2009-04-02 19:11 ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-04-02 19:11 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: Grant Grundler, linux-ide, linux-mips, linux-kernel

On Tuesday 31 March 2009, Atsushi Nemoto wrote:
> * define CHECK_DMA_MASK
> * remove use of wmb()
> 
> Suggested-by: Grant Grundler <grundler@google.com>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

applied

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tx4939ide: remove wmb()
  2009-03-31 16:36 ` Grant Grundler
@ 2009-04-02 19:18   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2009-04-02 19:18 UTC (permalink / raw)
  To: Grant Grundler; +Cc: Atsushi Nemoto, linux-ide, linux-mips, linux-kernel

On Tuesday 31 March 2009, Grant Grundler wrote:
> On Tue, Mar 31, 2009 at 9:15 AM, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> > * define CHECK_DMA_MASK
> > * remove use of wmb()
> >
> > Suggested-by: Grant Grundler <grundler@google.com>
> 
> Thank you for the attribution!
> 
> But I think proper header would be:
>     Reported-by: Grant Grundler <grundler@google.com>
> 
> 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@google.com>

Well, you can have both! ;)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-02 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-31 16:15 [PATCH] tx4939ide: remove wmb() Atsushi Nemoto
2009-03-31 16:36 ` Grant Grundler
2009-04-02 19:18   ` Bartlomiej Zolnierkiewicz
2009-04-02 19:11 ` Bartlomiej Zolnierkiewicz

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).