Fixes #13: dma_set_coherent_mask to 64 bits#15
Conversation
|
@wesleywesley @lsgunth @dmeyergio - please review and merge |
|
@wesleywesley @lsgunth @dmeyergio - please review and merge |
|
I think the change belongs in the proper switchtec driver during PCI init. Not in the NTB code. I'd also like to see this go upstream and for that we will need a better commit message and a sign-off tag. Thanks, Logan |
|
@lsgunth do you mean inside switchtec_init_pci() function in switchtec.c ? |
|
The DMA mask is a property of the PCI device not really of the usage of that device and we don't need other potential client drivers competing over what/when to set the mask. The latest changes for switchtec kernel also have started doing DMA requests too. switchtec_init_pci() seems like a good spot. Logan |
This patch fixes the problem during large buffers allocation with CMA. The result of cma_alloc() is checked against dma_mask value. It seems like default dma_mask value is 32, however Microsemi switch supports 64-bit DMA. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
|
@lsgunth done, please review |
|
Looks good to me. |
|
@wesleywesley please merge |
|
One question: Regard, |
|
Yes, dma_set_mask_and_coherent() is probably a better choice. Logan |
|
@lsgunth Regard, |
to be able to allocate large memory using CMA