summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/cnic.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2012-09-08 10:01:04 +0400
committerDavid S. Miller <davem@davemloft.net>2012-09-10 23:48:21 +0400
commit51a8f54d13f1b2e91da214ff1e619628bd68fd27 (patch)
tree4fd27d57a04e4043c58b0301543bbd0db694e42a /drivers/net/ethernet/broadcom/cnic.h
parent8cc0e028eda5bc07a4b816411448065b6892e383 (diff)
downloadlinux-51a8f54d13f1b2e91da214ff1e619628bd68fd27.tar.xz
cnic: Allocate kcq resource only on devices that support FCoE.
To save memory and to exit IRQ loop quicker on devices that don't support FCoE. Reviewed-by: Eddie Wai <eddie.wai@broadcom.com> Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/cnic.h')
-rw-r--r--drivers/net/ethernet/broadcom/cnic.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.h b/drivers/net/ethernet/broadcom/cnic.h
index 9643e3a81a7d..148604c3fa0c 100644
--- a/drivers/net/ethernet/broadcom/cnic.h
+++ b/drivers/net/ethernet/broadcom/cnic.h
@@ -475,6 +475,10 @@ struct bnx2x_bd_chain_next {
MAX_STAT_COUNTER_ID_E1))
#endif
+#define CNIC_SUPPORTS_FCOE(cp) \
+ (BNX2X_CHIP_IS_E2_PLUS((cp)->chip_id) && \
+ !((cp)->ethdev->drv_state & CNIC_DRV_STATE_NO_FCOE))
+
#define CNIC_RAMROD_TMO (HZ / 4)
#endif