netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Milind Parab <mparab@cadence.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Nicolas.Ferre@microchip.com" <Nicolas.Ferre@microchip.com>,
	"antoine.tenart@bootlin.com" <antoine.tenart@bootlin.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Dhananjay Vilasrao Kangude <dkangude@cadence.com>,
	Parshuram Raju Thombare <pthombar@cadence.com>,
	"rmk+kernel@arm.linux.org.uk" <rmk+kernel@arm.linux.org.uk>
Subject: RE: [PATCH 2/3] net: macb: add support for C45 MDIO read/write
Date: Fri, 29 Nov 2019 10:02:18 +0000	[thread overview]
Message-ID: <BY5PR07MB6514E3FB613AFD01FD8DEA70D3460@BY5PR07MB6514.namprd07.prod.outlook.com> (raw)
In-Reply-To: <20191128145246.GD3420@lunn.ch>

>
>> This patch doesn't affect current C22 operation of the driver.
>> However if a user selects C45 on incompatible MAC (there are old MAC,
>prior to Release1p10, released 10th April 2003) MDIO operations may fails.
>
>How do they fail? Lockup the chip and require a cold boot? Timeout after
>10ms and return -ETIMEOUT?
>
No such catastrophic failure will happen. Failure will only on the possible response from the PHY.
Hence, it is safe to assume all versions of the MAC (old and new) using the GPL driver support both Clause 22 and Clause 45 operation.
Whether the access is in Clause 22 or Clause 45 format depends on the data pattern written to the PHY management register.

On response from PHY which would depend on the Start of Frame SOF
The relevant parts of the IEEE 802.3 standard are for identifying Clause 22 and Clause 45 operation is here:
22.2.4.5.3 ST (start of frame) 
The start of frame is indicated by a <01> pattern. This pattern assures transitions from the default logic one line state to zero and back to one.

45.3.3 ST (start of frame)
The start of frame for indirect access cycles is indicated by the <00> pattern. This pattern assures a transition from the default one and identifies the frame as an indirect access. Frames that contain the ST=<01> pattern defined in Clause 22 shall be ignored by the devices specified in Clause 45.

>Currently, there is nothing stopping a C45 access to happen. There has been
>talk of making the probe for C45 PHYs the same as C22, scan the bus. I guess
>that would be implemented by adding a flag to each MDIO bus driver
>indicating it supports C45. All 32 addresses would then be probed using C45 as
>well as C22. So we need to be sure it is safe to use C45 on these older devices.
>
>      Andrew

  reply	other threads:[~2019-11-29 10:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-26  9:09 [PATCH 0/3] net: macb: cover letter Milind Parab
2019-11-26  9:09 ` [PATCH 1/3] net: macb: fix for fixed-link mode Milind Parab
2019-11-26 14:30   ` Andrew Lunn
2019-11-27 18:02   ` Nicolas.Ferre
2019-11-28  6:50     ` Milind Parab
2019-11-26  9:09 ` [PATCH 2/3] net: macb: add support for C45 MDIO read/write Milind Parab
2019-11-26 14:37   ` Andrew Lunn
2019-11-27 18:31     ` Nicolas.Ferre
2019-11-27 18:51       ` Andrew Lunn
2019-11-28  8:29         ` Milind Parab
2019-11-28 14:52           ` Andrew Lunn
2019-11-29 10:02             ` Milind Parab [this message]
2019-11-26  9:09 ` [PATCH 3/3] net: macb: add support for high speed interface Milind Parab
2019-11-26 18:09 ` [PATCH 0/3] net: macb: cover letter David Miller
2019-12-09 11:13 [PATCH 0/3] net: macb: fix for fixed link, support for c45 mdio and 10G Milind Parab
2019-12-09 11:15 ` [PATCH 2/3] net: macb: add support for C45 MDIO read/write Milind Parab

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=BY5PR07MB6514E3FB613AFD01FD8DEA70D3460@BY5PR07MB6514.namprd07.prod.outlook.com \
    --to=mparab@cadence.com \
    --cc=Nicolas.Ferre@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=dkangude@cadence.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pthombar@cadence.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    /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).