Patch "net: micrel: Fix receiving the timestamp in the frame for lan8841" has been added to the 6.8-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: micrel: Fix receiving the timestamp in the frame for lan8841

to the 6.8-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-micrel-fix-receiving-the-timestamp-in-the-frame-.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 3ed495c025bd76eae3f2cedb7282c49af88805bc
Author: Horatiu Vultur <horatiu.vultur@xxxxxxxxxxxxx>
Date:   Mon May 13 21:21:57 2024 +0200

    net: micrel: Fix receiving the timestamp in the frame for lan8841
    
    [ Upstream commit aea27a92a41dae14843f92c79e9e42d8f570105c ]
    
    The blamed commit started to use the ptp workqueue to get the second
    part of the timestamp. And when the port was set down, then this
    workqueue is stopped. But if the config option NETWORK_PHY_TIMESTAMPING
    is not enabled, then the ptp_clock is not initialized so then it would
    crash when it would try to access the delayed work.
    So then basically by setting up and then down the port, it would crash.
    The fix consists in checking if the ptp_clock is initialized and only
    then cancel the delayed work.
    
    Fixes: cc7554954848 ("net: micrel: Change to receive timestamp in the frame for lan8841")
    Signed-off-by: Horatiu Vultur <horatiu.vultur@xxxxxxxxxxxxx>
    Reviewed-by: Simon Horman <horms@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 1f950c824418f..827db6a6ff397 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -4635,7 +4635,8 @@ static int lan8841_suspend(struct phy_device *phydev)
 	struct kszphy_priv *priv = phydev->priv;
 	struct kszphy_ptp_priv *ptp_priv = &priv->ptp_priv;
 
-	ptp_cancel_worker_sync(ptp_priv->ptp_clock);
+	if (ptp_priv->ptp_clock)
+		ptp_cancel_worker_sync(ptp_priv->ptp_clock);
 
 	return genphy_suspend(phydev);
 }




[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