Re: [PATCH 2/3] staging: ccree: handle limiting of DMA masks

2017-11-01 Thread Dan Carpenter
On Tue, Oct 31, 2017 at 11:56:16AM +, Gilad Ben-Yossef wrote: > > - if (!dev->coherent_dma_mask) > - dev->coherent_dma_mask = DMA_BIT_MASK(DMA_BIT_MASK_LEN); > + if (rc) { > + dev_err(dev, "Error: failed in dma_set_mask, mask=%par\n", > +

Re: [PATCH 2/3] staging: ccree: handle limiting of DMA masks

2017-11-01 Thread Dan Carpenter
On Tue, Oct 31, 2017 at 11:56:16AM +, Gilad Ben-Yossef wrote: > + dma_mask = (dma_addr_t)(DMA_BIT_MASK(DMA_BIT_MASK_LEN)); > + while (dma_mask > 0x7fffUL) { > + if (dma_supported(_dev->dev, dma_mask)) { > + rc = dma_set_coherent_mask(_dev->dev,

[PATCH 2/3] staging: ccree: handle limiting of DMA masks

2017-10-31 Thread Gilad Ben-Yossef
Properly handle limiting of DMA masks based on device and bus capabilities. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c