* ldd irq problem [not found] <40dfeece0711291447m2efa4f40i5c2c22a4273ecbc0@mail.gmail.com> @ 2007-11-30 9:28 ` Chris Rutherford 2007-11-30 10:31 ` Jiri Slaby 0 siblings, 1 reply; 3+ messages in thread From: Chris Rutherford @ 2007-11-30 9:28 UTC (permalink / raw) To: linux-kernel Helo lkml, I'm trying to write a LDD but I have got a bug. Any ideas what i might be doing wrong? ret = request_irq(12, handler, SA_INTERRUPT | SA_SHIRQ, "sha1 handler", DEVICE_NAME); printk (KERN_INFO "req irq %d \n", ret); enable_irq(12); I am working on a linux device driver and trying to handle interupts. using the code above I get the log messages below. req irq 0 Unbalanced enable for IRQ 12 BUG: warning at kernel/irq/manage.c:118/enable_irq() [<c0140889>] enable_irq+0x54/0x87 [<c02133de>] __driver_attach+0x0/0x5d [<e0b6f23b>] device_probe+0x16b/0x173 [raggedstone1] [<c01c33ce>] pci_device_probe+0x36/0x57 [<c0213339>] driver_probe_device+0x42/0x91 [<c0213416>] __driver_attach+0x38/0x5d [<c0212e58>] bus_for_each_dev+0x37/0x59 [<c02132a3>] driver_attach+0x11/0x13 [<c02133de>] __driver_attach+0x0/0x5d [<c0212b67>] bus_add_driver+0x6b/0xfd [<c01c3509>] __pci_register_driver+0x47/0x63 [<c0135c67>] sys_init_module+0x1732/0x18b5 [<c015a43b>] do_sync_read+0xb6/0xf1 [<c016e2db>] dput+0x2a/0x119 [<c0102bed>] sysenter_past_esp+0x56/0x79 Has any one seen this type of bug message before? any idea what could be causing it. Thanks Chris ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ldd irq problem 2007-11-30 9:28 ` ldd irq problem Chris Rutherford @ 2007-11-30 10:31 ` Jiri Slaby 2007-11-30 17:39 ` Chris Rutherford 0 siblings, 1 reply; 3+ messages in thread From: Jiri Slaby @ 2007-11-30 10:31 UTC (permalink / raw) To: Chris Rutherford; +Cc: linux-kernel On 11/30/2007 10:28 AM, Chris Rutherford wrote: > Helo lkml, > > I'm trying to write a LDD but I have got a bug. Any ideas what i > might be doing wrong? > > ret = request_irq(12, handler, SA_INTERRUPT | SA_SHIRQ, "sha1 > handler", DEVICE_NAME); > printk (KERN_INFO "req irq %d \n", ret); > enable_irq(12); enable_irq is opposite of disable_irq(_nosync), you don't need to call it in probe function and in most cases you don't need it at all. regards, -- Jiri Slaby (jirislaby@gmail.com) Faculty of Informatics, Masaryk University ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ldd irq problem 2007-11-30 10:31 ` Jiri Slaby @ 2007-11-30 17:39 ` Chris Rutherford 0 siblings, 0 replies; 3+ messages in thread From: Chris Rutherford @ 2007-11-30 17:39 UTC (permalink / raw) To: Jiri Slaby, linux-kernel many thanks, the following says it all.. box:/home/chris/work/fpgaio# grep sha1 /proc/interrupts 12: 14669741 XT-PIC sha1 handler On Nov 30, 2007 10:31 AM, Jiri Slaby <jirislaby@gmail.com> wrote: > On 11/30/2007 10:28 AM, Chris Rutherford wrote: > > Helo lkml, > > > > I'm trying to write a LDD but I have got a bug. Any ideas what i > > might be doing wrong? > > > > ret = request_irq(12, handler, SA_INTERRUPT | SA_SHIRQ, "sha1 > > handler", DEVICE_NAME); > > printk (KERN_INFO "req irq %d \n", ret); > > enable_irq(12); > > enable_irq is opposite of disable_irq(_nosync), you don't need to call it in > probe function and in most cases you don't need it at all. > > regards, > -- > Jiri Slaby (jirislaby@gmail.com) > Faculty of Informatics, Masaryk University > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-30 17:39 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <40dfeece0711291447m2efa4f40i5c2c22a4273ecbc0@mail.gmail.com> 2007-11-30 9:28 ` ldd irq problem Chris Rutherford 2007-11-30 10:31 ` Jiri Slaby 2007-11-30 17:39 ` Chris Rutherford
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).