From 8cc0e028eda5bc07a4b816411448065b6892e383 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Sat, 8 Sep 2012 06:01:03 +0000 Subject: cnic: Add function pointers to arm IRQ for different devices. This will make it easier to exit IRQ loop and re-arm IRQ on devices that don't support FCoE. Reviewed-by: Eddie Wai Reviewed-by: Bhanu Prakash Gollapudi Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/cnic.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/ethernet/broadcom/cnic.h') diff --git a/drivers/net/ethernet/broadcom/cnic.h b/drivers/net/ethernet/broadcom/cnic.h index 30328097f51..9643e3a81a7 100644 --- a/drivers/net/ethernet/broadcom/cnic.h +++ b/drivers/net/ethernet/broadcom/cnic.h @@ -334,6 +334,7 @@ struct cnic_local { void (*enable_int)(struct cnic_dev *); void (*disable_int_sync)(struct cnic_dev *); void (*ack_int)(struct cnic_dev *); + void (*arm_int)(struct cnic_dev *, u32 index); void (*close_conn)(struct cnic_sock *, u32 opcode); }; -- cgit v1.2.3-18-g5258 From 51a8f54d13f1b2e91da214ff1e619628bd68fd27 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Sat, 8 Sep 2012 06:01:04 +0000 Subject: 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 Reviewed-by: Bhanu Prakash Gollapudi Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/cnic.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/net/ethernet/broadcom/cnic.h') diff --git a/drivers/net/ethernet/broadcom/cnic.h b/drivers/net/ethernet/broadcom/cnic.h index 9643e3a81a7..148604c3fa0 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 -- cgit v1.2.3-18-g5258