From d4ed8f8d1fb7d59eb63d2eada9a32c2f8c3795e2 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Wed, 13 Dec 2006 15:06:59 -0600 Subject: 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 Cc: James K Lewis Cc: Arnd Bergmann Signed-off-by: Jeff Garzik --- drivers/net/spider_net.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'drivers/net/spider_net.h') diff --git a/drivers/net/spider_net.h b/drivers/net/spider_net.h index 3e196df29790..4b76ef9524d1 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...) \ -- cgit v1.2.2 From 5a028877d2a350ebba3cda924cbf7f3bd2eb2135 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Wed, 13 Dec 2006 15:08:25 -0600 Subject: Spidernet add net_ratelimit to suppress long output This patch adds net_ratelimit to many of the printks in order to limit extraneous warning messages (created in response to Bug 28554). This patch supercedes all previous ratelimit patches. This has been tested, please apply. From: James K Lewis Signed-off-by: James K Lewis Signed-off-by: Linas Vepstas Signed-off-by: Jeff Garzik --- drivers/net/spider_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/spider_net.h') diff --git a/drivers/net/spider_net.h b/drivers/net/spider_net.h index 4b76ef9524d1..0810e12e210b 100644 --- a/drivers/net/spider_net.h +++ b/drivers/net/spider_net.h @@ -24,7 +24,7 @@ #ifndef _SPIDER_NET_H #define _SPIDER_NET_H -#define VERSION "1.6 A" +#define VERSION "1.6 B" #include "sungem_phy.h" -- cgit v1.2.2 From 75856175c26f89198ec64eb2480ed00c4a39a5d6 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Wed, 13 Dec 2006 15:10:06 -0600 Subject: Spidernet remove rxramfull tasklet Get rid of the rxramfull tasklet, and let the NAPI poll routine deal with this situation. (The rxramfull interrupt is simply stating that the h/w has run out of room for incoming packets). Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann Signed-off-by: Jeff Garzik --- drivers/net/spider_net.h | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/net/spider_net.h') diff --git a/drivers/net/spider_net.h b/drivers/net/spider_net.h index 0810e12e210b..2fec5cf76926 100644 --- a/drivers/net/spider_net.h +++ b/drivers/net/spider_net.h @@ -442,7 +442,6 @@ struct spider_net_card { struct spider_net_descr_chain rx_chain; struct spider_net_descr *low_watermark; - struct tasklet_struct rxram_full_tl; struct timer_list tx_timer; struct work_struct tx_timeout_task; atomic_t tx_timeout_task_counter; -- cgit v1.2.2