Subject: Re: [PATCH] e1000e: Fix usage under kexec

From: Andi Kleen <[email-masked]>
Date: Tue, 10 Nov 2009 10:35:37 +0100

Sven Anders <[email-masked]> writes:
>
> We get the following error:
>   e1000e: probe of 0000:02:00.0 failed with error -2
>
> We cannot unload the driver of the first kernel, because it's
> compiled in statically.
>
> It's caused by the PHY, because it's already initialized by the
> first driver and therefore does not respond correctly. The driver
> assumes the PHY to be in 'reset' state, which is done by the BIOS.
>
> We fixed it by adding a
>
> +       /* Reset PHY before initializing it. Allows re-init after kexec. */
> +       if (!e1000_check_reset_block(hw))
> +         e1000_phy_hw_reset(hw);

The problem of resetting PHYs in the driver init path is that it tends
to lose link-state, and if the link takes some time to re-negotiate
you can significantly slow down the "total time to network access"
at boot.

Perhaps you could only reset when the message above would trigger
and try again?

-Andi