summaryrefslogtreecommitdiffstats
path: root/sys/dev/e1000/e1000_manage.c
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2010-03-29 23:36:34 +0000
committerjfv <jfv@FreeBSD.org>2010-03-29 23:36:34 +0000
commite7270b68f305f255c984dcc9c3ff3e39bf73ba09 (patch)
tree52adde5169569de66f66f886a5c368751c45c604 /sys/dev/e1000/e1000_manage.c
parent5b550c005a08a17c603fa3014ddcefc9a26ff070 (diff)
downloadFreeBSD-src-e7270b68f305f255c984dcc9c3ff3e39bf73ba09.zip
FreeBSD-src-e7270b68f305f255c984dcc9c3ff3e39bf73ba09.tar.gz
Update to igb and em:
em revision 7.0.0: - Using driver devclass, seperate legacy (pre-pcie) code into a seperate source file. This will at least help protect against regression issues. It compiles along with em, and is transparent to end use, devices in each appear to be 'emX'. When using em in a modular form this also allows the legacy stuff to be defined out. - Add tx and rx rings as in igb, in the 82574 this becomes actual multiqueue for the first time (2 queues) while in other PCIE adapters its just make code cleaner. - Add RX mbuf handling logic that matches igb, this will eliminate packet drops due to temporary mbuf shortage. igb revision 1.9.3: - Following the ixgbe code, use a new approach in what was called 'get_buf', the routine now has been made independent of rxeof, it now does the update to the engine TDT register, this design allows temporary mbuf resources to become non-critical, not requiring a packet to be discarded, instead it just returns and does not increment the tail pointer. - With the above change it was also unnecessary to keep 'spare' maps around, since we do not have the discard issue. - Performance tweaks and improvements to the code also. MFC in a week
Diffstat (limited to 'sys/dev/e1000/e1000_manage.c')
-rw-r--r--sys/dev/e1000/e1000_manage.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/sys/dev/e1000/e1000_manage.c b/sys/dev/e1000/e1000_manage.c
index 2cd85b3..0b295f8 100644
--- a/sys/dev/e1000/e1000_manage.c
+++ b/sys/dev/e1000/e1000_manage.c
@@ -78,6 +78,12 @@ s32 e1000_mng_enable_host_if_generic(struct e1000_hw *hw)
DEBUGFUNC("e1000_mng_enable_host_if_generic");
+ if (!(hw->mac.arc_subsystem_valid)) {
+ DEBUGOUT("ARC subsystem not valid.\n");
+ ret_val = -E1000_ERR_HOST_INTERFACE_COMMAND;
+ goto out;
+ }
+
/* Check that the host interface is enabled. */
hicr = E1000_READ_REG(hw, E1000_HICR);
if ((hicr & E1000_HICR_EN) == 0) {
@@ -365,7 +371,7 @@ bool e1000_enable_mng_pass_thru(struct e1000_hw *hw)
if (!(manc & E1000_MANC_RCV_TCO_EN))
goto out;
- if (hw->mac.arc_subsystem_valid) {
+ if (hw->mac.has_fwsm) {
fwsm = E1000_READ_REG(hw, E1000_FWSM);
factps = E1000_READ_REG(hw, E1000_FACTPS);
@@ -375,12 +381,23 @@ bool e1000_enable_mng_pass_thru(struct e1000_hw *hw)
ret_val = TRUE;
goto out;
}
- } else {
- if ((manc & E1000_MANC_SMBUS_EN) &&
- !(manc & E1000_MANC_ASF_EN)) {
+ } else if ((hw->mac.type == e1000_82574) ||
+ (hw->mac.type == e1000_82583)) {
+ u16 data;
+
+ factps = E1000_READ_REG(hw, E1000_FACTPS);
+ e1000_read_nvm(hw, NVM_INIT_CONTROL2_REG, 1, &data);
+
+ if (!(factps & E1000_FACTPS_MNGCG) &&
+ ((data & E1000_NVM_INIT_CTRL2_MNGM) ==
+ (e1000_mng_mode_pt << 13))) {
ret_val = TRUE;
goto out;
}
+ } else if ((manc & E1000_MANC_SMBUS_EN) &&
+ !(manc & E1000_MANC_ASF_EN)) {
+ ret_val = TRUE;
+ goto out;
}
out:
OpenPOWER on IntegriCloud