]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/8139too.c
V4L/DVB (5967): ivtv: fix VIDIOC_S_FBUF:new OSD values where never set
[linux-2.6-omap-h63xx.git] / drivers / net / 8139too.c
index 99304b2aa86e3d70d40520a9332e9a57930d4350..f4e4298d24b96ef40ab305fb3270855b388360d4 100644 (file)
@@ -931,7 +931,6 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
        int i, addr_len, option;
        void __iomem *ioaddr;
        static int board_idx = -1;
-       u8 pci_rev;
 
        assert (pdev != NULL);
        assert (ent != NULL);
@@ -949,13 +948,11 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
        }
 #endif
 
-       pci_read_config_byte(pdev, PCI_REVISION_ID, &pci_rev);
-
        if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
-           pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pci_rev >= 0x20) {
+           pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->revision >= 0x20) {
                dev_info(&pdev->dev,
                           "This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
-                          pdev->vendor, pdev->device, pci_rev);
+                          pdev->vendor, pdev->device, pdev->revision);
                dev_info(&pdev->dev,
                           "Use the \"8139cp\" driver for improved performance and stability.\n");
        }
@@ -1904,10 +1901,10 @@ static __inline__ void wrap_copy(struct sk_buff *skb, const unsigned char *ring,
        u32 left = RX_BUF_LEN - offset;
 
        if (size > left) {
-               memcpy(skb->data, ring + offset, left);
-               memcpy(skb->data+left, ring, size - left);
+               skb_copy_to_linear_data(skb, ring + offset, left);
+               skb_copy_to_linear_data_offset(skb, left, ring, size - left);
        } else
-               memcpy(skb->data, ring + offset, size);
+               skb_copy_to_linear_data(skb, ring + offset, size);
 }
 #endif
 
@@ -2013,12 +2010,11 @@ no_early_rx:
 
                skb = dev_alloc_skb (pkt_size + 2);
                if (likely(skb)) {
-                       skb->dev = dev;
                        skb_reserve (skb, 2);   /* 16 byte align the IP fields. */
 #if RX_BUF_IDX == 3
                        wrap_copy(skb, rx_ring, ring_offset+4, pkt_size);
 #else
-                       eth_copy_and_sum (skb, &rx_ring[ring_offset + 4], pkt_size, 0);
+                       skb_copy_to_linear_data (skb, &rx_ring[ring_offset + 4], pkt_size);
 #endif
                        skb_put (skb, pkt_size);
 
@@ -2456,7 +2452,6 @@ static const struct ethtool_ops rtl8139_ethtool_ops = {
        .get_strings            = rtl8139_get_strings,
        .get_stats_count        = rtl8139_get_stats_count,
        .get_ethtool_stats      = rtl8139_get_ethtool_stats,
-       .get_perm_addr          = ethtool_op_get_perm_addr,
 };
 
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)