aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/enic/vnic_rq.h
diff options
context:
space:
mode:
authorScott Feldman <scofeldm@cisco.com>2009-09-03 17:02:45 +0000
committerDavid S. Miller <davem@davemloft.net>2009-09-03 20:19:25 -0700
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 f7b5730cb74..35e736cc2d8 100644
--- a/drivers/net/enic/vnic_rq.h
+++ b/drivers/net/enic/vnic_rq.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008 Cisco Systems, Inc. All rights reserved.
+ * Copyright 2008, 2009 Cisco Systems, Inc. All rights reserved.
* Copyright 2007 Nuova Systems, Inc. All rights reserved.
*
* This program is free software; you may redistribute it and/or modify
@@ -79,7 +79,6 @@ struct vnic_rq {
struct vnic_rq_buf *to_use;
struct vnic_rq_buf *to_clean;
void *os_buf_head;
- unsigned int buf_index;
unsigned int pkts_outstanding;
};
@@ -105,11 +104,6 @@ static inline unsigned int vnic_rq_next_index(struct vnic_rq *rq)
return rq->to_use->index;
}
-static inline unsigned int vnic_rq_next_buf_index(struct vnic_rq *rq)
-{
- return rq->buf_index++;
-}
-
static inline void vnic_rq_post(struct vnic_rq *rq,
void *os_buf, unsigned int os_buf_index,
dma_addr_t dma_addr, unsigned int len)
@@ -204,6 +198,10 @@ static inline int vnic_rq_fill(struct vnic_rq *rq,
void vnic_rq_free(struct vnic_rq *rq);
int vnic_rq_alloc(struct vnic_dev *vdev, struct vnic_rq *rq, unsigned int index,
unsigned int desc_count, unsigned int desc_size);
+void vnic_rq_init_start(struct vnic_rq *rq, unsigned int cq_index,
+ unsigned int fetch_index, unsigned int posted_index,
+ unsigned int error_interrupt_enable,
+ unsigned int error_interrupt_offset);
void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index,
unsigned int error_interrupt_enable,
unsigned int error_interrupt_offset);