[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    [PATCH] 2.5.24 - drivers/net/tlan.c dma mapping 7/10
From:       Francois Romieu <romieu () cogenit ! fr>
Date:       2002-06-30 15:19:48
[Download RAW message or body]

- private dma storage doesn't need room for Rx/Tx buffers anymore.

--- linux-2.5.24/drivers/net/tlan.h	Sat Jun 29 23:51:42 2002
+++ linux-2.5.24/drivers/net/tlan.h	Sat Jun 29 23:56:02 2002
@@ -42,6 +42,7 @@
 #define TLAN_NUM_RX_LISTS	32
 #define TLAN_NUM_TX_LISTS	64
 #define TLAN_NUM_ALL_LISTS	(TLAN_NUM_RX_LISTS+TLAN_NUM_TX_LISTS)
+#define TLAN_TOTAL_SIZE		TLAN_NUM_ALL_LISTS*sizeof(TLanList)
 
 #define TLAN_IGNORE		0
 #define TLAN_RECORD		1
--- linux-2.5.24/drivers/net/tlan.c	Sat Jun 29 23:51:38 2002
+++ linux-2.5.24/drivers/net/tlan.c	Sun Jun 30 00:00:07 2002
@@ -813,13 +813,7 @@ static int TLan_Init( struct net_device 
 			return -EIO;
 		}
 	
-	if ( bbuf ) {
-		dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS )
-	           * ( sizeof(TLanList) + TLAN_MAX_FRAME_SIZE );
-	} else {
-		dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS )
-	           * ( sizeof(TLanList) );
-	}
+	dma_size = TLAN_TOTAL_SIZE;	
 	priv->dmaStorage = kmalloc(dma_size, GFP_KERNEL | GFP_DMA);
 	if ( priv->dmaStorage == NULL ) {
 		printk(KERN_ERR "TLAN:  Could not allocate lists and buffers for %s.\n",
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic