From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Kory Maincent <kory.maincent@bootlin.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
andrew@lunn.ch, hkallweit1@gmail.com, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 6.6 019/104] net: phy: micrel: fix ts_info value in case of no phc
Date: Tue, 16 Jan 2024 14:45:45 -0500 [thread overview]
Message-ID: <20240116194908.253437-19-sashal@kernel.org> (raw)
In-Reply-To: <20240116194908.253437-1-sashal@kernel.org>
From: Kory Maincent <kory.maincent@bootlin.com>
[ Upstream commit 915d25a9d69be969c1cc6c1dd0c3861f6da7b55e ]
In case of no phc we should not return SOFTWARE TIMESTAMPING flags as we do
not know whether the netdev supports of timestamping.
Remove it from the lan8841_ts_info and simply return 0.
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/phy/micrel.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 927d3d54658e..09c26ad35df9 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -3609,12 +3609,8 @@ static int lan8841_ts_info(struct mii_timestamper *mii_ts,
info->phc_index = ptp_priv->ptp_clock ?
ptp_clock_index(ptp_priv->ptp_clock) : -1;
- if (info->phc_index == -1) {
- info->so_timestamping |= SOF_TIMESTAMPING_TX_SOFTWARE |
- SOF_TIMESTAMPING_RX_SOFTWARE |
- SOF_TIMESTAMPING_SOFTWARE;
+ if (info->phc_index == -1)
return 0;
- }
info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
SOF_TIMESTAMPING_RX_HARDWARE |
--
2.43.0
next parent reply other threads:[~2024-01-16 19:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240116194908.253437-1-sashal@kernel.org>
2024-01-16 19:45 ` Sasha Levin [this message]
2024-01-16 19:45 ` [PATCH AUTOSEL 6.6 021/104] r8169: improve RTL8411b phy-down fixup Sasha Levin
2024-01-16 19:45 ` [PATCH AUTOSEL 6.6 022/104] bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk Sasha Levin
2024-01-16 19:45 ` [PATCH AUTOSEL 6.6 023/104] net: usb: ax88179_178a: avoid two consecutive device resets Sasha Levin
2024-01-16 19:45 ` [PATCH AUTOSEL 6.6 031/104] bpf: Fix a few selftest failures due to llvm18 change Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 035/104] bnxt_en: Add 5760X (P7) PCI IDs Sasha Levin
2024-01-16 20:17 ` Michael Chan
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 042/104] net: mvmdio: Avoid excessive sleeps in polled mode Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 049/104] net: wangxun: fix changing mac failed when running Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 059/104] net: phy: at803x: fix passing the wrong reference for config_intr Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 060/104] ionic: pass opcode to devcmd_wait Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 061/104] ionic: bypass firmware cmds when stuck in reset Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 065/104] selftests/bpf: fix compiler warnings in RELEASE=1 mode Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 074/104] ice: fix ICE_AQ_VSI_Q_OPT_RSS_* register values Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 075/104] net: atlantic: eliminate double free in error handling logic Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 076/104] net: dsa: mv88e6xxx: Fix mv88e6352_serdes_get_stats error path Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 085/104] ice: fix pre-shifted bit usage Sasha Levin
2024-01-16 19:46 ` [PATCH AUTOSEL 6.6 092/104] wifi: cfg80211: free beacon_ies when overridden from hidden BSS Sasha Levin
2024-01-16 19:47 ` [PATCH AUTOSEL 6.6 097/104] net/smc: disable SEID on non-s390 archs where virtual ISM may be used Sasha Levin
2024-01-16 19:47 ` [PATCH AUTOSEL 6.6 098/104] bridge: cfm: fix enum typo in br_cc_ccm_tx_parse Sasha Levin
2024-01-16 19:47 ` [PATCH AUTOSEL 6.6 101/104] i40e: Fix VF disable behavior to block all traffic Sasha Levin
2024-01-16 19:47 ` [PATCH AUTOSEL 6.6 102/104] octeontx2-af: Fix max NPC MCAM entry check while validating ref_entry Sasha Levin
2024-01-16 19:47 ` [PATCH AUTOSEL 6.6 103/104] net: kcm: fix direct access to bv_len Sasha Levin
2024-01-16 19:47 ` [PATCH AUTOSEL 6.6 104/104] net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure Sasha Levin
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=20240116194908.253437-19-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kory.maincent@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
/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).