Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 2107

kernel-2.6.18-194.11.1.el5.src.rpm

From: Andy Gospodarek <gospo@redhat.com>
Date: Tue, 19 Jan 2010 15:27:38 -0500
Subject: [net] e1000e: fix deadlock unloading module on some ICH8
Message-id: <20100119152738.GI6655@gospo.rdu.redhat.com>
Patchwork-id: 22649
O-Subject: [RHEL5.5 PATCH] e1000e: fix deadlock when unloading module on some
	ICH8 hardware
Bugzilla: 555818
RH-Acked-by: Jiri Pirko <jpirko@redhat.com>
RH-Acked-by: Dean Nelson <dnelson@redhat.com>
RH-Acked-by: Stefan Assmann <sassmann@redhat.com>
RH-Acked-by: Prarit Bhargava <prarit@redhat.com>
RH-Acked-by: David S. Miller <davem@redhat.com>

During some testing, we found a problem with the latest e1000e driver
that would prevent the the driver from being unloaded on some hardware.
I tracked it down to a spot where the driver did not unlock the phy lock
during an error case.  Intel apparently already had a fix that just
recently went upstream so we can just use the bits from this commit that
will resolve the issue:

	commit baf86c9d36826fab0160251bbc87dfab3af48a21
	Author: Bruce Allan <bruce.w.allan@intel.com>
	Date:   Wed Jan 13 01:53:08 2010 +0000

	    e1000e: workaround link issues on busy hub in half duplex on 82577/82578

I have verified that the movement of the release_phy call will resolve
the deadlock while unloading the module.

This will resolve RHBZ 555818.


diff --git a/drivers/net/e1000e/ich8lan.c b/drivers/net/e1000e/ich8lan.c
index 795bf06..c857da3 100644
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -1171,9 +1171,9 @@ static s32 e1000_hv_phy_workarounds_ich8lan(struct e1000_hw *hw)
 
 	hw->phy.addr = 1;
 	ret_val = e1000e_write_phy_reg_mdic(hw, IGP01E1000_PHY_PAGE_SELECT, 0);
+	hw->phy.ops.release_phy(hw);
 	if (ret_val)
 		goto out;
-	hw->phy.ops.release_phy(hw);
 
 	/*
 	 * Configure the K1 Si workaround during phy reset assuming there is