Skip to content

Commit

Permalink
[PATCH] yenta oops fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ivan Kokshaysky authored and Linus Torvalds committed Sep 14, 2005
1 parent 2fd4ef8 commit c7fb0b3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion drivers/pcmcia/yenta_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,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_ERROR "Yenta: no bus associated with %s!\n",
pci_name(dev));
return -ENODEV;
}

socket = kmalloc(sizeof(struct yenta_socket), GFP_KERNEL);
if (!socket)
return -ENOMEM;
Expand Down

0 comments on commit c7fb0b3

Please sign in to comment.