diff options
Diffstat (limited to 'drivers/net/tokenring/3c359.c')
-rw-r--r-- | drivers/net/tokenring/3c359.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index bf621328b601..43853e3b210e 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
@@ -296,8 +296,9 @@ static int __devinit xl_probe(struct pci_dev *pdev, | |||
296 | } ; | 296 | } ; |
297 | 297 | ||
298 | /* | 298 | /* |
299 | * Allowing init_trdev to allocate the dev->priv structure will align xl_private | 299 | * Allowing init_trdev to allocate the private data will align |
300 | * on a 32 bytes boundary which we need for the rx/tx descriptors | 300 | * xl_private on a 32 bytes boundary which we need for the rx/tx |
301 | * descriptors | ||
301 | */ | 302 | */ |
302 | 303 | ||
303 | dev = alloc_trdev(sizeof(struct xl_private)) ; | 304 | dev = alloc_trdev(sizeof(struct xl_private)) ; |
@@ -638,13 +639,13 @@ static int xl_open(struct net_device *dev) | |||
638 | /* These MUST be on 8 byte boundaries */ | 639 | /* These MUST be on 8 byte boundaries */ |
639 | xl_priv->xl_tx_ring = kzalloc((sizeof(struct xl_tx_desc) * XL_TX_RING_SIZE) + 7, GFP_DMA | GFP_KERNEL); | 640 | xl_priv->xl_tx_ring = kzalloc((sizeof(struct xl_tx_desc) * XL_TX_RING_SIZE) + 7, GFP_DMA | GFP_KERNEL); |
640 | if (xl_priv->xl_tx_ring == NULL) { | 641 | if (xl_priv->xl_tx_ring == NULL) { |
641 | printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n", | 642 | printk(KERN_WARNING "%s: Not enough memory to allocate tx buffers.\n", |
642 | dev->name); | 643 | dev->name); |
643 | free_irq(dev->irq,dev); | 644 | free_irq(dev->irq,dev); |
644 | return -ENOMEM; | 645 | return -ENOMEM; |
645 | } | 646 | } |
646 | xl_priv->xl_rx_ring = kzalloc((sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL); | 647 | xl_priv->xl_rx_ring = kzalloc((sizeof(struct xl_rx_desc) * XL_RX_RING_SIZE) +7, GFP_DMA | GFP_KERNEL); |
647 | if (xl_priv->xl_tx_ring == NULL) { | 648 | if (xl_priv->xl_rx_ring == NULL) { |
648 | printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n", | 649 | printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers.\n", |
649 | dev->name); | 650 | dev->name); |
650 | free_irq(dev->irq,dev); | 651 | free_irq(dev->irq,dev); |
@@ -669,6 +670,8 @@ static int xl_open(struct net_device *dev) | |||
669 | if (i==0) { | 670 | if (i==0) { |
670 | printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers. Adapter disabled \n",dev->name) ; | 671 | printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers. Adapter disabled \n",dev->name) ; |
671 | free_irq(dev->irq,dev) ; | 672 | free_irq(dev->irq,dev) ; |
673 | kfree(xl_priv->xl_tx_ring); | ||
674 | kfree(xl_priv->xl_rx_ring); | ||
672 | return -EIO ; | 675 | return -EIO ; |
673 | } | 676 | } |
674 | 677 | ||
@@ -974,7 +977,6 @@ static void xl_rx(struct net_device *dev) | |||
974 | 977 | ||
975 | netif_rx(skb2) ; | 978 | netif_rx(skb2) ; |
976 | } /* if multiple buffers */ | 979 | } /* if multiple buffers */ |
977 | dev->last_rx = jiffies ; | ||
978 | } /* while packet to do */ | 980 | } /* while packet to do */ |
979 | 981 | ||
980 | /* Clear the updComplete interrupt */ | 982 | /* Clear the updComplete interrupt */ |
@@ -1571,7 +1573,6 @@ static void xl_arb_cmd(struct net_device *dev) | |||
1571 | * anyway. | 1573 | * anyway. |
1572 | */ | 1574 | */ |
1573 | 1575 | ||
1574 | dev->last_rx = jiffies ; | ||
1575 | /* Acknowledge interrupt, this tells nic we are done with the arb */ | 1576 | /* Acknowledge interrupt, this tells nic we are done with the arb */ |
1576 | writel(ACK_INTERRUPT | ARBCACK | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; | 1577 | writel(ACK_INTERRUPT | ARBCACK | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; |
1577 | 1578 | ||