diff options
author | Xue Chaojing <xuechaojing@huawei.com> | 2019-01-15 17:48:52 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-17 11:22:36 -0800 |
commit | 905b464ad9008905db099f90ae20f373c7051804 (patch) | |
tree | 4d4c452d5653908c359fbea551327fc9246187b7 /drivers/net/ethernet/huawei/hinic/hinic_tx.c | |
parent | net: dsa: Add ndo_get_phys_port_name() for CPU port (diff) | |
download | linux-dev-905b464ad9008905db099f90ae20f373c7051804.tar.xz linux-dev-905b464ad9008905db099f90ae20f373c7051804.zip |
net-next/hinic: replace disable_irq_nosync/enable_irq
In order to avoid frequent system interrupts when sending and
receiving packets. we replace disable_irq_nosync/enable_irq
with hinic_set_msix_state(), hinic_set_msix_state is used to
access memory mapped hinic devices.
Signed-off-by: Xue Chaojing <xuechaojing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/huawei/hinic/hinic_tx.c')
-rw-r--r-- | drivers/net/ethernet/huawei/hinic/hinic_tx.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_tx.c b/drivers/net/ethernet/huawei/hinic/hinic_tx.c index 11e73e67358d..e17bf33eba0c 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_tx.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_tx.c @@ -655,7 +655,9 @@ static int free_tx_poll(struct napi_struct *napi, int budget) if (pkts < budget) { napi_complete(napi); - enable_irq(sq->irq); + hinic_hwdev_set_msix_state(nic_dev->hwdev, + sq->msix_entry, + HINIC_MSIX_ENABLE); return pkts; } @@ -682,7 +684,9 @@ static irqreturn_t tx_irq(int irq, void *data) nic_dev = netdev_priv(txq->netdev); /* Disable the interrupt until napi will be completed */ - disable_irq_nosync(txq->sq->irq); + hinic_hwdev_set_msix_state(nic_dev->hwdev, + txq->sq->msix_entry, + HINIC_MSIX_DISABLE); hinic_hwdev_msix_cnt_set(nic_dev->hwdev, txq->sq->msix_entry); |