Patch "net: enetc: VFs do not support HWTSTAMP_TX_ONESTEP_SYNC" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: enetc: VFs do not support HWTSTAMP_TX_ONESTEP_SYNC

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-enetc-vfs-do-not-support-hwtstamp_tx_onestep_syn.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c800e17acff881d5a9294e9b367477737cffb586
Author: Wei Fang <wei.fang@xxxxxxx>
Date:   Mon Feb 24 19:12:47 2025 +0800

    net: enetc: VFs do not support HWTSTAMP_TX_ONESTEP_SYNC
    
    [ Upstream commit a562d0c4a893eae3ea51d512c4d90ab858a6b7ec ]
    
    Actually ENETC VFs do not support HWTSTAMP_TX_ONESTEP_SYNC because only
    ENETC PF can access PMa_SINGLE_STEP registers. And there will be a crash
    if VFs are used to test one-step timestamp, the crash log as follows.
    
    [  129.110909] Unable to handle kernel paging request at virtual address 00000000000080c0
    [  129.287769] Call trace:
    [  129.290219]  enetc_port_mac_wr+0x30/0xec (P)
    [  129.294504]  enetc_start_xmit+0xda4/0xe74
    [  129.298525]  enetc_xmit+0x70/0xec
    [  129.301848]  dev_hard_start_xmit+0x98/0x118
    
    Fixes: 41514737ecaa ("enetc: add get_ts_info interface for ethtool")
    Cc: stable@xxxxxxxxxxxxxxx
    Signed-off-by: Wei Fang <wei.fang@xxxxxxx>
    Reviewed-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
    Tested-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
    Link: https://patch.msgid.link/20250224111251.1061098-5-wei.fang@xxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 30653830981d1..8feb7d4226bb5 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -2971,6 +2971,9 @@ static int enetc_hwtstamp_set(struct net_device *ndev, struct ifreq *ifr)
 		new_offloads |= ENETC_F_TX_TSTAMP;
 		break;
 	case HWTSTAMP_TX_ONESTEP_SYNC:
+		if (!enetc_si_is_pf(priv->si))
+			return -EOPNOTSUPP;
+
 		new_offloads &= ~ENETC_F_TX_TSTAMP_MASK;
 		new_offloads |= ENETC_F_TX_ONESTEP_SYNC_TSTAMP;
 		break;
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
index 39fbc465746f7..1e3e0073276ec 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_ethtool.c
@@ -840,6 +840,7 @@ static int enetc_set_coalesce(struct net_device *ndev,
 static int enetc_get_ts_info(struct net_device *ndev,
 			     struct ethtool_ts_info *info)
 {
+	struct enetc_ndev_priv *priv = netdev_priv(ndev);
 	int *phc_idx;
 
 	phc_idx = symbol_get(enetc_phc_index);
@@ -860,8 +861,10 @@ static int enetc_get_ts_info(struct net_device *ndev,
 				SOF_TIMESTAMPING_TX_SOFTWARE;
 
 	info->tx_types = (1 << HWTSTAMP_TX_OFF) |
-			 (1 << HWTSTAMP_TX_ON) |
-			 (1 << HWTSTAMP_TX_ONESTEP_SYNC);
+			 (1 << HWTSTAMP_TX_ON);
+
+	if (enetc_si_is_pf(priv->si))
+		info->tx_types |= (1 << HWTSTAMP_TX_ONESTEP_SYNC);
 
 	info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) |
 			   (1 << HWTSTAMP_FILTER_ALL);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux