r2216 - in trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian: . patches patches/series

Christoph Hellwig hch-guest@costa.debian.org
Sun, 09 Jan 2005 12:36:14 +0100


Author: hch-guest
Date: 2005-01-09 12:36:12 +0100 (Sun, 09 Jan 2005)
New Revision: 2216

Added:
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/drivers-ide-__devinit.dpatch
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/modular-ide-2.dpatch
Modified:
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog
   trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-4
Log:

  * Rework the modular ide patch:
     - dropped support for unloading modules that didn't find devices
     - splited the rest into two patches, one that fixes modular ide
       support and one that fixes __init vs __devinit problems.
    (Christoph Hellwig).



Modified: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog	2005-01-09 11:18:12 UTC (rev 2215)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/changelog	2005-01-09 11:36:12 UTC (rev 2216)
@@ -1,3 +1,17 @@
+kernel-source-2.6.10 (2.6.10-4) UNRELEASED; urgency=low
+
+  * Replace smbfs-overflow-fixes.patch with a newer version from 2.6.10-ac
+    that actually works.  Thanks to S?ren Hansen <sh@warma.dk> for finding
+    and submitting it. (Christoph Hellwig) (closes: #283241).
+
+  * Rework the modular ide patch:
+     - dropped support for unloading modules that didn't find devices
+     - splited the rest into two patches, one that fixes modular ide
+       support and one that fixes __init vs __devinit problems.
+    (Christoph Hellwig).
+ 
+ -- Christoph Hellwig <hch@lst.de>  Sun, 09 Jan 2005 12:09:25 +0100
+
 kernel-source-2.6.10 (2.6.10-3) unstable; urgency=low
 
   * add dh_fixperms to the build targets to kernel-patch-debian-2.6.10

Added: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/drivers-ide-__devinit.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/drivers-ide-__devinit.dpatch	2005-01-09 11:18:12 UTC (rev 2215)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/drivers-ide-__devinit.dpatch	2005-01-09 11:36:12 UTC (rev 2216)
@@ -0,0 +1,466 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: pci probe routines must be __devinit, not __init
+## DP: Patch author: Herbert Xu
+## DP: Upstream status: not submitted
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- 1.4/drivers/ide/pci/adma100.c	2003-02-18 19:06:19 +01:00
++++ edited/drivers/ide/pci/adma100.c	2004-06-16 15:44:16 +02:00
+@@ -16,7 +16,7 @@
+ #include <linux/pci.h>
+ #include <asm/io.h>
+ 
+-void __init ide_init_adma100 (ide_hwif_t *hwif)
++void __devinit ide_init_adma100 (ide_hwif_t *hwif)
+ {
+ 	unsigned long  phy_admctl = pci_resource_start(hwif->pci_dev, 4) + 0x80 + (hwif->channel * 0x20);
+ 	void *v_admctl;
+--- 1.25/drivers/ide/pci/alim15x3.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/alim15x3.c	2004-06-16 15:45:33 +02:00
+@@ -581,7 +581,7 @@
+  *	appropriate also sets up the 1533 southbridge.
+  */
+   
+-static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const char *name)
+ {
+ 	unsigned long flags;
+ 	u8 tmpbyte;
+@@ -675,7 +675,7 @@
+  *	FIXME: frobs bits that are not defined on newer ALi devicea
+  */
+ 
+-static unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_ali15x3 (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev	= hwif->pci_dev;
+ 	unsigned int ata66	= 0;
+@@ -746,7 +746,7 @@
+  *	Initialize the IDE structure side of the ALi 15x3 driver.
+  */
+  
+-static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif)
++static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif)
+ {
+ 	hwif->autodma = 0;
+ 	hwif->tuneproc = &ali15x3_tune_drive;
+@@ -792,7 +792,7 @@
+  *	Sparc systems
+  */
+ 
+-static void __init init_hwif_ali15x3 (ide_hwif_t *hwif)
++static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
+ {
+ 	u8 ideic, inmir;
+ 	s8 irq_routing_table[] = { -1,  9, 3, 10, 4,  5, 7,  6,
+@@ -844,7 +844,7 @@
+  *	the actual work.
+  */
+ 
+-static void __init init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
++static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
+ {
+ 	if (m5229_revision < 0x20)
+ 		return;
+--- 1.31/drivers/ide/pci/amd74xx.c	2004-06-01 19:55:04 +02:00
++++ edited/drivers/ide/pci/amd74xx.c	2004-06-16 15:44:16 +02:00
+@@ -312,7 +312,7 @@
+  * and initialize its drive independent registers.
+  */
+ 
+-static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const char *name)
+ {
+ 	unsigned char t;
+ 	unsigned int u;
+@@ -416,7 +416,7 @@
+ 	return dev->irq;
+ }
+ 
+-static void __init init_hwif_amd74xx(ide_hwif_t *hwif)
++static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
+ {
+ 	int i;
+ 
+--- 1.9/drivers/ide/pci/cmd640.c	2004-02-01 19:06:55 +01:00
++++ edited/drivers/ide/pci/cmd640.c	2004-06-16 15:44:17 +02:00
+@@ -276,7 +276,7 @@
+ 	spin_unlock_irqrestore(&ide_lock, flags);
+ }
+ 
+-static int __init match_pci_cmd640_device (void)
++static int __devinit match_pci_cmd640_device (void)
+ {
+ 	const u8 ven_dev[4] = {0x95, 0x10, 0x40, 0x06};
+ 	unsigned int i;
+@@ -296,7 +296,7 @@
+ /*
+  * Probe for CMD640x -- pci method 1
+  */
+-static int __init probe_for_cmd640_pci1 (void)
++static int __devinit probe_for_cmd640_pci1 (void)
+ {
+ 	__get_cmd640_reg = get_cmd640_reg_pci1;
+ 	__put_cmd640_reg = put_cmd640_reg_pci1;
+@@ -312,7 +312,7 @@
+ /*
+  * Probe for CMD640x -- pci method 2
+  */
+-static int __init probe_for_cmd640_pci2 (void)
++static int __devinit probe_for_cmd640_pci2 (void)
+ {
+ 	__get_cmd640_reg = get_cmd640_reg_pci2;
+ 	__put_cmd640_reg = put_cmd640_reg_pci2;
+@@ -326,7 +326,7 @@
+ /*
+  * Probe for CMD640x -- vlb
+  */
+-static int __init probe_for_cmd640_vlb (void)
++static int __devinit probe_for_cmd640_vlb (void)
+ {
+ 	u8 b;
+ 
+@@ -347,7 +347,7 @@
+  *  Returns 1 if an IDE interface/drive exists at 0x170,
+  *  Returns 0 otherwise.
+  */
+-static int __init secondary_port_responding (void)
++static int __devinit secondary_port_responding (void)
+ {
+ 	unsigned long flags;
+ 
+@@ -390,7 +390,7 @@
+  * Check whether prefetch is on for a drive,
+  * and initialize the unmask flags for safe operation.
+  */
+-static void __init check_prefetch (unsigned int index)
++static void __devinit check_prefetch (unsigned int index)
+ {
+ 	ide_drive_t *drive = cmd_drives[index];
+ 	u8 b = get_cmd640_reg(prefetch_regs[index]);
+@@ -411,7 +411,7 @@
+ /*
+  * Figure out which devices we control
+  */
+-static void __init setup_device_ptrs (void)
++static void __devinit setup_device_ptrs (void)
+ {
+ 	unsigned int i;
+ 
+@@ -493,7 +493,7 @@
+ /*
+  * This routine retrieves the initial drive timings from the chipset.
+  */
+-static void __init retrieve_drive_counts (unsigned int index)
++static void __devinit retrieve_drive_counts (unsigned int index)
+ {
+ 	u8 b;
+ 
+@@ -714,7 +714,7 @@
+ /*
+  * Probe for a cmd640 chipset, and initialize it if found.  Called from ide.c
+  */
+-int __init ide_probe_for_cmd640x (void)
++int __devinit ide_probe_for_cmd640x (void)
+ {
+ #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
+ 	int second_port_toggled = 0;
+--- 1.22/drivers/ide/pci/cs5530.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/cs5530.c	2004-06-16 15:49:00 +02:00
+@@ -267,7 +267,7 @@
+  *	Initialize the cs5530 bridge for reliable IDE DMA operation.
+  */
+ 
+-static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const char *name)
+ {
+ 	struct pci_dev *master_0 = NULL, *cs5530_0 = NULL;
+ 	unsigned long flags;
+@@ -366,7 +366,7 @@
+  *	performs channel-specific pre-initialization before drive probing.
+  */
+ 
+-static void __init init_hwif_cs5530 (ide_hwif_t *hwif)
++static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif)
+ {
+ 	unsigned long basereg;
+ 	u32 d0_timings;
+--- 1.17/drivers/ide/pci/cy82c693.c	2004-03-18 15:20:56 +01:00
++++ edited/drivers/ide/pci/cy82c693.c	2004-06-16 15:44:17 +02:00
+@@ -334,7 +334,7 @@
+ /*
+  * this function is called during init and is used to setup the cy82c693 chip
+  */
+-static unsigned int __init init_chipset_cy82c693(struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_cy82c693(struct pci_dev *dev, const char *name)
+ {
+ 	if (PCI_FUNC(dev->devfn) != 1)
+ 		return 0;
+@@ -386,7 +386,7 @@
+ /*
+  * the init function - called for each ide channel once
+  */
+-static void __init init_hwif_cy82c693(ide_hwif_t *hwif)
++static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif)
+ {
+ 	hwif->autodma = 0;
+ 
+@@ -410,9 +410,9 @@
+ 	hwif->drives[1].autodma = hwif->autodma;
+ }
+ 
+-static __initdata ide_hwif_t *primary;
++static __devinitdata ide_hwif_t *primary;
+ 
+-void __init init_iops_cy82c693(ide_hwif_t *hwif)
++void __devinit init_iops_cy82c693(ide_hwif_t *hwif)
+ {
+ 	if (PCI_FUNC(hwif->pci_dev->devfn) == 1)
+ 		primary = hwif;
+--- 1.18/drivers/ide/pci/it8172.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/pci/it8172.c	2004-06-16 15:48:50 +02:00
+@@ -238,7 +238,7 @@
+ 	return 0;
+ }
+ 
+-static unsigned int __init init_chipset_it8172 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_it8172 (struct pci_dev *dev, const char *name)
+ {
+ 	unsigned char progif;
+     
+@@ -252,7 +252,7 @@
+ }
+ 
+ 
+-static void __init init_hwif_it8172 (ide_hwif_t *hwif)
++static void __devinit init_hwif_it8172 (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev* dev = hwif->pci_dev;
+ 	unsigned long cmdBase, ctrlBase;
+--- 1.19/drivers/ide/pci/ns87415.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/ns87415.c	2004-06-16 15:48:42 +02:00
+@@ -130,7 +130,7 @@
+ 	return __ide_dma_check(drive);
+ }
+ 
+-static void __init init_hwif_ns87415 (ide_hwif_t *hwif)
++static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 	unsigned int ctrl, using_inta;
+--- 1.18/drivers/ide/pci/opti621.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/pci/opti621.c	2004-06-16 15:48:02 +02:00
+@@ -328,7 +328,7 @@
+ /*
+  * init_hwif_opti621() is called once for each hwif found at boot.
+  */
+-static void __init init_hwif_opti621 (ide_hwif_t *hwif)
++static void __devinit init_hwif_opti621 (ide_hwif_t *hwif)
+ {
+ 	hwif->autodma = 0;
+ 	hwif->drives[0].drive_data = PIO_DONT_KNOW;
+@@ -348,7 +348,7 @@
+ 	hwif->drives[1].autodma = hwif->autodma;
+ }
+ 
+-static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
++static void __devinit init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
+ {
+ 	ide_setup_pci_device(dev, d);
+ }
+--- 1.19/drivers/ide/pci/sc1200.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/sc1200.c	2004-06-16 15:47:38 +02:00
+@@ -523,7 +523,7 @@
+  * This gets invoked by the IDE driver once for each channel,
+  * and performs channel-specific pre-initialization before drive probing.
+  */
+-static void __init init_hwif_sc1200 (ide_hwif_t *hwif)
++static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
+ {
+ 	if (hwif->mate)
+ 		hwif->serialized = hwif->mate->serialized = 1;
+--- 1.29/drivers/ide/pci/serverworks.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/pci/serverworks.c	2004-06-16 15:44:17 +02:00
+@@ -510,7 +510,7 @@
+ 	return __ide_dma_end(drive);
+ }
+ 
+-static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name)
+ {
+ 	unsigned int reg;
+ 	u8 btr;
+@@ -630,7 +630,7 @@
+ 	return (dev->irq) ? dev->irq : 0;
+ }
+ 
+-static unsigned int __init ata66_svwks_svwks (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_svwks_svwks (ide_hwif_t *hwif)
+ {
+ 	return 1;
+ }
+@@ -642,7 +642,7 @@
+  * Bit 14 clear = primary IDE channel does not have 80-pin cable.
+  * Bit 14 set   = primary IDE channel has 80-pin cable.
+  */
+-static unsigned int __init ata66_svwks_dell (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_svwks_dell (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 	if (dev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
+@@ -660,7 +660,7 @@
+  *
+  * WARNING: this only works on Alpine hardware!
+  */
+-static unsigned int __init ata66_svwks_cobalt (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_svwks_cobalt (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 	if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN &&
+@@ -671,7 +671,7 @@
+ 	return 0;
+ }
+ 
+-static unsigned int __init ata66_svwks (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 
+@@ -696,7 +696,7 @@
+ }
+ 
+ #undef CAN_SW_DMA
+-static void __init init_hwif_svwks (ide_hwif_t *hwif)
++static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
+ {
+ 	u8 dma_stat = 0;
+ 
+@@ -744,7 +744,7 @@
+ /*
+  * We allow the BM-DMA driver to only work on enabled interfaces.
+  */
+-static void __init init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
++static void __devinit init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 
+@@ -756,12 +756,12 @@
+ 	ide_setup_dma(hwif, dmabase, 8);
+ }
+ 
+-static void __init init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
++static void __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
+ {
+ 	ide_setup_pci_device(dev, d);
+ }
+ 
+-static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
++static void __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
+ {
+ 	if (!(PCI_FUNC(dev->devfn) & 1)) {
+ 		d->bootable = NEVER_BOARD;
+--- 1.27/drivers/ide/pci/sis5513.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/sis5513.c	2004-06-16 15:47:18 +02:00
+@@ -746,7 +746,7 @@
+ */
+ 
+ /* Chip detection and general config */
+-static unsigned int __init init_chipset_sis5513 (struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const char *name)
+ {
+ 	struct pci_dev *host;
+ 	int i = 0;
+@@ -890,7 +890,7 @@
+ 	return 0;
+ }
+ 
+-static unsigned int __init ata66_sis5513 (ide_hwif_t *hwif)
++static unsigned int __devinit ata66_sis5513 (ide_hwif_t *hwif)
+ {
+ 	u8 ata66 = 0;
+ 
+@@ -908,7 +908,7 @@
+         return ata66;
+ }
+ 
+-static void __init init_hwif_sis5513 (ide_hwif_t *hwif)
++static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif)
+ {
+ 	hwif->autodma = 0;
+ 
+--- 1.20/drivers/ide/pci/sl82c105.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/sl82c105.c	2004-06-16 15:47:12 +02:00
+@@ -388,7 +388,7 @@
+  * channel 0 here at least, but channel 1 has to be enabled by
+  * firmware or arch code. We still set both to 16 bits mode.
+  */
+-static unsigned int __init init_chipset_sl82c105(struct pci_dev *dev, const char *msg)
++static unsigned int __devinit init_chipset_sl82c105(struct pci_dev *dev, const char *msg)
+ {
+ 	u32 val;
+ 
+@@ -401,7 +401,7 @@
+ 	return dev->irq;
+ }
+ 
+-static void __init init_dma_sl82c105(ide_hwif_t *hwif, unsigned long dma_base)
++static void __devinit init_dma_sl82c105(ide_hwif_t *hwif, unsigned long dma_base)
+ {
+ 	unsigned int rev;
+ 	u8 dma_state;
+@@ -433,7 +433,7 @@
+  * Initialise the chip
+  */
+ 
+-static void __init init_hwif_sl82c105(ide_hwif_t *hwif)
++static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
+ {
+ 	struct pci_dev *dev = hwif->pci_dev;
+ 	u32 val;
+--- 1.22/drivers/ide/pci/slc90e66.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/slc90e66.c	2004-06-16 15:47:02 +02:00
+@@ -325,7 +325,7 @@
+ 	return 0;
+ }
+ 
+-static void __init init_hwif_slc90e66 (ide_hwif_t *hwif)
++static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
+ {
+ 	u8 reg47 = 0;
+ 	u8 mask = hwif->channel ? 0x01 : 0x02;  /* bit0:Primary */
+--- 1.9/drivers/ide/pci/triflex.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/triflex.c	2004-06-16 15:46:54 +02:00
+@@ -190,7 +190,7 @@
+ 	return hwif->ide_dma_on(drive);
+ }
+ 
+-static void __init init_hwif_triflex(ide_hwif_t *hwif)
++static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
+ {
+ 	hwif->tuneproc = &triflex_tune_drive;
+ 	hwif->speedproc = &triflex_tune_chipset;
+--- 1.23/drivers/ide/pci/via82cxxx.c	2004-06-15 18:29:40 +02:00
++++ edited/drivers/ide/pci/via82cxxx.c	2004-06-16 15:46:29 +02:00
+@@ -414,7 +414,7 @@
+  *	and initialize its drive independent registers.
+  */
+ 
+-static unsigned int __init init_chipset_via82cxxx(struct pci_dev *dev, const char *name)
++static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const char *name)
+ {
+ 	struct pci_dev *isa = NULL;
+ 	u8 t, v;
+@@ -575,7 +575,7 @@
+ 	return 0;
+ }
+ 
+-static void __init init_hwif_via82cxxx(ide_hwif_t *hwif)
++static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
+ {
+ 	int i;
+ 

Added: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/modular-ide-2.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/modular-ide-2.dpatch	2005-01-09 11:18:12 UTC (rev 2215)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/modular-ide-2.dpatch	2005-01-09 11:36:12 UTC (rev 2216)
@@ -0,0 +1,128 @@
+#! /bin/sh -e 
+## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Description: fix IDE modularisation
+## DP: Patch author: Herbert Xu
+## DP: Upstream status: rejected
+
+. $(dirname $0)/DPATCH
+
+@DPATCH@
+--- 1.3/drivers/ide/ide-generic.c	2004-02-22 18:36:17 +01:00
++++ edited/drivers/ide/ide-generic.c	2004-06-16 15:44:16 +02:00
+@@ -11,9 +11,14 @@
+ #include <linux/init.h>
+ #include <linux/module.h>
+ #include <linux/ide.h>
++#include <linux/config.h>
+ 
+ static int __init ide_generic_init(void)
+ {
++#ifdef CONFIG_BLK_DEV_IDEPCI
++	ide_scan_pcibus();
++#endif
++
+ 	if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
+ 		ide_get_lock(NULL, NULL); /* for atari only */
+ 
+--- 1.150/drivers/ide/ide.c	2004-06-15 18:31:12 +02:00
++++ edited/drivers/ide/ide.c	2004-06-16 15:44:16 +02:00
+@@ -175,10 +175,11 @@
+ static int initializing;	/* set while initializing built-in drivers */
+ 
+ DECLARE_MUTEX(ide_cfg_sem);
++EXPORT_SYMBOL(ide_cfg_sem);
+ spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+ 
+ #ifdef CONFIG_BLK_DEV_IDEPCI
+-static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
++int ide_scan_direction;		/* THIS was formerly 2.2.x pci=reverse */
+ #endif
+ 
+ #ifdef CONFIG_IDEDMA_AUTO
+@@ -1364,6 +1365,8 @@
+ 
+ EXPORT_SYMBOL(system_bus_clock);
+ 
++EXPORT_SYMBOL(ide_add_generic_settings);
++
+ /*
+  *	Locking is badly broken here - since way back.  That sucker is
+  * root-only, but that's not an excuse...  The real question is what
+@@ -2011,9 +2014,9 @@
+  */
+ static void __init probe_for_hwifs (void)
+ {
+-#ifdef CONFIG_BLK_DEV_IDEPCI
+-	ide_scan_pcibus(ide_scan_direction);
+-#endif /* CONFIG_BLK_DEV_IDEPCI */
++#if defined(CONFIG_BLK_DEV_IDEPCI) && !defined(MODULE)
++	ide_scan_pcibus();
++#endif /* CONFIG_BLK_DEV_IDEPCI && !MODULE */
+ 
+ #ifdef CONFIG_ETRAX_IDE
+ 	{
+--- 1.25/drivers/ide/setup-pci.c	2004-06-01 21:04:38 +02:00
++++ edited/drivers/ide/setup-pci.c	2004-06-16 15:44:18 +02:00
+@@ -821,7 +821,7 @@
+  *	boot up the pci layer takes over the job.
+  */
+  
+-static int __init ide_scan_pcidev(struct pci_dev *dev)
++static int ide_scan_pcidev(struct pci_dev *dev)
+ {
+ 	struct list_head *l;
+ 	struct pci_driver *d;
+@@ -847,21 +847,23 @@
+ 
+ /**
+  *	ide_scan_pcibus		-	perform the initial IDE driver scan
+- *	@scan_direction: set for reverse order scanning
+  *
+  *	Perform the initial bus rather than driver ordered scan of the
+  *	PCI drivers. After this all IDE pci handling becomes standard
+  *	module ordering not traditionally ordered.
+  */
+  	
+-void __init ide_scan_pcibus (int scan_direction)
++void ide_scan_pcibus(void)
+ {
+ 	struct pci_dev *dev = NULL;
+ 	struct pci_driver *d;
+ 	struct list_head *l, *n;
+ 
++	if (!pre_init)
++		return;
++
+ 	pre_init = 0;
+-	if (!scan_direction) {
++	if (!ide_scan_direction) {
+ 		while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
+ 			ide_scan_pcidev(dev);
+ 		}
+@@ -883,3 +885,5 @@
+ 		pci_register_driver(d);
+ 	}
+ }
++
++EXPORT_SYMBOL_GPL(ide_scan_pcibus);
+--- 1.124/include/linux/ide.h	2004-06-05 21:58:33 +02:00
++++ edited/include/linux/ide.h	2004-06-16 15:44:18 +02:00
+@@ -1224,6 +1224,7 @@
+ extern	ide_hwif_t	ide_hwifs[];		/* master data repository */
+ #endif
+ extern int noautodma;
++extern int ide_scan_direction;
+ 
+ extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
+ 
+@@ -1524,7 +1525,7 @@
+ 
+ extern int ideprobe_init(void);
+ 
+-extern void ide_scan_pcibus(int scan_direction) __init;
++extern void ide_scan_pcibus(void);
+ extern int ide_pci_register_driver(struct pci_driver *driver);
+ extern void ide_pci_unregister_driver(struct pci_driver *driver);
+ extern void ide_pci_setup_ports(struct pci_dev *dev, struct ide_pci_device_s *d, int autodma, int pciirq, ata_index_t *index);

Modified: trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-4
===================================================================
--- trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-4	2005-01-09 11:18:12 UTC (rev 2215)
+++ trunk/kernel/source/kernel-source-2.6.10-2.6.10/debian/patches/series/2.6.10-4	2005-01-09 11:36:12 UTC (rev 2216)
@@ -1,2 +1,5 @@
 - smbfs-overflow-fixes.dpatch
 + smbfs-overflow-fixes-2.dpatch
+- modular-ide.dpatch
++ modular-ide-2.dpatch
++ drivers-ide-__devinit.dpatch