From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>,
Vojtech Pavlik <vojtech@suse.cz>,
Peter Osterlund <petero2@telia.com>,
Patrick Mochel <mochel@osdl.org>, Tobias Diedrich <ranma@gmx.at>,
Alessandro Suardi <alessandro.suardi@oracle.com>,
linux-kernel@vger.kernel.org
Subject: Re: 2.5.20 - Xircom PCI Cardbus doesn't work
Date: Sat, 15 Jun 2002 16:07:21 -0400 [thread overview]
Message-ID: <3D0B9E79.7010909@mandrakesoft.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0206151140400.3479-100000@home.transmeta.com>
Linus Torvalds wrote:
> which is horribly stupid. We really want to do
>
> pci_enable_mem(dev);
> membase = ioremap(dev->resource[]);
>
> pci_request_irq(dev, irq_handler);
>
> where "pci_request_irq()" enables the interrupt and adds an interrupt
> handler atomically.
That seems ok to me. Note that we still want
pci_{enable,disable}_device to exist (as mentioned in the mail to
Kai)... I'm fine with moving a lot of pci_enable_device's duties to
pci_{assign,request,release}_{irq,io,mem} as long as we don't kill it
completely.
>>The only thing I've wanted is a cross-platform way to detect if
>>pdev->irq returned by pci_enable_device is valid.
>
>
> It's required to be valid, because if it isn't, then the platform is
> broken. There are no cross-platform issues: complain to the platform
> vendor and/or the linux code for that architecture.
Well, then I should either complain to myself, or to you ;-) Part of
this comes back to PCI irq routing. The actual situation encountered is,
When ia32 PCI irq routing messes up, or some other random reason why an
irq is not available for a PCI device, pdev->irq==0. So I test for that
in my code. Then DaveM bitches at me for my test (pdev->irq < 2) not
being cross-platform.
My suggested solution, if you like Kai's proposal, is to have
pci_assign_irq() or pci_request_irq() return an error if PCI IRQ routing
fails.
Jeff
P.S. Random tangent: the PCI layer could do a lot better job at
spreading devices across the available IRQs. I've seen devices
clustered on a single interrupt by the Linux PCI code, where their pci
irq routing masks indicating other, not-assigned-at-all irqs were available.
next prev parent reply other threads:[~2002-06-15 20:11 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-03 11:07 2.5.20 - Xircom PCI Cardbus doesn't work Alessandro Suardi
2002-06-06 17:08 ` Peter Osterlund
2002-06-09 9:17 ` Tobias Diedrich
2002-06-09 10:55 ` Peter Osterlund
2002-06-10 15:44 ` Patrick Mochel
2002-06-10 19:28 ` Peter Osterlund
2002-06-14 16:33 ` Linus Torvalds
2002-06-14 17:20 ` Peter Osterlund
2002-06-14 17:47 ` Linus Torvalds
2002-06-14 17:53 ` Vojtech Pavlik
2002-06-14 18:05 ` Linus Torvalds
2002-06-14 18:12 ` Kai Germaschewski
2002-06-14 18:18 ` Linus Torvalds
2002-06-14 19:37 ` Jeff Garzik
2002-06-15 18:48 ` Linus Torvalds
2002-06-15 19:05 ` Linus Torvalds
2002-06-15 19:39 ` Kai Germaschewski
2002-06-15 19:58 ` Jeff Garzik
2002-06-15 23:00 ` Kai Germaschewski
2002-06-15 20:07 ` Jeff Garzik [this message]
2002-06-15 22:51 ` Kai Germaschewski
2002-06-14 19:31 ` Jeff Garzik
2002-06-14 23:25 ` Kai Germaschewski
2002-06-14 23:53 ` Jeff Garzik
2002-06-15 8:25 ` Ingo Oeser
2002-06-14 19:34 ` Jeff Garzik
2002-06-14 18:30 ` Peter Osterlund
2002-06-14 18:51 ` Linus Torvalds
2002-06-14 20:07 ` Peter Osterlund
2002-06-15 2:42 ` Paul Mackerras
2002-06-15 21:58 ` Cardbus Linus Torvalds
2002-06-16 7:01 ` Cardbus Eric W. Biederman
2002-06-16 8:18 ` Cardbus Paul Mackerras
2002-06-10 20:59 ` 2.5.20 - Xircom PCI Cardbus doesn't work Alessandro Suardi
2002-06-16 4:57 ` Linus Torvalds
2002-06-16 7:40 ` Peter Osterlund
2002-06-16 18:16 ` Linus Torvalds
2002-06-16 18:42 ` Martin Dalecki
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=3D0B9E79.7010909@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=alessandro.suardi@oracle.com \
--cc=kai@tp1.ruhr-uni-bochum.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=petero2@telia.com \
--cc=ranma@gmx.at \
--cc=torvalds@transmeta.com \
--cc=vojtech@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox