linux-mips
[Top] [All Lists]

Re: [PATCH] tx4939ide: Do not use zero count PRD entry

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH] tx4939ide: Do not use zero count PRD entry
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Date: Fri, 16 Jan 2009 15:51:29 +0300
Cc: linux-ide@vger.kernel.org, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>, linux-mips@linux-mips.org, stable <stable@kernel.org>
In-reply-to: <1230215558-9197-1-git-send-email-anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1230215558-9197-1-git-send-email-anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)
Hello.

Atsushi Nemoto wrote:

This fixes data corruption on some heavy load.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index bafb7d1..30d0d25 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -259,6 +259,12 @@ static int tx4939ide_build_dmatable(ide_drive_t *drive, 
struct request *rq)
                        bcount = 0x10000 - (cur_addr & 0xffff);
                        if (bcount > cur_len)
                                bcount = cur_len;
+                       /*
+                        * This workaround for zero count seems required.
+                        * (standard ide_build_dmatable do it too)

   s/do/does/

+                        */
+                       if ((bcount & 0xffff) == 0x0000)

  Why not just bcount == 0x10000?

MBR, Sergei



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