[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/33] net: cadence_gem: Fix irq update w.r.t queue
From: |
Jason Wang |
Subject: |
[PULL 13/33] net: cadence_gem: Fix irq update w.r.t queue |
Date: |
Tue, 16 Jun 2020 14:45:24 +0800 |
From: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Set irq's specific to a queue, present implementation is setting q1 irq
based on q0 status.
Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/cadence_gem.c | 25 +++----------------------
1 file changed, 3 insertions(+), 22 deletions(-)
diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index fd3e4a8..4ad6c8e 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -554,29 +554,10 @@ static void gem_update_int_status(CadenceGEMState *s)
{
int i;
- if (!s->regs[GEM_ISR]) {
- /* ISR isn't set, clear all the interrupts */
- for (i = 0; i < s->num_priority_queues; ++i) {
- qemu_set_irq(s->irq[i], 0);
- }
- return;
- }
+ qemu_set_irq(s->irq[0], !!s->regs[GEM_ISR]);
- /* If we get here we know s->regs[GEM_ISR] is set, so we don't need to
- * check it again.
- */
- if (s->num_priority_queues == 1) {
- /* No priority queues, just trigger the interrupt */
- DB_PRINT("asserting int.\n");
- qemu_set_irq(s->irq[0], 1);
- return;
- }
-
- for (i = 0; i < s->num_priority_queues; ++i) {
- if (s->regs[GEM_INT_Q1_STATUS + i]) {
- DB_PRINT("asserting int. (q=%d)\n", i);
- qemu_set_irq(s->irq[i], 1);
- }
+ for (i = 1; i < s->num_priority_queues; ++i) {
+ qemu_set_irq(s->irq[i], !!s->regs[GEM_INT_Q1_STATUS + i - 1]);
}
}
--
2.5.0
- [PULL 02/33] virtio-net: implement RX RSS processing, (continued)
- [PULL 02/33] virtio-net: implement RX RSS processing, Jason Wang, 2020/06/16
- [PULL 06/33] virtio-net: add migration support for RSS and hash report, Jason Wang, 2020/06/16
- [PULL 07/33] virtio-net: align RSC fields with updated virtio-net header, Jason Wang, 2020/06/16
- [PULL 09/33] hw/net/tulip: Fix 'Descriptor Error' definition, Jason Wang, 2020/06/16
- [PULL 10/33] hw/net/tulip: Log descriptor overflows, Jason Wang, 2020/06/16
- [PULL 08/33] Fix tulip breakage, Jason Wang, 2020/06/16
- [PULL 11/33] net: cadence_gem: Fix debug statements, Jason Wang, 2020/06/16
- [PULL 16/33] net: cadence_gem: Move tx/rx packet buffert to CadenceGEMState, Jason Wang, 2020/06/16
- [PULL 14/33] net: cadence_gem: Define access permission for interrupt registers, Jason Wang, 2020/06/16
- [PULL 12/33] net: cadence_gem: Fix the queue address update during wrap around, Jason Wang, 2020/06/16
- [PULL 13/33] net: cadence_gem: Fix irq update w.r.t queue,
Jason Wang <=
- [PULL 15/33] net: cadence_gem: Set ISR according to queue in use, Jason Wang, 2020/06/16
- [PULL 17/33] net: cadence_gem: Fix up code style, Jason Wang, 2020/06/16
- [PULL 18/33] net: cadence_gem: Add support for jumbo frames, Jason Wang, 2020/06/16
- [PULL 19/33] net: cadnece_gem: Update irq_read_clear field of designcfg_debug1 reg, Jason Wang, 2020/06/16
- [PULL 20/33] net: cadence_gem: Update the reset value for interrupt mask register, Jason Wang, 2020/06/16
- [PULL 22/33] net: cadence_gem: Fix RX address filtering, Jason Wang, 2020/06/16
- [PULL 21/33] net: cadence_gem: TX_LAST bit should be set by guest, Jason Wang, 2020/06/16
- [PULL 23/33] net: use peer when purging queue in qemu_flush_or_purge_queue_packets(), Jason Wang, 2020/06/16
- [PULL 24/33] net/colo-compare.c: Create event_bh with the right AioContext, Jason Wang, 2020/06/16
- [PULL 27/33] net/colo-compare.c: Only hexdump packets if tracing is enabled, Jason Wang, 2020/06/16