summaryrefslogtreecommitdiff
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-11-18 18:38:05 -0800
committerJakub Kicinski <kuba@kernel.org>2023-11-18 18:42:37 -0800
commit289354f21b2c3fac93e956efd45f256a88a4d997 (patch)
treedd510eeb40fcddad875a20b1a46dfd118b0620eb /drivers/net/phy
parent055dd7511f675d26fa283b35bb3dadfc7f77ed97 (diff)
net: partial revert of the "Make timestamping selectable: series
Revert following commits: commit acec05fb78ab ("net_tstamp: Add TIMESTAMPING SOFTWARE and HARDWARE mask") commit 11d55be06df0 ("net: ethtool: Add a command to expose current time stamping layer") commit bb8645b00ced ("netlink: specs: Introduce new netlink command to get current timestamp") commit d905f9c75329 ("net: ethtool: Add a command to list available time stamping layers") commit aed5004ee7a0 ("netlink: specs: Introduce new netlink command to list available time stamping layers") commit 51bdf3165f01 ("net: Replace hwtstamp_source by timestamping layer") commit 0f7f463d4821 ("net: Change the API of PHY default timestamp to MAC") commit 091fab122869 ("net: ethtool: ts: Update GET_TS to reply the current selected timestamp") commit 152c75e1d002 ("net: ethtool: ts: Let the active time stamping layer be selectable") commit ee60ea6be0d3 ("netlink: specs: Introduce time stamping set command") They need more time for reviews. Link: https://lore.kernel.org/all/20231118183529.6e67100c@kernel.org/ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/bcm-phy-ptp.c3
-rw-r--r--drivers/net/phy/dp83640.c3
-rw-r--r--drivers/net/phy/micrel.c6
-rw-r--r--drivers/net/phy/mscc/mscc_ptp.c2
-rw-r--r--drivers/net/phy/nxp-c45-tja11xx.c3
-rw-r--r--drivers/net/phy/phy_device.c37
6 files changed, 0 insertions, 54 deletions
diff --git a/drivers/net/phy/bcm-phy-ptp.c b/drivers/net/phy/bcm-phy-ptp.c
index d3e825c951ee..617d384d4551 100644
--- a/drivers/net/phy/bcm-phy-ptp.c
+++ b/drivers/net/phy/bcm-phy-ptp.c
@@ -931,9 +931,6 @@ struct bcm_ptp_private *bcm_ptp_probe(struct phy_device *phydev)
return ERR_CAST(clock);
priv->ptp_clock = clock;
- /* Timestamp selected by default to keep legacy API */
- phydev->default_timestamp = true;
-
priv->phydev = phydev;
bcm_ptp_init(priv);
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index 64fd1a109c0f..5c42c47dc564 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1450,9 +1450,6 @@ static int dp83640_probe(struct phy_device *phydev)
phydev->mii_ts = &dp83640->mii_ts;
phydev->priv = dp83640;
- /* Timestamp selected by default to keep legacy API */
- phydev->default_timestamp = true;
-
spin_lock_init(&dp83640->rx_lock);
skb_queue_head_init(&dp83640->rx_queue);
skb_queue_head_init(&dp83640->tx_queue);
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 2b8dd0131926..bd4cd082662f 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -3158,9 +3158,6 @@ static void lan8814_ptp_init(struct phy_device *phydev)
ptp_priv->mii_ts.ts_info = lan8814_ts_info;
phydev->mii_ts = &ptp_priv->mii_ts;
-
- /* Timestamp selected by default to keep legacy API */
- phydev->default_timestamp = true;
}
static int lan8814_ptp_probe_once(struct phy_device *phydev)
@@ -4589,9 +4586,6 @@ static int lan8841_probe(struct phy_device *phydev)
phydev->mii_ts = &ptp_priv->mii_ts;
- /* Timestamp selected by default to keep legacy API */
- phydev->default_timestamp = true;
-
return 0;
}
diff --git a/drivers/net/phy/mscc/mscc_ptp.c b/drivers/net/phy/mscc/mscc_ptp.c
index fd174eb06d4a..eb0b032cb613 100644
--- a/drivers/net/phy/mscc/mscc_ptp.c
+++ b/drivers/net/phy/mscc/mscc_ptp.c
@@ -1570,8 +1570,6 @@ int vsc8584_ptp_probe(struct phy_device *phydev)
return PTR_ERR(vsc8531->load_save);
}
- /* Timestamp selected by default to keep legacy API */
- phydev->default_timestamp = true;
vsc8531->ptp->phydev = phydev;
return 0;
diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c
index 0515c7b979db..780ad353cf55 100644
--- a/drivers/net/phy/nxp-c45-tja11xx.c
+++ b/drivers/net/phy/nxp-c45-tja11xx.c
@@ -1658,9 +1658,6 @@ static int nxp_c45_probe(struct phy_device *phydev)
priv->mii_ts.ts_info = nxp_c45_ts_info;
phydev->mii_ts = &priv->mii_ts;
ret = nxp_c45_init_ptp_clock(priv);
-
- /* Timestamp selected by default to keep legacy API */
- phydev->default_timestamp = true;
} else {
phydev_dbg(phydev, "PTP support not enabled even if the phy supports it");
}
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 8c4794631daa..2ce74593d6e4 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1412,26 +1412,6 @@ int phy_sfp_probe(struct phy_device *phydev,
EXPORT_SYMBOL(phy_sfp_probe);
/**
- * phy_set_timestamp - set the default selected timestamping device
- * @dev: Pointer to net_device
- * @phydev: Pointer to phy_device
- *
- * This is used to set default timestamping device taking into account
- * the new API choice, which is selecting the timestamping from MAC by
- * default if the phydev does not have default_timestamp flag enabled.
- */
-static void phy_set_timestamp(struct net_device *dev, struct phy_device *phydev)
-{
- const struct ethtool_ops *ops = dev->ethtool_ops;
-
- if (!phy_has_tsinfo(phydev))
- return;
-
- if (!ops->get_ts_info || phydev->default_timestamp)
- dev->ts_layer = PHY_TIMESTAMPING;
-}
-
-/**
* phy_attach_direct - attach a network device to a given PHY device pointer
* @dev: network device to attach
* @phydev: Pointer to phy_device to attach
@@ -1504,7 +1484,6 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
phydev->phy_link_change = phy_link_change;
if (dev) {
- phy_set_timestamp(dev, phydev);
phydev->attached_dev = dev;
dev->phydev = phydev;
@@ -1833,22 +1812,6 @@ void phy_detach(struct phy_device *phydev)
phy_suspend(phydev);
if (dev) {
- const struct ethtool_ops *ops = dev->ethtool_ops;
- struct ethtool_ts_info ts_info = {0};
-
- if (ops->get_ts_info) {
- ops->get_ts_info(dev, &ts_info);
- if ((ts_info.so_timestamping &
- SOF_TIMESTAMPING_HARDWARE_MASK) ==
- SOF_TIMESTAMPING_HARDWARE_MASK)
- dev->ts_layer = MAC_TIMESTAMPING;
- else if ((ts_info.so_timestamping &
- SOF_TIMESTAMPING_SOFTWARE_MASK) ==
- SOF_TIMESTAMPING_SOFTWARE_MASK)
- dev->ts_layer = SOFTWARE_TIMESTAMPING;
- } else {
- dev->ts_layer = NO_TIMESTAMPING;
- }
phydev->attached_dev->phydev = NULL;
phydev->attached_dev = NULL;
}