linux/drivers/net/ethernet
David Ertman b3e5bf1ff3 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>
2014-05-26 23:53:11 -07:00
..
3com net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
8390 net: 8390: use time_after() for time comparison 2014-05-18 21:24:52 -04:00
adaptec net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
adi bfin_mac: remove empty MDIO bus reset function 2014-03-28 01:38:02 -04:00
aeroflex net: greth: remove empty MDIO bus reset function 2014-03-28 01:38:01 -04:00
allwinner net: sun4i-emac: add promiscuous support 2014-04-12 01:59:38 -04:00
alteon net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
altera Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
amd net/ariadne: delete unneeded call to netdev_priv 2014-05-15 16:57:47 -04:00
apple macmace: add missing platform_set_drvdata() in mace_probe() 2013-11-11 14:02:08 -05:00
arc arc_emac: add netpoll support 2014-05-13 18:02:24 -04:00
atheros net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
broadcom tg3: Override clock, link aware and link idle mode during NVRAM dump 2014-05-24 23:39:50 -04:00
brocade net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
cadence net: macb: Fix race between HW and driver 2014-05-05 17:11:18 -04:00
calxeda net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
chelsio net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
cirrus cs89x0: Call dev_consume_skb_any instead of dev_kfree_skb. 2014-03-24 21:18:58 -07:00
cisco enic: Add support for adaptive interrupt coalescing 2014-05-21 17:04:13 -04:00
davicom dm9000: Call dev_consume_skb_any instead of dev_kfree_skb. 2014-03-24 21:18:59 -07:00
dec net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
dlink net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
faraday net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
freescale ucc_geth: use the new fixed PHY helpers 2014-05-22 15:16:44 -04:00
fujitsu net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
hp
i825xx i825xx: Call dev_kfree_skb_any instead of dev_kfree_skb. 2014-03-24 21:19:02 -07:00
ibm net: ethernet: ibm: ehea: ehea_qmr.c: Fix for possible null pointer dereference 2014-05-18 21:26:02 -04:00
icplus net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
intel e1000e: Failure to write SHRA turns on PROMISC mode 2014-05-26 23:53:11 -07:00
marvell net: mvneta: Remove unneeded 'weigth' field 2014-05-23 15:31:49 -04:00
mellanox Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
micrel net: ks8851: Add of match table 2014-05-24 14:03:21 -04:00
microchip net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
moxa drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
myricom net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
natsemi net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
neterion vxge: Use time_before() 2014-05-21 16:42:30 -04:00
nuvoton
nvidia net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
nxp drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
octeon Merge branch 'for-linus-dma-masks' of git://git.linaro.org/people/rmk/linux-arm 2013-11-14 07:55:21 +09:00
oki-semi net: pch_gbe depends on x86_32 2014-05-16 17:00:58 -04:00
packetengines net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
pasemi drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
qlogic net-next:v4: Add support to configure SR-IOV VF minimum and maximum Tx rate through ip tool. 2014-05-23 15:04:02 -04:00
rdc r6040: remove empty MDIO bus reset function 2014-03-28 01:38:02 -04:00
realtek net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
renesas sh_eth: replace devm_kzalloc() with devm_kmalloc_array() 2014-05-13 18:51:27 -04:00
samsung net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
seeq drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
sfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
sgi drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
silan sc92031: Call dev_consume_skb_any instead of dev_kfree_skb. 2014-03-24 21:19:08 -07:00
sis net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
smsc net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
stmicro net: driver: stmicro: Remove some useless the lock protection 2014-05-24 23:32:53 -04:00
sun net: cassini: use nested lock annotation 2014-05-09 16:34:10 -04:00
tehuti net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
ti net: davinci_emac: fix oops caused by uninitialized ndev->dev 2014-05-22 15:22:36 -04:00
tile tilepro: Call dev_consume_skb_any instead of kfree_skb. 2014-03-24 21:19:12 -07:00
toshiba spider_net: Call dev_consume_skb_any instead of dev_kfree_skb. 2014-03-24 21:19:13 -07:00
tundra drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
via net: via-rhine: Convert #ifdef USE_MMIO to a runtime flag 2014-05-05 15:36:41 -04:00
wiznet net: w5100: Use devm_ioremap_resource() 2014-02-28 16:57:24 -05:00
xilinx xilinx: Use time_before_eq() 2014-05-22 15:50:13 -04:00
xircom ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
xscale net: ptp: move PTP classifier in its own file 2014-04-01 16:43:18 -04:00
dnet.c dnet: remove empty MDIO bus reset function 2014-03-28 01:38:02 -04:00
dnet.h
ec_bhf.c driver/net/ethernet/ec_bhf.c: fix sparse warnings 2014-05-14 16:09:33 -04:00
ethoc.c net: ethoc: remove ethoc_config 2014-04-21 14:58:48 -04:00
fealnx.c net: fealnx: remove unnecessary pci_set_drvdata() 2013-10-21 17:21:01 -04:00
jme.c jme: Fix unmap loop counting error: 2014-05-14 15:11:22 -04:00
jme.h jme: Remove unused #define PFX 2013-11-07 02:14:32 -05:00
Kconfig Driver for Beckhoff CX5020 EtherCAT master module. 2014-05-08 22:59:25 -04:00
korina.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00
lantiq_etop.c netdevice: add queue selection fallback handler for ndo_select_queue 2014-02-17 00:36:34 -05:00
Makefile Driver for Beckhoff CX5020 EtherCAT master module. 2014-05-08 22:59:25 -04:00
netx-eth.c ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
s6gmac.c drivers/net: delete non-required instances of include <linux/init.h> 2014-01-16 11:53:26 -08:00