netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Robert Hancock <robert.hancock@calian.com>
Cc: "linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"michal.simek@xilinx.com" <michal.simek@xilinx.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"radhey.shyam.pandey@xilinx.com" <radhey.shyam.pandey@xilinx.com>
Subject: Re: [PATCH] net: axienet: Properly handle PCS/PMA PHY for 1000BaseX mode
Date: Tue, 20 Oct 2020 00:04:42 +0200	[thread overview]
Message-ID: <20201019220442.GA139700@lunn.ch> (raw)
In-Reply-To: <c989910aee122cfa9d29994d9ce650ce486442ca.camel@calian.com>

> > Hi Robert
> > 
> > That looks like a layering violation. Maybe move this into
> > phylink_mii_c22_pcs_config(), it is accessing MII_BMCR anyway.
> 
> Could do - do we think there's any harm in just disabling BMCR_ISOLATE
> in all cases in that function?

We have something similar in phylib:

/**
 * genphy_restart_aneg - Enable and Restart Autonegotiation
 * @phydev: target phy_device struct
 */
int genphy_restart_aneg(struct phy_device *phydev)
{
        /* Don't isolate the PHY if we're negotiating */
        return phy_modify(phydev, MII_BMCR, BMCR_ISOLATE,
                          BMCR_ANENABLE | BMCR_ANRESTART);
}

so i think it would also be safe in PCS code.

   Andrew

      reply	other threads:[~2020-10-19 22:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 20:39 [PATCH] net: axienet: Properly handle PCS/PMA PHY for 1000BaseX mode Robert Hancock
2020-10-19 21:36 ` Andrew Lunn
2020-10-19 21:48   ` Robert Hancock
2020-10-19 22:04     ` Andrew Lunn [this message]

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=20201019220442.GA139700@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michal.simek@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=radhey.shyam.pandey@xilinx.com \
    --cc=robert.hancock@calian.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).