From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752484AbeACPu7 convert rfc822-to-8bit (ORCPT + 1 other); Wed, 3 Jan 2018 10:50:59 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:38116 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751263AbeACPu6 (ORCPT ); Wed, 3 Jan 2018 10:50:58 -0500 From: Stefan Chulski To: Antoine Tenart , Andrew Lunn CC: "davem@davemloft.net" , "kishon@ti.com" , "gregory.clement@free-electrons.com" , "linux@armlinux.org.uk" , "mw@semihalf.com" , Yan Markman , "thomas.petazzoni@free-electrons.com" , "miquel.raynal@free-electrons.com" , Nadav Haklai , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [EXT] Re: [PATCH net-next v2 4/4] net: mvpp2: 2500baseX support Thread-Topic: [EXT] Re: [PATCH net-next v2 4/4] net: mvpp2: 2500baseX support Thread-Index: AQHThKT23sngk7zJWUy4CRaTHRlkk6NiIf4AgAADT4CAACWWIA== Date: Wed, 3 Jan 2018 15:50:35 +0000 Message-ID: <6a14004f0f70462b88136162eeae1ee1@IL-EXCH01.marvell.com> References: <20180103150750.12974-1-antoine.tenart@free-electrons.com> <20180103150750.12974-5-antoine.tenart@free-electrons.com> <20180103152036.GC3401@lunn.ch> <20180103153227.GA9227@kwain> In-Reply-To: <20180103153227.GA9227@kwain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.5.102.207] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-03_12:,, signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801030222 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > -----Original Message----- > From: Antoine Tenart [mailto:antoine.tenart@free-electrons.com] > Sent: Wednesday, January 03, 2018 5:32 PM > To: Andrew Lunn > Cc: Antoine Tenart ; > davem@davemloft.net; kishon@ti.com; gregory.clement@free-electrons.com; > linux@armlinux.org.uk; mw@semihalf.com; Stefan Chulski > ; Yan Markman ; > thomas.petazzoni@free-electrons.com; miquel.raynal@free-electrons.com; > Nadav Haklai ; netdev@vger.kernel.org; linux- > kernel@vger.kernel.org > Subject: [EXT] Re: [PATCH net-next v2 4/4] net: mvpp2: 2500baseX support > > External Email > > ---------------------------------------------------------------------- > Hi Andrew, > > On Wed, Jan 03, 2018 at 04:20:36PM +0100, Andrew Lunn wrote: > > > @@ -4612,6 +4616,9 @@ static int mvpp22_comphy_init(struct > mvpp2_port *port) > > > case PHY_INTERFACE_MODE_1000BASEX: > > > mode = PHY_MODE_SGMII; > > > break; > > > + case PHY_INTERFACE_MODE_2500BASEX: > > > + mode = PHY_MODE_2500SGMII; > > > + break; > > > > I think this is the source of confusion with linux/phy.h and > > linux/phy/phy.h. > > > > What would PHY_INTERFACE_MODE_2500SGMII use? > > > > Where is this all getting confused? Should the caller to > > mvpp22_comphy_init() actually be passing > PHY_INTERFACE_MODE_2500SGMII? > > What is the MAC actually doing at this point? 2500BASEX or 2500SGMII? > > PHY_INTERFACE_MODE_2500BASEX is the PHY mode whereas > PHY_MODE_2500SGMII is the mode used by the common PHY driver (i.e. the > one configuring the serdes lanes). > > There's no PHY_INTERFACE_MODE_2500SGMII mode. > > > At minimum there needs to be a comment that this is not a typ0, > > otherwise you are going to get patches submitted to 'fix' this. > > Sure, I can add a comment to state this function is a translation between the > net PHY mode and the generic PHY mode (it's a n-to-1 translation). > Maybe we should rename enum phy_mode to comphy_mode and PHY_MODE_2500SGMII to COMPHY_MODE_2500SGMII. Since this enum set MAC to PHY serdes communication mode, not PHY to PHY communication mode. Stefan. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Chulski Subject: RE: [EXT] Re: [PATCH net-next v2 4/4] net: mvpp2: 2500baseX support Date: Wed, 3 Jan 2018 15:50:35 +0000 Message-ID: <6a14004f0f70462b88136162eeae1ee1@IL-EXCH01.marvell.com> References: <20180103150750.12974-1-antoine.tenart@free-electrons.com> <20180103150750.12974-5-antoine.tenart@free-electrons.com> <20180103152036.GC3401@lunn.ch> <20180103153227.GA9227@kwain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Cc: "davem@davemloft.net" , "kishon@ti.com" , "gregory.clement@free-electrons.com" , "linux@armlinux.org.uk" , "mw@semihalf.com" , Yan Markman , "thomas.petazzoni@free-electrons.com" , "miquel.raynal@free-electrons.com" , Nadav Haklai , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" To: Antoine Tenart , Andrew Lunn Return-path: In-Reply-To: <20180103153227.GA9227@kwain> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org > -----Original Message----- > From: Antoine Tenart [mailto:antoine.tenart@free-electrons.com] > Sent: Wednesday, January 03, 2018 5:32 PM > To: Andrew Lunn > Cc: Antoine Tenart ; > davem@davemloft.net; kishon@ti.com; gregory.clement@free-electrons.com; > linux@armlinux.org.uk; mw@semihalf.com; Stefan Chulski > ; Yan Markman ; > thomas.petazzoni@free-electrons.com; miquel.raynal@free-electrons.com; > Nadav Haklai ; netdev@vger.kernel.org; linux- > kernel@vger.kernel.org > Subject: [EXT] Re: [PATCH net-next v2 4/4] net: mvpp2: 2500baseX support > > External Email > > ---------------------------------------------------------------------- > Hi Andrew, > > On Wed, Jan 03, 2018 at 04:20:36PM +0100, Andrew Lunn wrote: > > > @@ -4612,6 +4616,9 @@ static int mvpp22_comphy_init(struct > mvpp2_port *port) > > > case PHY_INTERFACE_MODE_1000BASEX: > > > mode = PHY_MODE_SGMII; > > > break; > > > + case PHY_INTERFACE_MODE_2500BASEX: > > > + mode = PHY_MODE_2500SGMII; > > > + break; > > > > I think this is the source of confusion with linux/phy.h and > > linux/phy/phy.h. > > > > What would PHY_INTERFACE_MODE_2500SGMII use? > > > > Where is this all getting confused? Should the caller to > > mvpp22_comphy_init() actually be passing > PHY_INTERFACE_MODE_2500SGMII? > > What is the MAC actually doing at this point? 2500BASEX or 2500SGMII? > > PHY_INTERFACE_MODE_2500BASEX is the PHY mode whereas > PHY_MODE_2500SGMII is the mode used by the common PHY driver (i.e. the > one configuring the serdes lanes). > > There's no PHY_INTERFACE_MODE_2500SGMII mode. > > > At minimum there needs to be a comment that this is not a typ0, > > otherwise you are going to get patches submitted to 'fix' this. > > Sure, I can add a comment to state this function is a translation between the > net PHY mode and the generic PHY mode (it's a n-to-1 translation). > Maybe we should rename enum phy_mode to comphy_mode and PHY_MODE_2500SGMII to COMPHY_MODE_2500SGMII. Since this enum set MAC to PHY serdes communication mode, not PHY to PHY communication mode. Stefan.