/[linux-patches]/genpatches-2.6/tags/2.6.12-12/1315_amd64-cardbus.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.12-12/1315_amd64-cardbus.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 133 - (hide annotations) (download)
Tue Aug 9 19:42:38 2005 UTC (13 years ago) by dsd
Original Path: genpatches-2.6/trunk/2.6.12/1315_amd64-cardbus.patch
File size: 1901 byte(s)
Fix PCMCIA for amd64 laptops
1 dsd 133 From: Greg Kroah-Hartman <gregkh@suse.de>
2     Date: Thu, 2 Jun 2005 22:41:48 +0000 (-0700)
3     Subject: [PATCH] PCI: Fix up PCI routing in parent bridge
4     X-Git-Tag: v2.6.13-rc2
5     X-Git-Url: http://www.kernel.org/git/gitweb.cgi?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=26f674ae0e37190bf61c988e52911e4372fdb5f5
6    
7     [PATCH] PCI: Fix up PCI routing in parent bridge
8    
9     When the cardbus bridge is behind another bridge change the routing
10     in the parent bridge for new cards. This fixes Cardbus on various AMD64
11     laptops.
12    
13     Signed-off-by: Andi Kleen <ak@suse.de>
14     Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15     ---
16    
17     --- a/drivers/pci/probe.c
18     +++ b/drivers/pci/probe.c
19     @@ -398,6 +398,16 @@ static void pci_enable_crs(struct pci_de
20     pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl);
21     }
22    
23     +static void __devinit pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max)
24     +{
25     + struct pci_bus *parent = child->parent;
26     + while (parent->parent && parent->subordinate < max) {
27     + parent->subordinate = max;
28     + pci_write_config_byte(parent->self, PCI_SUBORDINATE_BUS, max);
29     + parent = parent->parent;
30     + }
31     +}
32     +
33     unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus);
34    
35     /*
36     @@ -499,7 +509,13 @@ int __devinit pci_scan_bridge(struct pci
37    
38     if (!is_cardbus) {
39     child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA;
40     -
41     + /*
42     + * Adjust subordinate busnr in parent buses.
43     + * We do this before scanning for children because
44     + * some devices may not be detected if the bios
45     + * was lazy.
46     + */
47     + pci_fixup_parent_subordinate_busnr(child, max);
48     /* Now we can scan all subordinate buses... */
49     max = pci_scan_child_bus(child);
50     } else {
51     @@ -513,6 +529,7 @@ int __devinit pci_scan_bridge(struct pci
52     max+i+1))
53     break;
54     max += i;
55     + pci_fixup_parent_subordinate_busnr(child, max);
56     }
57     /*
58     * Set the subordinate bus number to its real value.

  ViewVC Help
Powered by ViewVC 1.1.20