if(c->mtu > PAGE_SIZE/2)
return -EMSGSIZE;
- c->rx_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
+ c->rx_buf[0]=(void *)get_free_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_zeroed_page(GFP_KERNEL|GFP_DMA);
+ c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA);
if(c->tx_dma_buf[0]==NULL)
{
free_page((unsigned long)c->rx_buf[0]);
if(c->mtu > PAGE_SIZE/2)
return -EMSGSIZE;
- c->tx_dma_buf[0]=(void *)get_zeroed_page(GFP_KERNEL|GFP_DMA);
+ c->tx_dma_buf[0]=(void *)get_free_page(GFP_KERNEL|GFP_DMA);
if(c->tx_dma_buf[0]==NULL)
return -ENOBUFS;
dev->chanB.dcdcheck=DCD;
/* Set up the chip level lock */
- spin_lock_init(&dev->lock);
dev->chanA.lock = &dev->lock;
dev->chanB.lock = &dev->lock;
c->tx_next_skb=NULL;
c->tx_ptr=c->tx_next_ptr;
- netif_wake_queue(c->netdevice);
if(c->tx_skb==NULL)
{
/* Idle on */
/* ABUNDER off */
write_zsreg(c, R10, c->regs[10]);
write_zsctrl(c, RES_Tx_CRC);
-//??? write_zsctrl(c, RES_EOM_L);
while(c->txcount && (read_zsreg(c,R0)&Tx_BUF_EMP))
{
}
}
+ /*
+ * Since we emptied tx_skb we can ask for more
+ */
+ netif_wake_queue(c->netdevice);
}
/**
{
struct sk_buff *skb;
- netif_wake_queue(c->netdevice);
/* Actually this can happen.*/
if(c->tx_skb==NULL)
return;
write_zsreg(c, R0, RES_Rx_CRC);
}
else
- /* Can't occur as we don't reenable the DMA irq until
+ /* Can't occur as we dont reenable the DMA irq until
after the flip is done */
printk(KERN_WARNING "%s: DMA flip overrun!\n", c->netdevice->name);
z8530_tx_begin(c);
spin_unlock_irqrestore(c->lock, flags);
- netif_wake_queue(c->netdevice);
return 0;
}