* [PATCH] tx4939ide: Do not use zero count PRD entry
@ 2008-12-25 14:32 Atsushi Nemoto
2008-12-29 18:38 ` Bartlomiej Zolnierkiewicz
2009-01-16 12:51 ` Sergei Shtylyov
0 siblings, 2 replies; 4+ messages in thread
From: Atsushi Nemoto @ 2008-12-25 14:32 UTC (permalink / raw)
To: linux-ide; +Cc: Bartlomiej Zolnierkiewicz, sshtylyov, linux-mips, stable
This fixes data corruption on some heavy load.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: stable <stable@kernel.org>
---
drivers/ide/tx4939ide.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
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)
+ */
+ if ((bcount & 0xffff) == 0x0000)
+ bcount = 0x8000;
*table++ = bcount & 0xffff;
*table++ = cur_addr;
cur_addr += bcount;
--
1.5.6.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tx4939ide: Do not use zero count PRD entry
2008-12-25 14:32 [PATCH] tx4939ide: Do not use zero count PRD entry Atsushi Nemoto
@ 2008-12-29 18:38 ` Bartlomiej Zolnierkiewicz
2009-01-16 12:51 ` Sergei Shtylyov
1 sibling, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-12-29 18:38 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-ide, sshtylyov, linux-mips, stable
On Thursday 25 December 2008, Atsushi Nemoto wrote:
> This fixes data corruption on some heavy load.
>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> Cc: stable <stable@kernel.org>
applied
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tx4939ide: Do not use zero count PRD entry
2008-12-25 14:32 [PATCH] tx4939ide: Do not use zero count PRD entry Atsushi Nemoto
2008-12-29 18:38 ` Bartlomiej Zolnierkiewicz
@ 2009-01-16 12:51 ` Sergei Shtylyov
2009-01-16 14:25 ` Atsushi Nemoto
1 sibling, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2009-01-16 12:51 UTC (permalink / raw)
To: Atsushi Nemoto; +Cc: linux-ide, Bartlomiej Zolnierkiewicz, linux-mips, stable
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tx4939ide: Do not use zero count PRD entry
2009-01-16 12:51 ` Sergei Shtylyov
@ 2009-01-16 14:25 ` Atsushi Nemoto
0 siblings, 0 replies; 4+ messages in thread
From: Atsushi Nemoto @ 2009-01-16 14:25 UTC (permalink / raw)
To: sshtylyov; +Cc: linux-ide, bzolnier, linux-mips, stable
On Fri, 16 Jan 2009 15:51:29 +0300, Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
> > + * This workaround for zero count seems required.
> > + * (standard ide_build_dmatable do it too)
>
> s/do/does/
Thanks!
> > + if ((bcount & 0xffff) == 0x0000)
>
> Why not just bcount == 0x10000?
Indeed. It is just because ide_build_dmatable does so :)
I will prepare another patch, while the patch is already mainlined and
queued for stable, and this time changes are not suitable for stable
tree.
---
Atsushi Nemoto
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-16 14:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-25 14:32 [PATCH] tx4939ide: Do not use zero count PRD entry Atsushi Nemoto
2008-12-29 18:38 ` Bartlomiej Zolnierkiewicz
2009-01-16 12:51 ` Sergei Shtylyov
2009-01-16 14:25 ` Atsushi Nemoto
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).