Strange patch to the Z85230 driver.

Alan Cox (alan@lxorguk.ukuu.org.uk)
12 Oct 2002 19:02:29 +0100


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/