Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756422AbYKCVQg (ORCPT ); Mon, 3 Nov 2008 16:16:36 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754582AbYKCVQ2 (ORCPT ); Mon, 3 Nov 2008 16:16:28 -0500 Received: from trinity.fluff.org ([89.145.97.151]:37138 "EHLO trinity.fluff.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754363AbYKCVQ1 (ORCPT ); Mon, 3 Nov 2008 16:16:27 -0500 Date: Mon, 3 Nov 2008 21:16:25 +0000 From: Ben Dooks To: Henrique de Moraes Holschuh Cc: Ben Dooks , linux-kernel@vger.kernel.org, drzeus-mmc@drzeus.cx, sdhci-devel@list.drzeus.cx Subject: Re: [patch 6/7] SDHCI: Check DMA for overruns at end of transfer Message-ID: <20081103211625.GG14806@trinity.fluff.org> References: <20081103200944.099353331@fluff.org.uk> <20081103201010.820070757@fluff.org.uk> <20081103211200.GA10721@khazad-dum.debian.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081103211200.GA10721@khazad-dum.debian.net> X-Disclaimer: These are my views alone. X-URL: http://www.fluff.org/ User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ben@trinity.fluff.org X-SA-Exim-Scanned: No (on trinity.fluff.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 23 On Mon, Nov 03, 2008 at 07:12:00PM -0200, Henrique de Moraes Holschuh wrote: > Maybe I didn't understand it right, but if the DMA controller could overrun > a buffer, don't you ALSO need to add defensive padding (i.e. increase the > buffer) to make sure nothing important gets overrun? This is only generated by problems elsewhere in the driver, such as getting the timeout clock wrong. It is here just as a precaution and as an aide to debugging, it should not trigger in normal circumstances. There is a seperate problem where the DMA buffer is passed from the stack which is, IIRC, a complete no-no under Linux. -- Ben Q: What's a light-year? A: One-third less calories than a regular year. -- 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/