netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: John David Anglin <dave.anglin@bell.net>
Cc: Russell King <linux@arm.linux.org.uk>,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs
Date: Wed, 23 Jan 2019 01:22:40 +0100	[thread overview]
Message-ID: <20190123002240.GF3634@lunn.ch> (raw)
In-Reply-To: <e74f35e2-d81c-7f86-a6b3-7cecce035ce9@bell.net>

> > It does not need to. There are two options here:
> >
> > 1) The PHY has no interrupt. phylib will poll the PHY once per second
> >    for link changes.
> >
> > 2) The PHY has in interrupt. Link changes will cause the interrupt to
> >    fire, and the phylib will then read the current state.
> >
> > For PHYs embedded within a switch driver by mv88e6xxx interrupts
> > should always be used.

Hi Dave

From my Espressobin

cat /proc/interrupts
...
 44:          0          0  mv88e6xxx-g1   3 Edge      mv88e6xxx-g1-atu-prob
 46:          0          0  mv88e6xxx-g1   5 Edge      mv88e6xxx-g1-vtu-prob
 48:         38         24  mv88e6xxx-g1   7 Edge      mv88e6xxx-g2
 51:          0          1  mv88e6xxx-g2   1 Edge      !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:11
 52:          0          0  mv88e6xxx-g2   2 Edge      !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:12
 53:         38         23  mv88e6xxx-g2   3 Edge      !soc!internal-regs@d0000000!mdio@32004!switch0@1!mdio:13

These are PHY interrupts.

> I don't think option 2) is implemented.  Didn't see any irq code in phy.c.

You would not. All the interrupt code is in the PHY core and the PHY
driver. drivers/net/dsa/mv88e6xxx/phy.c is just a bunch of helpers
which allow the mdio bus driver to access phy registers. The PHY
driver itself is drivers/net/phy/marvell.c, and the interrupt handling
is spread between that and drivers/net/phy/phy.c

> If I remember correctly, one needs to use clause 45 accesses to get at
> the PHY registers in the 88E6341.

Nope. The PHYs are c22 devices. The SERDES are probably C45, but those
are not being used here.

      Andrew

  reply	other threads:[~2019-01-23  0:22 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 19:16 net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs John David Anglin
2019-01-22 20:28 ` Andrew Lunn
2019-01-22 21:40   ` John David Anglin
2019-01-22 22:36     ` Andrew Lunn
2019-01-22 23:52       ` John David Anglin
2019-01-23  0:11       ` John David Anglin
2019-01-23  0:22         ` Andrew Lunn [this message]
2019-01-25 16:30           ` John David Anglin
2019-01-25 16:48             ` Russell King - ARM Linux admin
2019-01-25 18:38               ` John David Anglin
2019-01-30 17:08           ` John David Anglin
2019-01-30 17:28             ` Andrew Lunn
2019-01-30 19:01               ` John David Anglin
2019-01-30 19:09                 ` Andrew Lunn
2019-01-30 22:24               ` John David Anglin
2019-01-30 22:38                 ` Andrew Lunn
2019-01-31  1:27                   ` John David Anglin
2019-01-31 17:27                     ` John David Anglin
2019-02-04 18:37                       ` [PATCH] net: phylink: dsa: mv88e6xxx: Revise irq setup ordering John David Anglin
2019-02-04 19:35                         ` Andrew Lunn
2019-02-04 19:52                           ` John David Anglin
2019-02-04 20:19                             ` Andrew Lunn
2019-02-04 21:38                               ` John David Anglin
2019-02-04 22:47                                 ` Andrew Lunn
2019-02-04 21:59                         ` [PATCH v2] net: " John David Anglin
2019-02-04 23:14                           ` Andrew Lunn
2019-02-05  0:38                             ` John David Anglin
2019-02-05  2:21                               ` Andrew Lunn
2019-02-05 19:20                                 ` John David Anglin
2019-02-05 19:54                                   ` Andrew Lunn
2019-02-05 18:37                           ` David Miller
2019-02-11 18:40                           ` [PATCH net] dsa: mv88e6xxx: Ensure all pending interrupts are handled prior to exit John David Anglin
2019-02-11 23:33                             ` Andrew Lunn
2019-02-12  0:57                               ` John David Anglin
2019-02-12  1:21                                 ` Andrew Lunn
2019-02-12  3:58                                 ` Andrew Lunn
2019-02-12  6:51                                   ` Heiner Kallweit
2019-02-12 12:56                                     ` Andrew Lunn
2019-02-12 18:42                                       ` Heiner Kallweit
2019-02-12 20:09                                       ` John David Anglin
2019-02-12 16:30                                     ` Russell King - ARM Linux admin
2019-02-12 20:11                                       ` Heiner Kallweit
2019-02-12 20:54                                       ` Heiner Kallweit
2019-02-12 22:55                                         ` Russell King - ARM Linux admin
2019-02-14  2:07                             ` Andrew Lunn
2019-02-14  4:47                               ` David Miller
2019-02-14  4:50                                 ` Andrew Lunn
2019-02-14 15:27                                   ` David Miller
2019-01-22 23:12 ` net: phylink: dsa: mv88e6xxx: flaky link detection on switch ports with internal PHYs Andrew Lunn
2019-01-22 23:48   ` John David Anglin
2019-01-23  0:00   ` John David Anglin
2019-01-23  0:04     ` Florian Fainelli

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=20190123002240.GF3634@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=dave.anglin@bell.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux@arm.linux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.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;
as well as URLs for NNTP newsgroup(s).