nixge.c (9ddb236f13594b34a12dacf69a5adca7a1aef35e) | nixge.c (f246d129fe8cec16f088c12185a4e986ef682c02) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (c) 2016-2017, National Instruments Corp. 3 * 4 * Author: Moritz Fischer <mdf@kernel.org> 5 */ 6 7#include <linux/etherdevice.h> 8#include <linux/module.h> --- 773 unchanged lines hidden (view full) --- 782 783 tasklet_schedule(&priv->dma_err_tasklet); 784 nixge_dma_write_reg(priv, XAXIDMA_RX_SR_OFFSET, status); 785 } 786out: 787 return IRQ_HANDLED; 788} 789 | 1// SPDX-License-Identifier: GPL-2.0 2/* Copyright (c) 2016-2017, National Instruments Corp. 3 * 4 * Author: Moritz Fischer <mdf@kernel.org> 5 */ 6 7#include <linux/etherdevice.h> 8#include <linux/module.h> --- 773 unchanged lines hidden (view full) --- 782 783 tasklet_schedule(&priv->dma_err_tasklet); 784 nixge_dma_write_reg(priv, XAXIDMA_RX_SR_OFFSET, status); 785 } 786out: 787 return IRQ_HANDLED; 788} 789 |
790static void nixge_dma_err_handler(unsigned long data) | 790static void nixge_dma_err_handler(struct tasklet_struct *t) |
791{ | 791{ |
792 struct nixge_priv *lp = (struct nixge_priv *)data; | 792 struct nixge_priv *lp = from_tasklet(lp, t, dma_err_tasklet); |
793 struct nixge_hw_dma_bd *cur_p; 794 struct nixge_tx_skb *tx_skb; 795 u32 cr, i; 796 797 __nixge_device_reset(lp, XAXIDMA_TX_CR_OFFSET); 798 __nixge_device_reset(lp, XAXIDMA_RX_CR_OFFSET); 799 800 for (i = 0; i < TX_BD_NUM; i++) { --- 73 unchanged lines hidden (view full) --- 874 phy = of_phy_connect(ndev, priv->phy_node, 875 &nixge_handle_link_change, 0, priv->phy_mode); 876 if (!phy) 877 return -ENODEV; 878 879 phy_start(phy); 880 881 /* Enable tasklets for Axi DMA error handling */ | 793 struct nixge_hw_dma_bd *cur_p; 794 struct nixge_tx_skb *tx_skb; 795 u32 cr, i; 796 797 __nixge_device_reset(lp, XAXIDMA_TX_CR_OFFSET); 798 __nixge_device_reset(lp, XAXIDMA_RX_CR_OFFSET); 799 800 for (i = 0; i < TX_BD_NUM; i++) { --- 73 unchanged lines hidden (view full) --- 874 phy = of_phy_connect(ndev, priv->phy_node, 875 &nixge_handle_link_change, 0, priv->phy_mode); 876 if (!phy) 877 return -ENODEV; 878 879 phy_start(phy); 880 881 /* Enable tasklets for Axi DMA error handling */ |
882 tasklet_init(&priv->dma_err_tasklet, nixge_dma_err_handler, 883 (unsigned long)priv); | 882 tasklet_setup(&priv->dma_err_tasklet, nixge_dma_err_handler); |
884 885 napi_enable(&priv->napi); 886 887 /* Enable interrupts for Axi DMA Tx */ 888 ret = request_irq(priv->tx_irq, nixge_tx_irq, 0, ndev->name, ndev); 889 if (ret) 890 goto err_tx_irq; 891 /* Enable interrupts for Axi DMA Rx */ --- 512 unchanged lines hidden --- | 883 884 napi_enable(&priv->napi); 885 886 /* Enable interrupts for Axi DMA Tx */ 887 ret = request_irq(priv->tx_irq, nixge_tx_irq, 0, ndev->name, ndev); 888 if (ret) 889 goto err_tx_irq; 890 /* Enable interrupts for Axi DMA Rx */ --- 512 unchanged lines hidden --- |