diff options
author | Ivan Kokshaysky <ink@jurassic.park.msu.ru> | 2005-09-14 15:05:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-14 15:28:15 -0400 |
commit | c7fb0b35ada6e0e691e70af5591a2006fbec85b5 (patch) | |
tree | 04e058f2bd4a9ed1b7940bf7ff5b461a380e90b0 /drivers/pcmcia | |
parent | 2fd4ef85e0db9ed75c98e13953257a967ea55e03 (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>
Diffstat (limited to 'drivers/pcmcia')
-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 f0997c36c9b7..2e43911b4876 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -1045,7 +1045,18 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i | |||
1045 | { | 1045 | { |
1046 | struct yenta_socket *socket; | 1046 | struct yenta_socket *socket; |
1047 | int ret; | 1047 | int ret; |
1048 | 1048 | ||
1049 | /* | ||
1050 | * If we failed to assign proper bus numbers for this cardbus | ||
1051 | * controller during PCI probe, its subordinate pci_bus is NULL. | ||
1052 | * Bail out if so. | ||
1053 | */ | ||
1054 | if (!dev->subordinate) { | ||
1055 | printk(KERN_ERROR "Yenta: no bus associated with %s!\n", | ||
1056 | pci_name(dev)); | ||
1057 | return -ENODEV; | ||
1058 | } | ||
1059 | |||
1049 | socket = kmalloc(sizeof(struct yenta_socket), GFP_KERNEL); | 1060 | socket = kmalloc(sizeof(struct yenta_socket), GFP_KERNEL); |
1050 | if (!socket) | 1061 | if (!socket) |
1051 | return -ENOMEM; | 1062 | return -ENOMEM; |