Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752212AbbKJUfo (ORCPT ); Tue, 10 Nov 2015 15:35:44 -0500 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:39604 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751123AbbKJUfm (ORCPT ); Tue, 10 Nov 2015 15:35:42 -0500 Message-ID: <1447187735.2187.58.camel@HansenPartnership.com> Subject: Re: [PATCH V2 1/3] scsi: mptxsas: try 64 bit DMA when 32 bit DMA fails From: James Bottomley To: Sinan Kaya Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Abhijit Mahajan , Nagalakshmi Nandigama , linux-scsi@vger.kernel.org, jcm@redhat.com, timur@codeaurora.org, linux-kernel@vger.kernel.org, Sreekanth Reddy , Praveen Krishnamoorthy , cov@codeaurora.org, linux-arm-msm@vger.kernel.org, agross@codeaurora.org, MPT-FusionLinux.pdl@avagotech.com, Hannes Reinecke Date: Tue, 10 Nov 2015 12:35:35 -0800 In-Reply-To: <564252DA.5000004@codeaurora.org> References: <1447034266-28003-1-git-send-email-okaya@codeaurora.org> <5349261.sTnZTFhKWB@wuerfel> <56421610.50005@codeaurora.org> <4982446.ZlJVrezq1Y@wuerfel> <56422725.7040809@codeaurora.org> <1447180034.2187.20.camel@HansenPartnership.com> <56424200.9080406@codeaurora.org> <1447184611.2187.45.camel@HansenPartnership.com> <56424BF4.2040207@codeaurora.org> <1447185920.2187.53.camel@HansenPartnership.com> <564252DA.5000004@codeaurora.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1693 Lines: 39 On Tue, 2015-11-10 at 15:26 -0500, Sinan Kaya wrote: > > On 11/10/2015 3:05 PM, James Bottomley wrote: > > OK, you don't seem to be understanding the problem: the Altix isn't a > > LSI card, it was a SGI platform. > > Got it. > > > It was the platform where we first > > discovered the issue that a lot of storage cards didn't work because it > > by default had no memory below 4GB. The reason coherent masks were > > introduced was initially so the Altix could manufacture and manage a > > region of memory in the lower 4GB region and we would guarantee to make > > allocations from it so the storage cards would then work on that > > platform. > > I can't fix the issue if the card cannot do 64 bit DMA when IOMMU is not > there. I need IOMMU enabled all the time for this card. That depends on the limitations of your platform. The Altix only used an iommu to manufacture the coherent memory for the descriptors, but the card itself mostly operated in bypass mode (using 64 bit physical addresses rather than iommu remapped ones), so all accesses except for the few firmware descriptor ones didn't use an iommu. Apparently this was for performance reasons. So, to recap, the card itself *can* do 64 bit DMA. The limitation is that the RDPQ descriptors need to be all in the same region of 4G memory and the way the driver ensures this is to set the 64 bit coherent mask after using the 32 bit one to allocate the RDPQ pools. James -- 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/