[From nobody Thu Jun 25 05:55:30 2020
Received: from hosting.moc6.cz ([2a02:c60:c70:8900::1] helo=moc6.cz)
 by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
 id 1iTPdO-0004Jf-Oa
 for openwrt-devel@lists.openwrt.org; Sat, 09 Nov 2019 12:14:32 +0000
Received: by moc6.cz (Postfix, from userid 1025)
 id 88AD12320021; Sat,  9 Nov 2019 13:14:20 +0100 (CET)
Date: Sat, 9 Nov 2019 13:14:20 +0100
From: Filip Moc &lt;lede@moc6.cz&gt;
To: 'Enrico Mioso' &lt;mrkiko.rs@gmail.com&gt;,
 Adrian Schmutzler &lt;mail@adrianschmutzler.de&gt;,
 John Crispin &lt;john@phrozen.org&gt;
Cc: openwrt-devel@lists.openwrt.org,
 Daniel Dickinson &lt;lede@daniel.thecshore.com&gt;
Subject: Re: [PATCH V2] ath79: add support for TP-Link TL-MR6400
Message-ID: &lt;20191109121420.GB14590@moc6.cz&gt;
References: &lt;20190917193029.1336491-1-mrkiko.rs@gmail.com&gt;
 &lt;20191007214054.GA14886@moc6.cz&gt;
 &lt;alpine.LNX.2.21.99999.353.1910080711190.3029597@mStation.localdomain&gt;
 &lt;01d001d582a7$2a3edd90$7ebc98b0$@adrianschmutzler.de&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: &lt;01d001d582a7$2a3edd90$7ebc98b0$@adrianschmutzler.de&gt;
User-Agent: Mutt/1.10.1 (2018-07-13)
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 
X-CRM114-CacheID: sfid-20191109_041430_951725_F0509003 
X-CRM114-Status: GOOD (  19.11  )
X-Spam-Score: -0.0 (/)
X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary:
 Content analysis details:   (-0.0 points)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 -0.0 SPF_PASS               SPF: sender matches SPF record

Hi,

&gt; What exactly are you referring to when you say &quot;connection status events&quot;?
Link detection does not work. eth0 is always reported as up with carrier even when
there is no cable connected to any port of the switch.

This seems related:
https://bugs.openwrt.org/index.php?do=details&amp;task_id=1702&amp;order=dateopened&amp;sort=desc
And see also this comment and comments below:
https://github.com/openwrt/openwrt/pull/1146#issuecomment-408653790

It seems to me that link detection on this switch might be currently not
supported at all on ath79.
I did not find any bug report that would track this issue further so I'm not
really sure what the current status is.
But I find it hard to belive that so important feature wouldn't be supported.

Note also this comment on bug page by John: &quot;it'll come when we add qca8k support&quot;.
But it seems qca8k support was already added to kernel long time ago:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=e5dcad290a7c62d1c856269dbd13e470e388b704
So I'm not sure what support exactly needs to be added.

Perhaps John could explain what exactly needs to be done to get link detection
support on ag71xx. Then we could try to make some patch if needed.

--

I also found another problem. LTE module does not work reliably. Sometimes when
I boot MR6400 the LTE module is not detected. This never happens when I boot
ar71xx version.

Filip


On Mon, Oct 14, 2019 at 05:50:55PM +0200, Adrian Schmutzler wrote:
&gt; Hi,
&gt; 
&gt; &gt; -----Original Message-----
&gt; &gt; From: Enrico Mioso [mailto:mrkiko.rs@gmail.com]
&gt; &gt; Sent: Dienstag, 8. Oktober 2019 07:14
&gt; &gt; To: Filip Moc &lt;lede@moc6.cz&gt;
&gt; &gt; Cc: mail@adrianschmutzler.de; openwrt-devel@lists.openwrt.org
&gt; &gt; Subject: Re: [PATCH V2] ath79: add support for TP-Link TL-MR6400
&gt; &gt; 
&gt; &gt; Hi Filip, hello all!
&gt; &gt; 
&gt; &gt; Thank you very very much for your help and sorry for me not ansering to your previous mail. I tought I would re-check this all when I
&gt; &gt; went back home to report with precise informations, but in the end I didn't.
&gt; &gt; Your help is very very much apreciated.
&gt; &gt; 
&gt; &gt; As you found out, I would need help in exactly that: setting port numbers correctly in the UI and fixing the fact eth0 doesn't receive
&gt; &gt; connection status events.
&gt; 
&gt; What exactly are you referring to when you say &quot;connection status events&quot;?
&gt; 
&gt; This has two aspects: One is the LED status which needs to be set with switch0 (I commented on that in my previous e-mail reviewing your v2 patch again).
&gt; 
&gt; The other one is that switch-phy-swap has an effect on which ports can detect link status changes. This setting will affect several things:
&gt; 1. Which port gets link detection
&gt; 2. The port numbers will change
&gt; 3. The order in which gmacs are set up will change: If you change that, eth0 will become eth1 and vice versa (on running system). This will require adjustment of setup in 02_network/01_leds, where ethX then needs to be swapped, too. Note that for several devices eth0/eth1 are swapped compared to ar71xx.
&gt; 
&gt; So, you really have a lot to play around with and to make wrong ;-)
&gt; 
&gt; For further reading on the effects of switch-phy-swap, you might have a look at this Pull Request (starting at the comment):
&gt; 
&gt; https://github.com/openwrt/openwrt/pull/1942#issuecomment-529078064
&gt; 
&gt; Note that the situation in the PR is even more complicated as the vendor did a dumbass setup in the first place.
&gt; 
&gt; Best
&gt; 
&gt; Adrian



]