Microchip-Ethernet / EVB-KSZ9477

Repository for using Microchip EVB-KSZ9477 board. Product Supported: KSZ9477, KSZ9567, KSZ9897, KSZ9896, KSZ8567, KSZ8565, KSZ9893, KSZ9563, KSZ8563, LAN9646, Phys(KSZ9031/9131, LAN8770
77 stars 78 forks source link

KSZ9477 : multi_dev=1 on FEC #74

Open jeghub opened 3 years ago

jeghub commented 3 years ago

Hi,

I need your help, I'm still trying to get the driver work on FEC (imx7d) with multi-dev=1. I'm using KSZ9477 chip, with multi_dev set to 1 on kernel 4.14. Here are my boot settings : spi-ksz9897.multi_dev=1 spi-ksz9897.iba=0 spi-ksz9897.sgmii=1 spi-ksz9897.stp=0 spi-ksz9897.avb=0 Work fine on our custom board with multi-dev = 0 with the same settings.

I'm using the fec_main.c and fec patch from this git : imx-linux-4.14 Try with files from linux-4.14, same issues.

I've made a change that seems to correct the first issue with iperf : in fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id), the ndev pointer is no longer use directly, a local var is use instead so ndev is not changed. Find attached a patch for im-linux-4.14 fec_main.c : fec_main_tx_ring_dump.patch.txt

Have you a solution or any idea for the second problem?

parthshah3690 commented 3 years ago

Hi,

I am having the similar issue on iperf . Please check #77 . Do you have a solution already?

jeghub commented 3 years ago

Please find attached : dsti.txt

parthshah3690 commented 3 years ago

Hi @jeghub , Are you able to solve the crash with attached dtsi file?

jeghub commented 3 years ago

No. For me the device tree is not related to this bug. For the iperf bug, see my first comment. I had error that lead to Tx_rind_dump and the crash.

I've made a change that seems to correct the first issue with iperf : in fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id), the ndev pointer is no longer use directly, a local var is use instead so ndev is not changed.
Find attached a patch for im-linux-4.14 fec_main.c : fec_main_tx_ring_dump.patch.txt

With this patch, I'm able to use iperf with the chip in multi-dev=0;

My problem is that for some application I need to have an iface for each port (that's what the driver do when set in multi-dev=1) but in this mode, I've kernel OOPS at random times. That's this issue with multi-dev=1 that I'm not able to resolve. (And I've the same issue (bad memory free that leads to kernel oops) when enabling STP in multi-dev=0 mode.