diff options
author | Michael Chan <mchan@broadcom.com> | 2010-10-13 14:06:49 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-14 10:45:55 -0700 |
commit | cd801536c236e287f1d3eeee428abf9ffd523ede (patch) | |
tree | 64ab5c454c9e40111da14d8848f39ff6eaca658b /drivers/net/cnic.h | |
parent | c06c0462250a5dbc9e58d00caab4cd7e6675128c (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.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/drivers/net/cnic.h b/drivers/net/cnic.h index 47cd801af85..928af9e6482 100644 --- a/drivers/net/cnic.h +++ b/drivers/net/cnic.h @@ -195,6 +195,23 @@ struct iro { u16 size; }; +struct cnic_uio_dev { + struct uio_info cnic_uinfo; + u32 uio_dev; + + int l2_ring_size; + void *l2_ring; + dma_addr_t l2_ring_map; + + int l2_buf_size; + void *l2_buf; + dma_addr_t l2_buf_map; + + struct cnic_dev *dev; + struct pci_dev *pdev; + struct list_head list; +}; + struct cnic_local { spinlock_t cnic_ulp_lock; @@ -214,14 +231,9 @@ struct cnic_local { struct cnic_eth_dev *ethdev; - void *l2_ring; - dma_addr_t l2_ring_map; - int l2_ring_size; - int l2_rx_ring_size; + struct cnic_uio_dev *udev; - void *l2_buf; - dma_addr_t l2_buf_map; - int l2_buf_size; + int l2_rx_ring_size; int l2_single_buf_size; u16 *rx_cons_ptr; @@ -301,9 +313,6 @@ struct cnic_local { u32 pfid; u32 shmem_base; - u32 uio_dev; - struct uio_info *cnic_uinfo; - struct cnic_ops *cnic_ops; int (*start_hw)(struct cnic_dev *); void (*stop_hw)(struct cnic_dev *); |