Commit eeda0b71 authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'at91-fixes-6.4' of...

Merge tag 'at91-fixes-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/fixes

AT91 fixes for 6.4

It contains:
- fix imbalanced reference counter for ethernet devices; without it
  system hangs after consecutive suspend/resume cycles;
- fix debounce delay property for shutdown controller; the initial DT
  property is not what the driver expects.

* tag 'at91-fixes-6.4' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux:
  ARM: dts: at91: sama7g5ek: fix debounce delay property for shdwc
  ARM: at91: pm: fix imbalanced reference counter for ethernet devices

Link: https://lore.kernel.org/r/20230530105930.11621-1-claudiu.beznea@microchip.comSigned-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 44b5814f 6b0db163
...@@ -792,7 +792,7 @@ &sdmmc2 { ...@@ -792,7 +792,7 @@ &sdmmc2 {
}; };
&shdwc { &shdwc {
atmel,shdwc-debouncer = <976>; debounce-delay-us = <976>;
status = "okay"; status = "okay";
input@0 { input@0 {
......
...@@ -334,16 +334,14 @@ static bool at91_pm_eth_quirk_is_valid(struct at91_pm_quirk_eth *eth) ...@@ -334,16 +334,14 @@ static bool at91_pm_eth_quirk_is_valid(struct at91_pm_quirk_eth *eth)
pdev = of_find_device_by_node(eth->np); pdev = of_find_device_by_node(eth->np);
if (!pdev) if (!pdev)
return false; return false;
/* put_device(eth->dev) is called at the end of suspend. */
eth->dev = &pdev->dev; eth->dev = &pdev->dev;
} }
/* No quirks if device isn't a wakeup source. */ /* No quirks if device isn't a wakeup source. */
if (!device_may_wakeup(eth->dev)) { if (!device_may_wakeup(eth->dev))
put_device(eth->dev);
return false; return false;
}
/* put_device(eth->dev) is called at the end of suspend. */
return true; return true;
} }
...@@ -439,14 +437,14 @@ static int at91_pm_config_quirks(bool suspend) ...@@ -439,14 +437,14 @@ static int at91_pm_config_quirks(bool suspend)
pr_err("AT91: PM: failed to enable %s clocks\n", pr_err("AT91: PM: failed to enable %s clocks\n",
j == AT91_PM_G_ETH ? "geth" : "eth"); j == AT91_PM_G_ETH ? "geth" : "eth");
} }
} else {
/*
* Release the reference to eth->dev taken in
* at91_pm_eth_quirk_is_valid().
*/
put_device(eth->dev);
eth->dev = NULL;
} }
/*
* Release the reference to eth->dev taken in
* at91_pm_eth_quirk_is_valid().
*/
put_device(eth->dev);
eth->dev = NULL;
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment