LS1021ATWR ETHERNET ISSUE

cancel
Showing results for 
Search instead for 
Did you mean: 

LS1021ATWR ETHERNET ISSUE

Jump to solution
527 Views
prasanthr
Contributor II

Hi,

 

With recent Flex-build I could see the ethernet configuration issue in my ls1021a-twr board, 

Bootlog

```

[ 1.534822] fsl-gianfar soc:ethernet@2d10000: enabled errata workarounds, flags: 0x4
[ 1.553412] fsl-gianfar soc:ethernet@2d10000 eth0: mac: 00:04:9f:03:f7:22
[ 1.560185] fsl-gianfar soc:ethernet@2d10000 eth0: Running with NAPI enabled
[ 1.567195] fsl-gianfar soc:ethernet@2d10000 eth0: RX BD ring size for Q[0]: 256
[ 1.574561] fsl-gianfar soc:ethernet@2d10000 eth0: RX BD ring size for Q[1]: 256
[ 1.581934] fsl-gianfar soc:ethernet@2d10000 eth0: TX BD ring size for Q[0]: 256
[ 1.589301] fsl-gianfar soc:ethernet@2d10000 eth0: TX BD ring size for Q[1]: 256
[ 1.597024] fsl-gianfar soc:ethernet@2d50000: enabled errata workarounds, flags: 0x4
[ 1.615496] fsl-gianfar soc:ethernet@2d50000 eth1: mac: 00:04:9f:03:f7:23
[ 1.622264] fsl-gianfar soc:ethernet@2d50000 eth1: Running with NAPI enabled
[ 1.629286] fsl-gianfar soc:ethernet@2d50000 eth1: RX BD ring size for Q[0]: 256
[ 1.636641] fsl-gianfar soc:ethernet@2d50000 eth1: RX BD ring size for Q[1]: 256
[ 1.644007] fsl-gianfar soc:ethernet@2d50000 eth1: TX BD ring size for Q[0]: 256
[ 1.651371] fsl-gianfar soc:ethernet@2d50000 eth1: TX BD ring size for Q[1]: 256
[ 1.659076] fsl-gianfar soc:ethernet@2d90000: enabled errata workarounds, flags: 0x4
[ 1.677543] fsl-gianfar soc:ethernet@2d90000 eth2: mac: 00:04:9f:03:f7:24
[ 1.684295] fsl-gianfar soc:ethernet@2d90000 eth2: Running with NAPI enabled
[ 1.691316] fsl-gianfar soc:ethernet@2d90000 eth2: RX BD ring size for Q[0]: 256
[ 1.698682] fsl-gianfar soc:ethernet@2d90000 eth2: RX BD ring size for Q[1]: 256
[ 1.706037] fsl-gianfar soc:ethernet@2d90000 eth2: TX BD ring size for Q[0]: 256
[ 1.713400] fsl-gianfar soc:ethernet@2d90000 eth2: TX BD ring size for Q[1]: 256

```

Tried both manual configuration and udhcpc

```

# udhcpc
udhcpc: started, v1.32.1
[ 15.623074] fsl-gianfar soc:ethernet@2d10000: Rejecting highmem page from CMA.
ifconfig: SIOCSIFFLAGS: Cannot allocate memory
udhcpc: sending discover
udhcpc: sendto: Network is down
udhcpc: read error: Network is down, reopening socket

```

 

Could solve the issue by 

setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait cma=257M

 

is it a valid one? or do you have any alternative solution for this?

 

Thanks,

Labels (2)
0 Kudos
1 Solution
515 Views
yipingwang
NXP TechSupport
NXP TechSupport

As upstream patches (commit <704f2c20eaa5> and <ad3c7b18c5b3>), it causes the highmem CMA reserved is not mapped and dma_alloc_from_contiguous() which returns highmem pages from CMA will fail.

To fix the issue, CMA needs to be reserved in the lowmem, please add "cma=64M@0x0-0xb0000000" in bootargs.

This might be of interest: https://www.spinics.net/lists/arm-kernel/msg740308.html

View solution in original post

2 Replies
525 Views
prasanthr
Contributor II

The issue was with the recent kernel version 5.4.*

I don't see any issues with the 4.19 kernel, 

0 Kudos
516 Views
yipingwang
NXP TechSupport
NXP TechSupport

As upstream patches (commit <704f2c20eaa5> and <ad3c7b18c5b3>), it causes the highmem CMA reserved is not mapped and dma_alloc_from_contiguous() which returns highmem pages from CMA will fail.

To fix the issue, CMA needs to be reserved in the lowmem, please add "cma=64M@0x0-0xb0000000" in bootargs.

This might be of interest: https://www.spinics.net/lists/arm-kernel/msg740308.html