Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Marek Behún" <marek.behun@nic.cz>
Cc: Gustav Ekelund <gustav.ekelund@axis.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	kernel@axis.com, Gustav Ekelund <gustaek@axis.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: dsa: mv88e6xxx: Reset mv88e6393x watchdog register
Date: Tue, 28 Mar 2023 14:30:37 +0200	[thread overview]
Message-ID: <9ba1722a-8dd7-4d6d-bade-b4c702c8387f@lunn.ch> (raw)
In-Reply-To: <20230328120604.zawfeskqs4yhlze6@kandell>

> > +static int mv88e6393x_watchdog_action(struct mv88e6xxx_chip *chip, int irq)
> > +{
> > +	mv88e6390_watchdog_action(chip, irq);
> > +
> > +	mv88e6xxx_g2_write(chip, MV88E6390_G2_WDOG_CTL,
> > +			   MV88E6390_G2_WDOG_CTL_UPDATE |
> > +			   MV88E6390_G2_WDOG_CTL_PTR_EVENT);
> > +
> > +	return IRQ_HANDLED;
> > +}
> 
> Shouldn't this update be in .irq_setup() method? In the commit message
> you're saying that the problem is that bits aren't cleared with SW
> reset. So I would guess that the change should be in the setup of
> watchdog IRQ, not in IRQ action?

I think it is a bit more complex than that. At least for the 6352,
which i just looked at the data sheet, the interrupt bits are listed
as "ROC". Which is missing from the list of definitions, but seems to
mean Read Only, Clear on read. So even if it was not cleared on
software reset, it would only fire once, and then be cleared.

The problem description here is that it does not clear on read, it
needs an explicit write. Which suggests Marvell changed it for the
6393.

So i have a couple of questions:

1) Is this new behaviour limited to the 6393, or does the 6390 also
need this write?

2) What about other interrupts? Is this the only one which has changed
behaviour?

	Andrew

  reply	other threads:[~2023-03-28 12:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-28 11:55 [PATCH net] net: dsa: mv88e6xxx: Reset mv88e6393x watchdog register Gustav Ekelund
2023-03-28 12:06 ` Marek Behún
2023-03-28 12:30   ` Andrew Lunn [this message]
2023-03-28 12:47     ` Marek Behún
2023-03-28 13:34       ` Gustav Ekelund
2023-03-28 13:45         ` Andrew Lunn
2023-03-28 14:47           ` Marek Behún
2023-03-30 13:29             ` Gustav Ekelund

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=9ba1722a-8dd7-4d6d-bade-b4c702c8387f@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=gustaek@axis.com \
    --cc=gustav.ekelund@axis.com \
    --cc=kernel@axis.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.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