All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: Marek Behun <marek.behun@nic.cz>,
	Russell King - ARM Linux admin <linux@armlinux.org.uk>,
	"vivien.didelot@gmail.com" <vivien.didelot@gmail.com>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"olteanv@gmail.com" <olteanv@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] net: dsa: mv88e6xxx: Don't force link when using in-band-status
Date: Tue, 20 Oct 2020 23:15:50 +0200	[thread overview]
Message-ID: <20201020211550.GA456889@lunn.ch> (raw)
In-Reply-To: <5a59f96e-070b-25d8-7921-64f7dc4516c6@alliedtelesis.co.nz>

Hi Chris

> So far I've not needed to use interrupts from the 6097. It's connected 
> on my hardware but never been tested.

The mv88e6xxx driver will also poll the interrupt bits, if the
interrupt is not wired to a GPIO.

> There are a couple of SERDES LinkInt bits in the Global2 interrupt
> source/mask register which look as though they should fire.

Sounds good. Maybe more 6352 code you can copy.

> > If you can use that, you can then be more in line with the other
> > implementations and not need this change.

> My particular problem was actually on the other end of the link (which 
> is a 98dx160 that doesn't currently have a dsa driver). When the link 
> was forced on the 6097 end it would only link up if the 6097 came up 
> after the dx160. Are you saying there is a way of avoiding the call to 
> mv88e6xxx_mac_link_up() if I have interrupts for the serdes ports?

If you have all the code in place, what should happen is that the PCS
is powered up. It will try to establish a link with its peer. phylink
will also call serdes_pcs_an_restart() function to kick off auto-neg
on the PCS link. Once link is established, you should get an
interrupt. The interrupt handler then calls
dsa_port_phylink_mac_change() which tells phylink the PCS is now
up. It will use the serdes_pcs_get_state() call to find out what the
PCS pair have agreed on, and then configure the MAC with the same
information, forcing it.

Lets just hope you can do this, given the level of integration of the
PCS and MAC, in that there are no real PCS registers you can play
with.

	Andrew


  reply	other threads:[~2020-10-20 21:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  3:45 [PATCH v3 0/3] net: dsa: mv88e6xxx: serdes link without phy Chris Packham
2020-10-20  3:45 ` [PATCH v3 1/3] net: dsa: mv88e6xxx: Don't force link when using in-band-status Chris Packham
2020-10-20 10:15   ` Russell King - ARM Linux admin
2020-10-20 13:49     ` Marek Behun
2020-10-20 14:05       ` Andrew Lunn
2020-10-20 14:15         ` Russell King - ARM Linux admin
2020-10-20 14:51           ` Marek Behun
2020-10-20 14:58             ` Andrew Lunn
2020-10-20 21:04               ` Chris Packham
2020-10-20 21:15                 ` Andrew Lunn [this message]
2020-10-20 21:06             ` Chris Packham
2020-10-20 21:18               ` Russell King - ARM Linux admin
2020-10-21  2:20                 ` Chris Packham
2020-10-20  3:45 ` [PATCH v3 2/3] net: dsa: mv88e6xxx: Support serdes ports on MV88E6097/6095/6185 Chris Packham
2020-10-20  3:45 ` [PATCH v3 3/3] net: dsa: mv88e6xxx: Support serdes ports on MV88E6123/6131 Chris Packham
2020-10-20 10:18   ` Russell King - ARM Linux admin
2020-10-20 21:24     ` Chris Packham
2020-10-20 21:34       ` Russell King - ARM Linux admin

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=20201020211550.GA456889@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Chris.Packham@alliedtelesis.co.nz \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marek.behun@nic.cz \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.