/[kernel]/branches/kernel-image-2.6.12/debian/patches-debian/modular-ide.patch
ViewVC logotype

Contents of /branches/kernel-image-2.6.12/debian/patches-debian/modular-ide.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3353 - (show annotations) (download)
Sat Jun 18 21:59:46 2005 UTC (7 years, 11 months ago) by maks-guest
File size: 3933 byte(s)
add all the remaining patches to the new branch
1 ## All lines beginning with `## DP:' are a description of the patch.
2 ## DP: Description: fix IDE modularisation
3 ## DP: Patch author: Herbert Xu
4 ## DP: Upstream status: rejected
5 #
6 diff -aurN a/drivers/ide/ide-generic.c b/drivers/ide/ide-generic.c
7 --- a/drivers/ide/ide-generic.c 2005-06-06 11:22:29.000000000 -0400
8 +++ b/drivers/ide/ide-generic.c 2005-06-15 22:16:56.000000000 -0400
9 @@ -11,9 +11,14 @@
10 #include <linux/init.h>
11 #include <linux/module.h>
12 #include <linux/ide.h>
13 +#include <linux/config.h>
14
15 static int __init ide_generic_init(void)
16 {
17 +#ifdef CONFIG_BLK_DEV_IDEPCI
18 + ide_scan_pcibus();
19 +#endif
20 +
21 if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
22 ide_get_lock(NULL, NULL); /* for atari only */
23
24 diff -aurN a/drivers/ide/ide.c b/drivers/ide/ide.c
25 --- a/drivers/ide/ide.c 2005-06-06 11:22:29.000000000 -0400
26 +++ b/drivers/ide/ide.c 2005-06-15 22:16:56.000000000 -0400
27 @@ -175,10 +175,11 @@
28 static int initializing; /* set while initializing built-in drivers */
29
30 DECLARE_MUTEX(ide_cfg_sem);
31 +EXPORT_SYMBOL(ide_cfg_sem);
32 __cacheline_aligned_in_smp DEFINE_SPINLOCK(ide_lock);
33
34 #ifdef CONFIG_BLK_DEV_IDEPCI
35 -static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
36 +int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
37 #endif
38
39 #ifdef CONFIG_IDEDMA_AUTO
40 @@ -1418,6 +1419,8 @@
41
42 EXPORT_SYMBOL(generic_ide_ioctl);
43
44 +EXPORT_SYMBOL(ide_add_generic_settings);
45 +
46 /*
47 * stridx() returns the offset of c within s,
48 * or -1 if c is '\0' or not found within s.
49 @@ -1797,9 +1800,9 @@
50 */
51 static void __init probe_for_hwifs (void)
52 {
53 -#ifdef CONFIG_BLK_DEV_IDEPCI
54 - ide_scan_pcibus(ide_scan_direction);
55 -#endif /* CONFIG_BLK_DEV_IDEPCI */
56 +#if defined(CONFIG_BLK_DEV_IDEPCI) && !defined(MODULE)
57 + ide_scan_pcibus();
58 +#endif /* CONFIG_BLK_DEV_IDEPCI && !MODULE */
59
60 #ifdef CONFIG_ETRAX_IDE
61 {
62 diff -aurN a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
63 --- a/drivers/ide/setup-pci.c 2005-06-06 11:22:29.000000000 -0400
64 +++ b/drivers/ide/setup-pci.c 2005-06-15 22:16:56.000000000 -0400
65 @@ -837,7 +837,7 @@
66 * boot up the pci layer takes over the job.
67 */
68
69 -static int __init ide_scan_pcidev(struct pci_dev *dev)
70 +static int ide_scan_pcidev(struct pci_dev *dev)
71 {
72 struct list_head *l;
73 struct pci_driver *d;
74 @@ -863,21 +863,23 @@
75
76 /**
77 * ide_scan_pcibus - perform the initial IDE driver scan
78 - * @scan_direction: set for reverse order scanning
79 *
80 * Perform the initial bus rather than driver ordered scan of the
81 * PCI drivers. After this all IDE pci handling becomes standard
82 * module ordering not traditionally ordered.
83 */
84
85 -void __init ide_scan_pcibus (int scan_direction)
86 +void ide_scan_pcibus(void)
87 {
88 struct pci_dev *dev = NULL;
89 struct pci_driver *d;
90 struct list_head *l, *n;
91
92 + if (!pre_init)
93 + return;
94 +
95 pre_init = 0;
96 - if (!scan_direction) {
97 + if (!ide_scan_direction) {
98 while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
99 ide_scan_pcidev(dev);
100 }
101 @@ -899,3 +901,5 @@
102 pci_register_driver(d);
103 }
104 }
105 +
106 +EXPORT_SYMBOL_GPL(ide_scan_pcibus);
107 diff -aurN a/include/linux/ide.h b/include/linux/ide.h
108 --- a/include/linux/ide.h 2005-06-06 11:22:29.000000000 -0400
109 +++ b/include/linux/ide.h 2005-06-15 22:16:56.000000000 -0400
110 @@ -1115,6 +1115,7 @@
111 extern ide_hwif_t ide_hwifs[]; /* master data repository */
112 #endif
113 extern int noautodma;
114 +extern int ide_scan_direction;
115
116 extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
117 extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs);
118 @@ -1323,7 +1324,7 @@
119
120 extern int ideprobe_init(void);
121
122 -extern void ide_scan_pcibus(int scan_direction) __init;
123 +extern void ide_scan_pcibus(void);
124 extern int ide_pci_register_driver(struct pci_driver *driver);
125 extern void ide_pci_unregister_driver(struct pci_driver *driver);
126 void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *);

  ViewVC Help
Powered by ViewVC 1.1.5