Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Arınç ÜNAL" <arinc.unal@arinc9.com>
To: Daniel Golle <daniel@makrotopia.org>
Cc: patchwork-bot+netdevbpf@kernel.org,
	Justin Swartz <justin.swartz@risingedge.co.za>,
	dqfext@gmail.com, sean.wang@mediatek.com, andrew@lunn.ch,
	f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] net: dsa: mt7530: disable LEDs before reset
Date: Tue, 12 Mar 2024 02:27:25 +0300	[thread overview]
Message-ID: <2846b377-f45b-45fd-9fe2-cb22615e0fd5@arinc9.com> (raw)
In-Reply-To: <Ze9-mp269h43WGD3@makrotopia.org>

On 12.03.2024 00:58, Daniel Golle wrote:
> On Tue, Mar 12, 2024 at 12:22:48AM +0300, Arınç ÜNAL wrote:
>> Why was this applied? I already explained it did not achieve anything.
> 
> I agree that we were still debating about it, however, I do believe
> Justin that he truely observed this problem and the fix seemed
> appropriate to me.
> 
> I've explained this in my previous email which you did not notice
> or at least haven't repied to:
> 
> https://patchwork.kernel.org/project/netdevbpf/patch/20240305043952.21590-1-justin.swartz@risingedge.co.za/#25753421

I did read that and I did not respond because you did not argue over any of
the technical points I've made. All you said was did I repeat the test
enough, on a technical matter that I consider adding two and two together
and expecting a result other than four.

How I interpreted your response was: I don't know much about this, maybe
you're wrong. Justin must've made this patch for a reason so let's have
them elaborate further.

> 
> In the end it probably depends on the electric capacity of the circuit
> connecting each LED, so it may not be reproducible on all boards and/or
> under all circumstances (temperature, humindity, ...).

I'm sorry, this makes no sense to me. I simply fail to see how this fits
here. Could you base your argument over my points please?

Do you agree that the LED controller starts manipulating the state of the
pins used for LEDs and bootstrapping after a link is established?

Do you agree that after power is cut from the switch IC and then given
back, any active link from before will go away, meaning the pins will go
back to the state that is being dictated by the bootstrapping design of the
board?

Do you agree that with power given back, the HWTRAP register will be
populated before a link is established?

> 
> Disabling the LEDs and waiting for around 1mS before reset seems like
> a sensible thing to do, and I'm glad Justin took care of it.

Let's ask Justin if they tested this on a standalone MT7530. Because I did.
The switch chip won't even be powered on before the switch chip reset
operation is done. So the operation this patch brings does not do anything
at all for standalone MT7530.

My conclusion to this patch is Justin tested this only on an MCM MT7530
where the switch IC still has power before the DSA subdriver kicks in. And
assumed that disabling the LED controller before switch chip reset would
"reduce" the possibility of having these pins continue being manipulated by
the LED controller AFTER power is cut off and given back to the switch
chip, where the state of these pins would be back to being dictated by the
bootstrapping design of the board.

Jakub, please revert this. And please next time do not apply any patch that
modifies this driver without my approval if I've already made an argument
against it. I'm actively maintaining this driver, if there's a need to
respond, I will do so.

This patch did not have any ACKs. It also did not have the tree described
on the subject. More reasons as to why this shouldn't have been applied in
its current state.

Arınç


  reply	other threads:[~2024-03-11 23:28 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  4:39 [PATCH] net: dsa: mt7530: disable LEDs before reset Justin Swartz
2024-03-08  9:51 ` Arınç ÜNAL
2024-03-08 14:46   ` Daniel Golle
2024-03-12  0:07   ` Justin Swartz
2024-03-12  1:03     ` Andrew Lunn
2024-03-12  2:41     ` Arınç ÜNAL
2024-03-12 12:01       ` Justin Swartz
2024-03-12 14:06         ` Arınç ÜNAL
2024-03-12 15:25           ` Justin Swartz
2024-03-12 16:35             ` Justin Swartz
2024-03-12 19:21               ` [PATCH] net: dsa: mt7530: increase reset hold time Justin Swartz
2024-03-13  8:59                 ` Arınç ÜNAL
2024-03-13 11:52                   ` Justin Swartz
2024-03-13 12:06                     ` Arınç ÜNAL
2024-03-13 13:13                       ` Justin Swartz
2024-03-13 15:04                         ` Arınç ÜNAL
2024-03-13 15:38                           ` Justin Swartz
2024-03-13 15:51                             ` Arınç ÜNAL
2024-03-11 21:10 ` [PATCH] net: dsa: mt7530: disable LEDs before reset patchwork-bot+netdevbpf
2024-03-11 21:22   ` Arınç ÜNAL
2024-03-11 21:58     ` Jakub Kicinski
2024-03-11 21:58     ` Daniel Golle
2024-03-11 23:27       ` Arınç ÜNAL [this message]
2024-03-11 23:43         ` Daniel Golle
2024-03-12  3:17           ` Arınç ÜNAL
2024-03-12  8:38   ` Arınç ÜNAL
2024-03-12 10:46     ` Paolo Abeni
2024-03-12 11:21       ` Arınç ÜNAL

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2846b377-f45b-45fd-9fe2-cb22615e0fd5@arinc9.com \
    --to=arinc.unal@arinc9.com \
    --cc=andrew@lunn.ch \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=justin.swartz@risingedge.co.za \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=patchwork-bot+netdevbpf@kernel.org \
    --cc=sean.wang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox