[PATCH] net: eth-uclass: avoid running start() twice without stop()

Tom Rini trini at konsulko.com
Tue Jan 19 21:00:41 CET 2021


On Wed, Nov 04, 2020 at 02:45:14PM +0100, Matthias Schiffer wrote:

> 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 at ew.tq-group.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210119/037880d8/attachment.sig>


More information about the U-Boot mailing list