--- zzzz-none-000/linux-3.10.107/drivers/net/ethernet/korina.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/net/ethernet/korina.c 2021-02-04 17:41:59.000000000 +0000 @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -483,7 +482,6 @@ unsigned long flags; struct netdev_hw_addr *ha; u32 recognise = ETH_ARC_AB; /* always accept broadcasts */ - int i; /* Set promiscuous mode */ if (dev->flags & IFF_PROMISC) @@ -495,12 +493,9 @@ /* Build the hash table */ if (netdev_mc_count(dev) > 4) { - u16 hash_table[4]; + u16 hash_table[4] = { 0 }; u32 crc; - for (i = 0; i < 4; i++) - hash_table[i] = 0; - netdev_for_each_mc_addr(ha, dev) { crc = ether_crc_le(6, ha->addr); crc >>= 26; @@ -1000,14 +995,14 @@ * that handles the Done Finished * Ovr and Und Events */ ret = request_irq(lp->rx_irq, korina_rx_dma_interrupt, - IRQF_DISABLED, "Korina ethernet Rx", dev); + 0, "Korina ethernet Rx", dev); if (ret < 0) { printk(KERN_ERR "%s: unable to get Rx DMA IRQ %d\n", dev->name, lp->rx_irq); goto err_release; } ret = request_irq(lp->tx_irq, korina_tx_dma_interrupt, - IRQF_DISABLED, "Korina ethernet Tx", dev); + 0, "Korina ethernet Tx", dev); if (ret < 0) { printk(KERN_ERR "%s: unable to get Tx DMA IRQ %d\n", dev->name, lp->tx_irq); @@ -1016,7 +1011,7 @@ /* Install handler for overrun error. */ ret = request_irq(lp->ovr_irq, korina_ovr_interrupt, - IRQF_DISABLED, "Ethernet Overflow", dev); + 0, "Ethernet Overflow", dev); if (ret < 0) { printk(KERN_ERR "%s: unable to get OVR IRQ %d\n", dev->name, lp->ovr_irq); @@ -1025,7 +1020,7 @@ /* Install handler for underflow error. */ ret = request_irq(lp->und_irq, korina_und_interrupt, - IRQF_DISABLED, "Ethernet Underflow", dev); + 0, "Ethernet Underflow", dev); if (ret < 0) { printk(KERN_ERR "%s: unable to get UND IRQ %d\n", dev->name, lp->und_irq); @@ -1114,7 +1109,7 @@ lp = netdev_priv(dev); bif->dev = dev; - memcpy(dev->dev_addr, bif->mac, 6); + memcpy(dev->dev_addr, bif->mac, ETH_ALEN); lp->rx_irq = platform_get_irq_byname(pdev, "korina_rx"); lp->tx_irq = platform_get_irq_byname(pdev, "korina_tx"); @@ -1214,7 +1209,6 @@ iounmap(lp->rx_dma_regs); iounmap(lp->tx_dma_regs); - platform_set_drvdata(pdev, NULL); unregister_netdev(bif->dev); free_netdev(bif->dev);