[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5349261.sTnZTFhKWB@wuerfel>
Date: Tue, 10 Nov 2015 09:38:32 +0100
From: Arnd Bergmann <arnd@...db.de>
To: linux-arm-kernel@...ts.infradead.org
Cc: Sinan Kaya <okaya@...eaurora.org>,
Abhijit Mahajan <abhijit.mahajan@...gotech.com>,
Nagalakshmi Nandigama <nagalakshmi.nandigama@...gotech.com>,
linux-scsi@...r.kernel.org, jcm@...hat.com, timur@...eaurora.org,
"James E.J. Bottomley" <JBottomley@...n.com>,
linux-kernel@...r.kernel.org,
Sreekanth Reddy <sreekanth.reddy@...gotech.com>,
Praveen Krishnamoorthy <praveen.krishnamoorthy@...gotech.com>,
cov@...eaurora.org, linux-arm-msm@...r.kernel.org,
agross@...eaurora.org, MPT-FusionLinux.pdl@...gotech.com,
Hannes Reinecke <hare@...e.de>
Subject: Re: [PATCH V2 1/3] scsi: mptxsas: try 64 bit DMA when 32 bit DMA fails
On Monday 09 November 2015 18:22:22 Sinan Kaya wrote:
> On 11/9/2015 9:33 AM, Arnd Bergmann wrote:
> > On Monday 09 November 2015 09:07:36 Sinan Kaya wrote:
> >> On 11/9/2015 3:59 AM, Arnd Bergmann wrote:
>
> ioc->dma_mask is 0 and the driver is trying to use 32 bit even though 64
> bit supported by the platform.
Ok, makes sense.
> I think the proper fix is to pass the required_mask back to
> consistent_dma_mask rather than using ioc->dma_mask and guessing.
>
> pci_set_consistent_dma_mask(pdev, required_mask)
>
> My code was just a band aid for broken code.
>
No, as Timur found, the driver is correct and it intentionally
sets the 32-bit mask, and that is guaranteed to work on all sane
hardware. Don't change the driver but find a better platform for
your workload, or talk to the people that are responsible for
the platform and get them to fix it.
If the platform also doesn't have an IOMMU, you can probably work
around it by setting up the dma-ranges property of the PCI host
to map the low PCI addresses to the start of RAM. This will also
require changes in the bootloader to set up the PCI outbound translation,
and it will require implementing the DMA offset on ARM64, which I was
hoping to avoid.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists