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";
};
@igorpadykov : Any suggestion to debug this.
Hi igor,
As of now we do not have i.MX6SX Sabre SD boards.
Any other suggestion to debug this issue.
one can look at similar case but for receiver side
Best regards
igor
Hi igor,
This does not solve the problem with high bandwidth data.
Hi igor,
Thanks for the suggestion.
I did similar change for transmit queue, I still observe the issue now.
Patch:
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 5038fd15e196..429b0996cc1f 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2265,12 +2265,31 @@ fec_enet_interrupt(int irq, void *dev_id)
return ret;
}
+static void fec_enet_recover_txq (struct fec_enet_private *fep, unsigned int queue_id)
+{
+ int work_bit = (queue_id == 0) ? 2 : ((queue_id == 1) ? 0 : 1);
+ if (readl(fep->tx_queue[queue_id]->bd.reg_desc_active))
+ return;
+
+ fep->work_tx |= (1 << work_bit);
+}
+
+static void fec_enet_recover_txqs(struct fec_enet_private *fep)
+{
+ unsigned int queue_id = 0;
+ for (queue_id = 0; queue_id < fep->num_tx_queues; queue_id++)
+ {
+ fec_enet_recover_txq(fep, queue_id);
+ }
+}
+
static int fec_enet_rx_napi(struct napi_struct *napi, int budget)
{
struct net_device *ndev = napi->dev;
struct fec_enet_private *fep = netdev_priv(ndev);
int pkts;
+ fec_enet_recover_txqs(fep);
pkts = fec_enet_rx(ndev, budget);
fec_enet_tx(ndev);
Hi Parth
one can try to reproduce issue with i.MX6SX Sabre SD boards and compare with custom,
use Demo Images from
Best regards
igor