summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2011-11-28 12:31:49 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-29 19:02:57 -0500
commit614c76df1d1224dc2eee8678fab6e0b95b49b7da (patch)
treefc69e019e8d5c833ddfe1188ea94fc774707411d /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
parent7e02e5433e004713a89f5f865a243133b55dcc88 (diff)
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 80c5ed08e41..2891cdcabdc 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 */