aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.h
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2010-10-13 10:06:49 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-14 13:45:55 -0400
commitcd801536c236e287f1d3eeee428abf9ffd523ede (patch)
tree64ab5c454c9e40111da14d8848f39ff6eaca658b /drivers/net/cnic.h
parentc06c0462250a5dbc9e58d00caab4cd7e6675128c (diff)
cnic: Add cnic_uio_dev struct
and put all uio related structures and ring buffers in it. This allows uio operations to be done independent of the cnic device structures. 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.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h
index 47cd801af857..928af9e64824 100644
--- a/drivers/net/cnic.h
+++ b/drivers/net/cnic.h
@@ -195,6 +195,23 @@ struct iro {
195 u16 size; 195 u16 size;
196}; 196};
197 197
198struct cnic_uio_dev {
199 struct uio_info cnic_uinfo;
200 u32 uio_dev;
201
202 int l2_ring_size;
203 void *l2_ring;
204 dma_addr_t l2_ring_map;
205
206 int l2_buf_size;
207 void *l2_buf;
208 dma_addr_t l2_buf_map;
209
210 struct cnic_dev *dev;
211 struct pci_dev *pdev;
212 struct list_head list;
213};
214
198struct cnic_local { 215struct cnic_local {
199 216
200 spinlock_t cnic_ulp_lock; 217 spinlock_t cnic_ulp_lock;
@@ -214,14 +231,9 @@ struct cnic_local {
214 231
215 struct cnic_eth_dev *ethdev; 232 struct cnic_eth_dev *ethdev;
216 233
217 void *l2_ring; 234 struct cnic_uio_dev *udev;
218 dma_addr_t l2_ring_map;
219 int l2_ring_size;
220 int l2_rx_ring_size;
221 235
222 void *l2_buf; 236 int l2_rx_ring_size;
223 dma_addr_t l2_buf_map;
224 int l2_buf_size;
225 int l2_single_buf_size; 237 int l2_single_buf_size;
226 238
227 u16 *rx_cons_ptr; 239 u16 *rx_cons_ptr;
@@ -301,9 +313,6 @@ struct cnic_local {
301 u32 pfid; 313 u32 pfid;
302 u32 shmem_base; 314 u32 shmem_base;
303 315
304 u32 uio_dev;
305 struct uio_info *cnic_uinfo;
306
307 struct cnic_ops *cnic_ops; 316 struct cnic_ops *cnic_ops;
308 int (*start_hw)(struct cnic_dev *); 317 int (*start_hw)(struct cnic_dev *);
309 void (*stop_hw)(struct cnic_dev *); 318 void (*stop_hw)(struct cnic_dev *);