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

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: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c06c0462
This diff is collapsed.
...@@ -195,6 +195,23 @@ struct iro { ...@@ -195,6 +195,23 @@ struct iro {
u16 size; 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 { struct cnic_local {
spinlock_t cnic_ulp_lock; spinlock_t cnic_ulp_lock;
...@@ -214,14 +231,9 @@ struct cnic_local { ...@@ -214,14 +231,9 @@ struct cnic_local {
struct cnic_eth_dev *ethdev; struct cnic_eth_dev *ethdev;
void *l2_ring; struct cnic_uio_dev *udev;
dma_addr_t l2_ring_map;
int l2_ring_size;
int l2_rx_ring_size;
void *l2_buf; int l2_rx_ring_size;
dma_addr_t l2_buf_map;
int l2_buf_size;
int l2_single_buf_size; int l2_single_buf_size;
u16 *rx_cons_ptr; u16 *rx_cons_ptr;
...@@ -301,9 +313,6 @@ struct cnic_local { ...@@ -301,9 +313,6 @@ struct cnic_local {
u32 pfid; u32 pfid;
u32 shmem_base; u32 shmem_base;
u32 uio_dev;
struct uio_info *cnic_uinfo;
struct cnic_ops *cnic_ops; struct cnic_ops *cnic_ops;
int (*start_hw)(struct cnic_dev *); int (*start_hw)(struct cnic_dev *);
void (*stop_hw)(struct cnic_dev *); void (*stop_hw)(struct cnic_dev *);
......
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