Skip to content

Commit

Permalink
powerpc/vio: Fix a dma_mask issue of vio
Browse files Browse the repository at this point in the history
I encountered following issue:
[    0.283035] ibmvscsi 30000015: couldn't initialize event pool
[    5.688822] ibmvscsi: probe of 30000015 failed with error -1

which prevents the storage from being recognized, and the machine from
booting.

After some digging, it seems that it is caused by commit 4886c39

as dma_mask pointer in viodev->dev is not set, so in
dma_set_mask_and_coherent(), dma_set_coherent_mask() is not called
because dma_set_mask(), which is dma_set_mask_pSeriesLP() returned EIO.
While before the commit, dma_set_coherent_mask() is always called.

I tried to replace dma_set_mask_and_coherent() with
dma_coerce_mask_and_coherent(), and the machine could boot again.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Li Zhong authored and Benjamin Herrenschmidt committed Nov 20, 2013
1 parent dc7a9bd commit c610260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)

/* needed to ensure proper operation of coherent allocations
* later, in case driver doesn't set it explicitly */
dma_set_mask_and_coherent(&viodev->dev, DMA_BIT_MASK(64));
dma_coerce_mask_and_coherent(&viodev->dev, DMA_BIT_MASK(64));
}

/* register with generic device framework */
Expand Down

0 comments on commit c610260

Please sign in to comment.