Control: tag -1 patch On Thu, 2013-06-20 at 23:14 +0000, Bjarni Ingi Gislason wrote: [...] > Part of difference in the manage.c file: [...] > Some more debugging messages show: > > 1) "desc" is always found > > 2) "irq_settings_can_request(desc)" is always true > > 3) "desc->action" is alway false except for irq=6 (floppy) [...] Very good work. This function should return true when desc->action is NULL. The attached patch should fix it; please test. Ben. -- Ben Hutchings DNRC Motto: I can please only one person per day. Today is not your day. Tomorrow isn't looking good either.
From 7957860cfe210043967a0fb0d53e2b043c8cb23f Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sun, 23 Jun 2013 03:48:45 +0100
Subject: [PATCH] genirq: Fix can_request_irq() for IRQs without an action
Commit 02725e7471b8 ('genirq: Use irq_get/put functions'),
inadvertently changed can_request_irq() to return 0 for IRQs that have
no action. This causes pcibios_lookup_irq() to select only IRQs that
already have an action with IRQF_SHARED set, or to fail if there are
none. Change can_request_irq() to return 1 for IRQs that have no
action (if the first two conditions are met).
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
References: http://bugs.debian.org/709647
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org # 2.6.39+
Cc: 709647@bugs.debian.org
---
kernel/irq/manage.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index fa17855..dc4db32 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -555,9 +555,9 @@ int can_request_irq(unsigned int irq, unsigned long irqflags)
return 0;
if (irq_settings_can_request(desc)) {
- if (desc->action)
- if (irqflags & desc->action->flags & IRQF_SHARED)
- canrequest =1;
+ if (!desc->action ||
+ irqflags & desc->action->flags & IRQF_SHARED)
+ canrequest = 1;
}
irq_put_desc_unlock(desc, flags);
return canrequest;
Attachment:
signature.asc
Description: This is a digitally signed message part