]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/natsemi.c
V4L/DVB (5967): ivtv: fix VIDIOC_S_FBUF:new OSD values where never set
[linux-2.6-omap-h63xx.git] / drivers / net / natsemi.c
index 4cf0d3fcb519d741559d9e016178f455a75884c3..b47a12d684f9ed30dd0b8cd302c09259ee394636 100644 (file)
@@ -671,7 +671,7 @@ static ssize_t natsemi_show_##_name(struct device *dev, \
 #define NATSEMI_CREATE_FILE(_dev, _name) \
          device_create_file(&_dev->dev, &dev_attr_##_name)
 #define NATSEMI_REMOVE_FILE(_dev, _name) \
-         device_create_file(&_dev->dev, &dev_attr_##_name)
+         device_remove_file(&_dev->dev, &dev_attr_##_name)
 
 NATSEMI_ATTR(dspcfg_workaround);
 
@@ -690,7 +690,7 @@ static ssize_t natsemi_set_dspcfg_workaround(struct device *dev,
 {
        struct netdev_private *np = netdev_priv(to_net_dev(dev));
        int new_setting;
-       u32 flags;
+       unsigned long flags;
 
         /* Find out the new setting */
         if (!strncmp("on", buf, count - 1) || !strncmp("1", buf, count - 1))
@@ -2357,8 +2357,8 @@ static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do)
                                        np->rx_dma[entry],
                                        buflen,
                                        PCI_DMA_FROMDEVICE);
-                               eth_copy_and_sum(skb,
-                                       np->rx_skbuff[entry]->data, pkt_len, 0);
+                               skb_copy_to_linear_data(skb,
+                                       np->rx_skbuff[entry]->data, pkt_len);
                                skb_put(skb, pkt_len);
                                pci_dma_sync_single_for_device(np->pci_dev,
                                        np->rx_dma[entry],
@@ -2438,13 +2438,16 @@ static void netdev_error(struct net_device *dev, int intr_status)
                                dev->name);
                }
                np->stats.rx_fifo_errors++;
+               np->stats.rx_errors++;
        }
        /* Hmmmmm, it's not clear how to recover from PCI faults. */
        if (intr_status & IntrPCIErr) {
                printk(KERN_NOTICE "%s: PCI error %#08x\n", dev->name,
                        intr_status & IntrPCIErr);
                np->stats.tx_fifo_errors++;
+               np->stats.tx_errors++;
                np->stats.rx_fifo_errors++;
+               np->stats.rx_errors++;
        }
        spin_unlock(&np->lock);
 }