From 0fccd0e9e3802748855d967940c16f8c59d4e2b6 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Fri, 15 Dec 2006 10:56:10 -0500 Subject: 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 , rewritten to use feature flags by me. Signed-off-by: Jeff Garzik --- drivers/net/e1000/e1000_hw.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers/net/e1000/e1000_hw.c') 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)) -- cgit v1.2.1