aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c515.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/3c515.c')
-rw-r--r--drivers/net/3c515.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c
index 37faf36e2457..063b049ffe55 100644
--- a/drivers/net/3c515.c
+++ b/drivers/net/3c515.c
@@ -764,10 +764,11 @@ static int corkscrew_open(struct net_device *dev)
764 /* Use the now-standard shared IRQ implementation. */ 764 /* Use the now-standard shared IRQ implementation. */
765 if (vp->capabilities == 0x11c7) { 765 if (vp->capabilities == 0x11c7) {
766 /* Corkscrew: Cannot share ISA resources. */ 766 /* Corkscrew: Cannot share ISA resources. */
767 if (dev->irq == 0 767 if (dev->irq == 0 ||
768 || dev->dma == 0 768 dev->dma == 0 ||
769 || request_irq(dev->irq, corkscrew_interrupt, 0, 769 request_irq(dev->irq, corkscrew_interrupt, 0,
770 vp->product_name, dev)) return -EAGAIN; 770 vp->product_name, dev))
771 return -EAGAIN;
771 enable_dma(dev->dma); 772 enable_dma(dev->dma);
772 set_dma_mode(dev->dma, DMA_MODE_CASCADE); 773 set_dma_mode(dev->dma, DMA_MODE_CASCADE);
773 } else if (request_irq(dev->irq, corkscrew_interrupt, IRQF_SHARED, 774 } else if (request_irq(dev->irq, corkscrew_interrupt, IRQF_SHARED,
@@ -1368,8 +1369,8 @@ static int boomerang_rx(struct net_device *dev)
1368 1369
1369 /* Check if the packet is long enough to just accept without 1370 /* Check if the packet is long enough to just accept without
1370 copying to a properly sized skbuff. */ 1371 copying to a properly sized skbuff. */
1371 if (pkt_len < rx_copybreak 1372 if (pkt_len < rx_copybreak &&
1372 && (skb = dev_alloc_skb(pkt_len + 4)) != NULL) { 1373 (skb = dev_alloc_skb(pkt_len + 4)) != NULL) {
1373 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ 1374 skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */
1374 /* 'skb_put()' points to the start of sk_buff data area. */ 1375 /* 'skb_put()' points to the start of sk_buff data area. */
1375 memcpy(skb_put(skb, pkt_len), 1376 memcpy(skb_put(skb, pkt_len),