From: Yaacov Akiba Slama <ya@slamail.org>
To: linux-kernel@vger.kernel.org
Cc: Mikael Pettersson <mikpe@csd.uu.se>,
Jens Taprogge <taprogge@idg.rwth-aachen.de>,
zwane@holomorphy.com, bvermeul@blackstar.nl
Subject: [PATCH] Re: [BUG] cardbus/hotplugging still broken in 2.5.56
Date: Wed, 15 Jan 2003 18:26:36 +0200 [thread overview]
Message-ID: <3E258BBC.7010902@slamail.org> (raw)
In-Reply-To: <15909.9796.157927.447889@harpo.it.uu.se>
[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]
Can you test the enclosed patch. It seems to be both simple and to
resolve the resource collisions and the "No IRQ known" problem.
I added a smal comment (and modified another) so future janitors won't
move pci_enable above pci_assign_resource again.
If everyone is ok, I can send it to Linus for inclusion in BK (I have
the green light of Dave Jones).
Thanks,
Yaacov Akiba Slama
Mikael Pettersson wrote:
>Jens Taprogge writes:
> > The cardbus problems are caused by
> >
> > ChangeSet@1.797.145.6 2002-11-25 18:31:10-08:00 davej@codemonkey.org.uk
> >
> > as far as I can tell.
> >
> > pci_enable_device() will fail at least on i386 (see
> > arch/i386/pci/i386.c: pcibios_enable_resource (line 260)) if the
> > resources have not been assigned previously. Hence the ostensible
> > resource collisions.
> >
> > The attached patch should fix the problem.
> >
> > I have send the patch to Dave Jones some time ago but did not hear from
> > him yet.
> >
> > I am not subscribed to the list so please cc me on replys.
>
>Thanks. Your patch fixed the cardbus hotplug issue perfectly on my laptop.
>It survives multiple insert/eject cycles without any problems.
>
>The patch posted by Yaacov Akiba Slama today also fixed cardbus hotplug
>for me, but with his patch the kernel still prints "PCI: No IRQ known for
>interrupt pin A of device xx:xx.x. Please try using pci=biosirq" when the
>cardbus NIC is inserted; Jens Taprogge's patch silenced that warning.
>
>/Mikael
>
>
>
[-- Attachment #2: cardbus-rom.patch --]
[-- Type: text/plain, Size: 1137 bytes --]
--- drivers/pcmcia/cardbus.c.original 2003-01-14 19:38:49.000000000 +0200
+++ drivers/pcmcia/cardbus.c 2003-01-15 18:21:40.000000000 +0200
@@ -285,25 +285,29 @@
dev->dev.dma_mask = &dev->dma_mask;
pci_setup_device(dev);
- if (pci_enable_device(dev))
- continue;
strcpy(dev->dev.bus_id, dev->slot_name);
- /* FIXME: Do we need to enable the expansion ROM? */
+ /* We need to assign resources for expansion ROM. */
for (r = 0; r < 7; r++) {
struct resource *res = dev->resource + r;
- if (res->flags)
+ if (!res->start && res->end)
pci_assign_resource(dev, r);
}
/* Does this function have an interrupt at all? */
pci_readb(dev, PCI_INTERRUPT_PIN, &irq_pin);
- if (irq_pin) {
+ if (irq_pin)
dev->irq = irq;
- pci_writeb(dev, PCI_INTERRUPT_LINE, irq);
- }
+
+ /* pci_enable_device needs to be called after pci_assign_resource */
+ /* because it returns an error if (!res->start && res->end). */
+ if (pci_enable_device(dev))
+ continue;
+ if (irq_pin)
+ pci_writeb(dev, PCI_INTERRUPT_LINE, irq);
+
device_register(&dev->dev);
pci_insert_device(dev, bus);
}
next prev parent reply other threads:[~2003-01-15 16:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-15 8:11 [BUG] cardbus/hotplugging still broken in 2.5.56 Jens Taprogge
2003-01-15 9:13 ` Mikael Pettersson
2003-01-15 16:26 ` Yaacov Akiba Slama [this message]
2003-01-15 19:47 ` [PATCH] " Jens Taprogge
2003-01-15 20:23 ` Dave Jones
-- strict thread matches above, loose matches on Subject: below --
2003-01-15 20:13 Yaacov Akiba Slama
2003-01-15 20:31 ` jens.taprogge
2003-01-15 20:55 ` Yaacov Akiba Slama
2003-01-14 18:39 [PATCH] Re : " Yaacov Akiba Slama
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=3E258BBC.7010902@slamail.org \
--to=ya@slamail.org \
--cc=bvermeul@blackstar.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@csd.uu.se \
--cc=taprogge@idg.rwth-aachen.de \
--cc=zwane@holomorphy.com \
/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.