diff options
author | Koen Vandeputte <koen.vandeputte@ncentric.com> | 2016-06-27 16:12:51 +0200 |
---|---|---|
committer | Zoltan HERPAI <wigyori@uid0.hu> | 2016-06-27 16:12:51 +0200 |
commit | 17870edd26c7e76e6b0f4d102bca61c8f23a9f9e (patch) | |
tree | 4092c11c388b6c03f99ef268275c5ede76491578 /target/linux/cns3xxx | |
parent | 784bd18690b2cbe2f8e217d840220b4cc216f0bd (diff) | |
download | master-187ad058-17870edd26c7e76e6b0f4d102bca61c8f23a9f9e.tar.gz master-187ad058-17870edd26c7e76e6b0f4d102bca61c8f23a9f9e.tar.bz2 master-187ad058-17870edd26c7e76e6b0f4d102bca61c8f23a9f9e.zip |
cns3xxx: fix RX softIRQ loop
Already reschedule when 1 or more frames came in.
Checking for a full queue could produce a re-schedule loop as
the checked RX ring location could contain undefined values
depending on activity in previous loops.
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'target/linux/cns3xxx')
-rw-r--r-- | target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c b/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c index 2f232c1d29..51b01876ef 100644 --- a/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c +++ b/target/linux/cns3xxx/files/drivers/net/ethernet/cavium/cns3xxx_eth.c @@ -717,8 +717,8 @@ static int eth_poll(struct napi_struct *napi, int budget) enable_irq(sw->rx_irq); budget = 0; - /* if rx descriptors are full schedule another poll */ - if (rx_ring->desc[(i-1) & (RX_DESCS-1)].cown) + /* If 1 or more frames came in during IRQ enable, re-schedule */ + if (rx_ring->desc[i].cown) eth_schedule_poll(sw); } |