[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 03/12] net: cadence_gem: Fix irq update w.r.t queue
From: |
Sai Pavan Boddu |
Subject: |
[PATCH v4 03/12] net: cadence_gem: Fix irq update w.r.t queue |
Date: |
Tue, 12 May 2020 18:39:58 +0530 |
Set irq's specific to a queue, present implementation is setting q1 irq
based on q0 status.
Signed-off-by: Sai Pavan Boddu <address@hidden>
Reviewed-by: Edgar E. Iglesias <address@hidden>
---
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 c3536ce..76c11a1 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.7.4
- [PATCH v4 00/12] Cadence GEM Fixes, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 01/12] net: cadence_gem: Fix debug statements, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 05/12] net: cadence_gem: Set ISR according to queue in use, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 06/12] net: cadence_gem: Move tx/rx packet buffert to CadenceGEMState, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 09/12] net: cadnece_gem: Update irq_read_clear field of designcfg_debug1 reg, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 04/12] net: cadence_gem: Define access permission for interrupt registers, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 07/12] net: cadence_gem: Fix up code style, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 12/12] net: cadence_gem: Fix RX address filtering, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 03/12] net: cadence_gem: Fix irq update w.r.t queue,
Sai Pavan Boddu <=
- [PATCH v4 08/12] net: cadence_gem: Add support for jumbo frames, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 11/12] net: cadence_gem: TX_LAST bit should be set by guest, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 10/12] net: cadence_gem: Update the reset value for interrupt mask register, Sai Pavan Boddu, 2020/05/12
- [PATCH v4 02/12] net: cadence_gem: Fix the queue address update during wrap around, Sai Pavan Boddu, 2020/05/12