diff options
author | Ivan Kokshaysky <ink@jurassic.park.msu.ru> | 2005-09-14 23:05:30 +0400 |
---|---|---|
committer | Chris Wright <chrisw@osdl.org> | 2005-10-03 16:27:17 -0700 |
commit | ef1b2a3b4cd1addfe039a4bb8105098d83bd6503 (patch) | |
tree | dcb925d9a5b1a1df154475a4647482d8df5e3a95 | |
parent | 9be78f865844edc728ac933f7161b01e48e1b418 (diff) |
[PATCH] yenta oops fix
In some cases, especially on modern laptops with a lot of PCI and
cardbus bridges, we're unable to assign correct secondary/subordinate
bus numbers to all cardbus bridges due to BIOS limitations unless
we are using "pci=assign-busses" boot option.
So some cardbus controllers may not have attached subordinate pci_bus
structure, and yenta driver must cope with it - just ignore such cardbus
bridges.
For example, see https://bugzilla.novell.com/show_bug.cgi?id=113778
Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Chris Wright <chrisw@osdl.org>
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 62fd705203f..42191e0000a 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c @@ -976,7 +976,18 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i { struct yenta_socket *socket; int ret; - + + /* + * If we failed to assign proper bus numbers for this cardbus + * controller during PCI probe, its subordinate pci_bus is NULL. + * Bail out if so. + */ + if (!dev->subordinate) { + printk(KERN_ERR "Yenta: no bus associated with %s! " + "(try 'pci=assign-busses')\n", pci_name(dev)); + return -ENODEV; + } + socket = kmalloc(sizeof(struct yenta_socket), GFP_KERNEL); if (!socket) return -ENOMEM; |