.. | .. |
---|
736 | 736 | ravb_write(ndev, ~(EIS_QFS | EIS_RESERVED), EIS); |
---|
737 | 737 | if (eis & EIS_QFS) { |
---|
738 | 738 | ris2 = ravb_read(ndev, RIS2); |
---|
739 | | - ravb_write(ndev, ~(RIS2_QFF0 | RIS2_RFFF | RIS2_RESERVED), |
---|
| 739 | + ravb_write(ndev, ~(RIS2_QFF0 | RIS2_QFF1 | RIS2_RFFF | RIS2_RESERVED), |
---|
740 | 740 | RIS2); |
---|
741 | 741 | |
---|
742 | 742 | /* Receive Descriptor Empty int */ |
---|
743 | 743 | if (ris2 & RIS2_QFF0) |
---|
744 | 744 | priv->stats[RAVB_BE].rx_over_errors++; |
---|
745 | 745 | |
---|
746 | | - /* Receive Descriptor Empty int */ |
---|
| 746 | + /* Receive Descriptor Empty int */ |
---|
747 | 747 | if (ris2 & RIS2_QFF1) |
---|
748 | 748 | priv->stats[RAVB_NC].rx_over_errors++; |
---|
749 | 749 | |
---|
.. | .. |
---|
1706 | 1706 | of_phy_deregister_fixed_link(np); |
---|
1707 | 1707 | } |
---|
1708 | 1708 | |
---|
| 1709 | + cancel_work_sync(&priv->work); |
---|
| 1710 | + |
---|
1709 | 1711 | if (priv->chip_id != RCAR_GEN2) { |
---|
1710 | 1712 | free_irq(priv->tx_irqs[RAVB_NC], ndev); |
---|
1711 | 1713 | free_irq(priv->rx_irqs[RAVB_NC], ndev); |
---|
.. | .. |
---|
2249 | 2251 | if (priv->chip_id != RCAR_GEN2) |
---|
2250 | 2252 | ravb_ptp_stop(ndev); |
---|
2251 | 2253 | |
---|
2252 | | - dma_free_coherent(ndev->dev.parent, priv->desc_bat_size, priv->desc_bat, |
---|
2253 | | - priv->desc_bat_dma); |
---|
2254 | 2254 | /* Set reset mode */ |
---|
2255 | 2255 | ravb_write(ndev, CCC_OPC_RESET, CCC); |
---|
2256 | | - pm_runtime_put_sync(&pdev->dev); |
---|
2257 | 2256 | unregister_netdev(ndev); |
---|
2258 | 2257 | netif_napi_del(&priv->napi[RAVB_NC]); |
---|
2259 | 2258 | netif_napi_del(&priv->napi[RAVB_BE]); |
---|
2260 | 2259 | ravb_mdio_release(priv); |
---|
| 2260 | + dma_free_coherent(ndev->dev.parent, priv->desc_bat_size, priv->desc_bat, |
---|
| 2261 | + priv->desc_bat_dma); |
---|
| 2262 | + pm_runtime_put_sync(&pdev->dev); |
---|
2261 | 2263 | pm_runtime_disable(&pdev->dev); |
---|
2262 | 2264 | free_netdev(ndev); |
---|
2263 | 2265 | platform_set_drvdata(pdev, NULL); |
---|