X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fnet%2Feepro100.c;h=36b5508f45826cc529c1c57beb05217360b078d1;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=56fc87881626bdc254154e2c81982a45abb92a08;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index 56fc87881..36b5508f4 100644 --- a/drivers/net/eepro100.c +++ b/drivers/net/eepro100.c @@ -87,12 +87,6 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1}; /* Size of an pre-allocated Rx buffer: + slack.*/ #define PKT_BUF_SZ 1536 -#if !defined(__OPTIMIZE__) || !defined(__KERNEL__) -#warning You must compile this file with the correct options! -#warning See the last lines of the source file. -#error You must compile this driver with "-O". -#endif - #include #include #include @@ -1027,7 +1021,7 @@ speedo_open(struct net_device *dev) /* Set up the Tx queue early.. */ sp->cur_tx = 0; sp->dirty_tx = 0; - sp->last_cmd = 0; + sp->last_cmd = NULL; sp->tx_full = 0; sp->in_interrupt = 0; @@ -1361,7 +1355,7 @@ static void speedo_purge_tx(struct net_device *dev) le32_to_cpu(sp->tx_ring[entry].tx_buf_addr0), sp->tx_skbuff[entry]->len, PCI_DMA_TODEVICE); dev_kfree_skb_irq(sp->tx_skbuff[entry]); - sp->tx_skbuff[entry] = 0; + sp->tx_skbuff[entry] = NULL; } sp->dirty_tx++; } @@ -1565,7 +1559,7 @@ static void speedo_tx_buffer_gc(struct net_device *dev) le32_to_cpu(sp->tx_ring[entry].tx_buf_addr0), sp->tx_skbuff[entry]->len, PCI_DMA_TODEVICE); dev_kfree_skb_irq(sp->tx_skbuff[entry]); - sp->tx_skbuff[entry] = 0; + sp->tx_skbuff[entry] = NULL; } dirty_tx++; } @@ -1938,7 +1932,7 @@ speedo_close(struct net_device *dev) /* Free all the skbuffs in the Rx and Tx queues. */ for (i = 0; i < RX_RING_SIZE; i++) { struct sk_buff *skb = sp->rx_skbuff[i]; - sp->rx_skbuff[i] = 0; + sp->rx_skbuff[i] = NULL; /* Clear the Rx descriptors. */ if (skb) { pci_unmap_single(sp->pdev, @@ -1950,7 +1944,7 @@ speedo_close(struct net_device *dev) for (i = 0; i < TX_RING_SIZE; i++) { struct sk_buff *skb = sp->tx_skbuff[i]; - sp->tx_skbuff[i] = 0; + sp->tx_skbuff[i] = NULL; /* Clear the Tx descriptors. */ if (skb) { pci_unmap_single(sp->pdev, @@ -2180,7 +2174,7 @@ static void set_rx_mode(struct net_device *dev) last_cmd = sp->last_cmd; sp->last_cmd = (struct descriptor *)&sp->tx_ring[entry]; - sp->tx_skbuff[entry] = 0; /* Redundant. */ + sp->tx_skbuff[entry] = NULL; /* Redundant. */ sp->tx_ring[entry].status = cpu_to_le32(CmdSuspend | CmdConfigure); sp->tx_ring[entry].link = cpu_to_le32(TX_RING_ELEM_DMA(sp, (entry + 1) % TX_RING_SIZE)); @@ -2223,7 +2217,7 @@ static void set_rx_mode(struct net_device *dev) last_cmd = sp->last_cmd; sp->last_cmd = (struct descriptor *)&sp->tx_ring[entry]; - sp->tx_skbuff[entry] = 0; + sp->tx_skbuff[entry] = NULL; sp->tx_ring[entry].status = cpu_to_le32(CmdSuspend | CmdMulticastList); sp->tx_ring[entry].link = cpu_to_le32(TX_RING_ELEM_DMA(sp, (entry + 1) % TX_RING_SIZE)); @@ -2304,7 +2298,7 @@ static void set_rx_mode(struct net_device *dev) sp->last_cmd = mc_setup_frm; /* Change the command to a NoOp, pointing to the CmdMulti command. */ - sp->tx_skbuff[entry] = 0; + sp->tx_skbuff[entry] = NULL; sp->tx_ring[entry].status = cpu_to_le32(CmdNOp); sp->tx_ring[entry].link = cpu_to_le32(mc_blk->frame_dma);