mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Strange patch to the Z85230 driver.
@ 2002-10-12 18:02 Alan Cox
  2002-10-12 17:59 ` William Lee Irwin III
  2002-10-12 18:19 ` Linus Torvalds
  0 siblings, 2 replies; 4+ messages in thread
From: Alan Cox @ 2002-10-12 18:02 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List

These are DMA ring buffers for ISA DMA, they do not need to be zeroed. 

diff -Nru a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c
--- a/drivers/net/wan/z85230.c	Fri Oct 11 21:22:51 2002
+++ b/drivers/net/wan/z85230.c	Fri Oct 11 21:22:51 2002
@@ -889,12 +889,12 @@
 	if(c->mtu  > PAGE_SIZE/2)
 		return -EMSGSIZE;
 	 
-	c->rx_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA);
+	c->rx_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
 	if(c->rx_buf[0]==NULL)
 		return -ENOBUFS;
 	c->rx_buf[1]=c->rx_buf[0]+PAGE_SIZE/2;
 	
-	c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA);
+	c->tx_dma_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
 	if(c->tx_dma_buf[0]==NULL)
 	{
 		free_page((unsigned long)c->rx_buf[0]);
@@ -1079,7 +1079,7 @@
 	if(c->mtu  > PAGE_SIZE/2)
 		return -EMSGSIZE;
 	 
-	c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA);
+	c->tx_dma_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
 	if(c->tx_dma_buf[0]==NULL)
 		return -ENOBUFS;
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-10-12 19:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-12 18:02 Strange patch to the Z85230 driver Alan Cox
2002-10-12 17:59 ` William Lee Irwin III
2002-10-12 18:19 ` Linus Torvalds
2002-10-12 19:31   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®