summaryrefslogtreecommitdiffstats
path: root/drivers/net/spider_net.h
diff options
context:
space:
mode:
authorLinas Vepstas <linas@austin.ibm.com>2006-12-13 15:06:59 -0600
committerJeff Garzik <jeff@garzik.org>2007-02-05 16:58:43 -0500
commitd4ed8f8d1fb7d59eb63d2eada9a32c2f8c3795e2 (patch)
tree5deb53b975439ce61e40bee57259c2d113df598a /drivers/net/spider_net.h
parent834324687d08e0f67b167934cb56406aa98ff8c6 (diff)
downloadop-kernel-dev-d4ed8f8d1fb7d59eb63d2eada9a32c2f8c3795e2.zip
op-kernel-dev-d4ed8f8d1fb7d59eb63d2eada9a32c2f8c3795e2.tar.gz
Spidernet DMA coalescing
The current driver code performs 512 DMA mappings of a bunch of 32-byte ring descriptor structures. This is silly, as they are all in contiguous memory. This patch changes the code to dma_map_coherent() each rx/tx ring as a whole. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: James K Lewis <jklewis@us.ibm.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/spider_net.h')
-rw-r--r--drivers/net/spider_net.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/spider_net.h b/drivers/net/spider_net.h
index 3e196df..4b76ef95 100644
--- a/drivers/net/spider_net.h
+++ b/drivers/net/spider_net.h
@@ -378,6 +378,9 @@ struct spider_net_descr_chain {
spinlock_t lock;
struct spider_net_descr *head;
struct spider_net_descr *tail;
+ struct spider_net_descr *ring;
+ int num_desc;
+ dma_addr_t dma_addr;
};
/* descriptor data_status bits */
@@ -397,8 +400,6 @@ struct spider_net_descr_chain {
* 701b8000 would be correct, but every packets gets that flag */
#define SPIDER_NET_DESTROY_RX_FLAGS 0x700b8000
-#define SPIDER_NET_DESCR_SIZE 32
-
/* this will be bigger some time */
struct spider_net_options {
int rx_csum; /* for rx: if 0 ip_summed=NONE,
@@ -441,25 +442,17 @@ struct spider_net_card {
struct spider_net_descr_chain rx_chain;
struct spider_net_descr *low_watermark;
- struct net_device_stats netdev_stats;
-
- struct spider_net_options options;
-
- spinlock_t intmask_lock;
struct tasklet_struct rxram_full_tl;
struct timer_list tx_timer;
-
struct work_struct tx_timeout_task;
atomic_t tx_timeout_task_counter;
wait_queue_head_t waitq;
/* for ethtool */
int msg_enable;
- int num_rx_desc;
- int num_tx_desc;
+ struct net_device_stats netdev_stats;
struct spider_net_extra_stats spider_stats;
-
- struct spider_net_descr descr[0];
+ struct spider_net_options options;
};
#define pr_err(fmt,arg...) \
OpenPOWER on IntegriCloud