summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
diff options
context:
space:
mode:
authorDmitry Kravkov2011-11-28 13:31:49 +0100
committerDavid S. Miller2011-11-30 01:02:57 +0100
commit614c76df1d1224dc2eee8678fab6e0b95b49b7da (patch)
treefc69e019e8d5c833ddfe1188ea94fc774707411d /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
parentcan: cc770: legacy CC770 ISA bus driver (diff)
downloadkernel-qcow2-linux-614c76df1d1224dc2eee8678fab6e0b95b49b7da.tar.gz
kernel-qcow2-linux-614c76df1d1224dc2eee8678fab6e0b95b49b7da.tar.xz
kernel-qcow2-linux-614c76df1d1224dc2eee8678fab6e0b95b49b7da.zip
bnx2x: handle iSCSI SD mode
in iSCSI SD mode to bnx2x device assigned single mac address which is supposted to be iscsi mac. If this mode is recognized bnx2x will disable LRO, decrease number of queues to 1 and rx ring size to the minumum allowed by FW, this in order minimize memory use. It will tranfer mac for iscsi usage and zero primary mac of the netdev. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
index 80c5ed08e419..2891cdcabdc8 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
@@ -20,6 +20,7 @@
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
#include "bnx2x.h"
@@ -1554,4 +1555,15 @@ static inline void bnx2x_update_drv_flags(struct bnx2x *bp, u32 flags, u32 set)
}
}
+static inline bool bnx2x_is_valid_ether_addr(struct bnx2x *bp, u8 *addr)
+{
+ if (is_valid_ether_addr(addr))
+ return true;
+#ifdef BCM_CNIC
+ if (is_zero_ether_addr(addr) && IS_MF_ISCSI_SD(bp))
+ return true;
+#endif
+ return false;
+}
+
#endif /* BNX2X_CMN_H */