LS1021A Ethernet driver crash

cancel
Showing results for 
Search instead for 
Did you mean: 

LS1021A Ethernet driver crash

1,745 Views
amolshrotri
Contributor I


Hello,

I am working with LS1021A rev1 board. I am using linux kernel (4.1.8) from SDK2.0 and I observed driver crash when I am setting switch 3.6 to 0 (PCIE1,SGMII1,PCIE2,SGMII2,RGMII, CAN3&4, SAI1&2, 2D-ACE,LPUART1) but is works fine when switch 3.6 is set to 1 (PCIE1,SATA,PCIE2,SGMII2,RGMII, CAN3&4, CAN1&2, UCC1&3). But previously I was using kernel from SDK1.8 and never observed such issue.

Below is crash log.

WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:318 dev_watchdog+0x153/0x1b4()

NETDEV WATCHDOG: eth0 (fsl-gianfar): transmit queue 0 timed out

Modules linked in:

CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.1.8-rt8 #34

Hardware name: Freescale LS1021A

[<80011ef9>] (unwind_backtrace) from [<8000fa5b>] (show_stack+0xb/0xc)

[<8000fa5b>] (show_stack) from [<80347029>] (dump_stack+0x51/0x64)

[<80347029>] (dump_stack) from [<8001bafd>] (warn_slowpath_common+0x59/0x80)

[<8001bafd>] (warn_slowpath_common) from [<8001bb3f>] (warn_slowpath_fmt+0x1b/0x24)

[<8001bb3f>] (warn_slowpath_fmt) from [<802df117>] (dev_watchdog+0x153/0x1b4)

[<802df117>] (dev_watchdog) from [<800484e7>] (call_timer_fn.isra.28+0x15/0x5e)

[<800484e7>] (call_timer_fn.isra.28) from [<80048b5b>] (run_timer_softirq+0x131/0x162)

[<80048b5b>] (run_timer_softirq) from [<8001de71>] (__do_softirq+0x99/0x164)

[<8001de71>] (__do_softirq) from [<8001e317>] (irq_exit+0x4b/0x9c)

[<8001e317>] (irq_exit) from [<8003fa33>] (__handle_domain_irq+0x57/0x74)

[<8003fa33>] (__handle_domain_irq) from [<8000924f>] (gic_handle_irq+0x27/0x40)

[<8000924f>] (gic_handle_irq) from [<8034a1db>] (__irq_svc+0x3b/0x5c)

Exception stack(0x80bd7f58 to 0x80bd7fa0)

7f40:                                                       00000001 00000000

7f60: 00000000 800182c1 80bd6000 00000000 00000000 80bd7fa8 8034edc0 00000001

7f80: 8053c050 00000000 80bd8180 80bd7fa0 8000e083 8000e084 400f0033 ffffffff

[<8034a1db>] (__irq_svc) from [<8000e084>] (arch_cpu_idle+0x14/0x20)

[<8000e084>] (arch_cpu_idle) from [<8003a94d>] (cpu_startup_entry+0x175/0x1b0)

[<8003a94d>] (cpu_startup_entry) from [<80515917>] (start_kernel+0x273/0x2dc)

---[ end trace 444800fb4d056127 ]---

fsl-gianfar soc:ethernet@2d10000 eth0: Link is Up - 100Mbps/Full - flow control off

Below is my U-boot output:

U-Boot 2015.01 (Oct 14 2015 - 20:48:33)

CPU:   Freescale LayerScape LS1021E, Version: 1.0, (0x87081110)

Clock Configuration:

       CPU0(ARMV7):1000 MHz,

       Bus:300  MHz, DDR:800  MHz (1600 MT/s data rate),

Reset Configuration Word (RCW):

       00000000: 0608000a 00000000 00000000 00000000

       00000010: 20000000 00407900 e0025a00 21046000

       00000020: 00000000 00000000 00000000 00038000

       00000030: 00080000 881b7540 00000000 00000000

Board: LS1021ATWR

CPLD:  V2.3

PCBA:  V4.0

VBank: 0

I2C:   ready

DRAM:  1 GiB

Using SERDES1 Protocol: 32 (0x20)

Firmware 'Microcode version 0.0.0 for T1040 r1.0' for 1040 V1.0

QE: uploading microcode 'Microcode for T1040 r1.0'

Flash: 128 MiB

MMC:   FSL_SDHC: 0

EEPROM: CRC mismatch (d6e3e195 != ffffffff)

PCIe1: Root Complex no link, regs @ 0x3400000

PCIe2: Root Complex no link, regs @ 0x3500000

In:    serial

Out:   serial

Err:   serial

SEC0: RNG instantiated

SATA link 0 timeout.

AHCI 0001.0300 1 slots 1 ports ? Gbps 0x1 impl SATA mode

flags: 64bit ncq pm clo only pmp fbss pio slum part ccc

scanning bus for devices...

Found 0 device(s).

DCU: dcu_environment_init (remove later).

SCSI:  Net:   eTSEC1 is in sgmii mode.

eTSEC2 is in sgmii mode.

eTSEC1 [PRIME], eTSEC2, eTSEC3

Hit any key to stop autoboot:

Can you please guide me regarding the ethernet issue?

Thanks & Regards,

Amol M Shrotri

0 Kudos
5 Replies

883 Views
michaelkrummsd1
Contributor I

Hi AMOL SHROTR

I had the same message in linux. The reason is different endianess setting for eTSEC buffer descriptors in SCFG_ETSECDMAMCR Bit 20 and eTSECx_DMACTRL Bit 15. You have to make sure that both settings are equal in u-boot and also in linux.

See this commit:

sdk/u-boot.git - Freescale PowerPC u-boot Tree

0 Kudos

883 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello AMOL SHROTRI,

SDK 1.8  is used for LS1021 rev 1.0,  SDK 2.0 is used for LS1021 rev 2.0.

This problem should be caused by erratum A-008645 of LS1021 rev 1.0, this erratum is fixed in rev 2.0, so related software patches to fix this erratum  have already been removed from SDK 2.0 Linux Kernel.

If you are planning to use SDK 2.0 Linux Kernel for your LS1021 1.0  target board, please apply the following patches to SDK 2.0 Kernel source.

gianfar: Remove tx snooping support from LS1 With tx snooping enabled the eTSEC Tx DMA stops in mid-traffic at this point. Remove the Tx snooping support from gianfar for now. Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

883 Views
hwei
Contributor III

Hi yipingwang​,

I have met the same problem on version 2.0 board with SDK 2.0 while trying to bring up the Ethernet.

------------[ cut here ]------------

WARNING: CPU: 1 PID: 0 at net/sched/sch_generic.c:318 dev_watchdog+0x14d/0x1b0()

NETDEV WATCHDOG: eth1 (fsl-gianfar): transmit queue 1 timed out

Modules linked in:

CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.1.8-rt8 #12

Hardware name: Freescale LS1021A

[<8001d3b7>] (unwind_backtrace) from [<8001af0b>] (show_stack+0xb/0xc)

[<8001af0b>] (show_stack) from [<8038a835>] (dump_stack+0x51/0x64)

[<8038a835>] (dump_stack) from [<8002fbad>] (warn_slowpath_common+0x55/0x7c)

[<8002fbad>] (warn_slowpath_common) from [<8002fbef>] (warn_slowpath_fmt+0x1b/0x24)

[<8002fbef>] (warn_slowpath_fmt) from [<802e8c85>] (dev_watchdog+0x14d/0x1b0)

[<802e8c85>] (dev_watchdog) from [<8005c41f>] (call_timer_fn.isra.28+0x15/0x5e)

[<8005c41f>] (call_timer_fn.isra.28) from [<8005ca9b>] (run_timer_softirq+0x139/0x16a)

[<8005ca9b>] (run_timer_softirq) from [<80031e37>] (__do_softirq+0x9b/0x164)

[<80031e37>] (__do_softirq) from [<800322e3>] (irq_exit+0x4b/0x9c)

[<800322e3>] (irq_exit) from [<8005393b>] (__handle_domain_irq+0x57/0x74)

[<8005393b>] (__handle_domain_irq) from [<8000932b>] (gic_handle_irq+0x27/0x40)

[<8000932b>] (gic_handle_irq) from [<8038eddb>] (__irq_svc+0x3b/0x5c)

Exception stack(0xee07bf90 to 0xee07bfd8)

bf80:                                     00000001 00000000 00000000 80023ba1

bfa0: ee07a000 00000000 00000000 ee07bfe0 805c741c 805c9d60 80395034 00000001

bfc0: 805ce180 ee07bfd8 80019547 80019548 40060033 ffffffff

[<8038eddb>] (__irq_svc) from [<80019548>] (arch_cpu_idle+0x14/0x20)

[<80019548>] (arch_cpu_idle) from [<8004e92f>] (cpu_startup_entry+0x187/0x1c4)

[<8004e92f>] (cpu_startup_entry) from [<800093f1>] (__enable_mmu+0x1/0x10)

---[ end trace 9c66eed9f2863811 ]---

Do I have to use the U-Boot and Linux Kernel in the same SDK?

Thanks

0 Kudos

883 Views
amolshrotri
Contributor I

Hello H Wei,

Try with u-boot from the same SDK2.0. I observed even other issues (e.g. system hang on reboot command) when using SDK1.9 u-boot with SDK2.0 kernel.

Thanks & Regards,

Amol M Shrotri

0 Kudos

883 Views
hwei
Contributor III

Hi AMOL SHROTRI

Yes, I have verified it. If they are all SDK2.0 it works well but if the U-Boot is the previous version. there will be such a problem.

0 Kudos