Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753757AbcDVNNN (ORCPT ); Fri, 22 Apr 2016 09:13:13 -0400 Received: from mail-lf0-f48.google.com ([209.85.215.48]:34604 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751904AbcDVNNL (ORCPT ); Fri, 22 Apr 2016 09:13:11 -0400 Subject: Re: [PATCH v1 03/23] ata: sata_dwc_460ex: set dma_boundary to 0x1fff To: Andy Shevchenko , Tejun Heo , linux-ide@vger.kernel.org, Rob Herring , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Christian Lamparter , =?UTF-8?B?TcOlbnMgUnVsbGfDpXJk?= , Julian Margetson References: <1461262544-115408-1-git-send-email-andriy.shevchenko@linux.intel.com> <1461262544-115408-4-git-send-email-andriy.shevchenko@linux.intel.com> From: Sergei Shtylyov Organization: Cogent Embedded Message-ID: <571A235C.5070007@cogentembedded.com> Date: Fri, 22 Apr 2016 16:13:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <1461262544-115408-4-git-send-email-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1398 Lines: 42 Hello. On 04/21/2016 09:15 PM, Andy Shevchenko wrote: > The original code states: > > Make sure a LLI block is not created that will span 8K max FIS > boundary. If the block spans such a FIS boundary, there is a chance > that a DMA burst will cross that boundary -- this results in an error > in the host controller. > > Since we have switched to generic DMAengine API we satisfy above by setting > dma_boundary value to 0x1fff. > > Suggested-by: Mans Rullgard > Signed-off-by: Andy Shevchenko > --- > drivers/ata/sata_dwc_460ex.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c > index 7f95389..aee8873 100644 > --- a/drivers/ata/sata_dwc_460ex.c > +++ b/drivers/ata/sata_dwc_460ex.c > @@ -1151,7 +1151,13 @@ static struct scsi_host_template sata_dwc_sht = { > */ > .sg_tablesize = LIBATA_MAX_PRD, > /* .can_queue = ATA_MAX_QUEUE, */ > - .dma_boundary = ATA_DMA_BOUNDARY, > + /* > + * Make sure a LLI block is not created that will span 8K max FIS > + * boundary. If the block spans such a FIS boundary, there is a chance > + * that a DMA burst will cross that boundary -- this results in an > + * error in the host controller. > + */ > + .dma_boundary = 0x1fff /* ATA_DMA_BOUNDARY */, Not ~0x1fff? [...] MBR, Sergei