1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-02-02 15:47:56 +01:00
Files
u-boot-megous/net
Matthias Schiffer fa795f4525 net: eth-uclass: avoid running start() twice without stop()
Running the start() handler twice without a stop() inbetween completely
breaks communication for some ethernet drivers like fec_mxc.

eth_halt() is called before each eth_init(). Due to the switch to
eth_is_active() in commit 68acb51f44 ("net: Only call halt on a driver
that has been init'ed"), this is not sufficient anymore when netconsole
is active: eth_init_state_only()/eth_halt_state_only() manipulate the
state check that is performed by eth_is_active() without actually
calling into the driver.

The issue can be triggered by starting a network operation (e.g. ping or
tftp) while netconsole is active.

Add an additional "running" flag that reflects the actual state of the
driver and use it to ensure that eth_halt() actually stops the device as
it is supposed to.

Fixes: 68acb51f44 ("net: Only call halt on a driver that has been init'ed")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
2021-01-19 09:06:15 -05:00
..
2020-12-01 10:33:37 -05:00
2020-06-12 13:17:23 -04:00
2020-12-01 10:33:37 -05:00
2020-09-30 16:55:03 -04:00
2020-05-18 21:19:18 -04:00
2019-09-04 11:37:19 -05:00
2020-05-18 21:19:18 -04:00
2020-05-18 21:19:18 -04:00
2021-01-13 02:38:00 +01:00
2020-09-30 16:55:03 -04:00
2018-07-02 14:14:20 -05:00