aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/e1000e/hw.h
diff options
context:
space:
mode:
authorDavid Ertman <davidx.m.ertman@intel.com>2014-05-06 03:50:17 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-05-26 23:53:11 -0700
commitb3e5bf1ff32cbc58c56675498565020460c683cd (patch)
treea66a9dd9195d1f6765c803cc5c30c3696b7a9d20 /drivers/net/ethernet/intel/e1000e/hw.h
parentixgbe: avoid duplicate code in suspend and stop paths (diff)
downloadlinux-dev-b3e5bf1ff32cbc58c56675498565020460c683cd.tar.xz
linux-dev-b3e5bf1ff32cbc58c56675498565020460c683cd.zip
e1000e: Failure to write SHRA turns on PROMISC mode
Previously, the check to turn on promiscuous mode only took into account the total number of SHared Receive Address (SHRA) registers and if the request was for a register within that range. It is possible that the Management Engine might have locked a number of SHRA and not allowed a new address to be written to the requested register. Add a function to determine the number of unlocked SHRA registers. Then determine if the number of registers available is sufficient for our needs, if not then return -ENOMEM so that UNICAST PROMISC mode is activated. Since the method by which ME claims SHRA registers is non-deterministic, also add a return value to the function attempting to write an address to a SHRA, and return a -E1000_ERR_CONFIG if the write fails. The error will be passed up the function chain and allow the driver to also set UNICAST PROMISC when this happens. Cc: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/e1000e/hw.h')
-rw-r--r--drivers/net/ethernet/intel/e1000e/hw.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h
index 6b3de5f39a97..72f5475c4b90 100644
--- a/drivers/net/ethernet/intel/e1000e/hw.h
+++ b/drivers/net/ethernet/intel/e1000e/hw.h
@@ -469,8 +469,9 @@ struct e1000_mac_operations {
s32 (*setup_led)(struct e1000_hw *);
void (*write_vfta)(struct e1000_hw *, u32, u32);
void (*config_collision_dist)(struct e1000_hw *);
- void (*rar_set)(struct e1000_hw *, u8 *, u32);
+ int (*rar_set)(struct e1000_hw *, u8 *, u32);
s32 (*read_mac_addr)(struct e1000_hw *);
+ u32 (*rar_get_count)(struct e1000_hw *);
};
/* When to use various PHY register access functions: