All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: "Voon, Weifeng" <weifeng.voon@intel.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Ong, Boon Leong" <boon.leong.ong@intel.com>,
	"Kweh, Hock Leong" <hock.leong.kweh@intel.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>
Subject: RE: [PATCH 4/7] net: stmmac: introducing support for DWC xPCS logics
Date: Mon, 29 Apr 2019 13:23:26 +0000	[thread overview]
Message-ID: <78EB27739596EE489E55E81C33FEC33A0B46E26B@DE02WEMBXB.internal.synopsys.com> (raw)
In-Reply-To: <D6759987A7968C4889FDA6FA91D5CBC8146EF0A8@PGSMSX103.gar.corp.intel.com>

From: Voon, Weifeng <weifeng.voon@intel.com>
Date: Thu, Apr 25, 2019 at 08:06:43

> > From: Ong Boon Leong <boon.leong.ong@intel.com>
> > 
> > xPCS is DWC Ethernet Physical Coding Sublayer that may be integrated into a
> > GbE controller that uses DWC EQoS MAC controller. An example of HW
> > configuration is shown below:-
> > 
> >   <-----------------GBE Controller---------->|<--External PHY chip-->
> > 
> >   +----------+         +----+    +---+               +--------------+
> >   |   EQoS   | <-GMII->|xPCS|<-->|L1 | <-- SGMII --> | External GbE |
> >   |   MAC    |         |    |    |PHY|               | PHY Chip     |
> >   +----------+         +----+    +---+               +--------------+
> >          ^               ^                                  ^
> >          |               |                                  |
> >          +---------------------MDIO-------------------------+
> > 
> > xPCS is a Clause-45 MDIO Manageable Device (MMD) and we need a way to
> > differentiate it from external PHY chip that is discovered over MDIO.
> > Therefore, xpcs_phy_addr is introduced in stmmac platform data
> > (plat_stmmacenet_data) for differentiating xPCS from 'phy_addr' that
> > belongs to external PHY.
> > 
> > Basic functionalities for initializing xPCS and configuring auto negotiation (AN),
> > loopback, link status, AN advertisement and Link Partner ability are
> > implemented.
> > 
> > xPCS interrupt handling for C37 AN complete is also implemented.
> > 
> > Tested-by: Kweh Hock Leong <hock.leong.kweh@intel.com>
> > Reviewed-by: Chuah Kim Tatt <kim.tatt.chuah@intel.com>
> > Reviewed-by: Voon Weifeng <weifeng.voon@intel.com>
> > Reviewed-by: Kweh Hock Leong <hock.leong.kweh@intel.com>
> > Reviewed-by: Baoli Zhang <baoli.zhang@intel.com>
> > Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
> > ---
> >  drivers/net/ethernet/stmicro/stmmac/dw_xpcs.h | 288
> > ++++++++++++++++++++++++++
> >  drivers/net/ethernet/stmicro/stmmac/hwif.h    |  17 ++
> >  include/linux/stmmac.h                        |   1 +
> >  3 files changed, 306 insertions(+)
> >  create mode 100644 drivers/net/ethernet/stmicro/stmmac/dw_xpcs.h
> > 
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dw_xpcs.h
> > b/drivers/net/ethernet/stmicro/stmmac/dw_xpcs.h
> > new file mode 100644
> > index 0000000..446b714
> > --- /dev/null
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dw_xpcs.h

I would rather prefer see this as a .c file and then just export a new 
structure for HWIF because this does not belong to the MAC. Is there any 
specific reason why you added this as a .h file besides the reuse of 
callbacks across cores ?

And having inline functions everywhere seems overkill also.

Thanks,
Jose Miguel Abreu

  reply	other threads:[~2019-04-29 13:23 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24 17:17 [PATCH 0/7] net: stmmac: enable EHL SGMII Weifeng Voon
2019-04-24  9:26 ` Jose Abreu
2019-04-24 13:48 ` Andrew Lunn
2019-04-25  7:27   ` Voon, Weifeng
2019-04-25 12:38     ` Andrew Lunn
2019-04-25 14:39       ` Ong, Boon Leong
2019-04-25 15:23         ` Andrew Lunn
2019-04-29  5:37           ` Ong, Boon Leong
2019-04-29 13:10             ` Andrew Lunn
2019-04-29 13:44               ` Jose Abreu
2019-04-24 17:17 ` [PATCH 1/7] net: stmmac: add EHL SGMII 1Gbps platform data and PCI ID Weifeng Voon
2019-04-25  7:04   ` Voon, Weifeng
2019-04-25 12:24     ` Andrew Lunn
2019-04-26  2:10       ` Voon, Weifeng
2019-04-24 17:17 ` [PATCH 2/7] net: stmmac: enable clause 45 mdio support Weifeng Voon
2019-04-24 13:18   ` Andrew Lunn
2019-04-25  7:12     ` Voon, Weifeng
2019-04-24 17:17 ` [PATCH 3/7] net: stmmac: dma channel control register need to be init first Weifeng Voon
2019-04-25  7:06   ` Voon, Weifeng
2019-04-29 10:25     ` Jose Abreu
2019-04-30  2:49       ` Voon, Weifeng
2019-04-24 17:17 ` [PATCH 4/7] net: stmmac: introducing support for DWC xPCS logics Weifeng Voon
2019-04-24 13:41   ` Andrew Lunn
2019-04-25  1:45     ` Ong, Boon Leong
2019-04-25  3:21       ` Andrew Lunn
2019-04-25  6:51         ` Ong, Boon Leong
2019-04-25 12:22           ` Andrew Lunn
2019-04-25  7:06   ` Voon, Weifeng
2019-04-29 13:23     ` Jose Abreu [this message]
2019-04-24 17:17 ` [PATCH 5/7] net: stmmac: add xpcs function hooks into main driver and ethtool Weifeng Voon
2019-04-25  7:07   ` Voon, Weifeng
2019-04-24 17:17 ` [PATCH 6/7] net: stmmac: add xPCS platform data for EHL Weifeng Voon
2019-04-25  7:08   ` Voon, Weifeng
2019-04-24 17:17 ` [PATCH 7/7] net: stmmac: add xPCS functions for device with DWMACv5.1 Weifeng Voon
2019-04-25  7:09   ` Voon, Weifeng
2019-04-25  7:00 ` [PATCH 0/7] net: stmmac: enable EHL SGMII Voon, Weifeng

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=78EB27739596EE489E55E81C33FEC33A0B46E26B@DE02WEMBXB.internal.synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=andrew@lunn.ch \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hock.leong.kweh@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=weifeng.voon@intel.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.