diff options
author | Michael Chan <mchan@broadcom.com> | 2010-06-24 10:58:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-25 23:37:19 -0400 |
commit | e6c2889478f04b30e5a71d753734644c579472fa (patch) | |
tree | e5cf3e039b6b62684845b9b6e3044784e1d129ad /drivers/net/cnic.h | |
parent | 66fee9ed03a4413ea054e437b65af6fd3583b4db (diff) |
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 { | |||
169 | } proto; | 169 | } proto; |
170 | }; | 170 | }; |
171 | 171 | ||
172 | struct kcq_info { | ||
173 | struct cnic_dma dma; | ||
174 | struct kcqe **kcq; | ||
175 | |||
176 | u16 *hw_prod_idx_ptr; | ||
177 | u16 sw_prod_idx; | ||
178 | u16 *status_idx_ptr; | ||
179 | u32 io_addr; | ||
180 | }; | ||
181 | |||
172 | struct cnic_local { | 182 | struct cnic_local { |
173 | 183 | ||
174 | spinlock_t cnic_ulp_lock; | 184 | spinlock_t cnic_ulp_lock; |
@@ -202,9 +212,6 @@ struct cnic_local { | |||
202 | u16 rx_cons; | 212 | u16 rx_cons; |
203 | u16 tx_cons; | 213 | u16 tx_cons; |
204 | 214 | ||
205 | u32 kwq_cid_addr; | ||
206 | u32 kcq_cid_addr; | ||
207 | |||
208 | struct cnic_dma kwq_info; | 215 | struct cnic_dma kwq_info; |
209 | struct kwqe **kwq; | 216 | struct kwqe **kwq; |
210 | 217 | ||
@@ -218,11 +225,7 @@ struct cnic_local { | |||
218 | u16 *kwq_con_idx_ptr; | 225 | u16 *kwq_con_idx_ptr; |
219 | u16 kwq_con_idx; | 226 | u16 kwq_con_idx; |
220 | 227 | ||
221 | struct cnic_dma kcq_info; | 228 | struct kcq_info kcq1; |
222 | struct kcqe **kcq; | ||
223 | |||
224 | u16 kcq_prod_idx; | ||
225 | u32 kcq_io_addr; | ||
226 | 229 | ||
227 | union { | 230 | union { |
228 | void *gen; | 231 | void *gen; |