aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/vnic_rq.h
diff options
context:
space:
mode:
authorScott Feldman <scofeldm@cisco.com>2009-09-03 13:02:45 -0400
committerDavid S. Miller <davem@davemloft.net>2009-09-03 23:19:25 -0400
commit6fdfa97073a2bcbb60d900654c612b2ff09b9cb7 (patch)
tree3297813813e0a1a82664e13b52cbc79ecb36ae92 /drivers/net/enic/vnic_rq.h
parent491598a44f12fe8b862ab4123de1a1ffe9b86832 (diff)
enic: organize device initialization/deinit into separate functions
To unclutter probe() a little bit, put all device initialization code in one spot and device deinit code in another spot. Also remove unused rq->buf_index variable/func. Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic/vnic_rq.h')
-rw-r--r--drivers/net/enic/vnic_rq.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/enic/vnic_rq.h b/drivers/net/enic/vnic_rq.h
index f7b5730cb744..35e736cc2d88 100644
--- a/drivers/net/enic/vnic_rq.h
+++ b/drivers/net/enic/vnic_rq.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright 2008 Cisco Systems, Inc. All rights reserved. 2 * Copyright 2008, 2009 Cisco Systems, Inc. All rights reserved.
3 * Copyright 2007 Nuova Systems, Inc. All rights reserved. 3 * Copyright 2007 Nuova Systems, Inc. All rights reserved.
4 * 4 *
5 * This program is free software; you may redistribute it and/or modify 5 * This program is free software; you may redistribute it and/or modify
@@ -79,7 +79,6 @@ struct vnic_rq {
79 struct vnic_rq_buf *to_use; 79 struct vnic_rq_buf *to_use;
80 struct vnic_rq_buf *to_clean; 80 struct vnic_rq_buf *to_clean;
81 void *os_buf_head; 81 void *os_buf_head;
82 unsigned int buf_index;
83 unsigned int pkts_outstanding; 82 unsigned int pkts_outstanding;
84}; 83};
85 84
@@ -105,11 +104,6 @@ static inline unsigned int vnic_rq_next_index(struct vnic_rq *rq)
105 return rq->to_use->index; 104 return rq->to_use->index;
106} 105}
107 106
108static inline unsigned int vnic_rq_next_buf_index(struct vnic_rq *rq)
109{
110 return rq->buf_index++;
111}
112
113static inline void vnic_rq_post(struct vnic_rq *rq, 107static inline void vnic_rq_post(struct vnic_rq *rq,
114 void *os_buf, unsigned int os_buf_index, 108 void *os_buf, unsigned int os_buf_index,
115 dma_addr_t dma_addr, unsigned int len) 109 dma_addr_t dma_addr, unsigned int len)
@@ -204,6 +198,10 @@ static inline int vnic_rq_fill(struct vnic_rq *rq,
204void vnic_rq_free(struct vnic_rq *rq); 198void vnic_rq_free(struct vnic_rq *rq);
205int vnic_rq_alloc(struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index, 199int vnic_rq_alloc(struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index,
206 unsigned int desc_count, unsigned int desc_size); 200 unsigned int desc_count, unsigned int desc_size);
201void vnic_rq_init_start(struct vnic_rq *rq, unsigned int cq_index,
202 unsigned int fetch_index, unsigned int posted_index,
203 unsigned int error_interrupt_enable,
204 unsigned int error_interrupt_offset);
207void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index, 205void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index,
208 unsigned int error_interrupt_enable, 206 unsigned int error_interrupt_enable,
209 unsigned int error_interrupt_offset); 207 unsigned int error_interrupt_offset);