Find the answer to your Linux question:
Results 1 to 10 of 10
Hi all, I've implemented a PCI driver with MSI interrupt. For the first time I load my module (insmod ...), my driver works fine. I see expected interrupts from my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    11

    message: "No irq handler for vector"


    Hi all,
    I've implemented a PCI driver with MSI interrupt.
    For the first time I load my module (insmod ...), my driver works fine. I see expected interrupts from my card.

    However, when I remove module (rmmod) and insert again, dmesg gives me this weird "No irq handler for vector (irq -1) .." error although the module has successfully requested IRQ NUMBER and registered the ISR.

    I've encountered this messages since kernel 2.6.32, pretty sure that 2.6.31 didn't give me this thing. I've upgraded to 2.6.48, error is still there.

    Some websites suggest disabling MSI by having boot option (pci = nomsi) ... which i don't think it fixes the root cause.

    What's really the cause and why is it introduced since 2.6.32?

    Thanks, guys.

    Jeff

  2. #2
    Just Joined!
    Join Date
    Apr 2005
    Location
    Romania
    Posts
    42
    Hi jefflieu,

    Try to compile a new kernel enabling:

    PCI access support
    PCI access mode (Direct) --->

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677
    When your module is removed, do you release the IRQ it was using? My guess is that you are not properly releasing resources like this when your module is shut down and removed from the kernel.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Nov 2010
    Posts
    11
    Quote Originally Posted by Rubberman View Post
    When your module is removed, do you release the IRQ it was using? My guess is that you are not properly releasing resources like this when your module is shut down and removed from the kernel.
    Hi, thanks for the reply.
    I'm not sure i'm doing the right thing. It did work before. The remove sequence in the driver:
    - Disable interrupt generation at the card
    - Free irq line: disable_irq(irq_line), irq_line was obtained in the init function, after enabling msi by reading: pcidev->irq.
    - Disable MSI: pci_disable_msi(pcidev)


    By the way, Init function:
    - pci_enable_msi(pcidev)
    - irq_line = pcidev->irq
    - request_irq(irq_line, pcidev_isr_handler,IRQF_SHARED, DRV_NAME, (void*)mypci);

    Thanks very much.
    Jeff

  6. #5
    Just Joined!
    Join Date
    Nov 2010
    Posts
    11
    Quote Originally Posted by cbogdan View Post
    Hi jefflieu,

    Try to compile a new kernel enabling:

    PCI access support
    PCI access mode (Direct) --->
    Thanks, i'll give it a shot.

  7. #6
    Just Joined!
    Join Date
    Nov 2010
    Posts
    11
    When I re-insert the module, the request_irq returns SUCCESS.

  8. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677
    So, did cbogdan's suggestion work? It sounds like it.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #8
    Just Joined!
    Join Date
    Nov 2010
    Posts
    11
    Quote Originally Posted by Rubberman View Post
    So, did cbogdan's suggestion work? It sounds like it.
    Thanks for the suggestion. I've downloaded kernel 2.6.35.9 and built with the suggested option. BUT. It doesn't work.
    This time it gives me some additional info though - "the beeping sound" . a series of 10 beeps.
    10xbeeps ....... 2 seconds .....10xbeeps ... ...


  10. #9
    Just Joined!
    Join Date
    Nov 2010
    Posts
    11
    Since i have the source, any pointers to which particular areas to look at is really appreciated. I'm quite new to kernel "excavation".
    Thanks

  11. #10
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677
    Well, there were a number of changes in the kernel with the 2.6.32 kernel that could affect this. There should be some documentation on the kernel web site (The Linux Kernel Archives) on the changes you need to make in your driver if the changes impact what you are doing. Sorry, but that's about as far as I can take you right now. I haven't got into that level of detail on the changes that were instituted, other than reading some newsletter articles about it.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •