diff options
author | Matthias Schiffer <matthias.schiffer@ew.tq-group.com> | 2020-11-04 14:45:14 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-19 09:06:15 -0500 |
commit | fa795f452541ce07b33be603de36cac3c5d7dfcf (patch) | |
tree | 7830e3f9612e2f2d2fa0e9e1c5d52e37a5257457 /drivers/net/e1000.c | |
parent | db0dd72e27ce62c5b28f07595b91ed00d0565819 (diff) | |
download | u-boot-fa795f452541ce07b33be603de36cac3c5d7dfcf.tar.gz |
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 68acb51f442f ("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: 68acb51f442f ("net: Only call halt on a driver that has been init'ed")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Diffstat (limited to 'drivers/net/e1000.c')
0 files changed, 0 insertions, 0 deletions