netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e1000e: Fix usage under kexec
@ 2009-11-09 20:25 Sven Anders
  2009-11-10  9:35 ` Andi Kleen
  2009-11-17  9:21 ` Stefan Assmann
  0 siblings, 2 replies; 6+ messages in thread
From: Sven Anders @ 2009-11-09 20:25 UTC (permalink / raw)
  To: netdev


[-- Attachment #1.1: Type: text/plain, Size: 1516 bytes --]

Hello!

We're experiencing the following problem:

We start a minimal linux system, prepare the system and start the
final system via kexec.
On two different systems (one with a 82573 and one with a 82574),
the driver cannot initialize the network hardware, because the PHY
is not recognized.

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);

to the initialization routine. I'm not sure, if we need the additional
"block" check.
A patch is attached.

Please send a note, if the patch is correct or wrong...

Regards
 Sven Anders

-- 
 Sven Anders <anders@anduras.de>                 () Ascii Ribbon Campaign
                                                 /\ Support plain text e-mail
 ANDURAS service solutions AG
 Innstrasse 71 - 94036 Passau - Germany
 Web: www.anduras.de - Tel: +49 (0)851-4 90 50-0 - Fax: +49 (0)851-4 90 50-55

Those who would give up essential Liberty, to purchase a little
temporary Safety, deserve neither Liberty nor Safety.
  - Benjamin Franklin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: e1000e-kexec.patch --]
[-- Type: text/x-patch; name="e1000e-kexec.patch", Size: 507 bytes --]

--- linux-2.6.29.6/drivers/net/e1000e/82571.c.orig	2009-11-04 00:44:27.000000000 +0100
+++ linux-2.6.29.6/drivers/net/e1000e/82571.c	2009-11-04 00:44:19.000000000 +0100
@@ -107,6 +107,10 @@ static s32 e1000_init_phy_params_82571(s
 		break;
 	}
 
+	/* Reset PHY before initializing it. Allows re-init after kexec. */
+	if (!e1000_check_reset_block(hw))
+	  e1000_phy_hw_reset(hw);
+
 	/* This can only be done after all function pointers are setup. */
 	ret_val = e1000_get_phy_id_82571(hw);
 

[-- Attachment #1.3: sven.vcf --]
[-- Type: text/x-vcard, Size: 307 bytes --]

begin:vcard
fn:Sven Anders
n:Anders;Sven
adr;quoted-printable:;;Weidestra=C3=9Fe 19;Hannover;Niedersachsen;30453;Deutschland
email;internet:sven@anduras.de
tel;home:+49 (0)511 / 2123090
tel;cell:+49 (0)170 / 8091180
x-mozilla-html:FALSE
url:http://staff.anduras.de/anders
version:2.1
end:vcard


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-04  9:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-09 20:25 [PATCH] e1000e: Fix usage under kexec Sven Anders
2009-11-10  9:35 ` Andi Kleen
2009-11-17  9:21 ` Stefan Assmann
2009-11-17 21:28   ` Tantilov, Emil S
2009-11-17 21:34   ` Tantilov, Emil S
2009-12-04  9:10     ` Sven Anders

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).