All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anders Blomdell <anders.blomdell@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] NI analog card shows wrong IRQ number after reboot
Date: Mon, 14 Mar 2011 19:47:20 +0100	[thread overview]
Message-ID: <4D7E62B8.6090102@domain.hid> (raw)
In-Reply-To: <4D7E5F7D.9060508@domain.hid>

On 2011-03-14 19.33, Anders Blomdell wrote:
> Which is due to the fact that pci_enable_device (mite.c) is called at mite_setup
> instead of mite_init. The bad thing with this, is that interrupt conflicts can
> only be found AFTER the driver has been started with analogy_config, which is
> often too late (since interrupt conflicts will bring down the machine).
> 
> Would it be a good idea to pci_enable_device in mite_init as well, or will that
> break something else?

Many other kernel driver seems to call pci_enable_device from the probe
function, and this does give the card it's proper IRQ:

--- ksrc/drivers/analogy/national_instruments/mite.c.orig   2011-02-16
15:26:01.000000000 +0100
+++ ksrc/drivers/analogy/national_instruments/mite.c    2011-03-14
19:38:18.572674136 +0100
@@ -80,6 +80,7 @@
        }

        list_add(&mite->list, &mite_devices);
+       pci_enable_device(mite->pcidev);

        return 0;
 }

Regards

Anders


-- 
Anders Blomdell                  Email: anders.blomdell@domain.hid
Department of Automatic Control
Lund University                  Phone:    +46 46 222 4625
P.O. Box 118                     Fax:      +46 46 138118
SE-221 00 Lund, Sweden


      reply	other threads:[~2011-03-14 18:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14 18:33 [Xenomai-core] NI analog card shows wrong IRQ number after reboot Anders Blomdell
2011-03-14 18:47 ` Anders Blomdell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D7E62B8.6090102@domain.hid \
    --to=anders.blomdell@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.