net: qcom/emac: extend DMA mask to 46bits

Bit TPD3[31] is used as a timestamp bit if PTP is enabled, but
it's used as an address bit if PTP is disabled.  Since PTP isn't
supported by the driver, we can extend the DMA address to 46 bits.

Signed-off-by: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>
Acked-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Wang Dongsheng
2018-01-22 20:25:06 -08:00
committed by David S. Miller
parent 5c38bd1b82
commit df262dbdcc
2 changed files with 7 additions and 3 deletions

View File

@@ -615,8 +615,11 @@ static int emac_probe(struct platform_device *pdev)
u32 reg;
int ret;
/* The TPD buffer address is limited to 45 bits. */
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(45));
/* The TPD buffer address is limited to:
* 1. PTP: 45bits. (Driver doesn't support yet.)
* 2. NON-PTP: 46bits.
*/
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(46));
if (ret) {
dev_err(&pdev->dev, "could not set DMA mask\n");
return ret;