All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/8] net: phy: mscc: PHC and timestamping support
@ 2020-06-23 14:30 Antoine Tenart
  2020-06-23 14:30 ` [PATCH net-next v4 1/8] net: phy: add support for a common probe between shared PHYs Antoine Tenart
                   ` (8 more replies)
  0 siblings, 9 replies; 16+ messages in thread
From: Antoine Tenart @ 2020-06-23 14:30 UTC (permalink / raw)
  To: davem, andrew, f.fainelli, hkallweit1, richardcochran,
	alexandre.belloni, UNGLinuxDriver
  Cc: netdev, linux-kernel, thomas.petazzoni, allan.nielsen, foss,
	antoine.tenart

Hello,

This series aims at adding support for PHC and timestamping operations
in the MSCC PHY driver, for the VSC858x and VSC8575. Those PHYs are
capable of timestamping in 1-step and 2-step for both L2 and L4 traffic.

As of this series, only IPv4 support was implemented when using L4 mode.
This is because of an hardware limitation which prevents us for
supporting both IPv4 and IPv6 at the same time. Implementing support for
IPv6 should be quite easy (I do have the modifications needed for the
hardware configuration) but I did not see a way to retrieve this
information in hwtstamp(). What would you suggest?

Those PHYs are distributed in hardware packages containing multiple
times the PHY. The VSC8584 for example is composed of 4 PHYs. With
hardware packages, parts of the logic is usually common and one of the
PHY has to be used for some parts of the initialization. Following this
logic, the 1588 blocks of those PHYs are shared between two PHYs and
accessing the registers has to be done using the "base" PHY of the
group. This is handled thanks to helpers in the PTP code (and locks).
We also need the MDIO bus lock while performing a single read or write
to the 1588 registers as the read/write are composed of multiple MDIO
transactions (and we don't want other threads updating the page).

To get and set the PHC time, a GPIO has to be used and changes are only
retrieved or committed when on a rising edge. The same GPIO is shared by
all PHYs, so the granularity of the lock protecting it has to be
different from the ones protecting the 1588 registers (the VSC8584 PHY
has 2 1588 blocks, and a single load/save pin).

Patch 1 extends the recently added helpers to share information between
PHYs of the same hardware package; to allow having part of the probe to
be shared (in addition to the already supported init part). This will be
used when adding support for PHC/TS to initialize locks.

Patches 2 and 3 are mostly cosmetic.

Patch 4 takes into account the 1588 block in the MACsec initialization,
to allow having both the MACsec and 1588 blocks initialized on a running
system.

Patches 5 and 6 add support for PHC and timestamping operations in the
MSCC driver. An initialization of the 1588 block (plus all the registers
definition; and helpers) is added first; and then comes a patch to
implement the PHC and timestamping API.

Patches 7 and 8 add the required hardware description for device trees,
to be able to use the load/save GPIO pin on the PCB120 board.

To use this on a PCB120 board, two other series are needed and have
already been sent upstream (one is merged). There are no dependency
between all those series.

Thanks!
Antoine

Since v3:
  - Fixed a SKB leak.
  - Removed ts_lock from the init, as TS and PHC operations aren't
    registered at this time.
  - Refectored the ts_base_addr/phy intialization.
  - Cleaned up the ingr/egr latencies definitons.
  - Fixed a comment about locking and the shared GPIO.
  - A few cosmetic fixes.

Since v2:
  - Removed explicit inlines from .c files.
  - Fixed three warnings.

Since v1:
  - Removed checks in rxtstamp/txtstamp as skb cannot be NULL here.
  - Reworked get_ptp_header_rx/get_ptp_header.
  - Reworked the locking logic between the PHC and timestamping
    operations.
  - Fixed a compilation issue on x86 reported by Jakub.

Antoine Tenart (5):
  net: phy: add support for a common probe between shared PHYs
  net: phy: mscc: fix copyright and author information in MACsec
  net: phy: mscc: take into account the 1588 block in MACsec init
  net: phy: mscc: timestamping and PHC support
  dt-bindings: net: phy: vsc8531: document the load/save GPIO

Quentin Schulz (3):
  net: phy: mscc: remove the TR CLK disable magic value
  net: phy: mscc: 1588 block initialization
  MIPS: dts: ocelot: describe the load/save GPIO

 .../bindings/net/mscc-phy-vsc8531.txt         |    3 +
 arch/mips/boot/dts/mscc/ocelot_pcb120.dts     |   12 +-
 drivers/net/phy/mscc/Makefile                 |    4 +
 drivers/net/phy/mscc/mscc.h                   |   63 +
 drivers/net/phy/mscc/mscc_fc_buffer.h         |    2 +-
 drivers/net/phy/mscc/mscc_mac.h               |    2 +-
 drivers/net/phy/mscc/mscc_macsec.c            |   10 +-
 drivers/net/phy/mscc/mscc_macsec.h            |    2 +-
 drivers/net/phy/mscc/mscc_main.c              |   61 +-
 drivers/net/phy/mscc/mscc_ptp.c               | 1592 +++++++++++++++++
 drivers/net/phy/mscc/mscc_ptp.h               |  477 +++++
 include/linux/phy.h                           |   18 +-
 12 files changed, 2225 insertions(+), 21 deletions(-)
 create mode 100644 drivers/net/phy/mscc/mscc_ptp.c
 create mode 100644 drivers/net/phy/mscc/mscc_ptp.h

-- 
2.26.2


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [PATCH net-next v4 5/8] net: phy: mscc: 1588 block initialization
@ 2020-06-25  2:04 kernel test robot
  0 siblings, 0 replies; 16+ messages in thread
From: kernel test robot @ 2020-06-25  2:04 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 18879 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200623143014.47864-6-antoine.tenart@bootlin.com>
References: <20200623143014.47864-6-antoine.tenart@bootlin.com>
TO: Antoine Tenart <antoine.tenart@bootlin.com>
TO: davem(a)davemloft.net
TO: andrew(a)lunn.ch
TO: f.fainelli(a)gmail.com
TO: hkallweit1(a)gmail.com
TO: richardcochran(a)gmail.com
TO: alexandre.belloni(a)bootlin.com
TO: UNGLinuxDriver(a)microchip.com
CC: netdev(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: thomas.petazzoni(a)bootlin.com

Hi Antoine,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Antoine-Tenart/net-phy-mscc-PHC-and-timestamping-support/20200623-223712
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8af7b4525acf5012b2f111a8b168b8647f2c8d60
:::::: branch date: 35 hours ago
:::::: commit date: 35 hours ago
config: x86_64-randconfig-m001-20200624 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/net/phy/mscc/mscc_main.c:1472 vsc8584_config_init() error: double unlocked 'phydev->mdio.bus->mdio_lock' (orig line 1431)
drivers/net/phy/mscc/mscc_ptp.c:87 vsc85xx_ts_read_csr() error: uninitialized symbol 'blk_hw'.

# https://github.com/0day-ci/linux/commit/b3225965b276bd4f492184090bbac3a117bc77ae
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout b3225965b276bd4f492184090bbac3a117bc77ae
vim +1472 drivers/net/phy/mscc/mscc_main.c

a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1325  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1326  static int vsc8584_config_init(struct phy_device *phydev)
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1327  {
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1328  	struct vsc8531_private *vsc8531 = phydev->priv;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1329  	int ret, i;
deb04e9c0ff2b4 drivers/net/phy/mscc/mscc_main.c Michael Walle     2020-05-06  1330  	u16 val;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1331  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1332  	phydev->mdix_ctrl = ETH_TP_MDI_AUTO;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1333  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1334  	mutex_lock(&phydev->mdio.bus->mdio_lock);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1335  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1336  	/* Some parts of the init sequence are identical for every PHY in the
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1337  	 * package. Some parts are modifying the GPIO register bank which is a
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1338  	 * set of registers that are affecting all PHYs, a few resetting the
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1339  	 * microprocessor common to all PHYs. The CRC check responsible of the
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1340  	 * checking the firmware within the 8051 microprocessor can only be
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1341  	 * accessed via the PHY whose internal address in the package is 0.
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1342  	 * All PHYs' interrupts mask register has to be zeroed before enabling
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1343  	 * any PHY's interrupt in this register.
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1344  	 * For all these reasons, we need to do the init sequence once and only
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1345  	 * once whatever is the first PHY in the package that is initialized and
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1346  	 * do the correct init sequence for all PHYs that are package-critical
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1347  	 * in this pre-init function.
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1348  	 */
deb04e9c0ff2b4 drivers/net/phy/mscc/mscc_main.c Michael Walle     2020-05-06  1349  	if (phy_package_init_once(phydev)) {
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1350  		/* The following switch statement assumes that the lowest
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1351  		 * nibble of the phy_id_mask is always 0. This works because
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1352  		 * the lowest nibble of the PHY_ID's below are also 0.
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1353  		 */
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1354  		WARN_ON(phydev->drv->phy_id_mask & 0xf);
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1355  
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1356  		switch (phydev->phy_id & phydev->drv->phy_id_mask) {
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1357  		case PHY_ID_VSC8504:
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1358  		case PHY_ID_VSC8552:
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1359  		case PHY_ID_VSC8572:
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1360  		case PHY_ID_VSC8574:
00d70d8e0e7811 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1361  			ret = vsc8574_config_pre_init(phydev);
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1362  			break;
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1363  		case PHY_ID_VSC856X:
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1364  		case PHY_ID_VSC8575:
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1365  		case PHY_ID_VSC8582:
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1366  		case PHY_ID_VSC8584:
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1367  			ret = vsc8584_config_pre_init(phydev);
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1368  			break;
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1369  		default:
00d70d8e0e7811 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1370  			ret = -EINVAL;
75a1ccfe6c726b drivers/net/phy/mscc.c           Bryan Whitehead   2019-11-13  1371  			break;
1e8795b1b20d27 drivers/net/phy/mscc.c           kbuild test robot 2019-11-16  1372  		}
00d70d8e0e7811 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1373  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1374  		if (ret)
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1375  			goto err;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1376  	}
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1377  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1378  	phy_base_write(phydev, MSCC_EXT_PAGE_ACCESS,
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1379  		       MSCC_PHY_PAGE_EXTENDED_GPIO);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1380  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1381  	val = phy_base_read(phydev, MSCC_PHY_MAC_CFG_FASTLINK);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1382  	val &= ~MAC_CFG_MASK;
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1383  	if (phydev->interface == PHY_INTERFACE_MODE_QSGMII) {
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1384  		val |= MAC_CFG_QSGMII;
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1385  	} else if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1386  		val |= MAC_CFG_SGMII;
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1387  	} else if (phy_interface_is_rgmii(phydev)) {
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1388  		val |= MAC_CFG_RGMII;
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1389  	} else {
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1390  		ret = -EINVAL;
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1391  		goto err;
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1392  	}
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1393  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1394  	ret = phy_base_write(phydev, MSCC_PHY_MAC_CFG_FASTLINK, val);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1395  	if (ret)
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1396  		goto err;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1397  
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1398  	if (!phy_interface_is_rgmii(phydev)) {
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1399  		val = PROC_CMD_MCB_ACCESS_MAC_CONF | PROC_CMD_RST_CONF_PORT |
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1400  			PROC_CMD_READ_MOD_WRITE_PORT;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1401  		if (phydev->interface == PHY_INTERFACE_MODE_QSGMII)
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1402  			val |= PROC_CMD_QSGMII_MAC;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1403  		else
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1404  			val |= PROC_CMD_SGMII_MAC;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1405  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1406  		ret = vsc8584_cmd(phydev, val);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1407  		if (ret)
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1408  			goto err;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1409  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1410  		usleep_range(10000, 20000);
e8e4223046e19d drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1411  	}
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1412  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1413  	/* Disable SerDes for 100Base-FX */
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1414  	ret = vsc8584_cmd(phydev, PROC_CMD_FIBER_MEDIA_CONF |
49113d5e0c3f3f drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-06-05  1415  			  PROC_CMD_FIBER_PORT(vsc8531->addr) |
deb04e9c0ff2b4 drivers/net/phy/mscc/mscc_main.c Michael Walle     2020-05-06  1416  			  PROC_CMD_FIBER_DISABLE |
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1417  			  PROC_CMD_READ_MOD_WRITE_PORT |
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1418  			  PROC_CMD_RST_CONF_PORT | PROC_CMD_FIBER_100BASE_FX);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1419  	if (ret)
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1420  		goto err;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1421  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1422  	/* Disable SerDes for 1000Base-X */
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1423  	ret = vsc8584_cmd(phydev, PROC_CMD_FIBER_MEDIA_CONF |
49113d5e0c3f3f drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-06-05  1424  			  PROC_CMD_FIBER_PORT(vsc8531->addr) |
deb04e9c0ff2b4 drivers/net/phy/mscc/mscc_main.c Michael Walle     2020-05-06  1425  			  PROC_CMD_FIBER_DISABLE |
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1426  			  PROC_CMD_READ_MOD_WRITE_PORT |
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1427  			  PROC_CMD_RST_CONF_PORT | PROC_CMD_FIBER_1000BASE_X);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1428  	if (ret)
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1429  		goto err;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1430  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08 @1431  	mutex_unlock(&phydev->mdio.bus->mdio_lock);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1432  
1bbe0ecc2a1a00 drivers/net/phy/mscc.c           Antoine Tenart    2020-01-13  1433  	ret = vsc8584_macsec_init(phydev);
1bbe0ecc2a1a00 drivers/net/phy/mscc.c           Antoine Tenart    2020-01-13  1434  	if (ret)
fa164e40c53b38 drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-13  1435  		return ret;
1bbe0ecc2a1a00 drivers/net/phy/mscc.c           Antoine Tenart    2020-01-13  1436  
b3225965b276bd drivers/net/phy/mscc/mscc_main.c Quentin Schulz    2020-06-23  1437  	ret = vsc8584_ptp_init(phydev);
b3225965b276bd drivers/net/phy/mscc/mscc_main.c Quentin Schulz    2020-06-23  1438  	if (ret)
b3225965b276bd drivers/net/phy/mscc/mscc_main.c Quentin Schulz    2020-06-23  1439  		goto err;
b3225965b276bd drivers/net/phy/mscc/mscc_main.c Quentin Schulz    2020-06-23  1440  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1441  	phy_write(phydev, MSCC_EXT_PAGE_ACCESS, MSCC_PHY_PAGE_STANDARD);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1442  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1443  	val = phy_read(phydev, MSCC_PHY_EXT_PHY_CNTL_1);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1444  	val &= ~(MEDIA_OP_MODE_MASK | VSC8584_MAC_IF_SELECTION_MASK);
1ac7b090ec4618 drivers/net/phy/mscc.c           Antoine Tenart    2020-02-26  1445  	val |= (MEDIA_OP_MODE_COPPER << MEDIA_OP_MODE_POS) |
1ac7b090ec4618 drivers/net/phy/mscc.c           Antoine Tenart    2020-02-26  1446  	       (VSC8584_MAC_IF_SELECTION_SGMII << VSC8584_MAC_IF_SELECTION_POS);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1447  	ret = phy_write(phydev, MSCC_PHY_EXT_PHY_CNTL_1, val);
09d65e6d631c05 drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1448  	if (ret)
09d65e6d631c05 drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1449  		return ret;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1450  
2283a02b67d412 drivers/net/phy/mscc/mscc_main.c Vladimir Oltean   2020-03-24  1451  	if (phy_interface_is_rgmii(phydev)) {
2283a02b67d412 drivers/net/phy/mscc/mscc_main.c Vladimir Oltean   2020-03-24  1452  		ret = vsc85xx_rgmii_set_skews(phydev, VSC8572_RGMII_CNTL,
2283a02b67d412 drivers/net/phy/mscc/mscc_main.c Vladimir Oltean   2020-03-24  1453  					      VSC8572_RGMII_RX_DELAY_MASK,
2283a02b67d412 drivers/net/phy/mscc/mscc_main.c Vladimir Oltean   2020-03-24  1454  					      VSC8572_RGMII_TX_DELAY_MASK);
2283a02b67d412 drivers/net/phy/mscc/mscc_main.c Vladimir Oltean   2020-03-24  1455  		if (ret)
2283a02b67d412 drivers/net/phy/mscc/mscc_main.c Vladimir Oltean   2020-03-24  1456  			return ret;
2283a02b67d412 drivers/net/phy/mscc/mscc_main.c Vladimir Oltean   2020-03-24  1457  	}
dee48f78d02e15 drivers/net/phy/mscc/mscc_main.c Antoine Tenart    2020-03-19  1458  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1459  	ret = genphy_soft_reset(phydev);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1460  	if (ret)
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1461  		return ret;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1462  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1463  	for (i = 0; i < vsc8531->nleds; i++) {
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1464  		ret = vsc85xx_led_cntl_set(phydev, i, vsc8531->leds_mode[i]);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1465  		if (ret)
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1466  			return ret;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1467  	}
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1468  
c227ce4423855b drivers/net/phy/mscc.c           Heiner Kallweit   2019-08-17  1469  	return 0;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1470  
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1471  err:
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08 @1472  	mutex_unlock(&phydev->mdio.bus->mdio_lock);
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1473  	return ret;
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1474  }
a5afc1678044a3 drivers/net/phy/mscc.c           Quentin Schulz    2018-10-08  1475  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33424 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-06-25 13:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-23 14:30 [PATCH net-next v4 0/8] net: phy: mscc: PHC and timestamping support Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 1/8] net: phy: add support for a common probe between shared PHYs Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 2/8] net: phy: mscc: fix copyright and author information in MACsec Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 3/8] net: phy: mscc: remove the TR CLK disable magic value Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 4/8] net: phy: mscc: take into account the 1588 block in MACsec init Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 5/8] net: phy: mscc: 1588 block initialization Antoine Tenart
2020-06-25 11:52   ` Dan Carpenter
2020-06-25 11:52     ` Dan Carpenter
2020-06-25 11:52     ` Dan Carpenter
2020-06-23 14:30 ` [PATCH net-next v4 6/8] net: phy: mscc: timestamping and PHC support Antoine Tenart
2020-06-25 13:22   ` Richard Cochran
2020-06-25 13:38     ` Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 7/8] dt-bindings: net: phy: vsc8531: document the load/save GPIO Antoine Tenart
2020-06-23 14:30 ` [PATCH net-next v4 8/8] MIPS: dts: ocelot: describe " Antoine Tenart
2020-06-24 21:33 ` [PATCH net-next v4 0/8] net: phy: mscc: PHC and timestamping support David Miller
  -- strict thread matches above, loose matches on Subject: below --
2020-06-25  2:04 [PATCH net-next v4 5/8] net: phy: mscc: 1588 block initialization kernel test robot

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.