Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932586AbZAOUHa (ORCPT ); Thu, 15 Jan 2009 15:07:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1765834AbZAOUAd (ORCPT ); Thu, 15 Jan 2009 15:00:33 -0500 Received: from kroah.org ([198.145.64.141]:48811 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1762828AbZAOUAZ (ORCPT ); Thu, 15 Jan 2009 15:00:25 -0500 Date: Thu, 15 Jan 2009 11:57:38 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Atsushi Nemoto , sshtylyov@ru.mvista.com, Bartlomiej Zolnierkiewicz Subject: [patch 12/94] tx4939ide: Do not use zero count PRD entry Message-ID: <20090115195738.GL14419@kroah.com> References: <20090115194806.804618825@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="tx4939ide-do-not-use-zero-count-prd-entry.patch" In-Reply-To: <20090115195520.GA14403@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1239 Lines: 40 2.6.28-stable review patch. If anyone has any objections, please let us know. ------------------ From: Atsushi Nemoto commit a0fce792b55b260589c3d77293a224e84395ec07 upstream. This fixes data corruption on some heavy load. Signed-off-by: Atsushi Nemoto Cc: sshtylyov@ru.mvista.com Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- drivers/ide/tx4939ide.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/ide/tx4939ide.c +++ b/drivers/ide/tx4939ide.c @@ -259,6 +259,12 @@ static int tx4939ide_build_dmatable(ide_ 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; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/