[PATCH] ixp4xx_eth: set the device dma_coherent_mask
Subsystems:
arm/intel ixp4xx arm architecture , networking drivers , the rest
STALE4936d
3 messages,
3 authors,
2013-03-19 · open the first message on its own page
Without the mask it is impossible to take the network interface up
since it returns the following error:
net eth1: coherent DMA mask is unset
ifconfig: SIOCSIFFLAGS: Cannot allocate memory
Tested on an out-of-tree ixp425 based board.
Signed-off-by: Christophe Aeschlimann <redacted>
---
drivers/net/ethernet/xscale/ixp4xx_eth.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index 6958a5e..ff23c5c 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c @@ -1398,6 +1398,7 @@ static int eth_init_one(struct platform_device *pdev)
return - ENOMEM ;
SET_NETDEV_DEV ( dev , & pdev -> dev );
+ dev -> dev . coherent_dma_mask = DMA_BIT_MASK ( 32 );
port = netdev_priv ( dev );
port -> netdev = dev ;
port -> id = pdev -> id ; --
1.7.9
From: Christophe Aeschlimann <redacted>
Date: Tue, 19 Mar 2013 16:59:25 +0100
Without the mask it is impossible to take the network interface up
since it returns the following error:
quoted net eth1: coherent DMA mask is unset
ifconfig: SIOCSIFFLAGS: Cannot allocate memory
Tested on an out-of-tree ixp425 based board.
Signed-off-by: Christophe Aeschlimann <redacted> ... quoted hunk @@ -1398,6 +1398,7 @@ static int eth_init_one(struct platform_device *pdev)
return -ENOMEM;
SET_NETDEV_DEV(dev, &pdev->dev);
+ dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
Hmmm, shouldn't this be the default value, set by the bus layer or
similar?
On 3/19/2013 10:03 PM, David Miller wrote: From: Christophe Aeschlimann<redacted>
Date: Tue, 19 Mar 2013 16:59:25 +0100
quoted quoted Without the mask it is impossible to take the network interface up
since it returns the following error:
quoted quoted net eth1: coherent DMA mask is unset
ifconfig: SIOCSIFFLAGS: Cannot allocate memory
Tested on an out-of-tree ixp425 based board.
Signed-off-by: Christophe Aeschlimann<redacted> ... quoted quoted @@ -1398,6 +1398,7 @@ static int eth_init_one(struct platform_device *pdev)
return -ENOMEM;
SET_NETDEV_DEV(dev, &pdev->dev);
+ dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);Hmmm, shouldn't this be the default value, set by the bus layer or
similar? bus layer or any platform code doesn't init this value. The same issue
applies
to CPSW driver also. Previously the same was done in board or device
file. But
this approach is obsolete now, need to think of how it can be resolved in DT
approach
Regards
Mugunthan V N