/[linux-patches]/genpatches-2.6/tags/2.6.13-4/2900_yenta-oops.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.13-4/2900_yenta-oops.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 168 - (show annotations) (download)
Sun Sep 18 11:19:29 2005 UTC (9 years ago) by dsd
File size: 1737 byte(s)
2.6.13-4 release
1 From nobody Mon Sep 17 00:00:00 2001
2 Subject: [PATCH] yenta oops fix
3 From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
4 To: Olaf Hering <olh@suse.de>
5 Cc: Andreas Koch <koch@esa.informatik.tu-darmstadt.de>, Marcus Wegner <wegner3000@hotmail.com>
6 Date: Wed Sep 14 23:05:30 2005 +0400
7
8 In some cases, especially on modern laptops with a lot of PCI and
9 cardbus bridges, we're unable to assign correct secondary/subordinate
10 bus numbers to all cardbus bridges due to BIOS limitations unless
11 we are using "pci=assign-busses" boot option.
12 So some cardbus controllers may not have attached subordinate pci_bus
13 structure, and yenta driver must cope with it - just ignore such cardbus
14 bridges.
15
16 For example, see https://bugzilla.novell.com/show_bug.cgi?id=113778
17
18 Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
19 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
20 Signed-off-by: Chris Wright <chrisw@osdl.org>
21 ---
22 drivers/pcmcia/yenta_socket.c | 13 ++++++++++++-
23 1 files changed, 12 insertions(+), 1 deletion(-)
24
25 Index: linux-2.6.13.y/drivers/pcmcia/yenta_socket.c
26 ===================================================================
27 --- linux-2.6.13.y.orig/drivers/pcmcia/yenta_socket.c
28 +++ linux-2.6.13.y/drivers/pcmcia/yenta_socket.c
29 @@ -976,7 +976,18 @@ static int __devinit yenta_probe (struct
30 {
31 struct yenta_socket *socket;
32 int ret;
33 -
34 +
35 + /*
36 + * If we failed to assign proper bus numbers for this cardbus
37 + * controller during PCI probe, its subordinate pci_bus is NULL.
38 + * Bail out if so.
39 + */
40 + if (!dev->subordinate) {
41 + printk(KERN_ERROR "Yenta: no bus associated with %s!\n",
42 + pci_name(dev));
43 + return -ENODEV;
44 + }
45 +
46 socket = kmalloc(sizeof(struct yenta_socket), GFP_KERNEL);
47 if (!socket)
48 return -ENOMEM;

  ViewVC Help
Powered by ViewVC 1.1.20