Patch "r8169: use tp_to_dev instead of open code" has been added to the 5.4-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

    r8169: use tp_to_dev instead of open code

to the 5.4-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:
     r8169-use-tp_to_dev-instead-of-open-code.patch
and it can be found in the queue-5.4 subdirectory.

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



commit 2a3c383a086af997259698010467bfec2e9fad8b
Author: Juhee Kang <claudiajkang@xxxxxxxxx>
Date:   Wed Nov 30 01:12:44 2022 +0900

    r8169: use tp_to_dev instead of open code
    
    [ Upstream commit 4b6c6065fca123d419afef005a696f51e6590470 ]
    
    The open code is defined as a helper function(tp_to_dev) on r8169_main.c,
    which the open code is &tp->pci_dev->dev. The helper function was added
    in commit 1e1205b7d3e9 ("r8169: add helper tp_to_dev"). And then later,
    commit f1e911d5d0df ("r8169: add basic phylib support") added
    r8169_phylink_handler function but it didn't use the helper function.
    Thus, tp_to_dev() replaces the open code. This patch doesn't change logic.
    
    Signed-off-by: Juhee Kang <claudiajkang@xxxxxxxxx>
    Reviewed-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
    Link: https://lore.kernel.org/r/20221129161244.5356-1-claudiajkang@xxxxxxxxx
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Stable-dep-of: 621735f59064 ("r8169: fix rare issue with broken rx after link-down on RTL8125")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index fca2dbdd37aff..9676d599b5ba0 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -6293,12 +6293,13 @@ static void rtl8169_rx_missed(struct net_device *dev)
 static void r8169_phylink_handler(struct net_device *ndev)
 {
 	struct rtl8169_private *tp = netdev_priv(ndev);
+	struct device *d = tp_to_dev(tp);
 
 	if (netif_carrier_ok(ndev)) {
 		rtl_link_chg_patch(tp);
-		pm_request_resume(&tp->pci_dev->dev);
+		pm_request_resume(d);
 	} else {
-		pm_runtime_idle(&tp->pci_dev->dev);
+		pm_runtime_idle(d);
 	}
 
 	if (net_ratelimit())



[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