diff options
Diffstat (limited to 'drivers/net/via-rhine.c')
-rw-r--r-- | drivers/net/via-rhine.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index 1fd70583be44..593e01f64e9b 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c | |||
@@ -42,9 +42,9 @@ static int max_interrupt_work = 20; | |||
42 | 42 | ||
43 | /* Set the copy breakpoint for the copy-only-tiny-frames scheme. | 43 | /* Set the copy breakpoint for the copy-only-tiny-frames scheme. |
44 | Setting to > 1518 effectively disables this feature. */ | 44 | Setting to > 1518 effectively disables this feature. */ |
45 | #if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \ | 45 | #if defined(__alpha__) || defined(__arm__) || defined(__hppa__) || \ |
46 | || defined(CONFIG_SPARC) || defined(__ia64__) \ | 46 | defined(CONFIG_SPARC) || defined(__ia64__) || \ |
47 | || defined(__sh__) || defined(__mips__) | 47 | defined(__sh__) || defined(__mips__) |
48 | static int rx_copybreak = 1518; | 48 | static int rx_copybreak = 1518; |
49 | #else | 49 | #else |
50 | static int rx_copybreak; | 50 | static int rx_copybreak; |
@@ -1150,7 +1150,7 @@ static int rhine_open(struct net_device *dev) | |||
1150 | void __iomem *ioaddr = rp->base; | 1150 | void __iomem *ioaddr = rp->base; |
1151 | int rc; | 1151 | int rc; |
1152 | 1152 | ||
1153 | rc = request_irq(rp->pdev->irq, &rhine_interrupt, IRQF_SHARED, dev->name, | 1153 | rc = request_irq(rp->pdev->irq, rhine_interrupt, IRQF_SHARED, dev->name, |
1154 | dev); | 1154 | dev); |
1155 | if (rc) | 1155 | if (rc) |
1156 | return rc; | 1156 | return rc; |
@@ -1484,15 +1484,15 @@ static int rhine_rx(struct net_device *dev, int limit) | |||
1484 | } | 1484 | } |
1485 | } | 1485 | } |
1486 | } else { | 1486 | } else { |
1487 | struct sk_buff *skb; | 1487 | struct sk_buff *skb = NULL; |
1488 | /* Length should omit the CRC */ | 1488 | /* Length should omit the CRC */ |
1489 | int pkt_len = data_size - 4; | 1489 | int pkt_len = data_size - 4; |
1490 | 1490 | ||
1491 | /* Check if the packet is long enough to accept without | 1491 | /* Check if the packet is long enough to accept without |
1492 | copying to a minimally-sized skbuff. */ | 1492 | copying to a minimally-sized skbuff. */ |
1493 | if (pkt_len < rx_copybreak && | 1493 | if (pkt_len < rx_copybreak) |
1494 | (skb = netdev_alloc_skb(dev, pkt_len + NET_IP_ALIGN)) != NULL) { | 1494 | skb = netdev_alloc_skb_ip_align(dev, pkt_len); |
1495 | skb_reserve(skb, NET_IP_ALIGN); /* 16 byte align the IP header */ | 1495 | if (skb) { |
1496 | pci_dma_sync_single_for_cpu(rp->pdev, | 1496 | pci_dma_sync_single_for_cpu(rp->pdev, |
1497 | rp->rx_skbuff_dma[entry], | 1497 | rp->rx_skbuff_dma[entry], |
1498 | rp->rx_buf_sz, | 1498 | rp->rx_buf_sz, |
@@ -1683,8 +1683,8 @@ static void rhine_set_rx_mode(struct net_device *dev) | |||
1683 | rx_mode = 0x1C; | 1683 | rx_mode = 0x1C; |
1684 | iowrite32(0xffffffff, ioaddr + MulticastFilter0); | 1684 | iowrite32(0xffffffff, ioaddr + MulticastFilter0); |
1685 | iowrite32(0xffffffff, ioaddr + MulticastFilter1); | 1685 | iowrite32(0xffffffff, ioaddr + MulticastFilter1); |
1686 | } else if ((dev->mc_count > multicast_filter_limit) | 1686 | } else if ((dev->mc_count > multicast_filter_limit) || |
1687 | || (dev->flags & IFF_ALLMULTI)) { | 1687 | (dev->flags & IFF_ALLMULTI)) { |
1688 | /* Too many to match, or accept all multicasts. */ | 1688 | /* Too many to match, or accept all multicasts. */ |
1689 | iowrite32(0xffffffff, ioaddr + MulticastFilter0); | 1689 | iowrite32(0xffffffff, ioaddr + MulticastFilter0); |
1690 | iowrite32(0xffffffff, ioaddr + MulticastFilter1); | 1690 | iowrite32(0xffffffff, ioaddr + MulticastFilter1); |