[mv643xx] Add pci device table for auto module loading.
[firefly-linux-kernel-4.4.55.git] / drivers / net / mv643xx_eth.c
index 7f8e5ad1b7043d5d05a637601786618181cb0c90..a4f861bf32d6dcbc3657cba409f25d2a5840e439 100644 (file)
@@ -507,8 +507,7 @@ static void mv643xx_eth_update_pscr(struct net_device *dev,
  * Output :    N/A
  */
 
-static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id,
-                                               struct pt_regs *regs)
+static irqreturn_t mv643xx_eth_int_handler(int irq, void *dev_id)
 {
        struct net_device *dev = (struct net_device *)dev_id;
        struct mv643xx_private *mp = netdev_priv(dev);
@@ -1252,7 +1251,7 @@ static void mv643xx_netpoll(struct net_device *netdev)
        /* wait for previous write to complete */
        mv_read(MV643XX_ETH_INTERRUPT_MASK_REG(port_num));
 
-       mv643xx_eth_int_handler(netdev->irq, netdev, NULL);
+       mv643xx_eth_int_handler(netdev->irq, netdev);
 
        mv_write(MV643XX_ETH_INTERRUPT_MASK_REG(port_num), ETH_INT_UNMASK_ALL);
 }
@@ -1558,6 +1557,12 @@ static void __exit mv643xx_cleanup_module(void)
 module_init(mv643xx_init_module);
 module_exit(mv643xx_cleanup_module);
 
+static struct pci_device_id pci_marvell_mv64360[] = {
+       { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, PCI_DEVICE_ID_MARVELL_MV64360) },
+       {}
+};
+MODULE_DEVICE_TABLE(pci, pci_marvell_mv64360);
+
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR( "Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani"
                " and Dale Farnsworth");
@@ -2156,7 +2161,7 @@ static void eth_update_mib_counters(struct mv643xx_private *mp)
        for (offset = ETH_MIB_BAD_OCTETS_RECEIVED;
                        offset <= ETH_MIB_FRAMES_1024_TO_MAX_OCTETS;
                        offset += 4)
-               *(u32 *)((char *)p + offset) = read_mib(mp, offset);
+               *(u32 *)((char *)p + offset) += read_mib(mp, offset);
 
        p->good_octets_sent += read_mib(mp, ETH_MIB_GOOD_OCTETS_SENT_LOW);
        p->good_octets_sent +=
@@ -2165,7 +2170,7 @@ static void eth_update_mib_counters(struct mv643xx_private *mp)
        for (offset = ETH_MIB_GOOD_FRAMES_SENT;
                        offset <= ETH_MIB_LATE_COLLISION;
                        offset += 4)
-               *(u32 *)((char *)p + offset) = read_mib(mp, offset);
+               *(u32 *)((char *)p + offset) += read_mib(mp, offset);
 }
 
 /*