Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: usb: s2 WoL wakeup_count not incremented for USB->Eth devices

The PHY's "wakeup_count" is not incrementing when waking from
WoL. The wakeup count can be found in sysfs at:
/sys/bus/platform/devices/rdb/*.usb-phy/power/wakeup_count.
The problem is that the system wakup event handler was being passed
the wrong "device" by the PHY driver.

Fixes: f1c0db40a3ad ("phy: usb: Add "wake on" functionality")
Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Justin Chen <justinpopo6@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/1665005418-15807-3-git-send-email-justinpopo6@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Al Cooper and committed by
Vinod Koul
f7fc5b70 32fb07f3

+3 -3
+3 -3
drivers/phy/broadcom/phy-brcm-usb.c
··· 102 102 103 103 static irqreturn_t brcm_usb_phy_wake_isr(int irq, void *dev_id) 104 104 { 105 - struct phy *gphy = dev_id; 105 + struct device *dev = dev_id; 106 106 107 - pm_wakeup_event(&gphy->dev, 0); 107 + pm_wakeup_event(dev, 0); 108 108 109 109 return IRQ_HANDLED; 110 110 } ··· 452 452 if (priv->wake_irq >= 0) { 453 453 err = devm_request_irq(dev, priv->wake_irq, 454 454 brcm_usb_phy_wake_isr, 0, 455 - dev_name(dev), gphy); 455 + dev_name(dev), dev); 456 456 if (err < 0) 457 457 return err; 458 458 device_set_wakeup_capable(dev, 1);