[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 03/10] net: cadence_gem: Fix irq update w.r.t queue
From: |
Sai Pavan Boddu |
Subject: |
[PATCH 03/10] net: cadence_gem: Fix irq update w.r.t queue |
Date: |
Sat, 2 May 2020 23:23:07 +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>
---
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 074aaa8..7782d6d 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 00/10] Cadence GEM Fixes, Sai Pavan Boddu, 2020/05/02
- [PATCH 07/10] net: cadnece_gem: Update irq_read_clear field of designcfg_debug1 reg, Sai Pavan Boddu, 2020/05/02
- [PATCH 02/10] net: cadence_gem: Fix the queue address update during wrap around, Sai Pavan Boddu, 2020/05/02
- [PATCH 05/10] net: cadence_gem: Set ISR according to queue in use, Sai Pavan Boddu, 2020/05/02
- [PATCH 06/10] net: cadence_gem: Add support for jumbo frames, Sai Pavan Boddu, 2020/05/02
- [PATCH 03/10] net: cadence_gem: Fix irq update w.r.t queue,
Sai Pavan Boddu <=
- [PATCH 08/10] net: cadence_gem: Update the reset value for interrupt mask register, Sai Pavan Boddu, 2020/05/02
- [PATCH 09/10] net: cadence_gem: TX_LAST bit should be set by guest, Sai Pavan Boddu, 2020/05/02
- [PATCH 04/10] net: cadence_gem: Define access permission for interrupt registers, Sai Pavan Boddu, 2020/05/02
- [PATCH 01/10] net: cadence_gem: Fix debug statements, Sai Pavan Boddu, 2020/05/02
- [PATCH 10/10] net: cadence_gem: Fix RX address filtering, Sai Pavan Boddu, 2020/05/02
- Re: [PATCH 00/10] Cadence GEM Fixes, no-reply, 2020/05/02