mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 13:11:17 +07:00
net: lantiq: Use napi_complete_done()
Use napi_complete_done() and activate the interrupts when this function returns true. This way the generic NAPI code can take care of activating the interrupts. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
74c7b80e22
commit
c582a7fea9
@ -230,8 +230,8 @@ static int xrx200_poll_rx(struct napi_struct *napi, int budget)
|
||||
}
|
||||
|
||||
if (rx < budget) {
|
||||
napi_complete(&ch->napi);
|
||||
ltq_dma_enable_irq(&ch->dma);
|
||||
if (napi_complete_done(&ch->napi, rx))
|
||||
ltq_dma_enable_irq(&ch->dma);
|
||||
}
|
||||
|
||||
return rx;
|
||||
@ -272,8 +272,8 @@ static int xrx200_tx_housekeeping(struct napi_struct *napi, int budget)
|
||||
netif_wake_queue(net_dev);
|
||||
|
||||
if (pkts < budget) {
|
||||
napi_complete(&ch->napi);
|
||||
ltq_dma_enable_irq(&ch->dma);
|
||||
if (napi_complete_done(&ch->napi, pkts))
|
||||
ltq_dma_enable_irq(&ch->dma);
|
||||
}
|
||||
|
||||
return pkts;
|
||||
|
Loading…
Reference in New Issue
Block a user