summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/qualcomm/emac/emac.c
diff options
context:
space:
mode:
authorWang Dongsheng <dongsheng.wang@hxt-semitech.com>2018-01-23 05:25:06 +0100
committerDavid S. Miller <davem@davemloft.net>2018-01-24 22:32:29 +0100
commitdf262dbdcc31f5a89b39ff86a617f8e72c7949dd (patch)
treeb882f651db9824dbf34d2c447f946d9c2857c890 /drivers/net/ethernet/qualcomm/emac/emac.c
parentip_tunnel: Use mark in skb by default (diff)
downloadlinux-df262dbdcc31f5a89b39ff86a617f8e72c7949dd.tar.xz
linux-df262dbdcc31f5a89b39ff86a617f8e72c7949dd.zip
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>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/emac/emac.c')
-rw-r--r--drivers/net/ethernet/qualcomm/emac/emac.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c
index 38c924bdd32e..13235baf4766 100644
--- a/drivers/net/ethernet/qualcomm/emac/emac.c
+++ b/drivers/net/ethernet/qualcomm/emac/emac.c
@@ -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;