linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ufs-pltfrm: initialize DMA mask for device-tree probed device
@ 2013-08-19 13:56 Akinobu Mita
  2013-08-19 13:56 ` [PATCH 2/2] ufs: fix DMA mask setting Akinobu Mita
  2013-08-19 14:32 ` [PATCH 1/2] ufs-pltfrm: initialize DMA mask for device-tree probed device James Bottomley
  0 siblings, 2 replies; 6+ messages in thread
From: Akinobu Mita @ 2013-08-19 13:56 UTC (permalink / raw)
  To: linux-scsi
  Cc: Akinobu Mita, Sujit Reddy Thumma, Vinayak Holikatti, Santosh Y,
	James E.J. Bottomley

The device-tree probed device for ARM doesn't have dev->dma_mask.
So dma_set_mask() for the device doesn't succeed.  The popular trick
for this is - dev->dma_mask = &dev->coherent_dma_mask;

Currently there is no dma_set_mask() call in ufs-pltfrm, but the
forthcoming fix needs proper DMA mask setting in ufs core driver.  So
initializing dev->dma_mask as described above is required.

Signed-off-by: Akinobu Mita <mita@fixstars.com>
Cc: Sujit Reddy Thumma <sthumma@codeaurora.org>
Cc: Vinayak Holikatti <vinholikatti@gmail.com>
Cc: Santosh Y <santoshsy@gmail.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org
---
 drivers/scsi/ufs/ufshcd-pltfrm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index 94ba40c..c780840 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -122,6 +122,9 @@ static int ufshcd_pltfrm_probe(struct platform_device *pdev)
 		goto out;
 	}
 
+	if (!dev->dma_mask)
+		dev->dma_mask = &dev->coherent_dma_mask;
+
 	err = ufshcd_init(dev, &hba, mmio_base, irq);
 	if (err) {
 		dev_err(dev, "Intialization failed\n");
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-08-20 20:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-19 13:56 [PATCH 1/2] ufs-pltfrm: initialize DMA mask for device-tree probed device Akinobu Mita
2013-08-19 13:56 ` [PATCH 2/2] ufs: fix DMA mask setting Akinobu Mita
2013-08-19 14:32 ` [PATCH 1/2] ufs-pltfrm: initialize DMA mask for device-tree probed device James Bottomley
2013-08-20  7:26   ` Sujit Reddy Thumma
2013-08-20 15:03     ` Akinobu Mita
2013-08-20 20:54       ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).