Commit e6c28894 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

cnic: Unify kcq allocation for all devices.

By creating a common data stucture kcq_info for all devices, the kcq
(kernel completion queue) for all devices can be allocated by common
code.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 66fee9ed
This diff is collapsed.
...@@ -169,6 +169,16 @@ struct cnic_context { ...@@ -169,6 +169,16 @@ struct cnic_context {
} proto; } proto;
}; };
struct kcq_info {
struct cnic_dma dma;
struct kcqe **kcq;
u16 *hw_prod_idx_ptr;
u16 sw_prod_idx;
u16 *status_idx_ptr;
u32 io_addr;
};
struct cnic_local { struct cnic_local {
spinlock_t cnic_ulp_lock; spinlock_t cnic_ulp_lock;
...@@ -202,9 +212,6 @@ struct cnic_local { ...@@ -202,9 +212,6 @@ struct cnic_local {
u16 rx_cons; u16 rx_cons;
u16 tx_cons; u16 tx_cons;
u32 kwq_cid_addr;
u32 kcq_cid_addr;
struct cnic_dma kwq_info; struct cnic_dma kwq_info;
struct kwqe **kwq; struct kwqe **kwq;
...@@ -218,11 +225,7 @@ struct cnic_local { ...@@ -218,11 +225,7 @@ struct cnic_local {
u16 *kwq_con_idx_ptr; u16 *kwq_con_idx_ptr;
u16 kwq_con_idx; u16 kwq_con_idx;
struct cnic_dma kcq_info; struct kcq_info kcq1;
struct kcqe **kcq;
u16 kcq_prod_idx;
u32 kcq_io_addr;
union { union {
void *gen; void *gen;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment