zephyr/drivers/ethernet
Kevin ORourke 4690689a36 drivers: ethernet: eth_stm32_hal: fix bus error after disconnect
In some circumstances the struct eth_stm32_tx_context object that was
allocated on eth_tx's stack is still referenced after the function exits.
This usually happens when the network is disconnected, depending on the
PHY hardware.

When the network is reconnected there will eventually be a call to
HAL_ETH_ReleaseTxPacket, which calls HAL_ETH_TxFreeCallback with the
(now invalid) pointer to the tx context. When HAL_ETH_TxFreeCallback
tries to dereference that pointer we get a bus error.

Fix this by allocating struct eth_stm32_tx_context objects from a
static array, similarly to how the buffers are allocated. This ensures
that they remain valid until the HAL is finished with them.

Fixes: #79037

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2024-11-05 10:54:16 -06:00
..
dwc_xgmac drivers: ethernet: dwc_xgmac: Added dwc-xgmac 2024-09-05 17:03:05 -04:00
eth_nxp_enet_qos boards: nxp: Removing CONFIG_PINCTRL from the boards defconfig 2024-10-15 19:09:45 -04:00
nxp_enet boards: nxp: Removing CONFIG_PINCTRL from the boards defconfig 2024-10-15 19:09:45 -04:00
phy drivers: ethernet: ksz8081: RMII override RNB part 2024-11-01 13:54:00 -05:00
CMakeLists.txt drivers: ethernet: Add dummy driver for vnd,ethernet 2024-10-22 20:42:05 +02:00
Kconfig drivers: ethernet: Add dummy driver for vnd,ethernet 2024-10-22 20:42:05 +02:00
Kconfig.adin2111
Kconfig.cyclonev
Kconfig.dsa drivers: ethernet: Add ETH_DSA_SUPPORT 2024-04-18 11:18:31 +02:00
Kconfig.dwmac
Kconfig.e1000
Kconfig.enc28j60
Kconfig.enc424j600
Kconfig.esp32
Kconfig.gecko
Kconfig.ivshmem
Kconfig.lan865x
Kconfig.litex drivers: ethernet: litex: add phy 2024-08-05 16:29:06 +02:00
Kconfig.native_posix drivers: eth: native: Align to support ptp_clock driver for PTP subsys 2024-06-13 05:40:41 -04:00
Kconfig.numaker
Kconfig.nxp_imx_netc drivers: ethernet: add NXP i.MX NETC driver 2024-10-16 10:00:32 +02:00
Kconfig.nxp_s32_gmac
Kconfig.nxp_s32_netc boards: nxp: Removing CONFIG_PINCTRL from the boards defconfig 2024-10-15 19:09:45 -04:00
Kconfig.sam_gmac soc: atmel: Drop PINCTRL from Kconfig.defconfig 2024-11-04 13:43:26 -06:00
Kconfig.smsc91x
Kconfig.smsc911x
Kconfig.stellaris
Kconfig.stm32_hal copyright: change email 2024-09-25 04:04:03 -04:00
Kconfig.test drivers: ethernet: Add dummy driver for vnd,ethernet 2024-10-22 20:42:05 +02:00
Kconfig.w5500
Kconfig.xlnx_gem
Kconfig.xmc4xxx
dsa_ksz8xxx.c drivers: ethernet: ksz8863 Fix wrong register for tail tag enable 2024-05-07 15:23:01 -05:00
dsa_ksz8794.h
dsa_ksz8863.h
eth.h drivers: ethernet: use sys_rand_get directly 2024-04-05 12:28:46 +02:00
eth_adin2111.c drivers: ethernet: adin2111: minor corrections of is_adin2111 2024-10-18 14:15:42 +02:00
eth_adin2111_priv.h drivers: ethernet: adin2111: move OA buffers out from device data 2024-06-24 12:44:04 -04:00
eth_cyclonev.c
eth_cyclonev_priv.h
eth_dwmac.c
eth_dwmac_mmu.c kernel: mm: rename Z_MEM_PHYS/VIRT_ADDR to K_MEM_* 2024-06-12 21:13:26 -04:00
eth_dwmac_priv.h
eth_dwmac_stm32h7x.c
eth_e1000.c drivers: eth: e1000: Use double with PTP clock 2024-06-29 05:50:04 -04:00
eth_e1000_priv.h drivers: eth: e1000: Use double with PTP clock 2024-06-29 05:50:04 -04:00
eth_enc28j60.c drivers: ethernet: enc28j60: Fix carrier on race on init 2024-10-15 04:05:50 -04:00
eth_enc28j60_priv.h drivers: ethernet: enc28j60: Fix carrier on race on init 2024-10-15 04:05:50 -04:00
eth_enc424j600.c drivers: ethernet: enc424j600: change mac addr runtime 2024-10-24 17:54:08 +02:00
eth_enc424j600_priv.h
eth_esp32.c drivers: esp32: Interrupts flags configuration 2024-08-22 14:25:25 -04:00
eth_gecko.c
eth_gecko_priv.h
eth_ivshmem.c drivers: ethernet: use sys_rand_get directly 2024-04-05 12:28:46 +02:00
eth_ivshmem_priv.h
eth_ivshmem_queue.c style: drivers: comply with MISRA C:2012 Rule 15.6 2024-08-20 10:33:51 +02:00
eth_lan865x.c style: drivers: comply with MISRA C:2012 Rule 15.6 2024-08-20 10:33:51 +02:00
eth_lan865x_priv.h drivers: ethernet: lan865x: Enable all multicast MAC addr for IPv6 2024-08-08 20:21:58 -04:00
eth_litex_liteeth.c drivers: ethernet: litex: add phy 2024-08-05 16:29:06 +02:00
eth_native_posix.c drivers: eth: native_sim: Fix error output when creating interface 2024-09-13 13:42:20 +02:00
eth_native_posix_adapt.c
eth_native_posix_priv.h
eth_numaker.c
eth_numaker_priv.h
eth_nxp_imx_netc.c drivers: ethernet: add NXP i.MX NETC driver 2024-10-16 10:00:32 +02:00
eth_nxp_imx_netc_priv.h drivers: ethernet: add NXP i.MX NETC driver 2024-10-16 10:00:32 +02:00
eth_nxp_imx_netc_psi.c drivers: ethernet: add NXP i.MX NETC driver 2024-10-16 10:00:32 +02:00
eth_nxp_s32_gmac.c drivers: ethernet: add get_phy function 2024-07-27 15:07:26 +03:00
eth_nxp_s32_netc.c
eth_nxp_s32_netc_priv.h drivers: nxp_s32_netc_psi_vsi: update to RTD 2.0.0 2024-08-20 10:32:32 +02:00
eth_nxp_s32_netc_psi.c drivers: nxp_s32_netc_psi_vsi: update to RTD 2.0.0 2024-08-20 10:32:32 +02:00
eth_nxp_s32_netc_vsi.c drivers: nxp_s32_netc_psi_vsi: update to RTD 2.0.0 2024-08-20 10:32:32 +02:00
eth_raw.c
eth_sam0_gmac.h
eth_sam_gmac.c drivers: ethernet: add get_phy function 2024-07-27 15:07:26 +03:00
eth_sam_gmac_priv.h
eth_slip_tap.c
eth_smsc91x.c style: drivers: comply with MISRA C:2012 Rule 15.6 2024-08-20 10:33:51 +02:00
eth_smsc91x_priv.h
eth_smsc911x.c
eth_smsc911x_priv.h
eth_stellaris.c drivers: eth: stellaris: Fix build error 2024-04-10 15:55:13 +02:00
eth_stellaris_priv.h
eth_stm32_hal.c drivers: ethernet: eth_stm32_hal: fix bus error after disconnect 2024-11-05 10:54:16 -06:00
eth_stm32_hal_priv.h drivers: ethernet: eth_stm32_hal: Remove V1 code for H7/H5 series 2024-10-24 22:04:21 +01:00
eth_test.c drivers: ethernet: Add dummy driver for vnd,ethernet 2024-10-22 20:42:05 +02:00
eth_w5500.c drivers: ethernet: w5500: Tidy up 2024-04-26 10:19:27 +03:00
eth_w5500_priv.h drivers: ethernet: w5500: Tidy up 2024-04-26 10:19:27 +03:00
eth_xlnx_gem.c
eth_xlnx_gem_priv.h
eth_xmc4xxx.c drivers: ethernet: eth_xmc4xxx: fix get_phy 2024-08-12 12:43:24 +02:00
oa_tc6.c drivers: ethernet: tc6: Combine read chunks into continuous net buffer 2024-08-08 20:21:58 -04:00
oa_tc6.h
phy_cyclonev.c
phy_gecko.c
phy_gecko.h
phy_xlnx_gem.c
phy_xlnx_gem.h