diff options
author | Michael Chan <mchan@broadcom.com> | 2010-06-24 14:58:39 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-25 20:37:19 -0700 |
commit | e6c2889478f04b30e5a71d753734644c579472fa (patch) | |
tree | e5cf3e039b6b62684845b9b6e3044784e1d129ad /drivers/net/cnic.h | |
parent | 66fee9ed03a4413ea054e437b65af6fd3583b4db (diff) | |
download | talos-obmc-linux-e6c2889478f04b30e5a71d753734644c579472fa.tar.gz talos-obmc-linux-e6c2889478f04b30e5a71d753734644c579472fa.zip |
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: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cnic.h')
-rw-r--r-- | drivers/net/cnic.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index b7e2f7fcfb1c..275c36114d85 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h @@ -169,6 +169,16 @@ struct cnic_context { } 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 { spinlock_t cnic_ulp_lock; @@ -202,9 +212,6 @@ struct cnic_local { u16 rx_cons; u16 tx_cons; - u32 kwq_cid_addr; - u32 kcq_cid_addr; - struct cnic_dma kwq_info; struct kwqe **kwq; @@ -218,11 +225,7 @@ struct cnic_local { u16 *kwq_con_idx_ptr; u16 kwq_con_idx; - struct cnic_dma kcq_info; - struct kcqe **kcq; - - u16 kcq_prod_idx; - u32 kcq_io_addr; + struct kcq_info kcq1; union { void *gen; |