IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
[firefly-linux-kernel-4.4.55.git] / drivers / net / r8169.c
index 805562b8624e3b966c6531f1776d868e46cf0f47..f1c75751cab7a4a55e7ba3c6a0800bd50874ef4a 100644 (file)
@@ -210,7 +210,7 @@ static const struct {
 static struct pci_device_id rtl8169_pci_tbl[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8129), 0, 0, RTL_CFG_0 },
        { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8136), 0, 0, RTL_CFG_2 },
-       { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8167), 0, 0, RTL_CFG_1 },
+       { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8167), 0, 0, RTL_CFG_0 },
        { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8168), 0, 0, RTL_CFG_2 },
        { PCI_DEVICE(PCI_VENDOR_ID_REALTEK,     0x8169), 0, 0, RTL_CFG_0 },
        { PCI_DEVICE(PCI_VENDOR_ID_DLINK,       0x4300), 0, 0, RTL_CFG_0 },
@@ -473,8 +473,7 @@ MODULE_VERSION(RTL8169_VERSION);
 
 static int rtl8169_open(struct net_device *dev);
 static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev);
-static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance,
-                             struct pt_regs *regs);
+static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance);
 static int rtl8169_init_ring(struct net_device *dev);
 static void rtl8169_hw_start(struct net_device *dev);
 static int rtl8169_close(struct net_device *dev);
@@ -1124,7 +1123,7 @@ static void rtl8169_get_strings(struct net_device *dev, u32 stringset, u8 *data)
 }
 
 
-static struct ethtool_ops rtl8169_ethtool_ops = {
+static const struct ethtool_ops rtl8169_ethtool_ops = {
        .get_drvinfo            = rtl8169_get_drvinfo,
        .get_regs_len           = rtl8169_get_regs_len,
        .get_link               = ethtool_op_get_link,
@@ -1392,7 +1391,7 @@ static void rtl8169_netpoll(struct net_device *dev)
        struct pci_dev *pdev = tp->pci_dev;
 
        disable_irq(pdev->irq);
-       rtl8169_interrupt(pdev->irq, dev, NULL);
+       rtl8169_interrupt(pdev->irq, dev);
        enable_irq(pdev->irq);
 }
 #endif
@@ -2259,7 +2258,7 @@ static inline u32 rtl8169_tso_csum(struct sk_buff *skb, struct net_device *dev)
                if (mss)
                        return LargeSend | ((mss & MSSMask) << MSSShift);
        }
-       if (skb->ip_summed == CHECKSUM_HW) {
+       if (skb->ip_summed == CHECKSUM_PARTIAL) {
                const struct iphdr *ip = skb->nh.iph;
 
                if (ip->protocol == IPPROTO_TCP)
@@ -2592,7 +2591,7 @@ rtl8169_rx_interrupt(struct net_device *dev, struct rtl8169_private *tp,
 
 /* The interrupt handler does all of the Rx thread work and cleans up after the Tx thread. */
 static irqreturn_t
-rtl8169_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
+rtl8169_interrupt(int irq, void *dev_instance)
 {
        struct net_device *dev = (struct net_device *) dev_instance;
        struct rtl8169_private *tp = netdev_priv(dev);
@@ -2913,7 +2912,7 @@ static struct pci_driver rtl8169_pci_driver = {
 static int __init
 rtl8169_init_module(void)
 {
-       return pci_module_init(&rtl8169_pci_driver);
+       return pci_register_driver(&rtl8169_pci_driver);
 }
 
 static void __exit