diff options
13 files changed, 15 insertions, 566 deletions
diff --git a/driver-core.current/document-kernel-taint-flags-properly.patch b/driver-core.current/document-kernel-taint-flags-properly.patch deleted file mode 100644 index 3e6990dc089685..00000000000000 --- a/driver-core.current/document-kernel-taint-flags-properly.patch +++ /dev/null @@ -1,49 +0,0 @@ -From foo@baz Tue Apr 9 12:12:43 2002 -Date: Fri, 17 Oct 2008 15:01:07 -0700 -To: Greg KH <greg@kroah.com> -From: Greg Kroah-Hartman <gregkh@suse.de> -Subject: Document kernel taint flags properly - -This fills in the documentation for all of the current kernel taint -flags, and fixes the number for TAINT_CRAP, which was incorrectly -described. - -Cc: Michael Kerrisk <mtk.manpages@gmail.com> -Cc: Randy Dunlap <rdunlap@xenotime.net> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - Documentation/sysctl/kernel.txt | 24 +++++++++++++++++------- - 1 file changed, 17 insertions(+), 7 deletions(-) - ---- a/Documentation/sysctl/kernel.txt -+++ b/Documentation/sysctl/kernel.txt -@@ -363,11 +363,21 @@ tainted: - Non-zero if the kernel has been tainted. Numeric values, which - can be ORed together: - -- 1 - A module with a non-GPL license has been loaded, this -- includes modules with no license. -- Set by modutils >= 2.4.9 and module-init-tools. -- 2 - A module was force loaded by insmod -f. -- Set by modutils >= 2.4.9 and module-init-tools. -- 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP. -- 64 - A module from drivers/staging was loaded. -+ 1 - A module with a non-GPL license has been loaded, this -+ includes modules with no license. -+ Set by modutils >= 2.4.9 and module-init-tools. -+ 2 - A module was force loaded by insmod -f. -+ Set by modutils >= 2.4.9 and module-init-tools. -+ 4 - Unsafe SMP processors: SMP with CPUs not designed for SMP. -+ 8 - A module was forcibly unloaded from the system by rmmod -f. -+ 16 - A hardware machine check error occurred on the system. -+ 32 - A bad page was discovered on the system. -+ 64 - The user has asked that the system be marked "tainted". This -+ could be because they are running software that directly modifies -+ the hardware, or for other reasons. -+ 128 - The system has died. -+ 256 - The ACPI DSDT has been overridden with one supplied by the user -+ instead of using the one provided by the hardware. -+ 512 - A kernel warning has occurred. -+1024 - A module from drivers/staging was loaded. - diff --git a/driver-core.current/driver-core-drivers-base-sys.c-update-comments.patch b/driver-core.current/driver-core-drivers-base-sys.c-update-comments.patch deleted file mode 100644 index ce968fac385229..00000000000000 --- a/driver-core.current/driver-core-drivers-base-sys.c-update-comments.patch +++ /dev/null @@ -1,41 +0,0 @@ -From s3c24xx@gmail.com Mon Oct 20 16:08:23 2008 -From: Qinghuang Feng <s3c24xx@gmail.com> -Date: Mon, 13 Oct 2008 18:05:04 +0800 -Subject: driver core: drivers/base/sys.c: update comments -To: gregkh@suse.de -Cc: linux-kernel@vger.kernel.org -Message-ID: <200810131805.04985.qhfeng.kernel@gmail.com> -Content-Disposition: inline - - -There are no functions named sys_device_shutdown or sys_device_suspend -in the kernel. -They should be fixed to sysdev_shutdown and sysdev_suspend respectively. - -Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/sys.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/base/sys.c -+++ b/drivers/base/sys.c -@@ -355,7 +355,7 @@ static void __sysdev_resume(struct sys_d - * sysdev_suspend - Suspend all system devices. - * @state: Power state to enter. - * -- * We perform an almost identical operation as sys_device_shutdown() -+ * We perform an almost identical operation as sysdev_shutdown() - * above, though calling ->suspend() instead. Interrupts are disabled - * when this called. Devices are responsible for both saving state and - * quiescing or powering down the device. -@@ -437,7 +437,7 @@ aux_driver: - /** - * sysdev_resume - Bring system devices back to life. - * -- * Similar to sys_device_suspend(), but we iterate the list forwards -+ * Similar to sysdev_suspend(), but we iterate the list forwards - * to guarantee that parent devices are resumed before their children. - * - * Note: Interrupts are disabled when called. diff --git a/driver-core.current/driver-core-fix-dynamic_debug-cmd-line-parameter.patch b/driver-core.current/driver-core-fix-dynamic_debug-cmd-line-parameter.patch deleted file mode 100644 index 0d81662bb8cbb6..00000000000000 --- a/driver-core.current/driver-core-fix-dynamic_debug-cmd-line-parameter.patch +++ /dev/null @@ -1,45 +0,0 @@ -From jbaron@redhat.com Mon Oct 27 12:14:08 2008 -From: Jason Baron <jbaron@redhat.com> -Date: Mon, 27 Oct 2008 12:05:14 -0400 -Subject: Driver core: fix 'dynamic_debug' cmd line parameter -To: gregkh@suse.de -Cc: linux-kernel@vger.kernel.org -Message-ID: <20081027160514.GA3161@redhat.com> -Content-Disposition: inline - - -In testing 2.6.28-rc1, I found that passing 'dynamic_printk' on the command -line didn't activate the debug code. The problem is that dynamic_printk_setup() -(which activates the debugging) is being called before dynamic_printk_init() is -called (which initializes infrastructure). Fix this by setting setting the -state to 'DYNAMIC_ENABLED_ALL' in dynamic_printk_setup(), which will also -cause all subsequent modules to have debugging automatically started, which is -probably the behavior we want. - -Signed-off-by: Jason Baron <jbaron@redhat.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - lib/dynamic_printk.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - ---- a/lib/dynamic_printk.c -+++ b/lib/dynamic_printk.c -@@ -402,6 +402,8 @@ static int __init dynamic_printk_init(vo - iter->logical_modname, - iter->flag_names, iter->hash, iter->hash2); - } -+ if (dynamic_enabled == DYNAMIC_ENABLED_ALL) -+ set_all(true); - return 0; - } - module_init(dynamic_printk_init); -@@ -411,7 +413,7 @@ static int __init dynamic_printk_setup(c - { - if (str) - return -ENOENT; -- set_all(true); -+ dynamic_enabled = DYNAMIC_ENABLED_ALL; - return 0; - } - /* Use early_param(), so we can get debug output as early as possible */ diff --git a/driver-core.current/howto-sync-patch-for-jp_jp-howto.patch b/driver-core.current/howto-sync-patch-for-jp_jp-howto.patch deleted file mode 100644 index 674e2560442dc1..00000000000000 --- a/driver-core.current/howto-sync-patch-for-jp_jp-howto.patch +++ /dev/null @@ -1,66 +0,0 @@ -From tshibata@ab.jp.nec.com Mon Oct 27 11:45:13 2008 -From: Tsugikazu Shibata <tshibata@ab.jp.nec.com> -Date: Mon, 27 Oct 2008 18:05:40 +0900 (JST) -Subject: HOWTO: Sync patch for jp_JP/HOWTO -To: gregkh@suse.de -Cc: tshibata@ab.jp.nec.com, francois.cami@free.fr -Message-ID: <20081027.180540.104048966.tshibata@ab.jp.nec.com> - -Sync the jp_JP version of HOWTO to contain the latest updates - -From: Tsugikazu Shibata <tshibata@ab.jp.nec.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - Documentation/ja_JP/HOWTO | 14 +++++++------- - 1 file changed, 7 insertions(+), 7 deletions(-) - ---- a/Documentation/ja_JP/HOWTO -+++ b/Documentation/ja_JP/HOWTO -@@ -11,14 +11,14 @@ for non English (read: Japanese) speaker - fork. So if you have any comments or updates for this file, please try - to update the original English file first. - --Last Updated: 2008/08/21 -+Last Updated: 2008/10/24 - ================================== - これは、 --linux-2.6.27/Documentation/HOWTO -+linux-2.6.28/Documentation/HOWTO - の和訳です。 - - 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > --翻訳日: 2008/8/5 -+翻訳日: 2008/10/24 - 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> - 校正者: 松倉さん <nbh--mats at nifty dot com> - 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> -@@ -110,8 +110,8 @@ 新しい機能がカーネルに追加� - 新しいドキュメントファイルも追加することを勧めます。 - カーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの - 変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報 --をマニュアルページのメンテナ mtk.manpages@gmail.com に送ることを勧めま --す。 -+をマニュアルページのメンテナ mtk.manpages@gmail.com に送り、CC を -+linux-api@ver.kernel.org に送ることを勧めます。 - - 以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で - す- -@@ -149,7 +149,7 @@ 以下はカーネルソースツリー� - この他にパッチを作る方法についてのよくできた記述は- - - "The Perfect Patch" -- http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt -+ http://userweb.kernel.org/~akpm/stuff/tpp.txt - "Linux kernel patch submission format" - http://linux.yyz.us/patch-format.html - -@@ -664,7 +664,7 @@ 性と有用性で正当化されなけ� - これについて全てがどのようにあるべきかについての詳細は、以下のドキュメ - ントの ChangeLog セクションを見てください- - "The Perfect Patch" -- http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt -+ http://userweb.kernel.org/~akpm/stuff/tpp.txt - - これらのどれもが、時にはとても困難です。これらの慣例を完璧に実施するに - は数年かかるかもしれません。これは継続的な改善のプロセスであり、そのた diff --git a/driver-core.current/sysfs-fix-return-values-for-sysdev_store_-ulong-int.patch b/driver-core.current/sysfs-fix-return-values-for-sysdev_store_-ulong-int.patch deleted file mode 100644 index b93fdc6a3dce53..00000000000000 --- a/driver-core.current/sysfs-fix-return-values-for-sysdev_store_-ulong-int.patch +++ /dev/null @@ -1,46 +0,0 @@ -From andi@firstfloor.org Mon Oct 20 16:08:55 2008 -From: Andi Kleen <andi@firstfloor.org> -Date: Mon, 13 Oct 2008 12:03:03 +0200 -Subject: sysfs: Fix return values for sysdev_store_{ulong,int} -To: greg@kroah.com, linux-kernel@vger.kernel.org -Message-ID: <20081013100303.GA32199@basil.nowhere.org> -Content-Disposition: inline - - -SYSFS: Fix return values for sysdev_store_{ulong,int} - -Always return the full size instead of the consumed -length of the string in sysdev_store_{ulong,int} - -This avoids EINVAL errors in some echo versions. - -Signed-off-by: Andi Kleen <ak@linux.intel.com> -Cc: stable <stable@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/sys.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - ---- a/drivers/base/sys.c -+++ b/drivers/base/sys.c -@@ -488,7 +488,8 @@ ssize_t sysdev_store_ulong(struct sys_de - if (end == buf) - return -EINVAL; - *(unsigned long *)(ea->var) = new; -- return end - buf; -+ /* Always return full write size even if we didn't consume all */ -+ return size; - } - EXPORT_SYMBOL_GPL(sysdev_store_ulong); - -@@ -511,7 +512,8 @@ ssize_t sysdev_store_int(struct sys_devi - if (end == buf || new > INT_MAX || new < INT_MIN) - return -EINVAL; - *(int *)(ea->var) = new; -- return end - buf; -+ /* Always return full write size even if we didn't consume all */ -+ return size; - } - EXPORT_SYMBOL_GPL(sysdev_store_int); - diff --git a/driver-core.current/update-stable-tree-documentation.patch b/driver-core.current/update-stable-tree-documentation.patch deleted file mode 100644 index ed2c22ad31c632..00000000000000 --- a/driver-core.current/update-stable-tree-documentation.patch +++ /dev/null @@ -1,31 +0,0 @@ -From jwboyer@linux.vnet.ibm.com Mon Oct 27 11:43:29 2008 -From: Josh Boyer <jwboyer@linux.vnet.ibm.com> -Date: Fri, 24 Oct 2008 10:10:42 -0400 -Subject: Update stable tree documentation -To: greg@kroah.com -Cc: linux-kernel@vger.kernel.org -Message-ID: <20081024141042.GB2299@yoda.jdub.homelinux.org> -Content-Disposition: inline - - -Update the documentation for the stable tree rules to reflect -that device IDs and quirks are also suitable for -stable -kernels. - -Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - Documentation/stable_kernel_rules.txt | 1 + - 1 file changed, 1 insertion(+) - ---- a/Documentation/stable_kernel_rules.txt -+++ b/Documentation/stable_kernel_rules.txt -@@ -12,6 +12,7 @@ Rules on what kind of patches are accept - marked CONFIG_BROKEN), an oops, a hang, data corruption, a real - security issue, or some "oh, that's not good" issue. In short, something - critical. -+ - New device IDs and quirks are also accepted. - - No "theoretical race condition" issues, unless an explanation of how the - race can be exploited is also provided. - - It cannot contain any "trivial" fixes in it (spelling changes, diff --git a/driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch b/driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch index 33531b09d520ff..59b8378a4e568a 100644 --- a/driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch +++ b/driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch @@ -345,7 +345,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c -@@ -420,8 +420,7 @@ static int pci_pm_suspend(struct device +@@ -433,8 +433,7 @@ static int pci_pm_suspend(struct device static int pci_pm_suspend_noirq(struct device *dev) { @@ -355,7 +355,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> int error = 0; if (drv && drv->pm) { -@@ -456,11 +455,10 @@ static int pci_pm_resume(struct device * +@@ -469,11 +468,10 @@ static int pci_pm_resume(struct device * static int pci_pm_resume_noirq(struct device *dev) { @@ -369,7 +369,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (drv && drv->pm) { if (drv->pm->resume_noirq) -@@ -506,8 +504,7 @@ static int pci_pm_freeze(struct device * +@@ -519,8 +517,7 @@ static int pci_pm_freeze(struct device * static int pci_pm_freeze_noirq(struct device *dev) { @@ -379,7 +379,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> int error = 0; if (drv && drv->pm) { -@@ -540,15 +537,14 @@ static int pci_pm_thaw(struct device *de +@@ -553,15 +550,14 @@ static int pci_pm_thaw(struct device *de static int pci_pm_thaw_noirq(struct device *dev) { @@ -397,7 +397,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> error = pci_legacy_resume_early(dev); } -@@ -576,8 +572,7 @@ static int pci_pm_poweroff(struct device +@@ -589,8 +585,7 @@ static int pci_pm_poweroff(struct device static int pci_pm_poweroff_noirq(struct device *dev) { @@ -407,7 +407,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> int error = 0; if (drv && drv->pm) { -@@ -612,7 +607,7 @@ static int pci_pm_restore(struct device +@@ -625,7 +620,7 @@ static int pci_pm_restore(struct device static int pci_pm_restore_noirq(struct device *dev) { struct pci_dev *pci_dev = to_pci_dev(dev); @@ -416,7 +416,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> int error = 0; pci_fixup_device(pci_fixup_resume, pci_dev); -@@ -641,17 +636,15 @@ static int pci_pm_restore_noirq(struct d +@@ -654,17 +649,15 @@ static int pci_pm_restore_noirq(struct d #endif /* !CONFIG_HIBERNATION */ @@ -443,7 +443,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> .suspend_noirq = pci_pm_suspend_noirq, .resume_noirq = pci_pm_resume_noirq, .freeze_noirq = pci_pm_freeze_noirq, -@@ -660,7 +653,7 @@ struct pm_ext_ops pci_pm_ops = { +@@ -673,7 +666,7 @@ struct pm_ext_ops pci_pm_ops = { .restore_noirq = pci_pm_restore_noirq, }; @@ -452,7 +452,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #else /* !CONFIG_PM_SLEEP */ -@@ -690,9 +683,6 @@ int __pci_register_driver(struct pci_dri +@@ -703,9 +696,6 @@ int __pci_register_driver(struct pci_dri drv->driver.owner = owner; drv->driver.mod_name = mod_name; @@ -522,7 +522,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* interface for exporting device attributes */ --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -409,7 +409,6 @@ struct pci_driver { +@@ -415,7 +415,6 @@ struct pci_driver { int (*resume_early) (struct pci_dev *dev); int (*resume) (struct pci_dev *dev); /* Device woken up */ void (*shutdown) (struct pci_dev *dev); diff --git a/driver-core/warn-when-statically-allocated-kobjects-are-used.patch b/driver-core/warn-when-statically-allocated-kobjects-are-used.patch index e085d42cd8e089..6a9e0f0f005707 100644 --- a/driver-core/warn-when-statically-allocated-kobjects-are-used.patch +++ b/driver-core/warn-when-statically-allocated-kobjects-are-used.patch @@ -37,7 +37,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/include/linux/init.h +++ b/include/linux/init.h -@@ -143,6 +143,7 @@ extern int do_one_initcall(initcall_t fn +@@ -147,6 +147,7 @@ extern int do_one_initcall(initcall_t fn extern char __initdata boot_command_line[]; extern char *saved_command_line; extern unsigned int reset_devices; @@ -11,20 +11,10 @@ gregkh/detect-atomic-counter-underflows.patch ################################# # Driver core patches for 2.6.28 ################################# -driver-core.current/document-kernel-taint-flags-properly.patch -driver-core.current/driver-core-drivers-base-sys.c-update-comments.patch -driver-core.current/sysfs-fix-return-values-for-sysdev_store_-ulong-int.patch -driver-core.current/update-stable-tree-documentation.patch -driver-core.current/howto-sync-patch-for-jp_jp-howto.patch -driver-core.current/driver-core-fix-dynamic_debug-cmd-line-parameter.patch ################################# # USB patches for 2.6.28 ################################# -usb.current/usb-fix-crash-when-urbs-are-unlinked-after-the-device-is-gone.patch -usb.current/usb-usbtmc-use-explicit-unsigned-type-for-input-buffer-instead-of-char.patch -usb.current/usb-unusual-dev-for-the-kyocera-contax-sl300r-t-digital-camera.patch -usb.current/usb-prevent-autosuspend-during-hub-initialization.patch ##################################################################### @@ -42,10 +32,10 @@ driver-core/uio-use-pci_ioremap_bar-in-drivers-uio.patch #driver-core/acpi-fixup-typo-in-acpi_device_remove.patch # for .28 -#driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch +driver-core/pm-simplify-the-new-suspend-hibernation-framework-for-devices.patch # helper tools, not for mainline. -#driver-core/warn-when-statically-allocated-kobjects-are-used.patch +driver-core/warn-when-statically-allocated-kobjects-are-used.patch ################################# # USB stuff (after 2.6.27 is out) @@ -66,7 +56,7 @@ usb/usb-remove-info-macro-from-usb.h.patch # my ols tutorial driver, never in mainline -#usb/usb-gotemp.patch +usb/usb-gotemp.patch ################################# # Staging stuff diff --git a/usb.current/usb-fix-crash-when-urbs-are-unlinked-after-the-device-is-gone.patch b/usb.current/usb-fix-crash-when-urbs-are-unlinked-after-the-device-is-gone.patch deleted file mode 100644 index f19eddcf0ba07e..00000000000000 --- a/usb.current/usb-fix-crash-when-urbs-are-unlinked-after-the-device-is-gone.patch +++ /dev/null @@ -1,189 +0,0 @@ -From stern@rowland.harvard.edu Mon Oct 27 11:24:17 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Tue, 21 Oct 2008 15:28:46 -0400 (EDT) -Subject: USB: fix crash when URBs are unlinked after the device is gone -To: Greg KH <greg@kroah.com> -Message-ID: <Pine.LNX.4.44L0.0810211526200.2995-100000@iolanthe.rowland.org> - -From: Alan Stern <stern@rowland.harvard.edu> - -This patch (as1151) protects usbcore against drivers that try to -unlink an URB after the URB's device or bus have been removed. The -core does not currently check for this, and certain drivers can cause -a crash if they are running while an HCD is unloaded. - -Certainly it would be best to fix the guilty drivers. But a little -defensive programming doesn't hurt, especially since it appears that -quite a few drivers need to be fixed. - -The patch prevents the problem by grabbing a reference to the device -while an unlink is in progress and using a new spinlock to synchronize -unlinks with device removal. (There's no need to acquire a reference -to the bus as well, since the device structure itself keeps a -reference to the bus.) In addition, the kerneldoc is updated to -indicate that URBs should not be unlinked after the disconnect method -returns. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Cc: stable <stable@kernel.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/hcd.c | 35 ++++++++++++++++++++++++++++++++--- - drivers/usb/core/hcd.h | 1 + - drivers/usb/core/hub.c | 1 + - drivers/usb/core/urb.c | 22 ++++++++++++++++++++++ - 4 files changed, 56 insertions(+), 3 deletions(-) - ---- a/drivers/usb/core/hcd.c -+++ b/drivers/usb/core/hcd.c -@@ -106,6 +106,9 @@ static DEFINE_SPINLOCK(hcd_root_hub_lock - /* used when updating an endpoint's URB list */ - static DEFINE_SPINLOCK(hcd_urb_list_lock); - -+/* used to protect against unlinking URBs after the device is gone */ -+static DEFINE_SPINLOCK(hcd_urb_unlink_lock); -+ - /* wait queue for synchronous unlinks */ - DECLARE_WAIT_QUEUE_HEAD(usb_kill_urb_queue); - -@@ -1376,10 +1379,25 @@ static int unlink1(struct usb_hcd *hcd, - int usb_hcd_unlink_urb (struct urb *urb, int status) - { - struct usb_hcd *hcd; -- int retval; -+ int retval = -EIDRM; -+ unsigned long flags; - -- hcd = bus_to_hcd(urb->dev->bus); -- retval = unlink1(hcd, urb, status); -+ /* Prevent the device and bus from going away while -+ * the unlink is carried out. If they are already gone -+ * then urb->use_count must be 0, since disconnected -+ * devices can't have any active URBs. -+ */ -+ spin_lock_irqsave(&hcd_urb_unlink_lock, flags); -+ if (atomic_read(&urb->use_count) > 0) { -+ retval = 0; -+ usb_get_dev(urb->dev); -+ } -+ spin_unlock_irqrestore(&hcd_urb_unlink_lock, flags); -+ if (retval == 0) { -+ hcd = bus_to_hcd(urb->dev->bus); -+ retval = unlink1(hcd, urb, status); -+ usb_put_dev(urb->dev); -+ } - - if (retval == 0) - retval = -EINPROGRESS; -@@ -1528,6 +1546,17 @@ void usb_hcd_disable_endpoint(struct usb - hcd->driver->endpoint_disable(hcd, ep); - } - -+/* Protect against drivers that try to unlink URBs after the device -+ * is gone, by waiting until all unlinks for @udev are finished. -+ * Since we don't currently track URBs by device, simply wait until -+ * nothing is running in the locked region of usb_hcd_unlink_urb(). -+ */ -+void usb_hcd_synchronize_unlinks(struct usb_device *udev) -+{ -+ spin_lock_irq(&hcd_urb_unlink_lock); -+ spin_unlock_irq(&hcd_urb_unlink_lock); -+} -+ - /*-------------------------------------------------------------------------*/ - - /* called in any context */ ---- a/drivers/usb/core/hcd.h -+++ b/drivers/usb/core/hcd.h -@@ -232,6 +232,7 @@ extern void usb_hcd_flush_endpoint(struc - struct usb_host_endpoint *ep); - extern void usb_hcd_disable_endpoint(struct usb_device *udev, - struct usb_host_endpoint *ep); -+extern void usb_hcd_synchronize_unlinks(struct usb_device *udev); - extern int usb_hcd_get_frame_number(struct usb_device *udev); - - extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver, ---- a/drivers/usb/core/hub.c -+++ b/drivers/usb/core/hub.c -@@ -1429,6 +1429,7 @@ void usb_disconnect(struct usb_device ** - */ - dev_dbg (&udev->dev, "unregistering device\n"); - usb_disable_device(udev, 0); -+ usb_hcd_synchronize_unlinks(udev); - - usb_unlock_device(udev); - ---- a/drivers/usb/core/urb.c -+++ b/drivers/usb/core/urb.c -@@ -474,6 +474,12 @@ EXPORT_SYMBOL_GPL(usb_submit_urb); - * indicating that the request has been canceled (rather than any other - * code). - * -+ * Drivers should not call this routine or related routines, such as -+ * usb_kill_urb() or usb_unlink_anchored_urbs(), after their disconnect -+ * method has returned. The disconnect function should synchronize with -+ * a driver's I/O routines to insure that all URB-related activity has -+ * completed before it returns. -+ * - * This request is always asynchronous. Success is indicated by - * returning -EINPROGRESS, at which time the URB will probably not yet - * have been given back to the device driver. When it is eventually -@@ -550,6 +556,9 @@ EXPORT_SYMBOL_GPL(usb_unlink_urb); - * This routine may not be used in an interrupt context (such as a bottom - * half or a completion handler), or when holding a spinlock, or in other - * situations where the caller can't schedule(). -+ * -+ * This routine should not be called by a driver after its disconnect -+ * method has returned. - */ - void usb_kill_urb(struct urb *urb) - { -@@ -588,6 +597,9 @@ EXPORT_SYMBOL_GPL(usb_kill_urb); - * This routine may not be used in an interrupt context (such as a bottom - * half or a completion handler), or when holding a spinlock, or in other - * situations where the caller can't schedule(). -+ * -+ * This routine should not be called by a driver after its disconnect -+ * method has returned. - */ - void usb_poison_urb(struct urb *urb) - { -@@ -622,6 +634,9 @@ EXPORT_SYMBOL_GPL(usb_unpoison_urb); - * - * this allows all outstanding URBs to be killed starting - * from the back of the queue -+ * -+ * This routine should not be called by a driver after its disconnect -+ * method has returned. - */ - void usb_kill_anchored_urbs(struct usb_anchor *anchor) - { -@@ -651,6 +666,9 @@ EXPORT_SYMBOL_GPL(usb_kill_anchored_urbs - * this allows all outstanding URBs to be poisoned starting - * from the back of the queue. Newly added URBs will also be - * poisoned -+ * -+ * This routine should not be called by a driver after its disconnect -+ * method has returned. - */ - void usb_poison_anchored_urbs(struct usb_anchor *anchor) - { -@@ -672,6 +690,7 @@ void usb_poison_anchored_urbs(struct usb - spin_unlock_irq(&anchor->lock); - } - EXPORT_SYMBOL_GPL(usb_poison_anchored_urbs); -+ - /** - * usb_unlink_anchored_urbs - asynchronously cancel transfer requests en masse - * @anchor: anchor the requests are bound to -@@ -680,6 +699,9 @@ EXPORT_SYMBOL_GPL(usb_poison_anchored_ur - * from the back of the queue. This function is asynchronous. - * The unlinking is just tiggered. It may happen after this - * function has returned. -+ * -+ * This routine should not be called by a driver after its disconnect -+ * method has returned. - */ - void usb_unlink_anchored_urbs(struct usb_anchor *anchor) - { diff --git a/usb.current/usb-prevent-autosuspend-during-hub-initialization.patch b/usb.current/usb-prevent-autosuspend-during-hub-initialization.patch deleted file mode 100644 index f02fd0690142fd..00000000000000 --- a/usb.current/usb-prevent-autosuspend-during-hub-initialization.patch +++ /dev/null @@ -1,39 +0,0 @@ -From stern@rowland.harvard.edu Mon Oct 27 12:13:51 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Mon, 27 Oct 2008 12:07:44 -0400 (EDT) -Subject: USB: prevent autosuspend during hub initialization -To: Greg KH <greg@kroah.com> -Cc: USB list <linux-usb@vger.kernel.org> -Message-ID: <Pine.LNX.4.44L0.0810271206450.2296-100000@iolanthe.rowland.org> - - -This patch (as1153) fixes a potential problem in hub initialization. -Starting in 2.6.28, initialization was split into several tasks to -help speed up booting. This opens the possibility that the hub may be -autosuspended before all the initialization tasks can complete. - -Normally that wouldn't matter, but with incomplete initialization -there is a risk that the hub would never autoresume -- especially if -devices were plugged into the hub beforehand. The solution is a -simple one-line change to suppress autosuspend until the -initialization is finished. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/hub.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/usb/core/hub.c -+++ b/drivers/usb/core/hub.c -@@ -659,6 +659,9 @@ static void hub_activate(struct usb_hub - PREPARE_DELAYED_WORK(&hub->init_work, hub_init_func2); - schedule_delayed_work(&hub->init_work, - msecs_to_jiffies(delay)); -+ -+ /* Suppress autosuspend until init is done */ -+ to_usb_interface(hub->intfdev)->pm_usage_cnt = 1; - return; /* Continues at init2: below */ - } else { - hub_power_on(hub, true); diff --git a/usb.current/usb-usbtmc-use-explicit-unsigned-type-for-input-buffer-instead-of-char.patch b/usb.current/usb-usbtmc-use-explicit-unsigned-type-for-input-buffer-instead-of-char.patch deleted file mode 100644 index 22e55944bd4651..00000000000000 --- a/usb.current/usb-usbtmc-use-explicit-unsigned-type-for-input-buffer-instead-of-char.patch +++ /dev/null @@ -1,35 +0,0 @@ -From mail@chrismalley.co.uk Mon Oct 27 11:44:03 2008 -From: Chris Malley <mail@chrismalley.co.uk> -Date: Sat, 25 Oct 2008 22:07:32 +0100 -Subject: USB: usbtmc: Use explicit unsigned type for input buffer instead of char* -To: gregkh <gregkh@suse.de> -Cc: linux-kernel@vger.kernel.org -Message-ID: <1224968852.25054.3.camel@helix.beotel.net> - - -From: Chris Malley <mail@chrismalley.co.uk> - -Silences compiler warning about comparison with 0x80, and type now matches the -corresponding _bulk_out function. - -drivers/usb/class/usbtmc.c: In function ‘usbtmc_ioctl_abort_bulk_in’: -drivers/usb/class/usbtmc.c:163: warning: comparison is always false due to limited range of data type - -Signed-off-by: Chris Malley <mail@chrismalley.co.uk> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/class/usbtmc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/usb/class/usbtmc.c -+++ b/drivers/usb/class/usbtmc.c -@@ -133,7 +133,7 @@ static int usbtmc_release(struct inode * - - static int usbtmc_ioctl_abort_bulk_in(struct usbtmc_device_data *data) - { -- char *buffer; -+ u8 *buffer; - struct device *dev; - int rv; - int n; @@ -1 +1 @@ -2.6.28-rc2 +2.6.28-rc5 |
