From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?TWljaGFsIFZva8OhxI0=?= Subject: Re: i.MX6S/DL and QCA8334 switch using DSA driver - CPU port not working Date: Thu, 10 May 2018 15:49:13 +0200 Message-ID: <5e8ecfed-c772-5668-4bac-1549143f599a@gmail.com> References: <037faf3c-8e8f-a696-8312-d1380c3b8656@gmail.com> <649c06a4-ca63-cb38-f105-ffd9dc17f5d2@gmail.com> <20180426140629.GB15370@lunn.ch> <48c029f1-1632-573f-c628-86b4972d668c@gmail.com> <20180430132025.GF10066@lunn.ch> <573258a9-b115-ca4a-121c-5174798d5621@gmail.com> <20180504133014.GB9666@lunn.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Vivien Didelot , Florian Fainelli To: Andrew Lunn Return-path: Received: from mail-wr0-f173.google.com ([209.85.128.173]:38263 "EHLO mail-wr0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757097AbeEJNtQ (ORCPT ); Thu, 10 May 2018 09:49:16 -0400 Received: by mail-wr0-f173.google.com with SMTP id 94-v6so2096943wrf.5 for ; Thu, 10 May 2018 06:49:15 -0700 (PDT) In-Reply-To: <20180504133014.GB9666@lunn.ch> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 4.5.2018 15:30, Andrew Lunn wrote: >> I am out of ideas how to further debug this. >> Any additional adivce will be much appreciated. > > I would suggest looking at the statistics counters. ethtool -S. Try > it for both the slave interfaces, and the master interface. The master > interfaces statistics should have both the host counters, and the > switches counters. Do you see packets being sent but not received? Are > there errors reported? Thanks Andrew, now I am getting closer! I briefly looked at the statistics some time ago but could not interpret the numbers correctly. Now I went through the relevant source code and it shed some light to it. This is what I get from the numbers: Slaves - switch counters: some packets received, none transmitted. No errors. Slaves - DSA counters: some packets transmitted, none received. No error cntrs. Master - switch counters: some packets transmitted, none received. No errors. Master - host/fec counters: some packets transmitted, none received. No errors, but IEEE_rx_drop counter shows frames are being dropped! So this is most probably the issue. From the i.MX6 RM: "Counter increments if a frame with invalid or missing SFD character is detected and has been dropped. None of the other counters increments if this counter increments." At first I thought that this could be caused by the atheros header. But the atheros header is inserted in the frame by the switch after the SA. So it can not be the issue as the frame is discarded even before the DA and SA is processed. So both the CPU and the switch are trying to talk to each other but their frames are not delivered. This still looks like RGMII configuration problem. As it works with my old PHY driver I suspect the problem is at the switches side somewhere in qca8k_set_pad_ctrl or qca8k_setup in the qca8k driver. Any other ideas? BR, Michal