Strange patch to the Z85230 driver.

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sat Oct 12 2002 - 13:02:29 EST


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;
 
-
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/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:44 EST