linux/drivers/net/ethernet/ti
Sondhauß, Jan 2844e24343 drivers: ethernet: cpsw: fix panic when interrupt coaleceing is set via ethtool
cpsw_ethtool_begin directly returns the result of pm_runtime_get_sync
when successful.
pm_runtime_get_sync returns -error code on failure and 0 on successful
resume but also 1 when the device is already active. So the common case
for cpsw_ethtool_begin is to return 1. That leads to inconsistent calls
to pm_runtime_put in the call-chain so that pm_runtime_put is called
one too many times and as result leaving the cpsw dev behind suspended.

The suspended cpsw dev leads to an access violation later on by
different parts of the cpsw driver.

Fix this by calling the return-friendly pm_runtime_resume_and_get
function.

Fixes: d43c65b05b ("ethtool: runtime-resume netdev parent in ethnl_ops_begin")
Signed-off-by: Jan Sondhauss <jan.sondhauss@wago.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Link: https://lore.kernel.org/r/20220323084725.65864-1-jan.sondhauss@wago.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-03-23 10:46:42 -07:00
..
am65-cpsw-ethtool.c net: ethernet: ti: am65-cpsw: Convert to PHYLINK 2022-03-11 11:00:03 +00:00
am65-cpsw-nuss.c net: ethernet: ti: am65-cpsw: Convert to PHYLINK 2022-03-11 11:00:03 +00:00
am65-cpsw-nuss.h net: ethernet: ti: am65-cpsw: Convert to PHYLINK 2022-03-11 11:00:03 +00:00
am65-cpsw-qos.c net: ethernet: ti: am65-cpsw-qos: Demote non-conformant function header 2021-01-16 18:13:10 -08:00
am65-cpsw-qos.h
am65-cpsw-switchdev.c net: ti: am65-cpsw-nuss: remove guards against !BRIDGE_VLAN_INFO_BRENTRY 2022-02-17 14:17:10 +00:00
am65-cpsw-switchdev.h net: ti: am65-cpsw-nuss: Add switchdev support 2021-02-11 17:52:13 -08:00
am65-cpts.c net: ethernet: ti: am65-cpts: Use devm_platform_ioremap_resource_byname() 2021-06-09 15:24:43 -07:00
am65-cpts.h
cpmac.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
cpsw_ale.c net: ethernet: ti: cpsw_ale: Fix access to un-initialized memory 2021-11-10 14:33:04 +00:00
cpsw_ale.h
cpsw_ethtool.c drivers: ethernet: cpsw: fix panic when interrupt coaleceing is set via ethtool 2022-03-23 10:46:42 -07:00
cpsw_new.c net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account 2022-01-19 14:19:19 +00:00
cpsw_priv.c net: cpsw: Properly initialise struct page_pool_params 2022-01-25 11:06:33 +00:00
cpsw_priv.h net: Add includes masked by netdevice.h including uapi/bpf.h 2021-12-29 20:03:05 -08:00
cpsw_sl.c
cpsw_sl.h
cpsw_switchdev.c net: ti: cpsw: remove guards against !BRIDGE_VLAN_INFO_BRENTRY 2022-02-17 14:17:10 +00:00
cpsw_switchdev.h
cpsw-common.c
cpsw-phy-sel.c net: ethernet: ti: cpsw-phy-sel: Use devm_platform_ioremap_resource_byname() 2021-06-09 15:27:55 -07:00
cpsw.c net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account 2022-01-19 14:19:19 +00:00
cpsw.h
cpts.c net: ethernet: ti: cpts: Handle error for clk_enable 2022-03-09 12:12:46 +00:00
cpts.h
davinci_cpdma.c net: ethernet: ti: davinci_cpdma: revert "drop frame padding" 2021-08-06 16:18:15 -07:00
davinci_cpdma.h net: ethernet: ti: davinci_cpdma: revert "drop frame padding" 2021-08-06 16:18:15 -07:00
davinci_emac.c net: ethernet: ti: davinci_emac: Use platform_get_irq() to get the interrupt 2022-03-11 11:01:42 +00:00
davinci_mdio.c drivers: net: davinci_mdio: Use of_device_get_match_data() 2021-01-26 12:17:31 -06:00
k3-cppi-desc-pool.c
k3-cppi-desc-pool.h
Kconfig Revert "net: build all switchdev drivers as modules when the bridge is a module" 2021-08-04 12:35:07 +01:00
Makefile net: ti: am65-cpsw-nuss: Add switchdev support 2021-02-11 17:52:13 -08:00
netcp_core.c net: ethernet: ti: Fix spelling mistake and clean up message 2022-03-17 16:35:34 -07:00
netcp_ethss.c net_tstamp: add new flag HWTSTAMP_FLAG_BONDED_PHC_INDEX 2021-12-14 12:28:24 +00:00
netcp_sgmii.c
netcp_xgbepcsr.c
netcp.h
tlan.c ethernet: tlan: use eth_hw_addr_set() 2021-10-20 11:41:01 +01:00
tlan.h