aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_hw.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-12-15 10:56:10 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-26 15:51:29 -0500
commit0fccd0e9e3802748855d967940c16f8c59d4e2b6 (patch)
tree6c869abd0f2af31d532b90a489ca1db749f8bd5b /drivers/net/e1000/e1000_hw.c
parente1000: omit stats for broken counter in 82543 (diff)
downloadlinux-dev-0fccd0e9e3802748855d967940c16f8c59d4e2b6.tar.xz
linux-dev-0fccd0e9e3802748855d967940c16f8c59d4e2b6.zip
e1000: consolidate managability enabling/disabling
Several bugs existed in how we handle manageability issues all over the driver. This patch consolidates all the managability release and init code in two single functions and call them from appropriate locations. This fixes several BMC packet redirect issues and powerup/down hiccups. Originally from Jesse Brandeburg <jesse.brandeburg@intel.com>, rewritten to use feature flags by me. Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/e1000/e1000_hw.c')
-rw-r--r--drivers/net/e1000/e1000_hw.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c
index ce82eb52ea95..1ea556ef093b 100644
--- a/drivers/net/e1000/e1000_hw.c
+++ b/drivers/net/e1000/e1000_hw.c
@@ -448,6 +448,10 @@ e1000_set_mac_type(struct e1000_hw *hw)
if (hw->mac_type == e1000_82543)
hw->bad_tx_carr_stats_fd = TRUE;
+ /* capable of receiving management packets to the host */
+ if (hw->mac_type >= e1000_82571)
+ hw->has_manc2h = TRUE;
+
return E1000_SUCCESS;
}
@@ -7823,9 +7827,8 @@ e1000_enable_mng_pass_thru(struct e1000_hw *hw)
fwsm = E1000_READ_REG(hw, FWSM);
factps = E1000_READ_REG(hw, FACTPS);
- if (((fwsm & E1000_FWSM_MODE_MASK) ==
- (e1000_mng_mode_pt << E1000_FWSM_MODE_SHIFT)) &&
- (factps & E1000_FACTPS_MNGCG))
+ if ((((fwsm & E1000_FWSM_MODE_MASK) >> E1000_FWSM_MODE_SHIFT) ==
+ e1000_mng_mode_pt) && !(factps & E1000_FACTPS_MNGCG))
return TRUE;
} else
if ((manc & E1000_MANC_SMBUS_EN) && !(manc & E1000_MANC_ASF_EN))