i.MX6SoloX Linux 5.4 - fec_main.c : Not updating transmit interrupt status

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6SoloX Linux 5.4 - fec_main.c : Not updating transmit interrupt status

1,647 Views
parth_shah
Contributor III

Hi,

I am doing a ping between 2 devices based on IMX6SX. After certain point of time it is doing a fec_dump.

After debugging further, it is found out that fec_enet_interrupt() function is getting called only for RX interrupt, and transmit complete interrupt is not set.

#define FEC_ENET_RXF_0 ((uint)0x02000000) /* Full frame received */

static irqreturn_t
fec_enet_interrupt(int irq, void *dev_id)
{
struct net_device *ndev = dev_id;
struct fec_enet_private *fep = netdev_priv(ndev);
uint int_events;
irqreturn_t ret = IRQ_NONE;

int_events = readl(fep->hwp + FEC_IEVENT);
writel(int_events, fep->hwp + FEC_IEVENT);

int_events is always read as 0x2000000.

DTS node:

fec1: ethernet@2188000 {
compatible = "fsl,imx6sx-fec", "fsl,imx6q-fec";
reg = <0x02188000 0x4000>;
interrupt-names = "int0", "pps";
interrupts = <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6SX_CLK_ENET>,
<&clks IMX6SX_CLK_ENET_AHB>,
<&clks IMX6SX_CLK_ENET_PTP>,
<&clks IMX6SX_CLK_ENET_REF>,
<&clks IMX6SX_CLK_ENET_PTP>;
clock-names = "ipg", "ahb", "ptp",
"enet_clk_ref", "enet_out";
fsl,num-tx-queues = <3>;
fsl,num-rx-queues = <3>;
stop-mode = <&gpr 0x10 3>;
fsl,wakeup_irq = <0>;
status = "disabled";
};

Any suggestion to debug this further highly appreciated.

0 Kudos
Reply
2 Replies

1,417 Views
joanxie
NXP TechSupport
NXP TechSupport

you can refer to the document for how to set up this,

"https://www.cyberciti.biz/faq/debian-network-interfaces-bridge-eth0-eth1-eth2/"

did you use nxp imx6sx sabresd board? when you doing a ping between what error message did you get?

 

 

0 Kudos
Reply

1,410 Views
parth_shah
Contributor III

I have been using custom boards.

When I do ping between 2 boards, I get below warning.

64 bytes from 192.168.0.2: seq=58 ttl=64 time=2.909 ms
64 bytes from 192.168.0.2: seq=59 ttl=64 time=2.995 ms
64 bytes from 192.168.0.2: seq=60 ttl=64 time=2.929 ms
64 bytes from 192.168.0.2: seq=61 ttl=64 time=2.690 ms
64 bytes from 192.168.0.2: seq=62 ttl=64 time=2.872 ms
64 bytes from 192.168.0.2: seq=63 ttl=64 time=2.830 ms
64 bytes from 192.168.0.2: seq=64 ttl=64 time=2.771 ms
[ 137.124628] ------------[ cut here ]------------
[ 137.129443] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:454 dev_watchdog+0x270/0x274
[ 137.137756] NETDEV WATCHDOG: eth0.100 (fec): transmit queue 0 timed out
[ 137.144399] Modules linked in:
[ 137.147517] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.70+gbd4d925136bc #1
[ 137.154680] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[ 137.160610] [<801107f8>] (unwind_backtrace) from [<8010b6ec>] (show_stack+0x10/0x14)
[ 137.168420] [<8010b6ec>] (show_stack) from [<80c5d26c>] (dump_stack+0x90/0xa4)
[ 137.175706] [<80c5d26c>] (dump_stack) from [<8012cc94>] (__warn+0xbc/0xd8)
[ 137.182634] [<8012cc94>] (__warn) from [<8012cd48>] (warn_slowpath_fmt+0x98/0xc4)
[ 137.190172] [<8012cd48>] (warn_slowpath_fmt) from [<80a964d8>] (dev_watchdog+0x270/0x274)
[ 137.198432] [<80a964d8>] (dev_watchdog) from [<8018d698>] (call_timer_fn.constprop.0+0x24/0x98)
[ 137.207196] [<8018d698>] (call_timer_fn.constprop.0) from [<8018dd30>] (run_timer_softirq+0x3e0/0x3f8)
[ 137.216565] [<8018dd30>] (run_timer_softirq) from [<801022ac>] (__do_softirq+0x104/0x278)
[ 137.224803] [<801022ac>] (__do_softirq) from [<80131d94>] (irq_exit+0xb0/0xd8)
[ 137.232093] [<80131d94>] (irq_exit) from [<80174d44>] (__handle_domain_irq+0x60/0xb0)
[ 137.239990] [<80174d44>] (__handle_domain_irq) from [<804cd6bc>] (gic_handle_irq+0x4c/0x90)
[ 137.248396] [<804cd6bc>] (gic_handle_irq) from [<80101a8c>] (__irq_svc+0x6c/0xa8)
[ 137.255906] Exception stack(0x81301f40 to 0x81301f88)
[ 137.261007] 1f40: 00000000 0000bd34 9f9b26b4 80119a20 81300000 00000000 81304f68 81304fa4
[ 137.269229] 1f60: 00000001 81267a40 9feff940 00000000 00000001 81301f90 80108904 80108908
[ 137.277433] 1f80: 600e0013 ffffffff
[ 137.280988] [<80101a8c>] (__irq_svc) from [<80108908>] (arch_cpu_idle+0x38/0x3c)
[ 137.288452] [<80108908>] (arch_cpu_idle) from [<80157584>] (do_idle+0xc8/0x150)
[ 137.295819] [<80157584>] (do_idle) from [<801578f0>] (cpu_startup_entry+0x18/0x1c)
[ 137.303463] [<801578f0>] (cpu_startup_entry) from [<81200dac>] (start_kernel+0x45c/0x490)
[ 137.311740] ---[ end trace 179132dcc3032a19 ]---
[ 137.316429] fec 2188000.ethernet eth0.100: TX ring dump
[ 137.321687] Nr SC addr len SKB
[ 137.326093] 0 0x1c00 0x86e82802 336 343a1c3f
[ 137.330927] 1 0x1c00 0x86e82002 348 b4569136
[ 137.335758] 2 0x1c00 0x877e2802 96 db7e31d8
[ 137.340590] 3 0x1c00 0x877e1002 96 ba18b7cb
[ 137.345420] 4 0x1c00 0x86e82402 336 ef730291
[ 137.350251] 5 0x1c00 0x8776f802 96 77e8e61d
[ 137.355081] 6 0x1c00 0x86cffe02 92 fa48c03d
[ 137.359910] 7 0x1c00 0x877e0802 96 e23c2617
[ 137.364738] 8 0x1c00 0x8676d002 336 b3470e9e
[ 137.369568] 9 0x1c00 0x866c0002 96 ff30244f
[ 137.374397] 10 0x1c00 0x878b8002 96 91fec0a6
[ 137.379226] 11 0x1c00 0x86ce2a02 92 36812b75
[ 137.384053] 12 0x1c00 0x86f44e02 92 a5bc3cd1

0 Kudos
Reply