r2593 - trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches
Sven Luther
luther@costa.debian.org
Fri, 04 Mar 2005 10:44:49 +0100
Author: luther
Date: 2005-03-04 10:44:49 +0100 (Fri, 04 Mar 2005)
New Revision: 2593
Added:
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/005-sparc64_no_i_sock.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/027-track_dummy_capability.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos.dpatch
Removed:
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/005-sparc64_no_i_sock-2.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/007-pci_ide_no_reserve.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/027-track_dummy_capability-2.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/028-do_brk_security_fixes.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/083-x86_64_switch_mm_context_race.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/alsa-module-load-fix.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/drivers-input-psaux-hacks.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/modular-ide.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/modular-vesafb.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos-2.dpatch
trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/smbfs-overflow-fixes.dpatch
Log:
First step of move around of patches for 2.6.11
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/005-sparc64_no_i_sock-2.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/005-sparc64_no_i_sock-2.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/005-sparc64_no_i_sock-2.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,35 +0,0 @@
-#! /bin/sh -e
-## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: [SPARC64]: Fix typo in previous change, s/IS_SOCK/S_ISSOCK/
-## DP: Patch author: davem@nuts.davemloft.net
-## DP: Upstream status: backported
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2004/12/27 21:08:40-08:00 davem@nuts.davemloft.net
-# [SPARC64]: Fix typo in previous change, s/IS_SOCK/S_ISSOCK/
-#
-# Signed-off-by: David S. Miller <davem@davemloft.net>
-#
-# arch/sparc64/solaris/timod.c
-# 2004/12/27 21:08:08-08:00 davem@nuts.davemloft.net +1 -1
-# [SPARC64]: Fix typo in previous change, s/IS_SOCK/S_ISSOCK/
-#
-diff -Nru a/arch/sparc64/solaris/timod.c b/arch/sparc64/solaris/timod.c
---- a/arch/sparc64/solaris/timod.c 2005-01-04 17:51:52 -08:00
-+++ b/arch/sparc64/solaris/timod.c 2005-01-04 17:51:52 -08:00
-@@ -921,7 +921,7 @@
- ino = filp->f_dentry->d_inode;
- if (!ino) goto out;
-
-- if (!IS_SOCK(ino->i_mode) &&
-+ if (!S_ISSOCK(ino->i_mode) &&
- (imajor(ino) != 30 || iminor(ino) != 1))
- goto out;
-
Copied: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/005-sparc64_no_i_sock.dpatch (from rev 2592, trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/005-sparc64_no_i_sock-2.dpatch)
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/007-pci_ide_no_reserve.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/007-pci_ide_no_reserve.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/007-pci_ide_no_reserve.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,71 +0,0 @@
-#! /bin/sh -e
-## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: [ide] fix return codes in the generic PCI IDE driver
-## DP: Patch author: bzolnier@trik.(none)
-## DP: Upstream status: backported
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2004/12/30 19:07:00+01:00 bzolnier@trik.(none)
-# [ide] fix return codes in the generic PCI IDE driver
-#
-# From: Alan Cox <alan@redhat.com>
-#
-# This patch updates ide/pci/generic.c to fix the incorrect returns
-# causing PCI devices to be left reserved wrongly by the driver.
-#
-# From: Francois Romieu <romieu@fr.zoreil.com>
-#
-# Use -ENODEV instead of -EAGAIN.
-#
-# Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-#
-# drivers/ide/pci/generic.c
-# 2004/12/30 19:06:50+01:00 bzolnier@trik.(none) +8 -6
-# [ide] fix return codes in the generic PCI IDE driver
-#
-diff -Nru a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
---- a/drivers/ide/pci/generic.c 2005-01-04 18:06:08 -08:00
-+++ b/drivers/ide/pci/generic.c 2005-01-04 18:06:08 -08:00
-@@ -96,27 +96,29 @@
- {
- ide_pci_device_t *d = &generic_chipsets[id->driver_data];
- u16 command;
-+ int ret = -ENODEV;
-
- if (dev->vendor == PCI_VENDOR_ID_UMC &&
- dev->device == PCI_DEVICE_ID_UMC_UM8886A &&
- (!(PCI_FUNC(dev->devfn) & 1)))
-- return 1; /* UM8886A/BF pair */
-+ goto out; /* UM8886A/BF pair */
-
- if (dev->vendor == PCI_VENDOR_ID_OPTI &&
- dev->device == PCI_DEVICE_ID_OPTI_82C558 &&
- (!(PCI_FUNC(dev->devfn) & 1)))
-- return 1;
-+ goto out;
-
- pci_read_config_word(dev, PCI_COMMAND, &command);
-- if(!(command & PCI_COMMAND_IO))
-- {
-+ if (!(command & PCI_COMMAND_IO)) {
- printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
-- return 1;
-+ goto out;
- }
-+ ret = 0;
- if (!try_module_get(THIS_MODULE))
- return -ENODEV;
- ide_setup_pci_device(dev, d);
-- return 0;
-+out:
-+ return ret;
- }
-
- static struct pci_device_id generic_pci_tbl[] = {
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/027-track_dummy_capability-2.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/027-track_dummy_capability-2.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/027-track_dummy_capability-2.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,50 +0,0 @@
-#! /bin/sh -e
-## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: [PATCH] fix up dummy security module code merge
-## DP: Patch author: chrisw@osdl.org
-## DP: Upstream status: backported
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2005/01/04 15:59:03-08:00 chrisw@osdl.org
-# [PATCH] fix up dummy security module code merge
-#
-# OK, somehow I managed to botch this one. It happens to work fine, but I
-# should have been more careful with forward porting this 1+ year old patch.
-# The exec-time calc should go in bprm_apply_creds, not bprm_free_security.
-#
-# Thanks to Stephen for spotting my mistake.
-#
-# Signed-off-by: Chris Wright <chrisw@osdl.org>
-# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-#
-# security/dummy.c
-# 2005/01/04 14:45:31-08:00 chrisw@osdl.org +2 -1
-# fix up dummy security module code merge
-#
-diff -Nru a/security/dummy.c b/security/dummy.c
---- a/security/dummy.c 2005-01-04 20:05:02 -08:00
-+++ b/security/dummy.c 2005-01-04 20:05:02 -08:00
-@@ -180,7 +180,6 @@
-
- static void dummy_bprm_free_security (struct linux_binprm *bprm)
- {
-- dummy_capget(current, ¤t->cap_effective, ¤t->cap_inheritable, ¤t->cap_permitted);
- return;
- }
-
-@@ -197,6 +196,8 @@
-
- current->suid = current->euid = current->fsuid = bprm->e_uid;
- current->sgid = current->egid = current->fsgid = bprm->e_gid;
-+
-+ dummy_capget(current, ¤t->cap_effective, ¤t->cap_inheritable, ¤t->cap_permitted);
- }
-
- static int dummy_bprm_set_security (struct linux_binprm *bprm)
Copied: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/027-track_dummy_capability.dpatch (from rev 2592, trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/027-track_dummy_capability-2.dpatch)
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/028-do_brk_security_fixes.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/028-do_brk_security_fixes.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/028-do_brk_security_fixes.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,113 +0,0 @@
-#! /bin/sh -e
-## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: Ensure do_brk() is called with semaphore held on current mm struct (CAN-2004-1235)
-## DP: Patch author: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
-## DP: Upstream status: not yet merged; pulled from 2.6.10-ac6
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
-diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/arch/ia64/kernel/sys_ia64.c linux-2.6.10/arch/ia64/kernel/sys_ia64.c
---- linux.vanilla-2.6.10/arch/ia64/kernel/sys_ia64.c 2004-12-25 21:15:32.000000000 +0000
-+++ linux-2.6.10/arch/ia64/kernel/sys_ia64.c 2005-01-07 15:36:22.000000000 +0000
-@@ -147,7 +147,7 @@
- goto out;
-
- /* Ok, looks good - let it rip. */
-- if (do_brk(oldbrk, newbrk-oldbrk) != oldbrk)
-+ if (__do_brk(oldbrk, newbrk-oldbrk) != oldbrk)
- goto out;
- set_brk:
- mm->brk = brk;
-diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/arch/mips/kernel/sysirix.c linux-2.6.10/arch/mips/kernel/sysirix.c
---- linux.vanilla-2.6.10/arch/mips/kernel/sysirix.c 2004-12-25 21:15:32.000000000 +0000
-+++ linux-2.6.10/arch/mips/kernel/sysirix.c 2005-01-07 15:36:33.000000000 +0000
-@@ -591,7 +591,7 @@
- * Ok, looks good - let it rip.
- */
- mm->brk = brk;
-- do_brk(oldbrk, newbrk-oldbrk);
-+ __do_brk(oldbrk, newbrk-oldbrk);
- ret = 0;
-
- out:
-diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/arch/sparc/kernel/sys_sunos.c linux-2.6.10/arch/sparc/kernel/sys_sunos.c
---- linux.vanilla-2.6.10/arch/sparc/kernel/sys_sunos.c 2004-12-25 21:15:32.000000000 +0000
-+++ linux-2.6.10/arch/sparc/kernel/sys_sunos.c 2005-01-07 15:37:03.000000000 +0000
-@@ -207,7 +207,7 @@
- * Ok, we have probably got enough memory - let it rip.
- */
- current->mm->brk = brk;
-- do_brk(oldbrk, newbrk-oldbrk);
-+ __do_brk(oldbrk, newbrk-oldbrk);
- retval = 0;
- out:
- up_write(¤t->mm->mmap_sem);
-diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/arch/sparc64/kernel/sys_sunos32.c linux-2.6.10/arch/sparc64/kernel/sys_sunos32.c
---- linux.vanilla-2.6.10/arch/sparc64/kernel/sys_sunos32.c 2004-12-25 21:15:32.000000000 +0000
-+++ linux-2.6.10/arch/sparc64/kernel/sys_sunos32.c 2005-01-07 15:37:23.000000000 +0000
-@@ -164,7 +164,7 @@
- goto out;
- /* Ok, we have probably got enough memory - let it rip. */
- current->mm->brk = brk;
-- do_brk(oldbrk, newbrk-oldbrk);
-+ __do_brk(oldbrk, newbrk-oldbrk);
- retval = 0;
- out:
- up_write(¤t->mm->mmap_sem);
-
-diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/include/linux/mm.h linux-2.6.10/include/linux/mm.h
---- linux.vanilla-2.6.10/include/linux/mm.h 2004-12-25 21:15:46.000000000 +0000
-+++ linux-2.6.10/include/linux/mm.h 2005-01-07 15:37:37.178938392 +0000
-@@ -703,6 +703,7 @@
-
- extern int do_munmap(struct mm_struct *, unsigned long, size_t);
-
-+extern unsigned long __do_brk(unsigned long, unsigned long);
- extern unsigned long do_brk(unsigned long, unsigned long);
-
- /* filemap.c */
-diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.10/mm/mmap.c linux-2.6.10/mm/mmap.c
---- linux.vanilla-2.6.10/mm/mmap.c 2004-12-25 21:15:46.000000000 +0000
-+++ linux-2.6.10/mm/mmap.c 2005-01-07 15:31:43.000000000 +0000
-@@ -145,7 +145,7 @@
- goto out;
-
- /* Ok, looks good - let it rip. */
-- if (do_brk(oldbrk, newbrk-oldbrk) != oldbrk)
-+ if (__do_brk(oldbrk, newbrk-oldbrk) != oldbrk)
- goto out;
- set_brk:
- mm->brk = brk;
-@@ -1742,7 +1742,7 @@
- * anonymous maps. eventually we may be able to do some
- * brk-specific accounting here.
- */
--unsigned long do_brk(unsigned long addr, unsigned long len)
-+unsigned long __do_brk(unsigned long addr, unsigned long len)
- {
- struct mm_struct * mm = current->mm;
- struct vm_area_struct * vma, * prev;
-@@ -1824,7 +1824,19 @@
- return addr;
- }
-
-+EXPORT_SYMBOL(__do_brk);
-+
-+unsigned long do_brk(unsigned long addr, unsigned long len)
-+{
-+ unsigned long ret;
-+
-+ down_write(¤t->mm->mmap_sem);
-+ ret = __do_brk(addr, len);
-+ up_write(¤t->mm->mmap_sem);
-+}
-+
- EXPORT_SYMBOL(do_brk);
-+
-
- /* Release all mmaps. */
- void exit_mmap(struct mm_struct *mm)
-
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/083-x86_64_switch_mm_context_race.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/083-x86_64_switch_mm_context_race.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/083-x86_64_switch_mm_context_race.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,51 +0,0 @@
-#! /bin/sh -e
-## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: [PATCH] x86_64: fix flush race on context switch
-## DP: Patch author: ak@suse.de
-## DP: Upstream status: backported
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2005/01/21 07:58:54-08:00 ak@suse.de
-# [PATCH] x86_64: fix flush race on context switch
-#
-# Fix a long standing race in x86-64 SMP TLB handling. When a mm is freed and
-# another thread exits to a lazy TLB thread (like idle) the freed user page
-# tables would be still kept loaded in the idle thread. When an interrupt does
-# a prefetch on NULL the CPU would try to follow it and read random data.
-#
-# This could lead to machine checks on Opterons in some cases.
-#
-# Credit goes to some unnamed debugging wizards at AMD who described the
-# problem. All blame to me. I did the fix based on their description.
-#
-# Signed-off-by: Andi Kleen <ak@suse.de>
-# Signed-off-by: Andrew Morton <akpm@osdl.org>
-# Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-#
-# include/asm-x86_64/mmu_context.h
-# 2005/01/20 20:58:11-08:00 ak@suse.de +3 -2
-# x86_64: fix flush race on context switch
-#
-diff -Nru a/include/asm-x86_64/mmu_context.h b/include/asm-x86_64/mmu_context.h
---- a/include/asm-x86_64/mmu_context.h 2005-01-22 21:36:29 -08:00
-+++ b/include/asm-x86_64/mmu_context.h 2005-01-22 21:36:29 -08:00
-@@ -51,9 +51,10 @@
- out_of_line_bug();
- if(!test_and_set_bit(cpu, &next->cpu_vm_mask)) {
- /* We were in lazy tlb mode and leave_mm disabled
-- * tlb flush IPI delivery. We must flush our tlb.
-+ * tlb flush IPI delivery. We must reload CR3
-+ * to make sure to use no freed page tables.
- */
-- local_flush_tlb();
-+ asm volatile("movq %0,%%cr3" :: "r" (__pa(next->pgd)) : "memory");
- load_LDT_nolock(&next->context, cpu);
- }
- }
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/alsa-module-load-fix.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/alsa-module-load-fix.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/alsa-module-load-fix.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,50 +0,0 @@
-#! /bin/sh -e
-## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: [ALSA] suppress auto-loading of modules in module_init().
-## DP: Patch author: Takashi Iwai <tiwai@suse.de>
-## DP: Upstream status: currently in -mm tree, not yet in linus'.
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
-# This is a BitKeeper generated diff -Nru style patch.
-#
-# ChangeSet
-# 2004/09/06 20:18:03+02:00 perex@suse.cz
-# [ALSA] suppress auto-loading of modules in module_init().
-#
-# ALSA sequencer
-# The auto-loading of sequencer modules is suppressed in module_init().
-# The recent module-init-tools may cause blocking.
-#
-# Signed-off-by: Takashi Iwai <tiwai@suse.de>
-#
-# sound/core/seq/seq_clientmgr.c
-# 2004/09/01 14:25:27+02:00 perex@suse.cz +4 -1
-# [ALSA] suppress auto-loading of modules in module_init().
-#
-# D:2004/09/01 20:25:27
-# C:ALSA sequencer
-# F:core/seq/seq_clientmgr.c:1.34->1.35
-# L:The auto-loading of sequencer modules is suppressed in module_init().
-# L:The recent module-init-tools may cause blocking.
-# Signed-off-by: Takashi Iwai <tiwai@suse.de>
-#
-diff -Nru a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
---- a/sound/core/seq/seq_clientmgr.c 2004-09-21 21:03:33 -07:00
-+++ b/sound/core/seq/seq_clientmgr.c 2004-09-21 21:03:33 -07:00
-@@ -156,7 +156,10 @@
- card_requested[card] = 1;
- snd_request_card(card);
- }
-- snd_seq_device_load_drivers();
-+ /* FIXME: may cause blocking when called from
-+ * module_init(), so disable this feature
-+ */
-+ /* snd_seq_device_load_drivers(); */
- }
- }
- spin_lock_irqsave(&clients_lock, flags);
-
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/drivers-input-psaux-hacks.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/drivers-input-psaux-hacks.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/drivers-input-psaux-hacks.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,53 +0,0 @@
-#! /bin/sh -e
-## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: add INPUT_MOUSEDEV_PSAUX_ENABLE
-## DP: Patch author: Herbert Xu
-## DP: Upstream status: not submitted
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
---- kernel-source-2.6.6/drivers/input/Kconfig 2004-03-11 13:55:22.000000000 +1100
-+++ kernel-source-2.6.6-1/drivers/input/Kconfig 2004-01-27 21:05:58.000000000 +1100
-@@ -65,6 +65,11 @@
- screen resolution you are using to correctly scale the data. If
- you're not using a digitizer, this value is ignored.
-
-+config INPUT_MOUSEDEV_PSAUX_ENABLE
-+ bool "Enable /dev/psaux device by default"
-+ default y
-+ depends on INPUT_MOUSEDEV_PSAUX
-+
- config INPUT_JOYDEV
- tristate "Joystick interface"
- depends on INPUT
---- kernel-source-2.6.6/drivers/input/mousedev.c 2004-03-11 13:55:44.000000000 +1100
-+++ kernel-source-2.6.6-1/drivers/input/mousedev.c 2004-02-05 20:20:54.000000000 +1100
-@@ -47,6 +47,16 @@
- module_param(yres, uint, 0);
- MODULE_PARM_DESC(yres, "Vertical screen resolution");
-
-+#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
-+#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX_ENABLE
-+#define psaux 1
-+#else
-+static int psaux;
-+module_param(psaux, uint, 0);
-+MODULE_PARM_DESC(psaux, "Enable legacy /dev/psaux interface");
-+#endif
-+#endif
-+
- struct mousedev {
- int exist;
- int open;
-@@ -572,7 +582,7 @@
- NULL, "mice");
-
- #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
-- if (!(psaux_registered = !misc_register(&psaux_mouse)))
-+ if (psaux && !(psaux_registered = !misc_register(&psaux_mouse)))
- printk(KERN_WARNING "mice: could not misc_register the device\n");
- #endif
-
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/modular-ide.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/modular-ide.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/modular-ide.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,1335 +0,0 @@
-#! /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: partially 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 */
-
-@@ -27,6 +32,11 @@
- return 0;
- }
-
-+static void __exit ide_generic_exit(void)
-+{
-+}
-+
- module_init(ide_generic_init);
-+module_exit(ide_generic_exit);
-
- MODULE_LICENSE("GPL");
---- 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.6/drivers/ide/arm/rapide.c 2004-02-07 20:44:16 +01:00
-+++ edited/drivers/ide/arm/rapide.c 2004-06-16 15:44:16 +02:00
-@@ -33,6 +33,15 @@
- probe_hwif_init(hwif);
- create_proc_ide_interfaces();
- ecard_set_drvdata(ec, hwif);
-+ /*
-+ * this locks the driver in-core - remove this
-+ * comment and the two lines below when we can
-+ * safely remove interfaces.
-+ */
-+
-+ if (!try_module_get(THIS_MODULE))
-+ ret = -ENODEV;
-+
- goto out;
- }
-
-@@ -60,7 +68,13 @@
- return ecard_register_driver(&rapide_driver);
- }
-
-+static void __exit rapide_exit(void)
-+{
-+ ecard_remove_driver(&rapide_driver);
-+}
-+
- MODULE_LICENSE("GPL");
- MODULE_DESCRIPTION("Yellowstone RAPIDE driver");
-
- module_init(rapide_init);
-+module_exit(rapide_exit);
---- 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.22/drivers/ide/pci/aec62xx.c 2004-06-16 05:17:44 +02:00
-+++ edited/drivers/ide/pci/aec62xx.c 2004-06-16 15:44:16 +02:00
-@@ -525,6 +525,8 @@
- {
- ide_pci_device_t *d = &aec62xx_chipsets[id->driver_data];
-
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- d->init_setup(dev, d);
- return 0;
- }
-@@ -550,7 +552,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit aec62xx_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(aec62xx_ide_init);
-+module_exit(aec62xx_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for ARTOP AEC62xx IDE");
---- 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;
-@@ -875,6 +875,9 @@
- {
- ide_pci_device_t *d = &ali15x3_chipset;
-
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
-+
- if(pci_find_device(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, NULL))
- printk(KERN_ERR "Warning: ATI Radeon IGP Northbridge is not yet fully tested.\n");
-
-@@ -903,7 +906,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit ali15x3_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(ali15x3_ide_init);
-+module_exit(ali15x3_ide_exit);
-
- MODULE_AUTHOR("Michael Aubry, Andrzej Krzysztofowicz, CJ, Andre Hedrick, Alan Cox");
- MODULE_DESCRIPTION("PCI driver module for ALi 15x3 IDE");
---- 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;
-
-@@ -496,6 +496,8 @@
-
- static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- amd_chipset = amd74xx_chipsets + id->driver_data;
- amd_config = amd_ide_chips + id->driver_data;
- if (dev->device != amd_config->id) BUG();
-@@ -538,7 +540,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit amd74xx_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(amd74xx_ide_init);
-+module_exit(amd74xx_ide_exit);
-
- MODULE_AUTHOR("Vojtech Pavlik");
- MODULE_DESCRIPTION("AMD PCI IDE driver");
---- 1.3/drivers/ide/pci/atiixp.c 2004-06-01 21:04:38 +02:00
-+++ edited/drivers/ide/pci/atiixp.c 2004-06-16 15:46:09 +02:00
-@@ -479,6 +479,8 @@
-
- static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &atiixp_pci_info[id->driver_data]);
- return 0;
- }
-@@ -500,7 +502,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit atiixp_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(atiixp_ide_init);
-+module_exit(atiixp_ide_exit);
-
- MODULE_AUTHOR("HUI YU");
- MODULE_DESCRIPTION("PCI driver module for ATI IXP IDE");
---- 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.23/drivers/ide/pci/cmd64x.c 2004-06-16 05:17:44 +02:00
-+++ edited/drivers/ide/pci/cmd64x.c 2004-06-16 15:49:12 +02:00
-@@ -746,6 +746,8 @@
-
- static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &cmd64x_chipsets[id->driver_data]);
- return 0;
- }
-@@ -770,7 +772,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit cmd64x_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(cmd64x_ide_init);
-+module_exit(cmd64x_ide_exit);
-
- MODULE_AUTHOR("Eddie Dost, David Miller, Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for CMD64x IDE");
---- 1.11/drivers/ide/pci/cs5520.c 2004-06-15 18:29:40 +02:00
-+++ edited/drivers/ide/pci/cs5520.c 2004-06-16 15:44:17 +02:00
-@@ -289,6 +289,10 @@
- printk(KERN_WARNING "%s: Unable to enable 55x0.\n", d->name);
- return 1;
- }
-+
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
-+
- pci_set_master(dev);
- pci_set_dma_mask(dev, 0xFFFFFFFF);
- init_chipset_cs5520(dev, d->name);
-@@ -329,7 +333,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit cs5520_ide_exit(void)
-+{
-+ return ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(cs5520_ide_init);
-+module_exit(cs5520_ide_exit);
-
- MODULE_AUTHOR("Alan Cox");
- MODULE_DESCRIPTION("PCI driver module for Cyrix 5510/5520 IDE");
---- 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;
-@@ -416,6 +416,8 @@
-
- static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &cs5530_chipset);
- return 0;
- }
-@@ -437,7 +439,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit cs5530_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(cs5530_ide_init);
-+module_exit(cs5530_ide_exit);
-
- MODULE_AUTHOR("Mark Lord");
- MODULE_DESCRIPTION("PCI driver module for Cyrix/NS 5530 IDE");
---- 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;
-@@ -427,6 +427,9 @@
- ide_pci_device_t *d = &cy82c693_chipsets[id->driver_data];
- struct pci_dev *dev2;
-
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
-+
- /* CY82C693 is more than only a IDE controller.
- Function 1 is primary IDE channel, function 2 - secondary. */
- if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
-@@ -454,7 +457,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit cy82c693_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(cy82c693_ide_init);
-+module_exit(cy82c693_ide_exit);
-
- MODULE_AUTHOR("Andreas Krebs, Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for the Cypress CY82C693 IDE");
---- 1.16/drivers/ide/pci/generic.c 2004-06-01 21:04:38 +02:00
-+++ edited/drivers/ide/pci/generic.c 2004-06-16 15:44:17 +02:00
-@@ -113,6 +113,8 @@
- printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
- return 1;
- }
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, d);
- return 0;
- }
-@@ -146,7 +148,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit generic_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(generic_ide_init);
-+module_exit(generic_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for generic PCI IDE");
---- 1.23/drivers/ide/pci/hpt34x.c 2004-06-16 05:17:44 +02:00
-+++ edited/drivers/ide/pci/hpt34x.c 2004-06-16 15:44:17 +02:00
-@@ -323,6 +323,9 @@
- static char *chipset_names[] = {"HPT343", "HPT345"};
- u16 pcicmd = 0;
-
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
-+
- pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
-
- d->name = chipset_names[(pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0];
-@@ -349,7 +352,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit hpt34x_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(hpt34x_ide_init);
-+module_exit(hpt34x_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for Highpoint 34x IDE");
---- 1.34/drivers/ide/pci/hpt366.c 2004-06-16 05:17:44 +02:00
-+++ edited/drivers/ide/pci/hpt366.c 2004-06-16 15:44:17 +02:00
-@@ -1241,6 +1241,8 @@
- {
- ide_pci_device_t *d = &hpt366_chipsets[id->driver_data];
-
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- d->init_setup(dev, d);
- return 0;
- }
-@@ -1266,7 +1268,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit hpt366_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(hpt366_ide_init);
-+module_exit(hpt366_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for Highpoint HPT366 IDE");
---- 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;
-@@ -291,6 +291,8 @@
- if ((!(PCI_FUNC(dev->devfn) & 1) ||
- (!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
- return 1; /* IT8172 is more than only a IDE controller */
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &it8172_chipsets[id->driver_data]);
- return 0;
- }
-@@ -312,7 +314,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit it8172_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(it8172_ide_init);
-+module_exit(it8172_ide_exit);
-
- MODULE_AUTHOR("SteveL@mvista.com");
- MODULE_DESCRIPTION("PCI driver module for ITE 8172 IDE");
---- 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;
-@@ -225,6 +225,8 @@
-
- static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &ns87415_chipset);
- return 0;
- }
-@@ -246,7 +248,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit ns87415_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(ns87415_ide_init);
-+module_exit(ns87415_ide_exit);
-
- MODULE_AUTHOR("Mark Lord, Eddie Dost, Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for NS87415 IDE");
---- 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,13 +348,15 @@
- 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);
- }
-
- static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]);
- return 0;
- }
-@@ -377,7 +379,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit opti621_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(opti621_ide_init);
-+module_exit(opti621_ide_exit);
-
- MODULE_AUTHOR("Jaromir Koutek, Jan Harkes, Mark Lord");
- MODULE_DESCRIPTION("PCI driver module for Opti621 IDE");
---- 1.30/drivers/ide/pci/pdc202xx_new.c 2004-06-16 05:17:44 +02:00
-+++ edited/drivers/ide/pci/pdc202xx_new.c 2004-06-16 15:44:17 +02:00
-@@ -514,6 +514,8 @@
- {
- ide_pci_device_t *d = &pdcnew_chipsets[id->driver_data];
-
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- d->init_setup(dev, d);
- return 0;
- }
-@@ -541,7 +543,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit pdc202new_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(pdc202new_ide_init);
-+module_exit(pdc202new_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
- MODULE_DESCRIPTION("PCI driver module for Promise PDC20268 and higher");
---- 1.32/drivers/ide/pci/pdc202xx_old.c 2004-06-16 05:17:44 +02:00
-+++ edited/drivers/ide/pci/pdc202xx_old.c 2004-06-16 15:44:17 +02:00
-@@ -884,6 +884,8 @@
- {
- ide_pci_device_t *d = &pdc202xx_chipsets[id->driver_data];
-
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- d->init_setup(dev, d);
- return 0;
- }
-@@ -909,7 +911,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit pdc202xx_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(pdc202xx_ide_init);
-+module_exit(pdc202xx_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
- MODULE_DESCRIPTION("PCI driver module for older Promise IDE");
---- 1.32/drivers/ide/pci/piix.c 2004-06-15 18:29:18 +02:00
-+++ edited/drivers/ide/pci/piix.c 2004-06-16 15:44:17 +02:00
-@@ -739,6 +739,8 @@
- {
- ide_pci_device_t *d = &piix_pci_info[id->driver_data];
-
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- d->init_setup(dev, d);
- return 0;
- }
-@@ -814,7 +816,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit piix_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(piix_ide_init);
-+module_exit(piix_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick, Andrzej Krzysztofowicz");
- MODULE_DESCRIPTION("PCI driver module for Intel PIIX IDE");
---- 1.15/drivers/ide/pci/rz1000.c 2004-06-15 18:29:40 +02:00
-+++ edited/drivers/ide/pci/rz1000.c 2004-06-16 15:47:44 +02:00
-@@ -62,6 +62,8 @@
-
- static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &rz1000_chipset);
- return 0;
- }
-@@ -84,7 +86,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit rz1000_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(rz1000_ide_init);
-+module_exit(rz1000_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE");
---- 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;
-@@ -554,6 +554,8 @@
-
- static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &sc1200_chipset);
- return 0;
- }
-@@ -577,7 +579,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit sc1200_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(sc1200_ide_init);
-+module_exit(sc1200_ide_exit);
-
- MODULE_AUTHOR("Mark Lord");
- MODULE_DESCRIPTION("PCI driver module for NS SC1200 IDE");
---- 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;
-@@ -798,6 +798,8 @@
- {
- ide_pci_device_t *d = &serverworks_chipsets[id->driver_data];
-
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- d->init_setup(dev, d);
- return 0;
- }
-@@ -826,7 +828,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit svwks_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(svwks_ide_init);
-+module_exit(svwks_ide_exit);
-
- MODULE_AUTHOR("Michael Aubry. Andrzej Krzysztofowicz, Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for Serverworks OSB4/CSB5/CSB6 IDE");
---- 1.9/drivers/ide/pci/sgiioc4.c 2004-06-01 21:04:38 +02:00
-+++ edited/drivers/ide/pci/sgiioc4.c 2004-06-16 15:49:46 +02:00
-@@ -751,5 +751,8 @@
- return -ENODEV;
- }
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
-+
- return sgiioc4_ide_setup_pci_device(dev, d);
- }
-
-@@ -793,7 +796,14 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void
-+sgiioc4_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(sgiioc4_ide_init);
-+module_exit(sgiioc4_ide_exit);
-
- MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)");
- MODULE_DESCRIPTION("PCI driver module for SGI IOC4 Base-IO Card");
---- 1.30/drivers/ide/pci/siimage.c 2004-06-15 18:29:40 +02:00
-+++ edited/drivers/ide/pci/siimage.c 2004-06-16 15:47:24 +02:00
-@@ -1121,6 +1121,8 @@
-
- static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &siimage_chipsets[id->driver_data]);
- return 0;
- }
-@@ -1144,7 +1146,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit siimage_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(siimage_ide_init);
-+module_exit(siimage_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick, Alan Cox");
- MODULE_DESCRIPTION("PCI driver module for SiI IDE");
---- 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;
-
-@@ -957,6 +957,8 @@
-
- static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &sis5513_chipset);
- return 0;
- }
-@@ -978,7 +980,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit sis5513_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(sis5513_ide_init);
-+module_exit(sis5513_ide_exit);
-
- MODULE_AUTHOR("Lionel Bouton, L C Chang, Andre Hedrick, Vojtech Pavlik");
- MODULE_DESCRIPTION("PCI driver module for SIS IDE");
---- 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;
-@@ -492,6 +492,8 @@
-
- static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &sl82c105_chipset);
- return 0;
- }
-@@ -513,7 +515,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit sl82c105_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(sl82c105_ide_init);
-+module_exit(sl82c105_ide_exit);
-
- MODULE_DESCRIPTION("PCI driver module for W82C105 IDE");
- MODULE_LICENSE("GPL");
---- 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 */
-@@ -376,6 +376,8 @@
-
- static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &slc90e66_chipset);
- return 0;
- }
-@@ -397,7 +399,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit slc90e66_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(slc90e66_ide_init);
-+module_exit(slc90e66_ide_exit);
-
- MODULE_AUTHOR("Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for SLC90E66 IDE");
---- 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;
-@@ -228,6 +228,8 @@
- static int __devinit triflex_init_one(struct pci_dev *dev,
- const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &triflex_device);
- triflex_dev = dev;
-
-@@ -252,7 +254,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit triflex_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(triflex_ide_init);
-+module_exit(triflex_ide_exit);
-
- MODULE_AUTHOR("Torben Mathiasen");
- MODULE_DESCRIPTION("PCI driver module for Compaq Triflex IDE");
---- 1.21/drivers/ide/pci/trm290.c 2004-06-15 18:29:40 +02:00
-+++ edited/drivers/ide/pci/trm290.c 2004-06-16 15:46:45 +02:00
-@@ -403,6 +403,8 @@
-
- static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- ide_setup_pci_device(dev, &trm290_chipset);
- return 0;
- }
-@@ -424,7 +426,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit trm290_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(trm290_ide_init);
-+module_exit(trm290_ide_exit);
-
- MODULE_AUTHOR("Mark Lord");
- MODULE_DESCRIPTION("PCI driver module for Tekram TRM290 IDE");
---- 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;
-
-@@ -621,6 +621,8 @@
- static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
- {
- ide_setup_pci_device(dev, &via82cxxx_chipset);
-+ if (!try_module_get(THIS_MODULE))
-+ return -ENODEV;
- return 0;
- }
-
-@@ -642,7 +644,13 @@
- return ide_pci_register_driver(&driver);
- }
-
-+static void __exit via_ide_exit(void)
-+{
-+ ide_pci_unregister_driver(&driver);
-+}
-+
- module_init(via_ide_init);
-+module_exit(via_ide_exit);
-
- MODULE_AUTHOR("Vojtech Pavlik, Michel Aubry, Jeff Garzik, Andre Hedrick");
- MODULE_DESCRIPTION("PCI driver module for VIA IDE");
---- 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);
---- a/drivers/ide/arm/icside.c 2004-12-30 13:45:43.000000000 -0800
-+++ b/drivers/ide/arm/icside.c 2004-12-30 13:47:27.000000000 -0800
-@@ -800,6 +800,13 @@
-
- if (ret == 0) {
- ecard_set_drvdata(ec, state);
-+ /*
-+ * this locks the driver in-core - remove this
-+ * comment and the line below when we can
-+ * safely remove interfaces.
-+ */
-+ if (!try_module_get(THIS_MODULE))
-+ ret = -ENODEV;
- goto out;
- }
-
-@@ -892,8 +899,14 @@
- return ecard_register_driver(&icside_driver);
- }
-
-+static void __exit icside_exit(void)
-+{
-+ ecard_remove_driver(&icside_driver);
-+}
-+
- MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
- MODULE_LICENSE("GPL");
- MODULE_DESCRIPTION("ICS IDE driver");
-
- module_init(icside_init);
-+module_exit(icside_exit);
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/modular-vesafb.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/modular-vesafb.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/modular-vesafb.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,112 +0,0 @@
-#! /bin/sh -e
-## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: modularised VESA FB
-## DP: Patch author: unknown
-## DP: Upstream status: not submitted
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
---- kernel-source-2.6.6/drivers/video/Kconfig 2004-05-10 19:48:01.000000000 +1000
-+++ kernel-source-2.6.6-1/drivers/video/Kconfig 2004-05-10 22:21:43.000000000 +1000
-@@ -283,7 +283,7 @@
- cards. Say Y if you have one of those.
-
- config FB_VESA
-- bool "VESA VGA graphics support"
-+ tristate "VESA VGA graphics support"
- depends on FB && (X86 || X86_64)
- help
- This is the frame buffer device driver for generic VESA 2.0
-
---- a/drivers/video/vesafb.c 2004-10-18 17:53:11.000000000 -0400
-+++ b/drivers/video/vesafb.c 2004-10-23 01:58:33.000000000 -0400
-@@ -19,6 +19,7 @@
- #include <linux/fb.h>
- #include <linux/ioport.h>
- #include <linux/init.h>
-+#include <linux/moduleparam.h>
- #ifdef __i386__
- #include <video/edid.h>
- #endif
-@@ -49,6 +50,7 @@
-
- static int inverse = 0;
- static int mtrr = 1;
-+static int mtrr_hdl;
- static int vram_remap __initdata = 0; /* Set amount of memory to be used */
- static int vram_total __initdata = 0; /* Set total amount of memory */
- static int pmi_setpal = 0; /* pmi for palette changes ??? */
-@@ -56,6 +58,9 @@
- static void (*pmi_start)(void);
- static void (*pmi_pal)(void);
-
-+static char *options;
-+module_param(options, charp, 0);
-+
- /* --------------------------------------------------------------------- */
-
- static int vesafb_pan_display(struct fb_var_screeninfo *var,
-@@ -221,6 +226,8 @@
- struct fb_info *info;
- int i, err;
-
-+ vesafb_setup(options);
-+
- if (screen_info.orig_video_isVGA != VIDEO_TYPE_VLFB)
- return -ENXIO;
-
-@@ -368,7 +375,7 @@
- temp_size &= (temp_size - 1);
-
- /* Try and find a power of two to add */
-- while (temp_size && mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)==-EINVAL) {
-+ while (temp_size && (mtrr_hdl = mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)) == -EINVAL) {
- temp_size >>= 1;
- }
- }
-@@ -390,6 +397,7 @@
- }
- printk(KERN_INFO "fb%d: %s frame buffer device\n",
- info->node, info->fix.id);
-+ dev_set_drvdata(device, info);
- return 0;
- err:
- framebuffer_release(info);
-@@ -397,6 +405,17 @@
- return err;
- }
-
-+static void __exit vesafb_remove(struct device *device)
-+{
-+ struct fb_info *info = dev_get_drvdata(device);
-+
-+ unregister_framebuffer(info);
-+ if (mtrr && mtrr_hdl >= 0)
-+ mtrr_del(mtrr_hdl, 0, 0);
-+ iounmap(info->screen_base);
-+ release_mem_region(vesafb_fix.smem_start, vesafb_fix.smem_len);
-+}
-+
- static struct device_driver vesafb_driver = {
- .name = "vesafb",
- .bus = &platform_bus_type,
-@@ -424,7 +443,16 @@
- }
- return ret;
- }
-+
-+#ifdef MODULE
-+static void __exit vesafb_exit(void)
-+{
-+ platform_device_unregister(&vesafb_device);
-+ driver_unregister(&vesafb_driver);
-+}
- module_init(vesafb_init);
-+module_exit(vesafb_exit);
-+#endif
-
- /*
- * Overrides for Emacs so that we follow Linus's tabbing style.
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos-2.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos-2.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos-2.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,312 +0,0 @@
-#! /bin/sh -e
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: Add Pegasos 1 and 2 support.
-## DP: Patch author: Sven Luther <luther@debian.org>
-## DP: Upstream status: submitted and approved.
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
-diff -urN kernel-source-2.6.8.orig/arch/ppc/kernel/ppc_ksyms.c kernel-source-2.6.8/arch/ppc/kernel/ppc_ksyms.c
---- kernel-source-2.6.8.orig/arch/ppc/kernel/ppc_ksyms.c 2004-08-14 07:37:41.000000000 +0200
-+++ kernel-source-2.6.8/arch/ppc/kernel/ppc_ksyms.c 2004-12-26 11:50:48.234758552 +0100
-@@ -96,6 +96,9 @@
- EXPORT_SYMBOL(_prep_type);
- EXPORT_SYMBOL(ucSystemType);
- #endif
-+#if defined(CONFIG_PPC_MULTIPLATFORM)
-+EXPORT_SYMBOL(_chrp_type);
-+#endif
-
- #if !defined(__INLINE_BITOPS)
- EXPORT_SYMBOL(set_bit);
-diff -urN kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_pci.c kernel-source-2.6.8/arch/ppc/platforms/chrp_pci.c
---- kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_pci.c 2004-12-26 12:03:07.438382520 +0100
-+++ kernel-source-2.6.8/arch/ppc/platforms/chrp_pci.c 2004-12-26 12:02:26.819557520 +0100
-@@ -97,8 +97,9 @@
- rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
- int len, u32 *val)
- {
-+ struct pci_controller *hose = bus->sysdata;
- unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
-- | ((bus->number & 0xff) << 16);
-+ | (((bus->number - hose->first_busno) & 0xff) << 16) | (pci_domain_nr(bus) << 24);
- unsigned long ret = ~0UL;
- int rval;
-
-@@ -111,8 +112,9 @@
- rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
- int len, u32 val)
- {
-+ struct pci_controller *hose = bus->sysdata;
- unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8)
-- | ((bus->number & 0xff) << 16);
-+ | (((bus->number - hose->first_busno) & 0xff) << 16) | (pci_domain_nr(bus) << 24);
- int rval;
-
- rval = call_rtas("write-pci-config", 3, 1, NULL, addr, len, val);
-@@ -186,6 +188,26 @@
- iounmap(reg);
- }
-
-+/* Marvell Discovery II based Pegasos 2 */
-+//#define PEGASOS_USE_PCI_DOMAINS
-+
-+static void __init
-+setup_peg2(struct pci_controller *hose, struct device_node *dev)
-+{
-+ struct device_node *root = find_path_device("/");
-+ struct device_node *rtas;
-+
-+ rtas = of_find_node_by_name (root, "rtas");
-+ if (rtas) {
-+ hose->ops = &rtas_pci_ops;
-+ } else {
-+ printk ("RTAS supporting Pegasos OF not found, please upgrade your firmware\n");
-+ }
-+#ifndef PEGASOS_USE_PCI_DOMAINS
-+ pci_assign_all_busses = 1;
-+#endif
-+}
-+
- void __init
- chrp_find_bridges(void)
- {
-@@ -195,7 +217,7 @@
- struct pci_controller *hose;
- unsigned int *dma;
- char *model, *machine;
-- int is_longtrail = 0, is_mot = 0;
-+ int is_longtrail = 0, is_mot = 0, is_pegasos = 0;
- struct device_node *root = find_path_device("/");
-
- /*
-@@ -207,6 +229,8 @@
- if (machine != NULL) {
- is_longtrail = strncmp(machine, "IBM,LongTrail", 13) == 0;
- is_mot = strncmp(machine, "MOT", 3) == 0;
-+ if (strncmp(machine, "Pegasos2", 8) == 0) is_pegasos = 2;
-+ else if (strncmp(machine, "Pegasos", 7) == 0) is_pegasos = 1;
- }
- for (dev = root->child; dev != NULL; dev = dev->sibling) {
- if (dev->type == NULL || strcmp(dev->type, "pci") != 0)
-@@ -257,6 +281,10 @@
- hose->cfg_data = (unsigned char *)
- ioremap(GG2_PCI_CONFIG_BASE, 0x80000);
- gg2_pci_config_base = (unsigned long) hose->cfg_data;
-+ } else if (is_pegasos == 1) {
-+ setup_indirect_pci(hose, 0xfec00cf8, 0xfee00cfc);
-+ } else if (is_pegasos == 2) {
-+ setup_peg2(hose, dev);
- } else {
- printk("No methods for %s (model %s), using RTAS\n",
- dev->full_name, model);
-@@ -274,6 +302,9 @@
- printk("pci_dram_offset = %lx\n", pci_dram_offset);
- }
- }
--
-- ppc_md.pcibios_fixup = chrp_pcibios_fixup;
-+
-+ if (is_pegasos)
-+ ppc_md.pcibios_fixup = NULL;
-+ else
-+ ppc_md.pcibios_fixup = chrp_pcibios_fixup;
- }
-diff -urN kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_setup.c kernel-source-2.6.8/arch/ppc/platforms/chrp_setup.c
---- kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_setup.c 2004-12-26 12:03:07.440382216 +0100
-+++ kernel-source-2.6.8/arch/ppc/platforms/chrp_setup.c 2004-12-26 12:01:39.050819472 +0100
-@@ -68,6 +68,8 @@
- extern unsigned long pmac_find_end_of_memory(void);
- extern int of_show_percpuinfo(struct seq_file *, int);
-
-+int _chrp_type;
-+
- /*
- * XXX this should be in xmon.h, but putting it there means xmon.h
- * has to include <linux/interrupt.h> (to get irqreturn_t), which
-@@ -214,6 +216,36 @@
- }
- }
-
-+void pegasos_set_l2cr(void)
-+{
-+ struct device_node *root = find_path_device("/");
-+ char *machine;
-+ struct device_node *np;
-+
-+ /* On Pegasos, enable the l2 cache if needed, as the OF forgets it */
-+ if (root == NULL)
-+ return;
-+ machine = get_property(root, "model", NULL);
-+ if (machine == NULL)
-+ return;
-+ if (_chrp_type == _CHRP_Pegasos) {
-+ /* Enable L2 cache if needed */
-+ np = find_type_devices("cpu");
-+ if (np != NULL) {
-+ unsigned int *l2cr = (unsigned int *)
-+ get_property (np, "l2cr", NULL);
-+ if (l2cr == NULL) {
-+ printk ("Pegasos l2cr : no cpu l2cr property found\n");
-+ return;
-+ }
-+ if (!((*l2cr) & 0x80000000)) {
-+ printk ("Pegasos l2cr : L2 cache was not active, activating\n");
-+ _set_L2CR(0);
-+ _set_L2CR((*l2cr) | 0x80000000);
-+ }
-+ }
-+ }
-+}
-
- void __init
- chrp_setup_arch(void)
-@@ -236,6 +268,9 @@
- /* Lookup PCI host bridges */
- chrp_find_bridges();
-
-+ /* On pegasos, enable the L2 cache if not already done by OF */
-+ pegasos_set_l2cr();
-+
- #ifndef CONFIG_PPC64BRIDGE
- /*
- * Temporary fixes for PCI devices.
-@@ -400,16 +435,19 @@
- if (np == NULL)
- printk(KERN_ERR "Cannot find PCI interrupt acknowledge address\n");
-
-- chrp_find_openpic();
--
-- prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
-- OpenPIC_InitSenses = init_senses;
-- OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
--
-- openpic_init(NUM_8259_INTERRUPTS);
-- /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
-- openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
-+ /* Pegasos doesn't have openpic */
-+ if (_chrp_type != _CHRP_Pegasos) {
-+ chrp_find_openpic();
-+
-+ prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
-+ OpenPIC_InitSenses = init_senses;
-+ OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
-+
-+ openpic_init(NUM_8259_INTERRUPTS);
-+ /* We have a cascade on OpenPIC IRQ 0, Linux IRQ 16 */
-+ openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade",
- i8259_irq);
-+ }
-
- for (i = 0; i < NUM_8259_INTERRUPTS; i++)
- irq_desc[i].handler = &i8259_pic;
-@@ -450,6 +488,8 @@
- chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
- unsigned long r6, unsigned long r7)
- {
-+ struct device_node *root = find_path_device ("/");
-+ char *machine;
- #ifdef CONFIG_BLK_DEV_INITRD
- /* take care of initrd if we have one */
- if ( r6 )
-@@ -464,12 +504,27 @@
- DMA_MODE_WRITE = 0x48;
- isa_io_base = CHRP_ISA_IO_BASE; /* default value */
-
-+ machine = get_property(root, "model", NULL);
-+ if (strncmp(machine, "Pegasos", 7) == 0) {
-+ _chrp_type = _CHRP_Pegasos;
-+ } else if (strncmp(machine, "IBM", 3) == 0) {
-+ _chrp_type = _CHRP_IBM;
-+ } else if (strncmp(machine, "MOT", 3) == 0) {
-+ _chrp_type = _CHRP_Motorola;
-+ } else {
-+ /* Let's assume it is an IBM chrp if all else fails */
-+ _chrp_type = _CHRP_IBM;
-+ }
-+
- ppc_md.setup_arch = chrp_setup_arch;
- ppc_md.show_percpuinfo = of_show_percpuinfo;
- ppc_md.show_cpuinfo = chrp_show_cpuinfo;
- ppc_md.irq_canonicalize = chrp_irq_canonicalize;
- ppc_md.init_IRQ = chrp_init_IRQ;
-- ppc_md.get_irq = openpic_get_irq;
-+ if (_chrp_type == _CHRP_Pegasos)
-+ ppc_md.get_irq = i8259_irq;
-+ else
-+ ppc_md.get_irq = openpic_get_irq;
-
- ppc_md.init = chrp_init2;
-
-diff -urN kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_time.c kernel-source-2.6.8/arch/ppc/platforms/chrp_time.c
---- kernel-source-2.6.8.orig/arch/ppc/platforms/chrp_time.c 2004-12-26 12:03:07.552365192 +0100
-+++ kernel-source-2.6.8/arch/ppc/platforms/chrp_time.c 2004-11-24 22:47:24.000000000 +0100
-@@ -41,6 +41,8 @@
- int base;
-
- rtcs = find_compatible_devices("rtc", "pnpPNP,b00");
-+ if (rtcs == NULL)
-+ rtcs = find_compatible_devices("rtc", "ds1385-rtc");
- if (rtcs == NULL || rtcs->addrs == NULL)
- return 0;
- base = rtcs->addrs[0].address;
-diff -urN kernel-source-2.6.8.orig/arch/ppc/syslib/prom_init.c kernel-source-2.6.8/arch/ppc/syslib/prom_init.c
---- kernel-source-2.6.8.orig/arch/ppc/syslib/prom_init.c 2004-12-26 12:03:07.672346952 +0100
-+++ kernel-source-2.6.8/arch/ppc/syslib/prom_init.c 2004-12-26 11:58:49.597580280 +0100
-@@ -794,6 +794,9 @@
- char *p, *d;
- unsigned long phys;
- void *result[3];
-+ char model[32];
-+ phandle node;
-+ int rc;
-
- /* Default */
- phys = (unsigned long) &_stext;
-@@ -850,11 +853,20 @@
-
- klimit = (char *) (mem - offset);
-
-- /* If we are already running at 0xc0000000, we assume we were
-- * loaded by an OF bootloader which did set a BAT for us.
-- * This breaks OF translate so we force phys to be 0.
-- */
-- if (offset == 0) {
-+ node = call_prom("finddevice", 1, 1, "/");
-+ rc = call_prom("getprop", 4, 1, node, "model", model, sizeof(model));
-+ if (rc > 0 && !strncmp (model, "Pegasos", 7)
-+ && strncmp (model, "Pegasos2", 8)) {
-+ /* Pegasos 1 has a broken translate method in the OF,
-+ * and furthermore the BATs are mapped 1:1 so the phys
-+ * address calculated above is correct, so let's use
-+ * it directly.
-+ */
-+ } else if (offset == 0) {
-+ /* If we are already running at 0xc0000000, we assume we were
-+ * loaded by an OF bootloader which did set a BAT for us.
-+ * This breaks OF translate so we force phys to be 0.
-+ */
- prom_print("(already at 0xc0000000) phys=0\n");
- phys = 0;
- } else if ((int) call_prom("getprop", 4, 1, prom_chosen, "mmu",
-diff -urN kernel-source-2.6.8.orig/include/asm-ppc/processor.h kernel-source-2.6.8/include/asm-ppc/processor.h
---- kernel-source-2.6.8.orig/include/asm-ppc/processor.h 2004-08-14 07:36:11.000000000 +0200
-+++ kernel-source-2.6.8/include/asm-ppc/processor.h 2004-12-26 13:50:25.909586120 +0100
-@@ -34,6 +34,7 @@
- /* these are arbitrary */
- #define _CHRP_Motorola 0x04 /* motorola chrp, the cobra */
- #define _CHRP_IBM 0x05 /* IBM chrp, the longtrail and longtrail 2 */
-+#define _CHRP_Pegasos 0x06 /* Genesi/bplan's Pegasos and Pegasos2 */
-
- #define _GLOBAL(n)\
- .stabs __stringify(n:F-1),N_FUN,0,0,n;\
-@@ -54,6 +55,7 @@
-
- /* what kind of prep workstation we are */
- extern int _prep_type;
-+extern int _chrp_type;
-
- /*
- * This is used to identify the board type from a given PReP board
Copied: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos.dpatch (from rev 2592, trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos-2.dpatch)
Deleted: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/smbfs-overflow-fixes.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/smbfs-overflow-fixes.dpatch 2005-03-04 09:38:34 UTC (rev 2592)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/smbfs-overflow-fixes.dpatch 2005-03-04 09:44:49 UTC (rev 2593)
@@ -1,83 +0,0 @@
-#! /bin/sh -e
-## <PATCHNAME>.dpatch by <PATCH_AUTHOR@EMAI>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Description: SMBfs overflow fixes
-## DP: Patch author: unknown, stolen from -ac tree (probably Stefan Esser, Juan Quintela, and Urban Widmark)
-## DP: Upstream status: unknown
-
-. $(dirname $0)/DPATCH
-
-@DPATCH@
-diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.9/fs/smbfs/proc.c linux-2.6.9/fs/smbfs/proc.c
---- linux.vanilla-2.6.9/fs/smbfs/proc.c 2004-10-20 23:17:20.000000000 +0100
-+++ linux-2.6.9/fs/smbfs/proc.c 2004-11-17 19:41:41.000000000 +0000
-@@ -1427,9 +1427,9 @@
- * So we must first calculate the amount of padding used by the server.
- */
- data_off -= hdrlen;
-- if (data_off > SMB_READX_MAX_PAD) {
-- PARANOIA("offset is larger than max pad!\n");
-- PARANOIA("%d > %d\n", data_off, SMB_READX_MAX_PAD);
-+ if (data_off > SMB_READX_MAX_PAD || data_off < 0) {
-+ PARANOIA("offset is larger than SMB_READX_MAX_PAD or negative!\n");
-+ PARANOIA("%d > %d || %d < 0\n", data_off, SMB_READX_MAX_PAD, data_off);
- req->rq_rlen = req->rq_bufsize + 1;
- return;
- }
-diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.9/fs/smbfs/request.c linux-2.6.9/fs/smbfs/request.c
---- linux.vanilla-2.6.9/fs/smbfs/request.c 2004-10-20 22:33:50.000000000 +0100
-+++ linux-2.6.9/fs/smbfs/request.c 2004-11-17 19:41:41.000000000 +0000
-@@ -588,6 +588,10 @@
- data_count = WVAL(inbuf, smb_drcnt);
-
- /* Modify offset for the split header/buffer we use */
-+ if (data_offset < hdrlen)
-+ goto out_bad_data;
-+ if (parm_offset < hdrlen)
-+ goto out_bad_parm;
- data_offset -= hdrlen;
- parm_offset -= hdrlen;
-
-@@ -607,6 +611,10 @@
- req->rq_lparm = parm_count;
- req->rq_data = req->rq_buffer + data_offset;
- req->rq_parm = req->rq_buffer + parm_offset;
-+ if (parm_offset + parm_count > req->rq_rlen)
-+ goto out_bad_parm;
-+ if (data_offset + data_count > req->rq_rlen)
-+ goto out_bad_data;
- return 0;
- }
-
-@@ -643,8 +652,12 @@
-
- if (parm_disp + parm_count > req->rq_total_parm)
- goto out_bad_parm;
-+ if (parm_offset + parm_count > req->rq_rlen)
-+ goto out_bad_parm;
- if (data_disp + data_count > req->rq_total_data)
- goto out_bad_data;
-+ if (data_offset + data_count > req->rq_rlen)
-+ goto out_bad_data;
-
- inbuf = req->rq_buffer;
- memcpy(req->rq_parm + parm_disp, inbuf + parm_offset, parm_count);
-@@ -676,13 +692,13 @@
- req->rq_errno = -EIO;
- goto out;
- out_bad_parm:
-- printk(KERN_ERR "smb_trans2: invalid parms, disp=%d, cnt=%d, tot=%d\n",
-- parm_disp, parm_count, parm_tot);
-+ printk(KERN_ERR "smb_trans2: invalid parms, disp=%d, cnt=%d, tot=%d, ofs=%d\n",
-+ parm_disp, parm_count, parm_tot, parm_offset);
- req->rq_errno = -EIO;
- goto out;
- out_bad_data:
-- printk(KERN_ERR "smb_trans2: invalid data, disp=%d, cnt=%d, tot=%d\n",
-- data_disp, data_count, data_tot);
-+ printk(KERN_ERR "smb_trans2: invalid data, disp=%d, cnt=%d, tot=%d, ofs=%d\n",
-+ data_disp, data_count, data_tot, data_offset);
- req->rq_errno = -EIO;
- out:
- return req->rq_errno;