aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2008-12-09 21:05:13 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-12-09 21:05:13 -0800
commit94b59b0d314ce1f564847775aa9eab3f22f4952a (patch)
tree605c045968c6b932be4801006f9f02fb63136200
parent1776bf845198ea8886ffbf0b7abc4091cd4202ec (diff)
downloadpatches-94b59b0d314ce1f564847775aa9eab3f22f4952a.tar.gz
lots-o-patches added
-rw-r--r--driver-core.current/driver-core-add-newlines-to-debugging-enabled-disabled-messages.patch35
-rw-r--r--driver-core.current/pktcdvd-remove-broken-dev_t-export-of-class-devices.patch41
-rw-r--r--driver-core.current/xilinx_hwicap-remove-improper-wording-in-license-statement.patch95
-rw-r--r--driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch96
-rw-r--r--driver-core/kobject-make-documentation-kobject.txt-a-little-more-coherent.patch40
-rw-r--r--driver-core/pci-rework-default-handling-of-suspend-and-resume.patch297
-rw-r--r--driver-core/uio-documentation-for-uio-ioport-info-handling.patch146
-rw-r--r--driver-core/uio-pass-information-about-ioports-to-userspace.patch350
-rw-r--r--series26
-rw-r--r--staging/staging-benet-cleanup-a-check-while-posting-rx-buffers.patch50
-rw-r--r--staging/staging-me4000-switch-to-list_for_each.patch260
-rw-r--r--staging/staging-otus-remove-dependence-on-kernel-version.patch766
-rw-r--r--staging/staging-usbip-switch-to-list_for_each_entry.patch37
-rw-r--r--usb.current/tty-sprogii-dcc-controller-identifiers.patch48
-rw-r--r--usb.current/usb-ftdi_sio-adding-ewert-energy-system-s-candapter-pid.patch60
-rw-r--r--usb.current/usb-gadget-fix-rndis-working-at-high-speed.patch45
-rw-r--r--usb.current/usb-storage-unusual_devs.h-nokia-3109c-addition.patch52
-rw-r--r--usb.current/usb-storage-update-unusual_devs-entry-for-nokia-5310.patch34
-rw-r--r--usb.current/usb-unusual-devs-patch-for-nokia-3500c.patch45
-rw-r--r--usb/usb-documentation-usb-gadget_serial.txt-update-to-match-driver-use_acm-behaviour.patch38
-rw-r--r--usb/usb-fix-comment-about-endianness-of-descriptors.patch57
-rw-r--r--usb/usb-gadget-don-t-wait-for-completion-twice.patch28
-rw-r--r--usb/usb-isp1760-fix-probe-in-pci-glue-code.patch188
-rw-r--r--usb/usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch48
-rw-r--r--usb/usb-serial-usb_debug-make-static.patch28
-rw-r--r--usb/usb-storage-clean-up-unusual_devs.h.patch20
-rw-r--r--usb/usb-storage-flag-devices-known-to-support-sane_sense.patch10
-rw-r--r--usb/usbmon-drop-bogus-0t-from-usbmon.txt.patch49
28 files changed, 2877 insertions, 112 deletions
diff --git a/driver-core.current/driver-core-add-newlines-to-debugging-enabled-disabled-messages.patch b/driver-core.current/driver-core-add-newlines-to-debugging-enabled-disabled-messages.patch
new file mode 100644
index 00000000000000..f7ca15f8dd193b
--- /dev/null
+++ b/driver-core.current/driver-core-add-newlines-to-debugging-enabled-disabled-messages.patch
@@ -0,0 +1,35 @@
+From 27160f1920f0218def61fc66a7c9f0c15f2c91be Mon Sep 17 00:00:00 2001
+From: Marcel Holtmann <marcel@holtmann.org>
+Date: Sun, 30 Nov 2008 14:01:26 +0100
+Subject: driver core: add newlines to debugging enabled/disabled messages
+
+Both messages are missing the newline and thus dmesg output gets
+scrambled.
+
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ lib/dynamic_printk.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/lib/dynamic_printk.c
++++ b/lib/dynamic_printk.c
+@@ -289,7 +289,7 @@ static ssize_t pr_debug_write(struct fil
+ dynamic_enabled = DYNAMIC_ENABLED_SOME;
+ err = 0;
+ printk(KERN_DEBUG
+- "debugging enabled for module %s",
++ "debugging enabled for module %s\n",
+ elem->name);
+ } else if (!value && (elem->enable == 1)) {
+ elem->enable = 0;
+@@ -309,7 +309,7 @@ static ssize_t pr_debug_write(struct fil
+ err = 0;
+ printk(KERN_DEBUG
+ "debugging disabled for module "
+- "%s", elem->name);
++ "%s\n", elem->name);
+ }
+ }
+ }
diff --git a/driver-core.current/pktcdvd-remove-broken-dev_t-export-of-class-devices.patch b/driver-core.current/pktcdvd-remove-broken-dev_t-export-of-class-devices.patch
new file mode 100644
index 00000000000000..ace6c65e03d33c
--- /dev/null
+++ b/driver-core.current/pktcdvd-remove-broken-dev_t-export-of-class-devices.patch
@@ -0,0 +1,41 @@
+From kay.sievers@vrfy.org Tue Dec 9 20:32:16 2008
+From: Kay Sievers <kay.sievers@vrfy.org>
+Date: Sat, 06 Dec 2008 04:38:11 +0100
+Subject: pktcdvd: remove broken dev_t export of class devices
+To: Al Viro <viro@zeniv.linux.org.uk>
+Cc: gregkh@suse.de, petero2@telia.com
+Message-ID: <1228534691.3428.1.camel@nga>
+
+From: Kay Sievers <kay.sievers@vrfy.org>
+
+The pktcdvd created class devices only export some sysfs files,
+but have no char dev_t registered in the driver.
+
+At class device creation time they copy the dev_t value of the
+block device to the char device, wich will register a new char
+device in the driver core and userspace, with a conflicting dev_t
+value.
+
+In many cases the class devices dev_t just points to a random
+USB device. This fixes the sysfs "duplicate entry" errors.
+
+Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Acked-by: Peter Osterlund <petero2@telia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/block/pktcdvd.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/block/pktcdvd.c
++++ b/drivers/block/pktcdvd.c
+@@ -302,7 +302,7 @@ static struct kobj_type kobj_pkt_type_wq
+ static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
+ {
+ if (class_pktcdvd) {
+- pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, NULL,
++ pd->dev = device_create(class_pktcdvd, NULL, MKDEV(0, 0), NULL,
+ "%s", pd->name);
+ if (IS_ERR(pd->dev))
+ pd->dev = NULL;
diff --git a/driver-core.current/xilinx_hwicap-remove-improper-wording-in-license-statement.patch b/driver-core.current/xilinx_hwicap-remove-improper-wording-in-license-statement.patch
new file mode 100644
index 00000000000000..b95368d8fd2546
--- /dev/null
+++ b/driver-core.current/xilinx_hwicap-remove-improper-wording-in-license-statement.patch
@@ -0,0 +1,95 @@
+From 58907e24d366ce0037243c36dd6f726d0f413390 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Sat, 6 Dec 2008 21:10:51 -0800
+Subject: xilinx_hwicap: remove improper wording in license statement
+
+From: Greg Kroah-Hartman <gregkh@suse.de>
+
+GPLv2 doesn't allow additional restrictions to be imposed on any
+code, so this wording needs to be removed from these files.
+
+Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/xilinx_hwicap/buffer_icap.c | 3 ---
+ drivers/char/xilinx_hwicap/buffer_icap.h | 3 ---
+ drivers/char/xilinx_hwicap/fifo_icap.c | 3 ---
+ drivers/char/xilinx_hwicap/fifo_icap.h | 3 ---
+ drivers/char/xilinx_hwicap/xilinx_hwicap.c | 3 ---
+ drivers/char/xilinx_hwicap/xilinx_hwicap.h | 3 ---
+ 6 files changed, 18 deletions(-)
+
+--- a/drivers/char/xilinx_hwicap/buffer_icap.c
++++ b/drivers/char/xilinx_hwicap/buffer_icap.c
+@@ -21,9 +21,6 @@
+ * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+- * Xilinx products are not intended for use in life support appliances,
+- * devices, or systems. Use in such applications is expressly prohibited.
+- *
+ * (c) Copyright 2003-2008 Xilinx Inc.
+ * All rights reserved.
+ *
+--- a/drivers/char/xilinx_hwicap/buffer_icap.h
++++ b/drivers/char/xilinx_hwicap/buffer_icap.h
+@@ -21,9 +21,6 @@
+ * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+- * Xilinx products are not intended for use in life support appliances,
+- * devices, or systems. Use in such applications is expressly prohibited.
+- *
+ * (c) Copyright 2003-2008 Xilinx Inc.
+ * All rights reserved.
+ *
+--- a/drivers/char/xilinx_hwicap/fifo_icap.c
++++ b/drivers/char/xilinx_hwicap/fifo_icap.c
+@@ -21,9 +21,6 @@
+ * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+- * Xilinx products are not intended for use in life support appliances,
+- * devices, or systems. Use in such applications is expressly prohibited.
+- *
+ * (c) Copyright 2007-2008 Xilinx Inc.
+ * All rights reserved.
+ *
+--- a/drivers/char/xilinx_hwicap/fifo_icap.h
++++ b/drivers/char/xilinx_hwicap/fifo_icap.h
+@@ -21,9 +21,6 @@
+ * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+- * Xilinx products are not intended for use in life support appliances,
+- * devices, or systems. Use in such applications is expressly prohibited.
+- *
+ * (c) Copyright 2007-2008 Xilinx Inc.
+ * All rights reserved.
+ *
+--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
++++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+@@ -21,9 +21,6 @@
+ * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+- * Xilinx products are not intended for use in life support appliances,
+- * devices, or systems. Use in such applications is expressly prohibited.
+- *
+ * (c) Copyright 2002 Xilinx Inc., Systems Engineering Group
+ * (c) Copyright 2004 Xilinx Inc., Systems Engineering Group
+ * (c) Copyright 2007-2008 Xilinx Inc.
+--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.h
++++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.h
+@@ -21,9 +21,6 @@
+ * INFRINGEMENT, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+- * Xilinx products are not intended for use in life support appliances,
+- * devices, or systems. Use in such applications is expressly prohibited.
+- *
+ * (c) Copyright 2003-2007 Xilinx Inc.
+ * All rights reserved.
+ *
diff --git a/driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch b/driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch
deleted file mode 100644
index 1d80137841e542..00000000000000
--- a/driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From tj@kernel.org Fri Nov 21 11:05:29 2008
-From: Tejun Heo <tj@kernel.org>
-Date: Thu, 20 Nov 2008 20:45:36 +0900
-Subject: char_dev: add cdev->release() and convert cdev_alloc() to use it
-To: Greg KH <greg@kroah.com>
-Cc: Boaz Harrosh <bharrosh@panasas.com>, Miklos Szeredi <miklos@szeredi.hu>
-Message-ID: <49254DE0.8040002@kernel.org>
-
-From: Tejun Heo <tj@kernel.org>
-
-Add cdev->release() so that cdev can be considered in more involved
-object lifetime management. cdev_alloc() used a separate ktype for
-auto-free release(). This patch converts it to use cdev->release() so
-that there's no need for separate ktype and cdev_init() can be used
-for auto-free variant too.
-
-Signed-off-by: Tejun Heo <tj@kernel.org>
-Cc: Miklos Szeredi <miklos@szeredi.hu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- fs/char_dev.c | 30 +++++++++++++-----------------
- include/linux/cdev.h | 1 +
- 2 files changed, 14 insertions(+), 17 deletions(-)
-
---- a/fs/char_dev.c
-+++ b/fs/char_dev.c
-@@ -482,26 +482,22 @@ void cdev_del(struct cdev *p)
- }
-
-
--static void cdev_default_release(struct kobject *kobj)
-+static void cdev_release(struct kobject *kobj)
- {
- struct cdev *p = container_of(kobj, struct cdev, kobj);
- cdev_purge(p);
-+ if (p->release)
-+ p->release(p);
- }
-
--static void cdev_dynamic_release(struct kobject *kobj)
--{
-- struct cdev *p = container_of(kobj, struct cdev, kobj);
-- cdev_purge(p);
-- kfree(p);
--}
--
--static struct kobj_type ktype_cdev_default = {
-- .release = cdev_default_release,
-+static struct kobj_type cdev_ktype = {
-+ .release = cdev_release,
- };
-
--static struct kobj_type ktype_cdev_dynamic = {
-- .release = cdev_dynamic_release,
--};
-+static void cdev_alloc_release(struct cdev *cdev)
-+{
-+ kfree(cdev);
-+}
-
- /**
- * cdev_alloc() - allocate a cdev structure
-@@ -510,10 +506,10 @@ static struct kobj_type ktype_cdev_dynam
- */
- struct cdev *cdev_alloc(void)
- {
-- struct cdev *p = kzalloc(sizeof(struct cdev), GFP_KERNEL);
-+ struct cdev *p = kmalloc(sizeof(struct cdev), GFP_KERNEL);
- if (p) {
-- INIT_LIST_HEAD(&p->list);
-- kobject_init(&p->kobj, &ktype_cdev_dynamic);
-+ cdev_init(p, NULL);
-+ p->release = cdev_alloc_release;
- }
- return p;
- }
-@@ -530,7 +526,7 @@ void cdev_init(struct cdev *cdev, const
- {
- memset(cdev, 0, sizeof *cdev);
- INIT_LIST_HEAD(&cdev->list);
-- kobject_init(&cdev->kobj, &ktype_cdev_default);
-+ kobject_init(&cdev->kobj, &cdev_ktype);
- cdev->ops = fops;
- }
-
---- a/include/linux/cdev.h
-+++ b/include/linux/cdev.h
-@@ -16,6 +16,7 @@ struct cdev {
- struct list_head list;
- dev_t dev;
- unsigned int count;
-+ void (*release)(struct cdev *);
- };
-
- void cdev_init(struct cdev *, const struct file_operations *);
diff --git a/driver-core/kobject-make-documentation-kobject.txt-a-little-more-coherent.patch b/driver-core/kobject-make-documentation-kobject.txt-a-little-more-coherent.patch
new file mode 100644
index 00000000000000..389d637e035a37
--- /dev/null
+++ b/driver-core/kobject-make-documentation-kobject.txt-a-little-more-coherent.patch
@@ -0,0 +1,40 @@
+From rusty@rustcorp.com.au Tue Dec 9 20:18:11 2008
+From: Rusty Russell <rusty@rustcorp.com.au>
+Date: Tue, 9 Dec 2008 08:32:14 +1030
+Subject: kobject: Make Documentation/kobject.txt a little more coherent.
+To: "Eric W. Biederman" <ebiederm@xmission.com>
+Cc: Greg KH <gregkh@suse.de>
+Message-ID: <200812090832.20403.rusty@rustcorp.com.au>
+Content-Disposition: inline
+
+
+While reading Documentation/kobject.txt:
+
+ Note kobject_rename does perform any locking or have a solid notion of
+ what names are valid so the provide must provide their own sanity checking
+ and serialization.
+
+I expect better: You never see me hard with time word making sentence
+coherent stuff. Ever.
+
+Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
+Acked-by: Eric W. Biederman <ebiederm@xmission.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/kobject.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/Documentation/kobject.txt
++++ b/Documentation/kobject.txt
+@@ -118,8 +118,8 @@ the name of the kobject, call kobject_re
+
+ int kobject_rename(struct kobject *kobj, const char *new_name);
+
+-Note kobject_rename does perform any locking or have a solid notion of
+-what names are valid so the provide must provide their own sanity checking
++kobject_rename does not perform any locking or have a solid notion of
++what names are valid so the caller must provide their own sanity checking
+ and serialization.
+
+ There is a function called kobject_set_name() but that is legacy cruft and
diff --git a/driver-core/pci-rework-default-handling-of-suspend-and-resume.patch b/driver-core/pci-rework-default-handling-of-suspend-and-resume.patch
new file mode 100644
index 00000000000000..5f38d53a3582f6
--- /dev/null
+++ b/driver-core/pci-rework-default-handling-of-suspend-and-resume.patch
@@ -0,0 +1,297 @@
+From rjw@sisk.pl Tue Dec 9 20:28:08 2008
+From: Rafael J. Wysocki <rjw@sisk.pl>
+Date: Mon, 8 Dec 2008 00:34:57 +0100
+Subject: PCI: Rework default handling of suspend and resume
+To: Greg KH <greg@kroah.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>, Ingo Molnar <mingo@elte.hu>, Jesse Barnes <jbarnes@virtuousgeek.org>, Len Brown <lenb@kernel.org>, Takashi Iwai <tiwai@suse.de>, Andrew Morton <akpm@linux-foundation.org>
+Message-ID: <200812080034.58106.rjw@sisk.pl>
+Content-Disposition: inline
+
+From: Rafael J. Wysocki <rjw@sisk.pl>
+
+Rework the handling of suspend and resume of PCI devices which have
+no drivers or the drivers of which do not provide any suspend-resume
+callbacks in such a way that their standard PCI configuration
+registers will be saved and restored with interrupts disabled. This
+should prevent such devices, including PCI bridges, from being
+resumed too late to be able to function correctly during the resume
+of the other PCI devices that may depend on them.
+
+Also, to remove one possible source of future confusion, drop the
+default handling of suspend and resume for PCI devices with drivers
+providing the 'pm' object introduced by the new suspend-resume
+framework (there are no such PCI drivers at the moment).
+
+This patch addresses the regression from 2.6.26 tracked as
+http://bugzilla.kernel.org/show_bug.cgi?id=12121 .
+
+Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
+Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pci/pci-driver.c | 94 +++++++++++++++++++++++++++++++----------------
+ 1 file changed, 63 insertions(+), 31 deletions(-)
+
+--- a/drivers/pci/pci-driver.c
++++ b/drivers/pci/pci-driver.c
+@@ -300,6 +300,14 @@ static void pci_device_shutdown(struct d
+
+ #ifdef CONFIG_PM_SLEEP
+
++static bool pci_has_legacy_pm_support(struct pci_dev *pci_dev)
++{
++ struct pci_driver *drv = pci_dev->driver;
++
++ return drv && (drv->suspend || drv->suspend_late || drv->resume
++ || drv->resume_early);
++}
++
+ /*
+ * Default "suspend" method for devices that have no driver provided suspend,
+ * or not even a driver at all.
+@@ -317,14 +325,22 @@ static void pci_default_pm_suspend(struc
+
+ /*
+ * Default "resume" method for devices that have no driver provided resume,
+- * or not even a driver at all.
++ * or not even a driver at all (first part).
+ */
+-static int pci_default_pm_resume(struct pci_dev *pci_dev)
++static void pci_default_pm_resume_early(struct pci_dev *pci_dev)
+ {
+- int retval = 0;
+-
+ /* restore the PCI config space */
+ pci_restore_state(pci_dev);
++}
++
++/*
++ * Default "resume" method for devices that have no driver provided resume,
++ * or not even a driver at all (second part).
++ */
++static int pci_default_pm_resume_late(struct pci_dev *pci_dev)
++{
++ int retval;
++
+ /* if the device was enabled before suspend, reenable */
+ retval = pci_reenable_device(pci_dev);
+ /*
+@@ -371,10 +387,12 @@ static int pci_legacy_resume(struct devi
+ struct pci_dev * pci_dev = to_pci_dev(dev);
+ struct pci_driver * drv = pci_dev->driver;
+
+- if (drv && drv->resume)
++ if (drv && drv->resume) {
+ error = drv->resume(pci_dev);
+- else
+- error = pci_default_pm_resume(pci_dev);
++ } else {
++ pci_default_pm_resume_early(pci_dev);
++ error = pci_default_pm_resume_late(pci_dev);
++ }
+ return error;
+ }
+
+@@ -420,10 +438,8 @@ static int pci_pm_suspend(struct device
+ if (drv->pm->suspend) {
+ error = drv->pm->suspend(dev);
+ suspend_report_result(drv->pm->suspend, error);
+- } else {
+- pci_default_pm_suspend(pci_dev);
+ }
+- } else {
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ error = pci_legacy_suspend(dev, PMSG_SUSPEND);
+ }
+ pci_fixup_device(pci_fixup_suspend, pci_dev);
+@@ -433,6 +449,7 @@ static int pci_pm_suspend(struct device
+
+ static int pci_pm_suspend_noirq(struct device *dev)
+ {
++ struct pci_dev *pci_dev = to_pci_dev(dev);
+ struct device_driver *drv = dev->driver;
+ int error = 0;
+
+@@ -441,8 +458,10 @@ static int pci_pm_suspend_noirq(struct d
+ error = drv->pm->suspend_noirq(dev);
+ suspend_report_result(drv->pm->suspend_noirq, error);
+ }
+- } else {
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ error = pci_legacy_suspend_late(dev, PMSG_SUSPEND);
++ } else {
++ pci_default_pm_suspend(pci_dev);
+ }
+
+ return error;
+@@ -452,15 +471,17 @@ static int pci_pm_resume(struct device *
+ {
+ struct pci_dev *pci_dev = to_pci_dev(dev);
+ struct device_driver *drv = dev->driver;
+- int error;
++ int error = 0;
+
+ pci_fixup_device(pci_fixup_resume, pci_dev);
+
+ if (drv && drv->pm) {
+- error = drv->pm->resume ? drv->pm->resume(dev) :
+- pci_default_pm_resume(pci_dev);
+- } else {
++ if (drv->pm->resume)
++ error = drv->pm->resume(dev);
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ error = pci_legacy_resume(dev);
++ } else {
++ error = pci_default_pm_resume_late(pci_dev);
+ }
+
+ return error;
+@@ -468,6 +489,7 @@ static int pci_pm_resume(struct device *
+
+ static int pci_pm_resume_noirq(struct device *dev)
+ {
++ struct pci_dev *pci_dev = to_pci_dev(dev);
+ struct device_driver *drv = dev->driver;
+ int error = 0;
+
+@@ -476,8 +498,10 @@ static int pci_pm_resume_noirq(struct de
+ if (drv && drv->pm) {
+ if (drv->pm->resume_noirq)
+ error = drv->pm->resume_noirq(dev);
+- } else {
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ error = pci_legacy_resume_early(dev);
++ } else {
++ pci_default_pm_resume_early(pci_dev);
+ }
+
+ return error;
+@@ -504,10 +528,8 @@ static int pci_pm_freeze(struct device *
+ if (drv->pm->freeze) {
+ error = drv->pm->freeze(dev);
+ suspend_report_result(drv->pm->freeze, error);
+- } else {
+- pci_default_pm_suspend(pci_dev);
+ }
+- } else {
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ error = pci_legacy_suspend(dev, PMSG_FREEZE);
+ pci_fixup_device(pci_fixup_suspend, pci_dev);
+ }
+@@ -517,6 +539,7 @@ static int pci_pm_freeze(struct device *
+
+ static int pci_pm_freeze_noirq(struct device *dev)
+ {
++ struct pci_dev *pci_dev = to_pci_dev(dev);
+ struct device_driver *drv = dev->driver;
+ int error = 0;
+
+@@ -525,8 +548,10 @@ static int pci_pm_freeze_noirq(struct de
+ error = drv->pm->freeze_noirq(dev);
+ suspend_report_result(drv->pm->freeze_noirq, error);
+ }
+- } else {
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ error = pci_legacy_suspend_late(dev, PMSG_FREEZE);
++ } else {
++ pci_default_pm_suspend(pci_dev);
+ }
+
+ return error;
+@@ -534,14 +559,15 @@ static int pci_pm_freeze_noirq(struct de
+
+ static int pci_pm_thaw(struct device *dev)
+ {
++ struct pci_dev *pci_dev = to_pci_dev(dev);
+ struct device_driver *drv = dev->driver;
+ int error = 0;
+
+ if (drv && drv->pm) {
+ if (drv->pm->thaw)
+ error = drv->pm->thaw(dev);
+- } else {
+- pci_fixup_device(pci_fixup_resume, to_pci_dev(dev));
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
++ pci_fixup_device(pci_fixup_resume, pci_dev);
+ error = pci_legacy_resume(dev);
+ }
+
+@@ -550,13 +576,14 @@ static int pci_pm_thaw(struct device *de
+
+ static int pci_pm_thaw_noirq(struct device *dev)
+ {
++ struct pci_dev *pci_dev = to_pci_dev(dev);
+ struct device_driver *drv = dev->driver;
+ int error = 0;
+
+ if (drv && drv->pm) {
+ if (drv->pm->thaw_noirq)
+ error = drv->pm->thaw_noirq(dev);
+- } else {
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ pci_fixup_device(pci_fixup_resume_early, to_pci_dev(dev));
+ error = pci_legacy_resume_early(dev);
+ }
+@@ -566,17 +593,18 @@ static int pci_pm_thaw_noirq(struct devi
+
+ static int pci_pm_poweroff(struct device *dev)
+ {
++ struct pci_dev *pci_dev = to_pci_dev(dev);
+ struct device_driver *drv = dev->driver;
+ int error = 0;
+
+- pci_fixup_device(pci_fixup_suspend, to_pci_dev(dev));
++ pci_fixup_device(pci_fixup_suspend, pci_dev);
+
+ if (drv && drv->pm) {
+ if (drv->pm->poweroff) {
+ error = drv->pm->poweroff(dev);
+ suspend_report_result(drv->pm->poweroff, error);
+ }
+- } else {
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ error = pci_legacy_suspend(dev, PMSG_HIBERNATE);
+ }
+
+@@ -593,7 +621,7 @@ static int pci_pm_poweroff_noirq(struct
+ error = drv->pm->poweroff_noirq(dev);
+ suspend_report_result(drv->pm->poweroff_noirq, error);
+ }
+- } else {
++ } else if (pci_has_legacy_pm_support(to_pci_dev(dev))) {
+ error = pci_legacy_suspend_late(dev, PMSG_HIBERNATE);
+ }
+
+@@ -604,13 +632,15 @@ static int pci_pm_restore(struct device
+ {
+ struct pci_dev *pci_dev = to_pci_dev(dev);
+ struct device_driver *drv = dev->driver;
+- int error;
++ int error = 0;
+
+ if (drv && drv->pm) {
+- error = drv->pm->restore ? drv->pm->restore(dev) :
+- pci_default_pm_resume(pci_dev);
+- } else {
++ if (drv->pm->restore)
++ error = drv->pm->restore(dev);
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ error = pci_legacy_resume(dev);
++ } else {
++ error = pci_default_pm_resume_late(pci_dev);
+ }
+ pci_fixup_device(pci_fixup_resume, pci_dev);
+
+@@ -628,8 +658,10 @@ static int pci_pm_restore_noirq(struct d
+ if (drv && drv->pm) {
+ if (drv->pm->restore_noirq)
+ error = drv->pm->restore_noirq(dev);
+- } else {
++ } else if (pci_has_legacy_pm_support(pci_dev)) {
+ error = pci_legacy_resume_early(dev);
++ } else {
++ pci_default_pm_resume_early(pci_dev);
+ }
+ pci_fixup_device(pci_fixup_resume_early, pci_dev);
+
diff --git a/driver-core/uio-documentation-for-uio-ioport-info-handling.patch b/driver-core/uio-documentation-for-uio-ioport-info-handling.patch
new file mode 100644
index 00000000000000..b50e7564c3710e
--- /dev/null
+++ b/driver-core/uio-documentation-for-uio-ioport-info-handling.patch
@@ -0,0 +1,146 @@
+From hjk@linutronix.de Tue Dec 9 20:34:03 2008
+From: "Hans J. Koch" <hjk@linutronix.de>
+Date: Sat, 6 Dec 2008 02:25:13 +0100
+Subject: UIO: Documentation for UIO ioport info handling
+Cc: gregkh@suse.de, Mike Frysinger <vapier@gentoo.org>, John Ogness <jogness@linutronix.de>, Benedikt Spranger <b.spranger@linutronix.de>
+Message-ID: <20081206012513.GC3081@local>
+Content-Disposition: inline
+
+
+This patch updates UIO documentation with the changes introduced by
+previous UIO patch.
+
+Signed-off-by: Hans J. Koch <hjk@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/DocBook/uio-howto.tmpl | 97 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 97 insertions(+)
+
+--- a/Documentation/DocBook/uio-howto.tmpl
++++ b/Documentation/DocBook/uio-howto.tmpl
+@@ -42,6 +42,12 @@ GPL version 2.
+
+ <revhistory>
+ <revision>
++ <revnumber>0.6</revnumber>
++ <date>2008-12-05</date>
++ <authorinitials>hjk</authorinitials>
++ <revremark>Added description of portio sysfs attributes.</revremark>
++ </revision>
++ <revision>
+ <revnumber>0.5</revnumber>
+ <date>2008-05-22</date>
+ <authorinitials>hjk</authorinitials>
+@@ -318,6 +324,54 @@ interested in translating it, please ema
+ offset = N * getpagesize();
+ </programlisting>
+
++<para>
++ Sometimes there is hardware with memory-like regions that can not be
++ mapped with the technique described here, but there are still ways to
++ access them from userspace. The most common example are x86 ioports.
++ On x86 systems, userspace can access these ioports using
++ <function>ioperm()</function>, <function>iopl()</function>,
++ <function>inb()</function>, <function>outb()</function>, and similar
++ functions.
++</para>
++<para>
++ Since these ioport regions can not be mapped, they will not appear under
++ <filename>/sys/class/uio/uioX/maps/</filename> like the normal memory
++ described above. Without information about the port regions a hardware
++ has to offer, it becomes difficult for the userspace part of the
++ driver to find out which ports belong to which UIO device.
++</para>
++<para>
++ To address this situation, the new directory
++ <filename>/sys/class/uio/uioX/portio/</filename> was added. It only
++ exists if the driver wants to pass information about one or more port
++ regions to userspace. If that is the case, subdirectories named
++ <filename>port0</filename>, <filename>port1</filename>, and so on,
++ will appear underneath
++ <filename>/sys/class/uio/uioX/portio/</filename>.
++</para>
++<para>
++ Each <filename>portX/</filename> directory contains three read-only
++ files that show start, size, and type of the port region:
++</para>
++<itemizedlist>
++<listitem>
++ <para>
++ <filename>start</filename>: The first port of this region.
++ </para>
++</listitem>
++<listitem>
++ <para>
++ <filename>size</filename>: The number of ports in this region.
++ </para>
++</listitem>
++<listitem>
++ <para>
++ <filename>porttype</filename>: A string describing the type of port.
++ </para>
++</listitem>
++</itemizedlist>
++
++
+ </sect1>
+ </chapter>
+
+@@ -356,6 +410,13 @@ See the description below for details.
+ </para></listitem>
+
+ <listitem><para>
++<varname>struct uio_port port[ MAX_UIO_PORTS_REGIONS ]</varname>: Required
++if you want to pass information about ioports to userspace. For each port
++region you need to fill one of the <varname>uio_port</varname> structures.
++See the description below for details.
++</para></listitem>
++
++<listitem><para>
+ <varname>long irq</varname>: Required. If your hardware generates an
+ interrupt, it's your modules task to determine the irq number during
+ initialization. If you don't have a hardware generated interrupt but
+@@ -448,6 +509,42 @@ Please do not touch the <varname>kobj</v
+ <varname>struct uio_mem</varname>! It is used by the UIO framework
+ to set up sysfs files for this mapping. Simply leave it alone.
+ </para>
++
++<para>
++Sometimes, your device can have one or more port regions which can not be
++mapped to userspace. But if there are other possibilities for userspace to
++access these ports, it makes sense to make information about the ports
++available in sysfs. For each region, you have to set up a
++<varname>struct uio_port</varname> in the <varname>port[]</varname> array.
++Here's a description of the fields of <varname>struct uio_port</varname>:
++</para>
++
++<itemizedlist>
++<listitem><para>
++<varname>char *porttype</varname>: Required. Set this to one of the predefined
++constants. Use <varname>UIO_PORT_X86</varname> for the ioports found in x86
++architectures.
++</para></listitem>
++
++<listitem><para>
++<varname>unsigned long start</varname>: Required if the port region is used.
++Fill in the number of the first port of this region.
++</para></listitem>
++
++<listitem><para>
++<varname>unsigned long size</varname>: Fill in the number of ports in this
++region. If <varname>size</varname> is zero, the region is considered unused.
++Note that you <emphasis>must</emphasis> initialize <varname>size</varname>
++with zero for all unused regions.
++</para></listitem>
++</itemizedlist>
++
++<para>
++Please do not touch the <varname>portio</varname> element of
++<varname>struct uio_port</varname>! It is used internally by the UIO
++framework to set up sysfs files for this region. Simply leave it alone.
++</para>
++
+ </sect1>
+
+ <sect1 id="adding_irq_handler">
diff --git a/driver-core/uio-pass-information-about-ioports-to-userspace.patch b/driver-core/uio-pass-information-about-ioports-to-userspace.patch
new file mode 100644
index 00000000000000..526c9a2d027af9
--- /dev/null
+++ b/driver-core/uio-pass-information-about-ioports-to-userspace.patch
@@ -0,0 +1,350 @@
+From hjk@linutronix.de Tue Dec 9 20:33:38 2008
+From: "Hans J. Koch" <hjk@linutronix.de>
+Date: Sat, 6 Dec 2008 02:23:13 +0100
+Subject: UIO: Pass information about ioports to userspace (V2)
+To: linux-kernel@vger.kernel.org
+Cc: gregkh@suse.de, Mike Frysinger <vapier@gentoo.org>, John Ogness <jogness@linutronix.de>, Benedikt Spranger <b.spranger@linutronix.de>, "Hans J. Koch" <hjk@linutronix.de>
+Message-ID: <20081206012313.GB3081@local>
+Content-Disposition: inline
+
+From: "Hans J. Koch" <hjk@linutronix.de>
+
+Devices sometimes have memory where all or parts of it can not be mapped to
+userspace. But it might still be possible to access this memory from
+userspace by other means. An example are PCI cards that advertise not only
+mappable memory but also ioport ranges. On x86 architectures, these can be
+accessed with ioperm, iopl, inb, outb, and friends. Mike Frysinger (CCed)
+reported a similar problem on Blackfin arch where it doesn't seem to be easy
+to mmap non-cached memory but it can still be accessed from userspace.
+
+This patch allows kernel drivers to pass information about such ports to
+userspace. Similar to the existing mem[] array, it adds a port[] array to
+struct uio_info. Each port range is described by start, size, and porttype.
+
+If a driver fills in at least one such port range, the UIO core will simply
+pass this information to userspace by creating a new directory "portio"
+underneath /sys/class/uio/uioN/. Similar to the "mem" directory, it will
+contain a subdirectory (portX) for each port range given.
+
+Note that UIO simply passes this information to userspace, it performs no
+action whatsoever with this data. It's userspace's responsibility to obtain
+access to these ports and to solve arch dependent issues. The "porttype"
+attribute tells userspace what kind of port it is dealing with.
+
+This mechanism could also be used to give userspace information about GPIOs
+related to a device. You frequently find such hardware in embedded devices,
+so I added a UIO_PORT_GPIO definition. I'm not really sure if this is a good
+idea since there are other solutions to this problem, but it won't hurt much
+anyway.
+
+Signed-off-by: Hans J. Koch <hjk@linutronix.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/uio/uio.c | 159 ++++++++++++++++++++++++++++++++++++++++-----
+ include/linux/uio_driver.h | 26 +++++++
+ 2 files changed, 168 insertions(+), 17 deletions(-)
+
+--- a/drivers/uio/uio.c
++++ b/drivers/uio/uio.c
+@@ -35,6 +35,7 @@ struct uio_device {
+ int vma_count;
+ struct uio_info *info;
+ struct kobject *map_dir;
++ struct kobject *portio_dir;
+ };
+
+ static int uio_major;
+@@ -75,17 +76,17 @@ static ssize_t map_offset_show(struct ui
+ return sprintf(buf, "0x%lx\n", mem->addr & ~PAGE_MASK);
+ }
+
+-struct uio_sysfs_entry {
++struct map_sysfs_entry {
+ struct attribute attr;
+ ssize_t (*show)(struct uio_mem *, char *);
+ ssize_t (*store)(struct uio_mem *, const char *, size_t);
+ };
+
+-static struct uio_sysfs_entry addr_attribute =
++static struct map_sysfs_entry addr_attribute =
+ __ATTR(addr, S_IRUGO, map_addr_show, NULL);
+-static struct uio_sysfs_entry size_attribute =
++static struct map_sysfs_entry size_attribute =
+ __ATTR(size, S_IRUGO, map_size_show, NULL);
+-static struct uio_sysfs_entry offset_attribute =
++static struct map_sysfs_entry offset_attribute =
+ __ATTR(offset, S_IRUGO, map_offset_show, NULL);
+
+ static struct attribute *attrs[] = {
+@@ -106,9 +107,9 @@ static ssize_t map_type_show(struct kobj
+ {
+ struct uio_map *map = to_map(kobj);
+ struct uio_mem *mem = map->mem;
+- struct uio_sysfs_entry *entry;
++ struct map_sysfs_entry *entry;
+
+- entry = container_of(attr, struct uio_sysfs_entry, attr);
++ entry = container_of(attr, struct map_sysfs_entry, attr);
+
+ if (!entry->show)
+ return -EIO;
+@@ -116,16 +117,93 @@ static ssize_t map_type_show(struct kobj
+ return entry->show(mem, buf);
+ }
+
+-static struct sysfs_ops uio_sysfs_ops = {
++static struct sysfs_ops map_sysfs_ops = {
+ .show = map_type_show,
+ };
+
+ static struct kobj_type map_attr_type = {
+ .release = map_release,
+- .sysfs_ops = &uio_sysfs_ops,
++ .sysfs_ops = &map_sysfs_ops,
+ .default_attrs = attrs,
+ };
+
++struct uio_portio {
++ struct kobject kobj;
++ struct uio_port *port;
++};
++#define to_portio(portio) container_of(portio, struct uio_portio, kobj)
++
++static ssize_t portio_start_show(struct uio_port *port, char *buf)
++{
++ return sprintf(buf, "0x%lx\n", port->start);
++}
++
++static ssize_t portio_size_show(struct uio_port *port, char *buf)
++{
++ return sprintf(buf, "0x%lx\n", port->size);
++}
++
++static ssize_t portio_porttype_show(struct uio_port *port, char *buf)
++{
++ const char *porttypes[] = {"none", "x86", "gpio", "other"};
++
++ if ((port->porttype < 0) || (port->porttype > UIO_PORT_OTHER))
++ return -EINVAL;
++
++ return sprintf(buf, "port_%s\n", porttypes[port->porttype]);
++}
++
++struct portio_sysfs_entry {
++ struct attribute attr;
++ ssize_t (*show)(struct uio_port *, char *);
++ ssize_t (*store)(struct uio_port *, const char *, size_t);
++};
++
++static struct portio_sysfs_entry portio_start_attribute =
++ __ATTR(start, S_IRUGO, portio_start_show, NULL);
++static struct portio_sysfs_entry portio_size_attribute =
++ __ATTR(size, S_IRUGO, portio_size_show, NULL);
++static struct portio_sysfs_entry portio_porttype_attribute =
++ __ATTR(porttype, S_IRUGO, portio_porttype_show, NULL);
++
++static struct attribute *portio_attrs[] = {
++ &portio_start_attribute.attr,
++ &portio_size_attribute.attr,
++ &portio_porttype_attribute.attr,
++ NULL,
++};
++
++static void portio_release(struct kobject *kobj)
++{
++ struct uio_portio *portio = to_portio(kobj);
++ kfree(portio);
++}
++
++static ssize_t portio_type_show(struct kobject *kobj, struct attribute *attr,
++ char *buf)
++{
++ struct uio_portio *portio = to_portio(kobj);
++ struct uio_port *port = portio->port;
++ struct portio_sysfs_entry *entry;
++
++ entry = container_of(attr, struct portio_sysfs_entry, attr);
++
++ if (!entry->show)
++ return -EIO;
++
++ return entry->show(port, buf);
++}
++
++static struct sysfs_ops portio_sysfs_ops = {
++ .show = portio_type_show,
++};
++
++static struct kobj_type portio_attr_type = {
++ .release = portio_release,
++ .sysfs_ops = &portio_sysfs_ops,
++ .default_attrs = portio_attrs,
++};
++
+ static ssize_t show_name(struct device *dev,
+ struct device_attribute *attr, char *buf)
+ {
+@@ -177,10 +255,13 @@ static struct attribute_group uio_attr_g
+ static int uio_dev_add_attributes(struct uio_device *idev)
+ {
+ int ret;
+- int mi;
++ int mi, pi;
+ int map_found = 0;
++ int portio_found = 0;
+ struct uio_mem *mem;
+ struct uio_map *map;
++ struct uio_port *port;
++ struct uio_portio *portio;
+
+ ret = sysfs_create_group(&idev->dev->kobj, &uio_attr_grp);
+ if (ret)
+@@ -195,25 +276,58 @@ static int uio_dev_add_attributes(struct
+ idev->map_dir = kobject_create_and_add("maps",
+ &idev->dev->kobj);
+ if (!idev->map_dir)
+- goto err;
++ goto err_map;
+ }
+ map = kzalloc(sizeof(*map), GFP_KERNEL);
+ if (!map)
+- goto err;
++ goto err_map;
+ kobject_init(&map->kobj, &map_attr_type);
+ map->mem = mem;
+ mem->map = map;
+ ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi);
+ if (ret)
+- goto err;
++ goto err_map;
+ ret = kobject_uevent(&map->kobj, KOBJ_ADD);
+ if (ret)
+- goto err;
++ goto err_map;
++ }
++
++ for (pi = 0; pi < MAX_UIO_PORT_REGIONS; pi++) {
++ port = &idev->info->port[pi];
++ if (port->size == 0)
++ break;
++ if (!portio_found) {
++ portio_found = 1;
++ idev->portio_dir = kobject_create_and_add("portio",
++ &idev->dev->kobj);
++ if (!idev->portio_dir)
++ goto err_portio;
++ }
++ portio = kzalloc(sizeof(*portio), GFP_KERNEL);
++ if (!portio)
++ goto err_portio;
++ kobject_init(&portio->kobj, &portio_attr_type);
++ portio->port = port;
++ port->portio = portio;
++ ret = kobject_add(&portio->kobj, idev->portio_dir,
++ "port%d", pi);
++ if (ret)
++ goto err_portio;
++ ret = kobject_uevent(&portio->kobj, KOBJ_ADD);
++ if (ret)
++ goto err_portio;
+ }
+
+ return 0;
+
+-err:
++err_portio:
++ for (pi--; pi >= 0; pi--) {
++ port = &idev->info->port[pi];
++ portio = port->portio;
++ kobject_put(&portio->kobj);
++ }
++ kobject_put(idev->portio_dir);
++err_map:
+ for (mi--; mi>=0; mi--) {
+ mem = &idev->info->mem[mi];
+ map = mem->map;
+@@ -228,15 +342,26 @@ err_group:
+
+ static void uio_dev_del_attributes(struct uio_device *idev)
+ {
+- int mi;
++ int i;
+ struct uio_mem *mem;
+- for (mi = 0; mi < MAX_UIO_MAPS; mi++) {
+- mem = &idev->info->mem[mi];
++ struct uio_port *port;
++
++ for (i = 0; i < MAX_UIO_MAPS; i++) {
++ mem = &idev->info->mem[i];
+ if (mem->size == 0)
+ break;
+ kobject_put(&mem->map->kobj);
+ }
+ kobject_put(idev->map_dir);
++
++ for (i = 0; i < MAX_UIO_PORT_REGIONS; i++) {
++ port = &idev->info->port[i];
++ if (port->size == 0)
++ break;
++ kobject_put(&port->portio->kobj);
++ }
++ kobject_put(idev->portio_dir);
++
+ sysfs_remove_group(&idev->dev->kobj, &uio_attr_grp);
+ }
+
+--- a/include/linux/uio_driver.h
++++ b/include/linux/uio_driver.h
+@@ -38,6 +38,24 @@ struct uio_mem {
+
+ #define MAX_UIO_MAPS 5
+
++struct uio_portio;
++
++/**
++ * struct uio_port - description of a UIO port region
++ * @start: start of port region
++ * @size: size of port region
++ * @porttype: type of port (see UIO_PORT_* below)
++ * @portio: for use by the UIO core only.
++ */
++struct uio_port {
++ unsigned long start;
++ unsigned long size;
++ int porttype;
++ struct uio_portio *portio;
++};
++
++#define MAX_UIO_PORT_REGIONS 5
++
+ struct uio_device;
+
+ /**
+@@ -46,6 +64,7 @@ struct uio_device;
+ * @name: device name
+ * @version: device driver version
+ * @mem: list of mappable memory regions, size==0 for end of list
++ * @port: list of port regions, size==0 for end of list
+ * @irq: interrupt number or UIO_IRQ_CUSTOM
+ * @irq_flags: flags for request_irq()
+ * @priv: optional private data
+@@ -60,6 +79,7 @@ struct uio_info {
+ char *name;
+ char *version;
+ struct uio_mem mem[MAX_UIO_MAPS];
++ struct uio_port port[MAX_UIO_PORT_REGIONS];
+ long irq;
+ unsigned long irq_flags;
+ void *priv;
+@@ -92,4 +112,10 @@ extern void uio_event_notify(struct uio_
+ #define UIO_MEM_LOGICAL 2
+ #define UIO_MEM_VIRTUAL 3
+
++/* defines for uio_port->porttype */
++#define UIO_PORT_NONE 0
++#define UIO_PORT_X86 1
++#define UIO_PORT_GPIO 2
++#define UIO_PORT_OTHER 3
++
+ #endif /* _LINUX_UIO_DRIVER_H_ */
diff --git a/series b/series
index e274b385da6acd..f15ed704421b1d 100644
--- a/series
+++ b/series
@@ -12,11 +12,21 @@ gregkh.pre/detect-atomic-counter-underflows.patch
# Driver core patches for 2.6.28
#################################
driver-core.current/driver-core-fix-using-ret-variable-in-unregister_dynamic_debug_module.patch
+driver-core.current/xilinx_hwicap-remove-improper-wording-in-license-statement.patch
+driver-core.current/driver-core-add-newlines-to-debugging-enabled-disabled-messages.patch
+driver-core.current/pktcdvd-remove-broken-dev_t-export-of-class-devices.patch
#################################
# USB patches for 2.6.28
#################################
usb.current/usb-fix-problem-with-usbtmc-driver-not-loading-properly.patch
+usb.current/usb-storage-unusual_devs.h-nokia-3109c-addition.patch
+usb.current/usb-unusual-devs-patch-for-nokia-3500c.patch
+usb.current/usb-storage-update-unusual_devs-entry-for-nokia-5310.patch
+usb.current/tty-sprogii-dcc-controller-identifiers.patch
+usb.current/usb-ftdi_sio-adding-ewert-energy-system-s-candapter-pid.patch
+usb.current/usb-gadget-fix-rndis-working-at-high-speed.patch
+
#####################################################################
# Stuff to be merged after 2.6.28 is out
@@ -39,7 +49,8 @@ driver-core/sysfs-clarify-sysfs_deprecated-help-text.patch
driver-core/uevent-don-t-pass-envp_ext-as-format-string-in-kobject_uevent_env.patch
driver-core/kobject-return-the-result-of-uevent-sending-by-netlink.patch
driver-core/kernel-ksysfs.c-fix-dependence-on-config_net.patch
-driver-core/char_dev-add-cdev-release-and-convert-cdev_alloc-to-use-it.patch
+driver-core/pci-rework-default-handling-of-suspend-and-resume.patch
+driver-core/kobject-make-documentation-kobject.txt-a-little-more-coherent.patch
driver-core/bus_id-xen.patch
driver-core/bus_id-w1.patch
@@ -80,6 +91,8 @@ driver-core/bus_id-arm.patch
driver-core/uio-use-pci_ioremap_bar-in-drivers-uio.patch
driver-core/uio-uio_pdrv_genirq-allow-custom-irq_flags.patch
+driver-core/uio-pass-information-about-ioports-to-userspace.patch
+driver-core/uio-documentation-for-uio-ioport-info-handling.patch
# helper tools, not for mainline.
driver-core/warn-when-statically-allocated-kobjects-are-used.patch
@@ -139,6 +152,13 @@ usb/usb-otg-add-otg_put_transceiver.patch
usb/usb-otg-sharable-otg-transceiver-ops.patch
usb/usb-utilize-round_jiffies_up_relative.patch
usb/usb-enhance-usage-of-pm_message_t.patch
+usb/usb-serial-usb_debug-make-static.patch
+usb/usb-gadget-don-t-wait-for-completion-twice.patch
+usb/usbmon-drop-bogus-0t-from-usbmon.txt.patch
+usb/usb-documentation-usb-gadget_serial.txt-update-to-match-driver-use_acm-behaviour.patch
+usb/usb-fix-comment-about-endianness-of-descriptors.patch
+usb/usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch
+usb/usb-isp1760-fix-probe-in-pci-glue-code.patch
usb/usb-add-imx-udc-gadget-driver.patch
usb/usb-add-new-opticon-serial-driver.patch
@@ -276,6 +296,7 @@ staging/staging-agnx-fix-build-warnings.patch
staging/staging-add-otus-atheros-wireless-network-driver.patch
staging/staging-otus-fix-name-clash.patch
staging/staging-otus-fix-urb-callback-function-type.patch
+staging/staging-otus-remove-dependence-on-kernel-version.patch
staging/staging-add-rt2860-wireless-driver.patch
staging/staging-rt2860-use-standard-bit-reverse-function.patch
@@ -289,6 +310,7 @@ staging/staging-benet-fix-build-errors-when-config_netpoll-is-off.patch
staging/staging-benet-fix-build-error.patch
staging/staging-benet-patch-to-use-offsetof-instead-of-amap_byte_offset.patch
staging/staging-benet-fix-problems-reported-by-checkpatch.patch
+staging/staging-benet-cleanup-a-check-while-posting-rx-buffers.patch
staging/staging-add-comedi-core.patch
staging/staging-comedi-fix-up-a-lot-of-checkpatch.pl-warnings.patch
@@ -363,6 +385,8 @@ staging/staging-rtl8187se-remove-unneeded-files.patch
staging/staging-rtl8187se-make-the-built-module-be-the-proper-name.patch
staging/staging-rtl8187se-remove-duplicate-pci-ids.patch
+staging/staging-me4000-switch-to-list_for_each.patch
+staging/staging-usbip-switch-to-list_for_each_entry.patch
# can not even compile :(
#staging/usb-add-princeton-instruments-usb-camera-driver.patch
diff --git a/staging/staging-benet-cleanup-a-check-while-posting-rx-buffers.patch b/staging/staging-benet-cleanup-a-check-while-posting-rx-buffers.patch
new file mode 100644
index 00000000000000..b2465793eb812b
--- /dev/null
+++ b/staging/staging-benet-cleanup-a-check-while-posting-rx-buffers.patch
@@ -0,0 +1,50 @@
+From sathyap@serverengines.com Tue Dec 9 20:35:12 2008
+From: Sathya Perla <sathyap@serverengines.com>
+Date: Fri, 05 Dec 2008 15:52:15 +0530
+Subject: Staging: benet: cleanup a check while posting rx buffers
+To: Greg KH <greg@kroah.com>
+Cc: "J.R. Mauro" <jrm8005@gmail.com>, subbu <subbus@serverengines.com>, Greg KH <gregkh@suse.de>
+Message-ID: <1228472535.24037.7.camel@sperla-laptop>
+
+From: Sathya Perla <sathyap@serverengines.com>
+
+This patch cleans up the way to check if there is enough space in the rx_q
+while posting buffers.
+
+Signed-off-by: Sathya Perla <sathyap@serverengines.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/benet/be_int.c | 15 ++-------------
+ 1 file changed, 2 insertions(+), 13 deletions(-)
+
+--- a/drivers/staging/benet/be_int.c
++++ b/drivers/staging/benet/be_int.c
+@@ -623,25 +623,14 @@ void be_post_eth_rx_buffs(struct be_net_
+ */
+ INIT_LIST_HEAD(&rxbl);
+
+- for (num_bufs = 0; num_bufs < max_bufs; ++num_bufs) {
++ for (num_bufs = 0; num_bufs < max_bufs &&
++ !pnob->rx_page_info[pnob->rx_pg_info_hd].page; ++num_bufs) {
+
+ rxbp = &pnob->eth_rx_bufs[num_bufs];
+ pg_hd = pnob->rx_pg_info_hd;
+ rx_page_info = &pnob->rx_page_info[pg_hd];
+
+ if (!page) {
+- /*
+- * before we allocate a page make sure that we
+- * have space in the RX queue to post the buffer.
+- * We check for two vacant slots since with
+- * 2K frags, we will need two slots.
+- */
+- if ((pnob->rx_ctxt[(pnob->rx_q_hd + num_bufs) &
+- (pnob->rx_q_len - 1)] != NULL)
+- || (pnob->rx_ctxt[(pnob->rx_q_hd + num_bufs + 1) %
+- pnob->rx_q_len] != NULL)) {
+- break;
+- }
+ page = alloc_pages(alloc_flags, page_order);
+ if (unlikely(page == NULL)) {
+ adapter->be_stat.bes_ethrx_post_fail++;
diff --git a/staging/staging-me4000-switch-to-list_for_each.patch b/staging/staging-me4000-switch-to-list_for_each.patch
new file mode 100644
index 00000000000000..b1212b2d2a3884
--- /dev/null
+++ b/staging/staging-me4000-switch-to-list_for_each.patch
@@ -0,0 +1,260 @@
+From a.beregalov@gmail.com Tue Dec 9 20:30:57 2008
+From: Alexander Beregalov <a.beregalov@gmail.com>
+Date: Sun, 7 Dec 2008 05:31:19 +0300
+Subject: Staging: me4000: switch to list_for_each*()
+To: gregkh@suse.de, adobriyan@gmail.com, linux-kernel@vger.kernel.org
+Message-ID: <20081207023119.GA21294@orion>
+
+From: Alexander Beregalov <a.beregalov@gmail.com>
+
+Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/me4000/me4000.c | 97 ++++++++++++++++------------------------
+ 1 file changed, 39 insertions(+), 58 deletions(-)
+
+--- a/drivers/staging/me4000/me4000.c
++++ b/drivers/staging/me4000/me4000.c
+@@ -536,25 +536,19 @@ module_init(me4000_init_module);
+
+ static void clear_board_info_list(void)
+ {
+- struct list_head *board_p;
+- struct list_head *dac_p;
+- struct me4000_info *board_info;
+- struct me4000_ao_context *ao_context;
++ struct me4000_info *board_info, *board_info_safe;
++ struct me4000_ao_context *ao_context, *ao_context_safe;
+
+ /* Clear context lists */
+- for (board_p = me4000_board_info_list.next;
+- board_p != &me4000_board_info_list; board_p = board_p->next) {
+- board_info = list_entry(board_p, struct me4000_info, list);
++ list_for_each_entry(board_info, &me4000_board_info_list, list) {
+ /* Clear analog output context list */
+- while (!list_empty(&board_info->ao_context_list)) {
+- dac_p = board_info->ao_context_list.next;
+- ao_context =
+- list_entry(dac_p, struct me4000_ao_context, list);
++ list_for_each_entry_safe(ao_context, ao_context_safe,
++ &board_info->ao_context_list, list) {
+ me4000_ao_reset(ao_context);
+ free_irq(ao_context->irq, ao_context);
+ if (ao_context->circ_buf.buf)
+ kfree(ao_context->circ_buf.buf);
+- list_del(dac_p);
++ list_del(&ao_context->list);
+ kfree(ao_context);
+ }
+
+@@ -574,11 +568,10 @@ static void clear_board_info_list(void)
+ }
+
+ /* Clear the board info list */
+- while (!list_empty(&me4000_board_info_list)) {
+- board_p = me4000_board_info_list.next;
+- board_info = list_entry(board_p, struct me4000_info, list);
++ list_for_each_entry_safe(board_info, board_info_safe,
++ &me4000_board_info_list, list) {
+ pci_release_regions(board_info->pci_dev_p);
+- list_del(board_p);
++ list_del(&board_info->list);
+ kfree(board_info);
+ }
+ }
+@@ -663,16 +656,17 @@ static int init_board_info(struct pci_de
+ }
+
+ /* Get the index of the board in the global list */
+- for (board_p = me4000_board_info_list.next, i = 0;
+- board_p != &me4000_board_info_list; board_p = board_p->next, i++) {
++ i = 0;
++ list_for_each(board_p, &me4000_board_info_list) {
+ if (board_p == &board_info->list) {
+ board_info->board_count = i;
+ break;
+ }
++ i++;
+ }
+ if (board_p == &me4000_board_info_list) {
+ printk(KERN_ERR
+- "ME4000:init_board_info():Cannot get index of baord\n");
++ "ME4000:init_board_info():Cannot get index of board\n");
+ return -ENODEV;
+ }
+
+@@ -863,16 +857,14 @@ static int alloc_ao_contexts(struct me40
+
+ static void release_ao_contexts(struct me4000_info *board_info)
+ {
+- struct list_head *dac_p;
+- struct me4000_ao_context *ao_context;
++ struct me4000_ao_context *ao_context, *ao_context_safe;
+
+ /* Clear analog output context list */
+- while (!list_empty(&board_info->ao_context_list)) {
+- dac_p = board_info->ao_context_list.next;
+- ao_context = list_entry(dac_p, struct me4000_ao_context, list);
++ list_for_each_entry_safe(ao_context, ao_context_safe,
++ &board_info->ao_context_list, list) {
+ free_irq(ao_context->irq, ao_context);
+ kfree(ao_context->circ_buf.buf);
+- list_del(dac_p);
++ list_del(&ao_context->list);
+ kfree(ao_context);
+ }
+ }
+@@ -1303,12 +1295,13 @@ static int me4000_open(struct inode *ino
+ dev, mode);
+
+ /* Search for the board context */
+- for (ptr = me4000_board_info_list.next, i = 0;
+- ptr != &me4000_board_info_list; ptr = ptr->next, i++) {
+- board_info = list_entry(ptr, struct me4000_info, list);
++ i = 0;
++ list_for_each(ptr, &me4000_board_info_list) {
+ if (i == board)
+ break;
++ i++;
+ }
++ board_info = list_entry(ptr, struct me4000_info, list);
+
+ if (ptr == &me4000_board_info_list) {
+ printk(KERN_ERR
+@@ -1318,14 +1311,13 @@ static int me4000_open(struct inode *ino
+ }
+
+ /* Search for the dac context */
+- for (ptr = board_info->ao_context_list.next, i = 0;
+- ptr != &board_info->ao_context_list;
+- ptr = ptr->next, i++) {
+- ao_context = list_entry(ptr, struct me4000_ao_context,
+- list);
++ i = 0;
++ list_for_each(ptr, &board_info->ao_context_list) {
+ if (i == dev)
+ break;
++ i++;
+ }
++ ao_context = list_entry(ptr, struct me4000_ao_context, list);
+
+ if (ptr == &board_info->ao_context_list) {
+ printk(KERN_ERR
+@@ -1384,12 +1376,13 @@ static int me4000_open(struct inode *ino
+ PDEBUG("me4000_open():ai board = %d mode = %d\n", board, mode);
+
+ /* Search for the board context */
+- for (ptr = me4000_board_info_list.next, i = 0;
+- ptr != &me4000_board_info_list; ptr = ptr->next, i++) {
+- board_info = list_entry(ptr, struct me4000_info, list);
++ i = 0;
++ list_for_each(ptr, &me4000_board_info_list) {
+ if (i == board)
+ break;
++ i++;
+ }
++ board_info = list_entry(ptr, struct me4000_info, list);
+
+ if (ptr == &me4000_board_info_list) {
+ printk(KERN_ERR
+@@ -1438,14 +1431,12 @@ static int me4000_open(struct inode *ino
+ PDEBUG("me4000_open():board = %d\n", board);
+
+ /* Search for the board context */
+- for (ptr = me4000_board_info_list.next;
+- ptr != &me4000_board_info_list; ptr = ptr->next) {
+- board_info = list_entry(ptr, struct me4000_info, list);
++ list_for_each_entry(board_info, &me4000_board_info_list, list) {
+ if (board_info->board_count == board)
+ break;
+ }
+
+- if (ptr == &me4000_board_info_list) {
++ if (&board_info->list == &me4000_board_info_list) {
+ printk(KERN_ERR
+ "ME4000:me4000_open():Board %d not in device list\n",
+ board);
+@@ -1483,14 +1474,12 @@ static int me4000_open(struct inode *ino
+ PDEBUG("me4000_open():board = %d\n", board);
+
+ /* Search for the board context */
+- for (ptr = me4000_board_info_list.next;
+- ptr != &me4000_board_info_list; ptr = ptr->next) {
+- board_info = list_entry(ptr, struct me4000_info, list);
++ list_for_each_entry(board_info, &me4000_board_info_list, list) {
+ if (board_info->board_count == board)
+ break;
+ }
+
+- if (ptr == &me4000_board_info_list) {
++ if (&board_info->list == &me4000_board_info_list) {
+ printk(KERN_ERR
+ "ME4000:me4000_open():Board %d not in device list\n",
+ board);
+@@ -1526,14 +1515,12 @@ static int me4000_open(struct inode *ino
+ PDEBUG("me4000_open():board = %d\n", board);
+
+ /* Search for the board context */
+- for (ptr = me4000_board_info_list.next;
+- ptr != &me4000_board_info_list; ptr = ptr->next) {
+- board_info = list_entry(ptr, struct me4000_info, list);
++ list_for_each_entry(board_info, &me4000_board_info_list, list) {
+ if (board_info->board_count == board)
+ break;
+ }
+
+- if (ptr == &me4000_board_info_list) {
++ if (&board_info->list == &me4000_board_info_list) {
+ printk(KERN_ERR
+ "ME4000:me4000_open():Board %d not in device list\n",
+ board);
+@@ -5955,7 +5942,6 @@ static irqreturn_t me4000_ext_int_isr(in
+
+ static void __exit me4000_module_exit(void)
+ {
+- struct list_head *board_p;
+ struct me4000_info *board_info;
+
+ CALL_PDEBUG("cleanup_module() is executed\n");
+@@ -5975,9 +5961,7 @@ static void __exit me4000_module_exit(vo
+ pci_unregister_driver(&me4000_driver);
+
+ /* Reset the boards */
+- for (board_p = me4000_board_info_list.next;
+- board_p != &me4000_board_info_list; board_p = board_p->next) {
+- board_info = list_entry(board_p, struct me4000_info, list);
++ list_for_each_entry(board_info, &me4000_board_info_list, list) {
+ me4000_reset_board(board_info);
+ }
+
+@@ -5992,7 +5976,6 @@ static int me4000_read_procmem(char *buf
+ int len = 0;
+ int limit = count - 1000;
+ struct me4000_info *board_info;
+- struct list_head *ptr;
+
+ len += sprintf(buf + len, "\nME4000 DRIVER VERSION %X.%X.%X\n\n",
+ (ME4000_DRIVER_VERSION & 0xFF0000) >> 16,
+@@ -6000,11 +5983,7 @@ static int me4000_read_procmem(char *buf
+ (ME4000_DRIVER_VERSION & 0xFF));
+
+ /* Search for the board context */
+- for (ptr = me4000_board_info_list.next;
+- (ptr != &me4000_board_info_list) && (len < limit);
+- ptr = ptr->next) {
+- board_info = list_entry(ptr, struct me4000_info, list);
+-
++ list_for_each_entry(board_info, &me4000_board_info_list, list) {
+ len +=
+ sprintf(buf + len, "Board number %d:\n",
+ board_info->board_count);
+@@ -6110,6 +6089,8 @@ static int me4000_read_procmem(char *buf
+ sprintf(buf + len, "AO 3 status register = 0x%08X\n",
+ inl(board_info->me4000_regbase +
+ ME4000_AO_03_STATUS_REG));
++ if (len >= limit)
++ break;
+ }
+
+ *eof = 1;
diff --git a/staging/staging-otus-remove-dependence-on-kernel-version.patch b/staging/staging-otus-remove-dependence-on-kernel-version.patch
new file mode 100644
index 00000000000000..0ebd28067262dd
--- /dev/null
+++ b/staging/staging-otus-remove-dependence-on-kernel-version.patch
@@ -0,0 +1,766 @@
+From a.beregalov@gmail.com Tue Dec 9 20:29:42 2008
+From: Alexander Beregalov <a.beregalov@gmail.com>
+Date: Sun, 7 Dec 2008 06:58:47 +0300
+Subject: Staging: otus: remove dependence on kernel version
+To: lrodriguez@atheros.com, gregkh@suse.de
+Message-ID: <20081207035847.GA21608@orion>
+
+From: Alexander Beregalov <a.beregalov@gmail.com>
+
+Dependence on kernel version is not needed anymore
+if we are in mainline now.
+
+Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
+Cc: <lrodriguez@atheros.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/otus/ioctl.c | 22 --------------
+ drivers/staging/otus/usbdrv.c | 61 ----------------------------------------
+ drivers/staging/otus/usbdrv.h | 9 +----
+ drivers/staging/otus/wrap_pkt.c | 4 --
+ drivers/staging/otus/wrap_usb.c | 4 --
+ drivers/staging/otus/wwrap.c | 57 -------------------------------------
+ drivers/staging/otus/zdcompat.h | 54 -----------------------------------
+ drivers/staging/otus/zdusb.c | 56 ------------------------------------
+ 8 files changed, 2 insertions(+), 265 deletions(-)
+
+--- a/drivers/staging/otus/ioctl.c
++++ b/drivers/staging/otus/ioctl.c
+@@ -309,9 +309,7 @@ char *usbdrv_translate_scan(struct net_d
+ iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
+ memcpy(iwe.u.ap_addr.sa_data, list->bssid, ETH_ALEN);
+ current_ev = iwe_stream_add_event(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev,
+ end_buf, &iwe, IW_EV_ADDR_LEN);
+
+@@ -332,9 +330,7 @@ char *usbdrv_translate_scan(struct net_d
+ iwe.cmd = SIOCGIWESSID;
+ iwe.u.data.flags = 1;
+ current_ev = iwe_stream_add_point(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, end_buf, &iwe, &list->ssid[2]);
+
+ /* Ran out of buffer */
+@@ -355,9 +351,7 @@ char *usbdrv_translate_scan(struct net_d
+ else
+ iwe.u.mode = IW_MODE_ADHOC;
+ current_ev = iwe_stream_add_event(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
+ }
+
+@@ -389,9 +383,7 @@ char *usbdrv_translate_scan(struct net_d
+ }
+ iwe.u.freq.e = 6;
+ current_ev = iwe_stream_add_event(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);
+
+ /* Ran out of buffer */
+@@ -412,9 +404,7 @@ char *usbdrv_translate_scan(struct net_d
+ iwe.u.qual.noise = 0;
+ iwe.u.qual.qual = list->signalQuality;
+ current_ev = iwe_stream_add_event(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
+
+ /* Ran out of buffer */
+@@ -435,9 +425,7 @@ char *usbdrv_translate_scan(struct net_d
+
+ iwe.u.data.length = 0;
+ current_ev = iwe_stream_add_point(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, end_buf, &iwe, list->ssid);
+
+ /* Ran out of buffer */
+@@ -462,9 +450,7 @@ char *usbdrv_translate_scan(struct net_d
+ iwe.u.bitrate.value = ((list->supportedRates[i+2] & 0x7f) * 500000);
+ /* Add new value to event */
+ current_val = iwe_stream_add_value(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
+
+ /* Ran out of buffer */
+@@ -482,9 +468,7 @@ char *usbdrv_translate_scan(struct net_d
+ iwe.u.bitrate.value = ((list->extSupportedRates[i+2] & 0x7f) * 500000);
+ /* Add new value to event */
+ current_val = iwe_stream_add_value(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
+
+ /* Ran out of buffer */
+@@ -506,9 +490,7 @@ char *usbdrv_translate_scan(struct net_d
+ snprintf(buf, sizeof(buf), "bcn_int=%d", (list->beaconInterval[1] << 8) + list->beaconInterval[0]);
+ iwe.u.data.length = strlen(buf);
+ current_ev = iwe_stream_add_point(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, end_buf, &iwe, buf);
+
+ /* Ran out of buffer */
+@@ -537,9 +519,7 @@ char *usbdrv_translate_scan(struct net_d
+
+ if (iwe.u.data.length != 0)
+ current_ev = iwe_stream_add_point(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, end_buf, &iwe, buf);
+
+ /* Ran out of buffer */
+@@ -563,9 +543,7 @@ char *usbdrv_translate_scan(struct net_d
+ rsn_leader, sizeof(rsn_leader)-1);
+ if (iwe.u.data.length != 0)
+ current_ev = iwe_stream_add_point(
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27))
+ info,
+-#endif
+ current_ev, end_buf, &iwe, buf);
+
+ /* Ran out of buffer */
+--- a/drivers/staging/otus/usbdrv.c
++++ b/drivers/staging/otus/usbdrv.c
+@@ -51,11 +51,7 @@ extern void zfDumpDescriptor(zdev_t* dev
+ //extern void zfiWlanQueryMacAddress(zdev_t* dev, u8_t* addr);
+
+ // ISR handler
+-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0))
+ irqreturn_t usbdrv_intr(int, void *, struct pt_regs *);
+-#else
+-void usbdrv_intr(int, void *, struct pt_regs *);
+-#endif
+
+ // Network Device interface related function
+ int usbdrv_open(struct net_device *);
+@@ -316,11 +312,7 @@ void zfLnxInitVapStruct(void);
+ * the RX & TX queues & starts the RU if it has stopped due
+ * to no resources.
+ */
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ irqreturn_t usbdrv_intr(int irq, void *dev_inst, struct pt_regs *regs)
+-#else
+-void usbdrv_intr(int irq, void *dev_inst, struct pt_regs *regs)
+-#endif
+ {
+ struct net_device *dev;
+ struct usbdrv_private *macp;
+@@ -331,38 +323,22 @@ void usbdrv_intr(int irq, void *dev_inst
+
+ /* Read register error, card may be unpluged */
+ if (0)//(intr_status == -1)
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ return IRQ_NONE;
+-#else
+- return;
+-#endif
+
+ /* the device is closed, don't continue or else bad things may happen. */
+ if (!netif_running(dev)) {
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ return IRQ_NONE;
+-#else
+- return;
+-#endif
+ }
+
+ if (macp->driver_isolated) {
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ return IRQ_NONE;
+-#else
+- return;
+-#endif
+ }
+
+ #if (WLAN_HOSTIF == WLAN_PCI)
+ //zfiIsrPci(dev);
+ #endif
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ return IRQ_HANDLED;
+-#else
+- return;
+-#endif
+ }
+
+ int usbdrv_open(struct net_device *dev)
+@@ -477,11 +453,7 @@ int usbdrv_open(struct net_device *dev)
+ zfiWlanEnable(dev);
+
+ #ifdef ZM_ENABLE_CENC
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+- macp->netlink_sk = netlink_kernel_create(NETLINK_USERSOCK, NULL);
+-#else
+ macp->netlink_sk = netlink_kernel_create(NETLINK_USERSOCK, 1, NULL, THIS_MODULE);
+-#endif
+
+ if (macp->netlink_sk == NULL)
+ {
+@@ -884,11 +856,7 @@ int zfLnxRegisterVapDev(struct net_devic
+ #else
+ vap[vapId].dev->do_ioctl = NULL;
+ #endif
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
+ vap[vapId].dev->destructor = free_netdev;
+-#else
+- vap[vapId].dev->features |= NETIF_F_DYNALLOC;
+-#endif
+
+ vap[vapId].dev->tx_queue_len = 0;
+
+@@ -939,13 +907,8 @@ int zfLnxUnregisterVapDev(struct net_dev
+
+
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* tune me! */
+ # define SUBMIT_URB(u,f) usb_submit_urb(u,f)
+ # define USB_ALLOC_URB(u,f) usb_alloc_urb(u,f)
+-#else
+-# define SUBMIT_URB(u,f) usb_submit_urb(u)
+-# define USB_ALLOC_URB(u,f) usb_alloc_urb(u)
+-#endif
+
+ //extern void zfiWlanQueryMacAddress(zdev_t* dev, u8_t* addr);
+
+@@ -963,26 +926,16 @@ extern UsbTxQ_t *zfLnxGetUsbTxBuffer(str
+ int zfLnxAllocAllUrbs(struct usbdrv_private *macp)
+ {
+ struct usb_interface *interface = macp->interface;
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+- struct usb_interface_descriptor *iface_desc = &interface->altsetting[0];
+-#else
+ struct usb_host_interface *iface_desc = &interface->altsetting[0];
+-#endif
+
+ struct usb_endpoint_descriptor *endpoint;
+ int i;
+
+ /* descriptor matches, let's find the endpoints needed */
+ /* check out the endpoints */
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+- for (i = 0; i < iface_desc->bNumEndpoints; ++i)
+- {
+- endpoint = &iface_desc->endpoint[i];
+-#else
+ for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i)
+ {
+ endpoint = &iface_desc->endpoint[i].desc;
+-#endif
+ if ((endpoint->bEndpointAddress & 0x80) &&
+ ((endpoint->bmAttributes & 3) == 0x02))
+ {
+@@ -1100,9 +1053,6 @@ void zfLnxUnlinkAllUrbs(struct usbdrv_pr
+ {
+ if (macp->WlanTxDataUrb[i] != NULL)
+ {
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+- macp->WlanTxDataUrb[i]->transfer_flags &= ~URB_ASYNC_UNLINK;
+-#endif
+ usb_unlink_urb(macp->WlanTxDataUrb[i]);
+ }
+ }
+@@ -1112,22 +1062,13 @@ void zfLnxUnlinkAllUrbs(struct usbdrv_pr
+ {
+ if (macp->WlanRxDataUrb[i] != NULL)
+ {
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+- macp->WlanRxDataUrb[i]->transfer_flags &= ~URB_ASYNC_UNLINK;
+-#endif
+ usb_unlink_urb(macp->WlanRxDataUrb[i]);
+ }
+ }
+
+ /* Unlink USB Register Read/Write URB */
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+- macp->RegOutUrb->transfer_flags &= ~URB_ASYNC_UNLINK;
+-#endif
+ usb_unlink_urb(macp->RegOutUrb);
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+- macp->RegInUrb->transfer_flags &= ~URB_ASYNC_UNLINK;
+-#endif
+ usb_unlink_urb(macp->RegInUrb);
+ }
+
+@@ -1166,14 +1107,12 @@ u8_t zfLnxInitSetup(struct net_device *d
+
+ dev->flags |= IFF_MULTICAST;
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
+ dev->dev_addr[0] = 0x00;
+ dev->dev_addr[1] = 0x03;
+ dev->dev_addr[2] = 0x7f;
+ dev->dev_addr[3] = 0x11;
+ dev->dev_addr[4] = 0x22;
+ dev->dev_addr[5] = 0x33;
+-#endif
+
+ /* Initialize Heart Beat timer */
+ init_timer(&macp->hbTimer10ms);
+--- a/drivers/staging/otus/usbdrv.h
++++ b/drivers/staging/otus/usbdrv.h
+@@ -35,15 +35,10 @@
+ #include <linux/netdevice.h>
+ #include <linux/etherdevice.h>
+ #include <linux/skbuff.h>
+-#include <linux/version.h>
+-#include <asm/uaccess.h>
++#include <linux/uaccess.h>
+ #include <linux/wireless.h>
+ #include <linux/if_arp.h>
+-#include <asm/io.h>
+-
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+- #include <asm/div64.h>
+-#endif
++#include <linux/io.h>
+
+ #include "zdcompat.h"
+
+--- a/drivers/staging/otus/wrap_pkt.c
++++ b/drivers/staging/otus/wrap_pkt.c
+@@ -65,11 +65,7 @@ void zfLnxRecv80211(zdev_t* dev, zbuf_t*
+ if(skb1 != NULL)
+ {
+ skb1->dev = dev;
+- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22))
+- skb1->mac.raw = skb1->data;
+- #else
+ skb1->mac_header = skb1->data;
+- #endif
+ skb1->ip_summed = CHECKSUM_NONE;
+ skb1->pkt_type = PACKET_OTHERHOST;
+ skb1->protocol = __constant_htons(0x0019); /* ETH_P_80211_RAW */
+--- a/drivers/staging/otus/wrap_usb.c
++++ b/drivers/staging/otus/wrap_usb.c
+@@ -144,11 +144,7 @@ void zfwUsbCmd(zdev_t* dev, u8_t endpt,
+ if (ret != 0)
+ {
+ usb_free_urb(macp->RegOutUrb);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) /* tune me! */
+ macp->RegOutUrb = usb_alloc_urb(0, GFP_ATOMIC);
+-#else
+- macp->RegOutUrb = usb_alloc_urb(0);
+-#endif
+ ret = zfLnxUsbWriteReg(dev, cmd, cmdLen);
+ }
+ }
+--- a/drivers/staging/otus/wwrap.c
++++ b/drivers/staging/otus/wwrap.c
+@@ -31,10 +31,6 @@
+ #include <net/iw_handler.h>
+ #endif
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+-#define URB_ZERO_PACKET USB_ZERO_PACKET
+-#endif
+-
+ extern void zfiRecv80211(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo);
+ extern void zfCoreRecv(zdev_t* dev, zbuf_t* buf, struct zsAdditionInfo* addInfo);
+ extern void zfIdlChkRsp(zdev_t* dev, u32_t* rsp, u16_t rspLen);
+@@ -310,10 +306,6 @@ void zfLnxUsbDataIn_callback(urb_t *urb)
+ if ((urb->status != -ENOENT) && (urb->status != -ECONNRESET)
+ && (urb->status != -ESHUTDOWN))
+ {
+- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+- if (urb->status == USB_ST_INTERNALERROR)
+- status = -1;
+- #else
+ if (urb->status == -EPIPE){
+ //printk(KERN_ERR "nonzero read bulk status received: -EPIPE");
+ status = -1;
+@@ -323,7 +315,6 @@ void zfLnxUsbDataIn_callback(urb_t *urb)
+ //printk(KERN_ERR "nonzero read bulk status received: -EPROTO");
+ status = -1;
+ }
+- #endif
+ }
+
+ //printk(KERN_ERR "urb->status: 0x%08x\n", urb->status);
+@@ -538,10 +529,6 @@ void zfLnxUsbRegIn_callback(urb_t *urb)
+ if ((urb->status != -ENOENT) && (urb->status != -ECONNRESET)
+ && (urb->status != -ESHUTDOWN))
+ {
+- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+- if (urb->status == USB_ST_INTERNALERROR)
+- status = -1;
+- #else
+ if (urb->status == -EPIPE){
+ //printk(KERN_ERR "nonzero read bulk status received: -EPIPE");
+ status = -1;
+@@ -551,7 +538,6 @@ void zfLnxUsbRegIn_callback(urb_t *urb)
+ //printk(KERN_ERR "nonzero read bulk status received: -EPROTO");
+ status = -1;
+ }
+- #endif
+ }
+
+ //printk(KERN_ERR "urb->status: 0x%08x\n", urb->status);
+@@ -810,15 +796,9 @@ u32_t zfLnxUsbWriteReg(zdev_t* dev, u32_
+
+ /* Issue an USB Out transfer */
+ /* Submit a tx urb */
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+- ret = zfLnxUsbSubmitBulkUrb(macp->RegOutUrb, macp->udev,
+- USB_REG_OUT_PIPE, USB_DIR_OUT, macp->regUsbWriteBuf,
+- cmdLen, zfLnxUsbRegOut_callback, dev);
+-#else
+ ret = zfLnxUsbSubmitIntUrb(macp->RegOutUrb, macp->udev,
+ USB_REG_OUT_PIPE, USB_DIR_OUT, macp->regUsbWriteBuf,
+ cmdLen, zfLnxUsbRegOut_callback, dev, 1);
+-#endif
+
+ return ret;
+ }
+@@ -914,10 +894,6 @@ u32_t zfLnxUsbSubmitBulkUrb(urb_t *urb,
+ transfer_buffer, buffer_length, complete, context);
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+- urb->transfer_flags |= URB_ASYNC_UNLINK;
+-#endif
+-
+ if (epnum == 4)
+ {
+ if (urb->hcpriv)
+@@ -927,11 +903,7 @@ u32_t zfLnxUsbSubmitBulkUrb(urb_t *urb,
+ }
+ }
+
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ ret = usb_submit_urb(urb, GFP_ATOMIC);
+-#else
+- ret = usb_submit_urb(urb);
+-#endif
+ if ((epnum == 4) & (ret != 0))
+ {
+ //printk("CWY - ret = %x\n", ret);
+@@ -956,15 +928,7 @@ u32_t zfLnxUsbSubmitIntUrb(urb_t *urb, s
+ transfer_buffer, buffer_length, complete, context, interval);
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+- urb->transfer_flags |= URB_ASYNC_UNLINK;
+-#endif
+-
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+ ret = usb_submit_urb(urb, GFP_ATOMIC);
+-#else
+- ret = usb_submit_urb(urb);
+-#endif
+
+ return ret;
+ }
+@@ -1001,11 +965,7 @@ int zfLnxCencSendMsg(struct sock *netlin
+ memcpy(pos, msg, len);
+ /*���㾭���ֽڶ���������ʵ�ʳ���*/
+ nlh->nlmsg_len = skb->tail - old_tail;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+- NETLINK_CB(skb).dst_groups = COMMTYPE_GROUP;
+-#else
+ NETLINK_CB(skb).dst_group = COMMTYPE_GROUP;
+-#endif
+ netlink_broadcast(netlink_sk, skb, 0, COMMTYPE_GROUP, GFP_ATOMIC);
+ ret = 0;
+ out:
+@@ -1043,11 +1003,7 @@ u32_t zfwReadReg(zdev_t* dev, u32_t offs
+ #ifndef INIT_WORK
+ #define work_struct tq_struct
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
+-#define schedule_work(a) queue_task(a, &tq_scheduler)
+-#else
+ #define schedule_work(a) schedule_task(a)
+-#endif
+
+ #define flush_scheduled_work flush_scheduled_tasks
+ #define INIT_WORK(_wq, _routine, _data) INIT_TQUEUE(_wq, _routine, _data)
+@@ -1058,20 +1014,11 @@ u32_t zfwReadReg(zdev_t* dev, u32_t offs
+
+ u32_t smp_kevent_Lock = 0;
+
+-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20))
+ void kevent(struct work_struct *work)
+-#else
+-void kevent(void *data)
+-#endif
+ {
+-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20))
+ struct usbdrv_private *macp =
+ container_of(work, struct usbdrv_private, kevent);
+ zdev_t *dev = macp->device;
+-#else
+- zdev_t *dev = (zdev_t *) data;
+- struct usbdrv_private *macp = (struct usbdrv_private *)dev->priv;
+-#endif
+
+ if (macp == NULL)
+ {
+@@ -1120,11 +1067,7 @@ u8_t zfLnxCreateThread(zdev_t *dev)
+ struct usbdrv_private *macp = (struct usbdrv_private *)dev->priv;
+
+ /* Create Mutex and keventd */
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
+- INIT_WORK(&macp->kevent, kevent, dev);
+-#else
+ INIT_WORK(&macp->kevent, kevent);
+-#endif
+ init_MUTEX(&macp->ioctl_sem);
+
+ return 0;
+--- a/drivers/staging/otus/zdcompat.h
++++ b/drivers/staging/otus/zdcompat.h
+@@ -27,58 +27,13 @@
+ #ifndef _ZDCOMPAT_H
+ #define _ZDCOMPAT_H
+
+-#ifndef KERNEL_VERSION
+-#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+-#endif
+-
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+-#ifndef INIT_TQUEUE
+-#define INIT_TQUEUE(_tq, _routine, _data) \
+- do { \
+- (_tq)->next = NULL; \
+- (_tq)->sync = 0; \
+- PREPARE_TQUEUE((_tq), (_routine), (_data)); \
+- } while (0)
+-#define PREPARE_TQUEUE(_tq, _routine, _data) \
+- do { \
+- (_tq)->routine = _routine; \
+- (_tq)->data = _data; \
+- } while (0)
+-#endif
+-
+-#ifndef INIT_WORK
+-#define work_struct tq_struct
+-
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
+-#define schedule_work(a) queue_task(a, &tq_scheduler)
+-#else
+-#define schedule_work(a) schedule_task(a)
+-#endif
+-
+-#define flush_scheduled_work flush_scheduled_tasks
+-#define INIT_WORK(_wq, _routine, _data) INIT_TQUEUE(_wq, _routine, _data)
+-#define PREPARE_WORK(_wq, _routine, _data) PREPARE_TQUEUE(_wq, _routine, _data)
+-#endif
+-#endif // < 2.5 kernel
+-
+
+ #ifndef DECLARE_TASKLET
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0))
+-#define tasklet_schedule(a) queue_task(a, &tq_scheduler)
+-#else
+ #define tasklet_schedule(a) schedule_task(a)
+ #endif
+-#endif
+-
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,38))
+-typedef struct device netdevice_t;
+-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,4))
+-typedef struct net_device netdevice_t;
+-#else
+ #undef netdevice_t
+ typedef struct net_device netdevice_t;
+-#endif
+
+ #ifdef WIRELESS_EXT
+ #if (WIRELESS_EXT < 13)
+@@ -90,7 +45,6 @@ struct iw_request_info
+ #endif
+ #endif
+
+-/* linux < 2.5.69 */
+ #ifndef IRQ_NONE
+ typedef void irqreturn_t;
+ #define IRQ_NONE
+@@ -102,15 +56,7 @@ typedef void irqreturn_t;
+ #define in_atomic() 0
+ #endif
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) // fixme
+-#define URB_ASYNC_UNLINK USB_ASYNC_UNLINK
+-#else
+ #define USB_QUEUE_BULK 0
+-#endif
+-
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+-#define free_netdev(x) kfree(x)
+-#endif
+
+
+ #endif
+--- a/drivers/staging/otus/zdusb.c
++++ b/drivers/staging/otus/zdusb.c
+@@ -24,7 +24,6 @@
+ /* */
+ /************************************************************************/
+
+-#include <linux/version.h>
+ #ifdef MODVERSIONS
+ #include <linux/modversions.h>
+ #endif
+@@ -69,26 +68,17 @@ extern struct zsWdsStruct wds[ZM_WDS_POR
+ /* VAP */
+ extern struct zsVapStruct vap[ZM_VAP_PORT_NUMBER];
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+-static void *zfLnxProbe(struct usb_device *dev, unsigned int ifnum,
+- const struct usb_device_id *id)
+-{
+- struct usb_interface *interface = &dev->actconfig->interface[ifnum];
+-#else
+ static int zfLnxProbe(struct usb_interface *interface,
+ const struct usb_device_id *id)
+ {
+ struct usb_device *dev = interface_to_usbdev(interface);
+-#endif
+
+ struct net_device *net = NULL;
+ struct usbdrv_private *macp = NULL;
+ int vendor_id, product_id;
+ int result = 0;
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+ usb_get_dev(dev);
+-#endif
+
+ vendor_id = dev->descriptor.idVendor;
+ product_id = dev->descriptor.idProduct;
+@@ -103,15 +93,6 @@ static int zfLnxProbe(struct usb_interfa
+ printk(KERN_NOTICE "USB 1.1 Host\n");
+ #endif
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+- if (usb_set_configuration(dev, dev->config[0].bConfigurationValue))
+- {
+- printk(KERN_ERR "usb_set_configuration() failed\n");
+- result = -EIO;
+- goto fail;
+- }
+-#endif
+-
+ if (!(macp = kmalloc(sizeof(struct usbdrv_private), GFP_KERNEL)))
+ {
+ printk(KERN_ERR "out of memory allocating device structure\n");
+@@ -122,10 +103,6 @@ static int zfLnxProbe(struct usb_interfa
+ /* Zero the memory */
+ memset(macp, 0, sizeof(struct usbdrv_private));
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+- usb_inc_dev_use(dev);
+-#endif
+-
+ net = alloc_etherdev(0);
+
+ if (net == NULL)
+@@ -137,10 +114,6 @@ static int zfLnxProbe(struct usb_interfa
+
+ strcpy(net->name, "ath%d");
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
+- SET_MODULE_OWNER(net);
+-#endif
+-
+ net->priv = macp; //kernel 2.6
+ macp->udev = dev;
+ macp->device = net;
+@@ -166,16 +139,12 @@ static int zfLnxProbe(struct usb_interfa
+ }
+ else
+ {
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+ usb_set_intfdata(interface, macp);
+ SET_NETDEV_DEV(net, &interface->dev);
+-#endif
+
+ if (register_netdev(net) != 0)
+ {
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+ usb_set_intfdata(interface, NULL);
+-#endif
+ goto fail3;
+ }
+ }
+@@ -191,30 +160,16 @@ fail1:
+ kfree(macp);
+
+ fail:
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+ usb_put_dev(dev);
+-#endif
+ macp = NULL;
+
+ done:
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+- return macp;
+-#else
+ return result;
+-#endif
+ }
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+-static void zfLnxDisconnect(struct usb_device *dev, void *ptr)
+-#else
+ static void zfLnxDisconnect(struct usb_interface *interface)
+-#endif
+ {
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+ struct usbdrv_private *macp = (struct usbdrv_private *) usb_get_intfdata(interface);
+-#else
+- struct usbdrv_private *macp = (struct usbdrv_private *)ptr;
+-#endif
+
+ printk(KERN_DEBUG "zfLnxDisconnect\n");
+
+@@ -246,11 +201,7 @@ static void zfLnxDisconnect(struct usb_i
+
+ unregister_netdev(macp->device);
+
+-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+- usb_dec_dev_use(dev);
+-#else
+ usb_put_dev(interface_to_usbdev(interface));
+-#endif
+
+ //printk(KERN_ERR "3. zfLnxUnlinkAllUrbs\n");
+ //zfLnxUnlinkAllUrbs(macp);
+@@ -263,17 +214,10 @@ static void zfLnxDisconnect(struct usb_i
+ kfree(macp);
+ macp = NULL;
+
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+ usb_set_intfdata(interface, NULL);
+-#endif
+ }
+
+ static struct usb_driver zd1221_driver = {
+-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15))
+- .owner = THIS_MODULE,
+- #endif
+-#endif
+ .name = driver_name,
+ .probe = zfLnxProbe,
+ .disconnect = zfLnxDisconnect,
diff --git a/staging/staging-usbip-switch-to-list_for_each_entry.patch b/staging/staging-usbip-switch-to-list_for_each_entry.patch
new file mode 100644
index 00000000000000..b5343eadacc7e9
--- /dev/null
+++ b/staging/staging-usbip-switch-to-list_for_each_entry.patch
@@ -0,0 +1,37 @@
+From a.beregalov@gmail.com Tue Dec 9 20:31:42 2008
+From: Alexander Beregalov <a.beregalov@gmail.com>
+Date: Sun, 7 Dec 2008 05:32:46 +0300
+Subject: Staging: usbip: switch to list_for_each_entry()
+To: gregkh@suse.de, adobriyan@gmail.com
+Message-ID: <20081207023246.GB21294@orion>
+
+From: Alexander Beregalov <a.beregalov@gmail.com>
+
+Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/staging/usbip/stub_rx.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/drivers/staging/usbip/stub_rx.c
++++ b/drivers/staging/usbip/stub_rx.c
+@@ -234,8 +234,6 @@ static void tweak_special_requests(struc
+ static int stub_recv_cmd_unlink(struct stub_device *sdev,
+ struct usbip_header *pdu)
+ {
+- struct list_head *listhead = &sdev->priv_init;
+- struct list_head *ptr;
+ unsigned long flags;
+
+ struct stub_priv *priv;
+@@ -243,8 +241,7 @@ static int stub_recv_cmd_unlink(struct s
+
+ spin_lock_irqsave(&sdev->priv_lock, flags);
+
+- for (ptr = listhead->next; ptr != listhead; ptr = ptr->next) {
+- priv = list_entry(ptr, struct stub_priv, list);
++ list_for_each_entry(priv, &sdev->priv_init, list) {
+ if (priv->seqnum == pdu->u.cmd_unlink.seqnum) {
+ int ret;
+
diff --git a/usb.current/tty-sprogii-dcc-controller-identifiers.patch b/usb.current/tty-sprogii-dcc-controller-identifiers.patch
new file mode 100644
index 00000000000000..cea7f1ce32aa5d
--- /dev/null
+++ b/usb.current/tty-sprogii-dcc-controller-identifiers.patch
@@ -0,0 +1,48 @@
+From akpm@linux-foundation.org Tue Dec 9 20:25:33 2008
+From: Alan Cox <alan@redhat.com>
+Date: Sat, 06 Dec 2008 23:46:04 -0800
+Subject: USB: tty: SprogII DCC controller identifiers
+To: mm-commits@vger.kernel.org
+Cc: alan@redhat.com, greg@kroah.com
+Message-ID: <200812070746.mB77k4wi004488@imap1.linux-foundation.org>
+
+From: Alan Cox <alan@redhat.com>
+
+Someone on rmweb reminded me this had been overlooked from ages ago..
+
+Add the identifiers for the Sprog II USB. This is a DCC control interface
+using the FTDI-SIO hardware: http://www.sprog-dcc.co.uk/. People have been
+using it with insmod options for ages, this just puts it into the driver
+data.
+
+Signed-off-by: Alan Cox <alan@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 1 +
+ drivers/usb/serial/ftdi_sio.h | 3 +++
+ 2 files changed, 4 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -166,6 +166,7 @@ static struct usb_device_id id_table_com
+ { USB_DEVICE(FTDI_VID, FTDI_OPENDCC_PID) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
+ { USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
++ { USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
+--- a/drivers/usb/serial/ftdi_sio.h
++++ b/drivers/usb/serial/ftdi_sio.h
+@@ -75,6 +75,9 @@
+ /* OpenDCC (www.opendcc.de) product id */
+ #define FTDI_OPENDCC_PID 0xBFD8
+
++/* Sprog II (Andrew Crosland's SprogII DCC interface) */
++#define FTDI_SPROG_II 0xF0C8
++
+ /* www.crystalfontz.com devices - thanx for providing free devices for evaluation ! */
+ /* they use the ftdi chipset for the USB interface and the vendor id is the same */
+ #define FTDI_XF_632_PID 0xFC08 /* 632: 16x2 Character Display */
diff --git a/usb.current/usb-ftdi_sio-adding-ewert-energy-system-s-candapter-pid.patch b/usb.current/usb-ftdi_sio-adding-ewert-energy-system-s-candapter-pid.patch
new file mode 100644
index 00000000000000..bd3d4ea10f3965
--- /dev/null
+++ b/usb.current/usb-ftdi_sio-adding-ewert-energy-system-s-candapter-pid.patch
@@ -0,0 +1,60 @@
+From andrew@ewertenergy.com Tue Dec 9 20:37:43 2008
+From: Andrew Ewert <andrew@ewertenergy.com>
+Date: Thu, 4 Dec 2008 09:09:59 -0600 (CST)
+Subject: USB: ftdi_sio: Adding Ewert Energy System's CANdapter PID
+To: linux-usb@vger.kernel.org, "Greg KH" <greg@kroah.com>
+Cc: andrew@ewertenergy.com
+Message-ID: <200812041509.mB4F9x4c016788@cslab.wheaton.edu>
+
+From: Andrew Ewert <andrew@ewertenergy.com>
+
+The following patch adds in the USB PID for Ewert Energy System's CANdapter
+device (CANBUS to USB-Serial which uses the FTDI 245R chipset) to the ftdi_sio
+device driver.
+
+The patch was tested successfully on Linux kernel 2.6.27 under Ubuntu.
+
+Relevant output from /proc/bus/usb/devices (With patch installed):
+
+T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
+D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
+P: Vendor=0403 ProdID=9f80 Rev= 6.00
+S: Manufacturer=Ewert Energy Systems
+S: Product=CANdapter
+S: SerialNumber=A6RGB3Z3
+C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
+I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
+E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+
+
+Signed-off-by: Andrew Ewert <andrew@ewertenergy.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/ftdi_sio.c | 1 +
+ drivers/usb/serial/ftdi_sio.h | 3 +++
+ 2 files changed, 4 insertions(+)
+
+--- a/drivers/usb/serial/ftdi_sio.c
++++ b/drivers/usb/serial/ftdi_sio.c
+@@ -143,6 +143,7 @@ static struct ftdi_sio_quirk ftdi_HE_TIR
+ static struct usb_device_id id_table_combined [] = {
+ { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_CANUSB_PID) },
++ { USB_DEVICE(FTDI_VID, FTDI_CANDAPTER_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_0_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_1_PID) },
+ { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_2_PID) },
+--- a/drivers/usb/serial/ftdi_sio.h
++++ b/drivers/usb/serial/ftdi_sio.h
+@@ -40,6 +40,9 @@
+ /* AlphaMicro Components AMC-232USB01 device */
+ #define FTDI_AMC232_PID 0xFF00 /* Product Id */
+
++/* www.candapter.com Ewert Energy Systems CANdapter device */
++#define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
++
+ /* SCS HF Radio Modems PID's (http://www.scs-ptc.com) */
+ /* the VID is the standard ftdi vid (FTDI_VID) */
+ #define FTDI_SCS_DEVICE_0_PID 0xD010 /* SCS PTC-IIusb */
diff --git a/usb.current/usb-gadget-fix-rndis-working-at-high-speed.patch b/usb.current/usb-gadget-fix-rndis-working-at-high-speed.patch
new file mode 100644
index 00000000000000..d87e0b018f7a7c
--- /dev/null
+++ b/usb.current/usb-gadget-fix-rndis-working-at-high-speed.patch
@@ -0,0 +1,45 @@
+From david-b@pacbell.net Tue Dec 9 20:40:02 2008
+From: David Brownell <david-b@pacbell.net>
+Date: Mon, 24 Nov 2008 23:11:03 -0800
+Subject: USB: gadget: fix rndis working at high speed
+To: linux-usb@vger.kernel.org
+Cc: Greg KH <greg@kroah.com>
+Message-ID: <200811242311.03524.david-b@pacbell.net>
+Content-Disposition: inline
+
+
+From: David Brownell <dbrownell@users.sourceforge.net>
+
+Fix a bug specific to highspeed mode in the recently updated RNDIS
+support: it wasn't setting up the high speed notification endpoint,
+which prevented high speed RNDIS links from working.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Tested-by: Anand Gadiyar <gadiyar@ti.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/f_rndis.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/usb/gadget/f_rndis.c
++++ b/drivers/usb/gadget/f_rndis.c
+@@ -651,6 +651,8 @@ rndis_bind(struct usb_configuration *c,
+ fs_in_desc.bEndpointAddress;
+ hs_out_desc.bEndpointAddress =
+ fs_out_desc.bEndpointAddress;
++ hs_notify_desc.bEndpointAddress =
++ fs_notify_desc.bEndpointAddress;
+
+ /* copy descriptors, and track endpoint copies */
+ f->hs_descriptors = usb_copy_descriptors(eth_hs_function);
+@@ -662,6 +664,8 @@ rndis_bind(struct usb_configuration *c,
+ f->hs_descriptors, &hs_in_desc);
+ rndis->hs.out = usb_find_endpoint(eth_hs_function,
+ f->hs_descriptors, &hs_out_desc);
++ rndis->hs.notify = usb_find_endpoint(eth_hs_function,
++ f->hs_descriptors, &hs_notify_desc);
+ }
+
+ rndis->port.open = rndis_open;
diff --git a/usb.current/usb-storage-unusual_devs.h-nokia-3109c-addition.patch b/usb.current/usb-storage-unusual_devs.h-nokia-3109c-addition.patch
new file mode 100644
index 00000000000000..d05235d624106d
--- /dev/null
+++ b/usb.current/usb-storage-unusual_devs.h-nokia-3109c-addition.patch
@@ -0,0 +1,52 @@
+From boobaa@frugalware.org Tue Dec 9 20:14:32 2008
+From: CS�CSY L�szl� <boobaa@frugalware.org>
+Date: Tue, 9 Dec 2008 23:39:14 +0100
+Subject: USB: storage: unusual_devs.h: Nokia 3109c addition
+To: Phil Dibowitz <phil@ipom.com>
+Cc: Alan Stern <stern@rowland.harvard.edu>, USB storage list <usb-storage@lists.one-eyed-alien.net>
+Message-ID: <200812092339.14720.boobaa@frugalware.org>
+
+From: CS�CSY L�szl� <boobaa@frugalware.org>
+
+2.6.26(.x, cannot remember) could handle the microSD card in my Nokia
+3109c attached via USB as mass storage, 2.6.27(.x, up to and included
+2.6.27.8) cannot. Please find the attached patch which fixes this
+regression, and a copy of /proc/bus/usb/devices with my phone plugged in
+running with this patch on Frugalware.
+
+T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 4 Spd=12 MxCh= 0
+D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
+P: Vendor=0421 ProdID=0063 Rev= 6.01
+S: Manufacturer=Nokia
+S: Product=Nokia 3109c
+S: SerialNumber=359561013742570
+C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
+I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+
+From: CS�CSY L�szl� <boobaa@frugalware.org>
+Cc: Phil Dibowitz <phil@ipom.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/unusual_devs.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -167,6 +167,13 @@ UNUSUAL_DEV( 0x0421, 0x005d, 0x0001, 0x
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY ),
+
++/* Reported by CSECSY Laszlo <boobaa@frugalware.org> */
++UNUSUAL_DEV( 0x0421, 0x0063, 0x0001, 0x0601,
++ "Nokia",
++ "Nokia 3109c",
++ US_SC_DEVICE, US_PR_DEVICE, NULL,
++ US_FL_FIX_CAPACITY ),
++
+ /* Patch for Nokia 5310 capacity */
+ UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0591,
+ "Nokia",
diff --git a/usb.current/usb-storage-update-unusual_devs-entry-for-nokia-5310.patch b/usb.current/usb-storage-update-unusual_devs-entry-for-nokia-5310.patch
new file mode 100644
index 00000000000000..8cbd80f6b10115
--- /dev/null
+++ b/usb.current/usb-storage-update-unusual_devs-entry-for-nokia-5310.patch
@@ -0,0 +1,34 @@
+From stern@rowland.harvard.edu Tue Dec 9 20:44:02 2008
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 1 Dec 2008 10:23:43 -0500 (EST)
+Subject: usb-storage: update unusual_devs entry for Nokia 5310
+To: Greg KH <greg@kroah.com>, Phil Dibowitz <phil@ipom.com>
+Cc: Robson Roberto Souza Peixoto <robsonpeixoto@gmail.com>, USB Storage list <usb-storage@lists.one-eyed-alien.net>
+Message-ID: <Pine.LNX.4.44L0.0812011022380.2212-100000@iolanthe.rowland.org>
+
+
+This patch (as1179) updates the unusual_devs entry for Nokia's 5310
+phone to include a more recent firmware revision.
+
+This fixes Bugzilla #12099.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Tested-by: Robson Roberto Souza Peixoto <robsonpeixoto@gmail.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/unusual_devs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -182,7 +182,7 @@ UNUSUAL_DEV( 0x0421, 0x0063, 0x0001, 0x
+ US_FL_FIX_CAPACITY ),
+
+ /* Patch for Nokia 5310 capacity */
+-UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0591,
++UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0701,
+ "Nokia",
+ "5310",
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
diff --git a/usb.current/usb-unusual-devs-patch-for-nokia-3500c.patch b/usb.current/usb-unusual-devs-patch-for-nokia-3500c.patch
new file mode 100644
index 00000000000000..348298d46d0881
--- /dev/null
+++ b/usb.current/usb-unusual-devs-patch-for-nokia-3500c.patch
@@ -0,0 +1,45 @@
+From themgzzy@gmail.com Tue Dec 9 20:19:22 2008
+From: Ozan Sener <themgzzy@gmail.com>
+Date: Mon, 8 Dec 2008 19:15:45 +0200
+Subject: USB: Unusual devs patch for Nokia 3500c
+To: stern@rowland.harvard.edu
+Cc: linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net
+Message-ID: <20081208191545.53367e1a@slave.domain.org>
+
+From: Ozan Sener <themgzzy@gmail.com>
+
+T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
+D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
+P: Vendor=0421 ProdID=0060 Rev= 5.51
+S: Manufacturer=Nokia
+S: Product=Nokia 3500c
+S: SerialNumber=357687010280751
+C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA
+I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
+
+From: Ozan Sener <themgzzy@gmail.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/storage/unusual_devs.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/usb/storage/unusual_devs.h
++++ b/drivers/usb/storage/unusual_devs.h
+@@ -167,6 +167,13 @@ UNUSUAL_DEV( 0x0421, 0x005d, 0x0001, 0x
+ US_SC_DEVICE, US_PR_DEVICE, NULL,
+ US_FL_FIX_CAPACITY ),
+
++/* Reported by Ozan Sener <themgzzy@gmail.com> */
++UNUSUAL_DEV( 0x0421, 0x0060, 0x0551, 0x0551,
++ "Nokia",
++ "3500c",
++ US_SC_DEVICE, US_PR_DEVICE, NULL,
++ US_FL_FIX_CAPACITY ),
++
+ /* Reported by CSECSY Laszlo <boobaa@frugalware.org> */
+ UNUSUAL_DEV( 0x0421, 0x0063, 0x0001, 0x0601,
+ "Nokia",
diff --git a/usb/usb-documentation-usb-gadget_serial.txt-update-to-match-driver-use_acm-behaviour.patch b/usb/usb-documentation-usb-gadget_serial.txt-update-to-match-driver-use_acm-behaviour.patch
new file mode 100644
index 00000000000000..cd0f75ed64e842
--- /dev/null
+++ b/usb/usb-documentation-usb-gadget_serial.txt-update-to-match-driver-use_acm-behaviour.patch
@@ -0,0 +1,38 @@
+From jacmet@sunsite.dk Tue Dec 9 20:37:00 2008
+From: Peter Korsgaard <jacmet@sunsite.dk>
+Date: Thu, 4 Dec 2008 16:30:53 +0100
+Subject: USB: Documentation/usb/gadget_serial.txt: update to match driver use_acm behaviour
+To: david-b@pacbell.net, greg@kroah.com
+Cc: Peter Korsgaard <jacmet@sunsite.dk>
+Message-ID: <1228404653-21037-1-git-send-email-jacmet@sunsite.dk>
+
+From: Peter Korsgaard <jacmet@sunsite.dk>
+
+Commit 7bb5ea54 (usb gadget serial: use composite gadget framework)
+changed the default for the use_acm parameter from 0 to 1.
+Update the documentation to match.
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+Acked-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/usb/gadget_serial.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/Documentation/usb/gadget_serial.txt
++++ b/Documentation/usb/gadget_serial.txt
+@@ -114,11 +114,11 @@ modules.
+ Then you must load the gadget serial driver. To load it as an
+ ACM device (recommended for interoperability), do this:
+
+- modprobe g_serial use_acm=1
++ modprobe g_serial
+
+ To load it as a vendor specific bulk in/out device, do this:
+
+- modprobe g_serial
++ modprobe g_serial use_acm=0
+
+ This will also automatically load the underlying gadget peripheral
+ controller driver. This must be done each time you reboot the gadget
diff --git a/usb/usb-fix-comment-about-endianness-of-descriptors.patch b/usb/usb-fix-comment-about-endianness-of-descriptors.patch
new file mode 100644
index 00000000000000..9c9bfb37bbabe0
--- /dev/null
+++ b/usb/usb-fix-comment-about-endianness-of-descriptors.patch
@@ -0,0 +1,57 @@
+From stern@rowland.harvard.edu Tue Dec 9 20:44:35 2008
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Mon, 1 Dec 2008 10:22:33 -0500 (EST)
+Subject: USB: fix comment about endianness of descriptors
+To: Greg KH <greg@kroah.com>, Phil Endecott <phil_twuce_endecott@chezphil.org>
+Message-ID: <Pine.LNX.4.44L0.0812011021100.2212-100000@iolanthe.rowland.org>
+
+
+From: Phil Endecott <usb_endian_patch@chezphil.org>
+
+This patch fixes a comment and clarifies the documentation about the
+endianness of descriptors. The current policy is that descriptors will
+be little-endian at the API even on big-endian systems; however the
+/proc/bus/usb API predates this policy and presents descriptors with
+some multibyte fields byte-swapped.
+
+Signed-off-by: Phil Endecott <usb_endian_patch@chezphil.org>
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/usb/proc_usb_info.txt | 6 ++++--
+ include/linux/usb/ch9.h | 8 ++++++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+--- a/Documentation/usb/proc_usb_info.txt
++++ b/Documentation/usb/proc_usb_info.txt
+@@ -49,8 +49,10 @@ it and 002/048 sometime later.
+
+ These files can be read as binary data. The binary data consists
+ of first the device descriptor, then the descriptors for each
+-configuration of the device. That information is also shown in
+-text form by the /proc/bus/usb/devices file, described later.
++configuration of the device. Multi-byte fields in the device and
++configuration descriptors, but not other descriptors, are converted
++to host endianness by the kernel. This information is also shown
++in text form by the /proc/bus/usb/devices file, described later.
+
+ These files may also be used to write user-level drivers for the USB
+ devices. You would open the /proc/bus/usb/BBB/DDD file read/write,
+--- a/include/linux/usb/ch9.h
++++ b/include/linux/usb/ch9.h
+@@ -158,8 +158,12 @@ struct usb_ctrlrequest {
+ * (rarely) accepted by SET_DESCRIPTOR.
+ *
+ * Note that all multi-byte values here are encoded in little endian
+- * byte order "on the wire". But when exposed through Linux-USB APIs,
+- * they've been converted to cpu byte order.
++ * byte order "on the wire". Within the kernel and when exposed
++ * through the Linux-USB APIs, they are not converted to cpu byte
++ * order; it is the responsibility of the client code to do this.
++ * The single exception is when device and configuration descriptors (but
++ * not other descriptors) are read from usbfs (i.e. /proc/bus/usb/BBB/DDD);
++ * in this case the fields are converted to host endianness by the kernel.
+ */
+
+ /*
diff --git a/usb/usb-gadget-don-t-wait-for-completion-twice.patch b/usb/usb-gadget-don-t-wait-for-completion-twice.patch
new file mode 100644
index 00000000000000..f71c51c5e678be
--- /dev/null
+++ b/usb/usb-gadget-don-t-wait-for-completion-twice.patch
@@ -0,0 +1,28 @@
+From 09b8add0eef9d7e370fafcb62985e6bba0ce1f82 Mon Sep 17 00:00:00 2001
+From: Felipe Balbi <felipe.balbi@nokia.com>
+Date: Mon, 8 Dec 2008 13:50:27 +0200
+Subject: USB: gadget: don't wait for completion twice
+
+In some obscure scenarios e.g. passing a 0-byte backing file
+storage, wait_for_completion() would wait forever in fsg_cleanup().
+
+Prevent it by completing the thread in fsg_bind() error path.
+
+Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/gadget/file_storage.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/usb/gadget/file_storage.c
++++ b/drivers/usb/gadget/file_storage.c
+@@ -4198,6 +4198,7 @@ out:
+ fsg->state = FSG_STATE_TERMINATED; // The thread is dead
+ fsg_unbind(gadget);
+ close_all_backing_files(fsg);
++ complete(&fsg->thread_notifier);
+ return rc;
+ }
+
diff --git a/usb/usb-isp1760-fix-probe-in-pci-glue-code.patch b/usb/usb-isp1760-fix-probe-in-pci-glue-code.patch
new file mode 100644
index 00000000000000..79229c1bbbe68f
--- /dev/null
+++ b/usb/usb-isp1760-fix-probe-in-pci-glue-code.patch
@@ -0,0 +1,188 @@
+From sebastian@breakpoint.cc Tue Dec 9 20:45:10 2008
+From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
+Date: Mon, 1 Dec 2008 11:47:40 +0100
+Subject: USB: isp1760: Fix probe in PCI glue code
+To: Greg Kroah-Hartman <gregkh@suse.de>
+Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>, Karl Bongers <kbongers@jged.com>
+Message-ID: <1228128461-10033-2-git-send-email-sebastian@breakpoint.cc>
+
+From: Karl Bongers <kbongers@jged.com>
+
+Contains fixes so probe on x86 PCI runs, apparently I'm first to try
+this. Several fixes to memory access to probe host scratch register.
+Previously would bug check on chip_addr var used uninitialized.
+Scratch reg write failed in one instance due to 16-bit initial access
+mode, so added "& 0x0000ffff" to the readl as fix.
+Includes some general cleanup - remove global vars, organize memory map
+resource use.
+
+Signed-off-by: Karl Bongers <kbongers@jged.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/isp1760-if.c | 97 +++++++++++++++++++++++-------------------
+ 1 file changed, 55 insertions(+), 42 deletions(-)
+
+--- a/drivers/usb/host/isp1760-if.c
++++ b/drivers/usb/host/isp1760-if.c
+@@ -129,23 +129,23 @@ static struct of_platform_driver isp1760
+ #endif
+
+ #ifdef CONFIG_PCI
+-static u32 nxp_pci_io_base;
+-static u32 iolength;
+-static u32 pci_mem_phy0;
+-static u32 length;
+-static u8 __iomem *chip_addr;
+-static u8 __iomem *iobase;
+-
+ static int __devinit isp1761_pci_probe(struct pci_dev *dev,
+ const struct pci_device_id *id)
+ {
+ u8 latency, limit;
+ __u32 reg_data;
+ int retry_count;
+- int length;
+- int status = 1;
+ struct usb_hcd *hcd;
+ unsigned int devflags = 0;
++ int ret_status = 0;
++
++ resource_size_t pci_mem_phy0;
++ resource_size_t memlength;
++
++ u8 __iomem *chip_addr;
++ u8 __iomem *iobase;
++ resource_size_t nxp_pci_io_base;
++ resource_size_t iolength;
+
+ if (usb_disabled())
+ return -ENODEV;
+@@ -168,26 +168,30 @@ static int __devinit isp1761_pci_probe(s
+ iobase = ioremap_nocache(nxp_pci_io_base, iolength);
+ if (!iobase) {
+ printk(KERN_ERR "ioremap #1\n");
+- release_mem_region(nxp_pci_io_base, iolength);
+- return -ENOMEM;
++ ret_status = -ENOMEM;
++ goto cleanup1;
+ }
+ /* Grab the PLX PCI shared memory of the ISP 1761 we need */
+ pci_mem_phy0 = pci_resource_start(dev, 3);
+- length = pci_resource_len(dev, 3);
+-
+- if (length < 0xffff) {
+- printk(KERN_ERR "memory length for this resource is less than "
+- "required\n");
+- release_mem_region(nxp_pci_io_base, iolength);
+- iounmap(iobase);
+- return -ENOMEM;
++ memlength = pci_resource_len(dev, 3);
++ if (memlength < 0xffff) {
++ printk(KERN_ERR "memory length for this resource is wrong\n");
++ ret_status = -ENOMEM;
++ goto cleanup2;
+ }
+
+- if (!request_mem_region(pci_mem_phy0, length, "ISP-PCI")) {
++ if (!request_mem_region(pci_mem_phy0, memlength, "ISP-PCI")) {
+ printk(KERN_ERR "host controller already in use\n");
+- release_mem_region(nxp_pci_io_base, iolength);
+- iounmap(iobase);
+- return -EBUSY;
++ ret_status = -EBUSY;
++ goto cleanup2;
++ }
++
++ /* map available memory */
++ chip_addr = ioremap_nocache(pci_mem_phy0,memlength);
++ if (!chip_addr) {
++ printk(KERN_ERR "Error ioremap failed\n");
++ ret_status = -ENOMEM;
++ goto cleanup3;
+ }
+
+ /* bad pci latencies can contribute to overruns */
+@@ -210,39 +214,54 @@ static int __devinit isp1761_pci_probe(s
+ * */
+ writel(0xface, chip_addr + HC_SCRATCH_REG);
+ udelay(100);
+- reg_data = readl(chip_addr + HC_SCRATCH_REG);
++ reg_data = readl(chip_addr + HC_SCRATCH_REG) & 0x0000ffff;
+ retry_count--;
+ }
+
++ iounmap(chip_addr);
++
+ /* Host Controller presence is detected by writing to scratch register
+ * and reading back and checking the contents are same or not
+ */
+ if (reg_data != 0xFACE) {
+ dev_err(&dev->dev, "scratch register mismatch %x\n", reg_data);
+- goto clean;
++ ret_status = -ENOMEM;
++ goto cleanup3;
+ }
+
+ pci_set_master(dev);
+
+- status = readl(iobase + 0x68);
+- status |= 0x900;
+- writel(status, iobase + 0x68);
++ /* configure PLX PCI chip to pass interrupts */
++#define PLX_INT_CSR_REG 0x68
++ reg_data = readl(iobase + PLX_INT_CSR_REG);
++ reg_data |= 0x900;
++ writel(reg_data, iobase + PLX_INT_CSR_REG);
+
+ dev->dev.dma_mask = NULL;
+- hcd = isp1760_register(pci_mem_phy0, length, dev->irq,
++ hcd = isp1760_register(pci_mem_phy0, memlength, dev->irq,
+ IRQF_SHARED | IRQF_DISABLED, &dev->dev, dev_name(&dev->dev),
+ devflags);
+- if (!IS_ERR(hcd)) {
+- pci_set_drvdata(dev, hcd);
+- return 0;
++ if (IS_ERR(hcd)) {
++ ret_status = -ENODEV;
++ goto cleanup3;
+ }
+-clean:
+- status = -ENODEV;
++
++ /* done with PLX IO access */
+ iounmap(iobase);
+- release_mem_region(pci_mem_phy0, length);
+ release_mem_region(nxp_pci_io_base, iolength);
+- return status;
++
++ pci_set_drvdata(dev, hcd);
++ return 0;
++
++cleanup3:
++ release_mem_region(pci_mem_phy0, memlength);
++cleanup2:
++ iounmap(iobase);
++cleanup1:
++ release_mem_region(nxp_pci_io_base, iolength);
++ return ret_status;
+ }
++
+ static void isp1761_pci_remove(struct pci_dev *dev)
+ {
+ struct usb_hcd *hcd;
+@@ -255,12 +274,6 @@ static void isp1761_pci_remove(struct pc
+ usb_put_hcd(hcd);
+
+ pci_disable_device(dev);
+-
+- iounmap(iobase);
+- iounmap(chip_addr);
+-
+- release_mem_region(nxp_pci_io_base, iolength);
+- release_mem_region(pci_mem_phy0, length);
+ }
+
+ static void isp1761_pci_shutdown(struct pci_dev *dev)
diff --git a/usb/usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch b/usb/usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch
new file mode 100644
index 00000000000000..ea0ff913429fce
--- /dev/null
+++ b/usb/usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch
@@ -0,0 +1,48 @@
+From bigeasy@breakpoint.cc Tue Dec 9 20:42:02 2008
+From: Sebastian Andrzej Siewior <bigeasy@breakpoint.cc>
+Date: Sun, 30 Nov 2008 16:50:04 +0100
+Subject: USB: isp1760: use a specific PLX bridge instead of any bdridge
+To: Karl Bongers <kblists08@gmail.com>
+Cc: linux-usb@vger.kernel.org
+Message-ID: <20081130155004.GA2132@Chamillionaire.breakpoint.cc>
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+this driver can't handle (of course) any brdige class devices. So we
+now are just active on one specific bridge which should be only the
+isp1761 chip behind a PLX bridge.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Tested-by: Karl Bongers <kblists08@gmail.com>
+Cc: stable <stable@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/host/isp1760-if.c | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+--- a/drivers/usb/host/isp1760-if.c
++++ b/drivers/usb/host/isp1760-if.c
+@@ -268,12 +268,16 @@ static void isp1761_pci_shutdown(struct
+ printk(KERN_ERR "ips1761_pci_shutdown\n");
+ }
+
+-static const struct pci_device_id isp1760_plx [] = { {
+- /* handle any USB 2.0 EHCI controller */
+- PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_OTHER << 8) | (0x06 << 16)), ~0),
+- .driver_data = 0,
+-},
+-{ /* end: all zeroes */ }
++static const struct pci_device_id isp1760_plx [] = {
++ {
++ .class = PCI_CLASS_BRIDGE_OTHER << 8,
++ .class_mask = ~0,
++ .vendor = PCI_VENDOR_ID_PLX,
++ .device = 0x5406,
++ .subvendor = PCI_VENDOR_ID_PLX,
++ .subdevice = 0x9054,
++ },
++ { }
+ };
+ MODULE_DEVICE_TABLE(pci, isp1760_plx);
+
diff --git a/usb/usb-serial-usb_debug-make-static.patch b/usb/usb-serial-usb_debug-make-static.patch
new file mode 100644
index 00000000000000..605434a9866b02
--- /dev/null
+++ b/usb/usb-serial-usb_debug-make-static.patch
@@ -0,0 +1,28 @@
+From roel.kluin@gmail.com Tue Dec 9 20:16:41 2008
+From: Roel Kluin <roel.kluin@gmail.com>
+Date: Tue, 09 Dec 2008 22:50:22 +0100
+Subject: USB: serial: usb_debug: Make static
+To: Greg KH <gregkh@suse.de>
+Message-ID: <493EE81E.4050904@gmail.com>
+
+
+Sparse asked whether these could be static.
+
+Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/usb/serial/usb_debug.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/usb_debug.c
++++ b/drivers/usb/serial/usb_debug.c
+@@ -31,7 +31,7 @@ static struct usb_driver debug_driver =
+ .no_dynamic_id = 1,
+ };
+
+-int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port,
++static int usb_debug_open(struct tty_struct *tty, struct usb_serial_port *port,
+ struct file *filp)
+ {
+ port->bulk_out_size = USB_DEBUG_MAX_PACKET_SIZE;
diff --git a/usb/usb-storage-clean-up-unusual_devs.h.patch b/usb/usb-storage-clean-up-unusual_devs.h.patch
index 3809249e7bd2e5..0b9d18d3ba526c 100644
--- a/usb/usb-storage-clean-up-unusual_devs.h.patch
+++ b/usb/usb-storage-clean-up-unusual_devs.h.patch
@@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
-@@ -174,6 +174,14 @@ UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x
+@@ -188,6 +188,14 @@ UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),
@@ -34,7 +34,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Reported by Mario Rettig <mariorettig@web.de> */
UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100,
"Nokia",
-@@ -253,21 +261,6 @@ UNUSUAL_DEV( 0x0421, 0x04fa, 0x0550, 0x
+@@ -267,21 +275,6 @@ UNUSUAL_DEV( 0x0421, 0x04fa, 0x0550, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),
@@ -56,7 +56,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */
UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210,
"SMSC",
-@@ -374,6 +367,15 @@ UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x
+@@ -388,6 +381,15 @@ UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x
"DVD-CAM DZ-MV100A Camcorder",
US_SC_SCSI, US_PR_CB, NULL, US_FL_SINGLE_LUN),
@@ -72,7 +72,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Patch for Nikon coolpix 2000
* Submitted by Fabien Cosse <fabien.cosse@wanadoo.fr>*/
UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010,
-@@ -466,15 +468,6 @@ UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x
+@@ -480,15 +482,6 @@ UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x
US_SC_DEVICE, US_PR_CB, NULL,
US_FL_MAX_SECTORS_MIN),
@@ -88,7 +88,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#ifdef CONFIG_USB_STORAGE_CYPRESS_ATACB
/* CY7C68300 : support atacb */
UNUSUAL_DEV( 0x04b4, 0x6830, 0x0000, 0x9999,
-@@ -793,15 +786,15 @@ UNUSUAL_DEV( 0x054c, 0x006d, 0x0000, 0x
+@@ -807,15 +800,15 @@ UNUSUAL_DEV( 0x054c, 0x006d, 0x0000, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY ),
@@ -109,7 +109,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
"Sony",
"PEG Mass Storage",
US_SC_DEVICE, US_PR_DEVICE, NULL,
-@@ -1329,17 +1322,6 @@ UNUSUAL_DEV( 0x0851, 0x1543, 0x0200, 0x
+@@ -1343,17 +1336,6 @@ UNUSUAL_DEV( 0x0851, 0x1543, 0x0200, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_NOT_LOCKABLE),
@@ -127,7 +127,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Submitted by Jan De Luyck <lkml@kcore.org> */
UNUSUAL_DEV( 0x08bd, 0x1100, 0x0000, 0x0000,
"CITIZEN",
-@@ -1458,6 +1440,16 @@ UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xf
+@@ -1472,6 +1454,16 @@ UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xf
US_FL_SINGLE_LUN ),
#endif
@@ -144,7 +144,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Submitted by: Nick Sillik <n.sillik@temple.edu>
* Needed for OneTouch extension to usb-storage
*
-@@ -1475,16 +1467,6 @@ UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xf
+@@ -1489,16 +1481,6 @@ UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xf
0),
#endif
@@ -161,7 +161,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Submitted by Joris Struyve <joris@struyve.be> */
UNUSUAL_DEV( 0x0d96, 0x410a, 0x0001, 0xffff,
"Medion",
-@@ -1624,13 +1606,6 @@ UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x
+@@ -1638,13 +1620,6 @@ UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ),
@@ -175,7 +175,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Reported by Emmanuel Vasilakis <evas@forthnet.gr> */
UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x0000,
"Sony Ericsson",
-@@ -1638,6 +1613,13 @@ UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x
+@@ -1652,6 +1627,13 @@ UNUSUAL_DEV( 0x0fce, 0xe031, 0x0000, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
diff --git a/usb/usb-storage-flag-devices-known-to-support-sane_sense.patch b/usb/usb-storage-flag-devices-known-to-support-sane_sense.patch
index 4285d6e4eb380f..91293697327c86 100644
--- a/usb/usb-storage-flag-devices-known-to-support-sane_sense.patch
+++ b/usb/usb-storage-flag-devices-known-to-support-sane_sense.patch
@@ -42,7 +42,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Reported by Grant Grundler <grundler@parisc-linux.org>
* HP r707 camera in "Disk" mode with 2.00.23 or 2.00.24 firmware.
*/
-@@ -983,6 +990,13 @@ UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x
+@@ -997,6 +1004,13 @@ UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 ),
@@ -56,7 +56,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Reported by Hanno Boeck <hanno@gmx.de>
* Taken from the Lycoris Kernel */
UNUSUAL_DEV( 0x0636, 0x0003, 0x0000, 0x9999,
-@@ -1417,6 +1431,13 @@ UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0
+@@ -1431,6 +1445,13 @@ UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0
US_SC_DEVICE, US_PR_DEVICE, NULL,
0 ),
@@ -70,7 +70,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#ifdef CONFIG_USB_STORAGE_ISD200
UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110,
"ATI",
-@@ -1440,6 +1461,12 @@ UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xf
+@@ -1454,6 +1475,12 @@ UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xf
US_FL_SINGLE_LUN ),
#endif
@@ -83,7 +83,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/*
* Pete Zaitcev <zaitcev@yahoo.com>, bz#164688.
* The device blatantly ignores LUN and returns 1 in GetMaxLUN.
-@@ -1632,6 +1659,12 @@ UNUSUAL_DEV( 0x1019, 0x0c55, 0x0000, 0x
+@@ -1646,6 +1673,12 @@ UNUSUAL_DEV( 0x1019, 0x0c55, 0x0000, 0x
US_SC_DEVICE, US_PR_DEVICE, usb_stor_ucr61s2b_init,
0 ),
@@ -96,7 +96,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/* Reported by Fabio Venturi <f.venturi@tdnet.it>
* The device reports a vendor-specific bDeviceClass.
*/
-@@ -2021,10 +2054,10 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x
+@@ -2035,10 +2068,10 @@ UNUSUAL_DEV( 0x14cd, 0x6600, 0x0201, 0x
* JMicron responds to USN and several other SCSI ioctls with a
* residue that causes subsequent I/O requests to fail. */
UNUSUAL_DEV( 0x152d, 0x2329, 0x0100, 0x0100,
diff --git a/usb/usbmon-drop-bogus-0t-from-usbmon.txt.patch b/usb/usbmon-drop-bogus-0t-from-usbmon.txt.patch
new file mode 100644
index 00000000000000..7a646d05b81b34
--- /dev/null
+++ b/usb/usbmon-drop-bogus-0t-from-usbmon.txt.patch
@@ -0,0 +1,49 @@
+From zaitcev@redhat.com Tue Dec 9 20:36:35 2008
+From: Pete Zaitcev <zaitcev@redhat.com>
+Date: Thu, 4 Dec 2008 16:17:00 -0700
+Subject: usbmon: drop bogus 0t from usbmon.txt
+To: greg@kroah.com
+Message-ID: <20081204161700.86554ddd.zaitcev@redhat.com>
+
+From: Pete Zaitcev <zaitcev@redhat.com>
+
+The example is incorrect: there is no 0t socket (the '1t' format has no
+bus number in it). Also, correct the broken sentence for USB Tag.
+
+Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/usb/usbmon.txt | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+--- a/Documentation/usb/usbmon.txt
++++ b/Documentation/usb/usbmon.txt
+@@ -34,11 +34,12 @@ if usbmon is built into the kernel.
+ Verify that bus sockets are present.
+
+ # ls /sys/kernel/debug/usbmon
+-0s 0t 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u
++0s 0u 1s 1t 1u 2s 2t 2u 3s 3t 3u 4s 4t 4u
+ #
+
+-Now you can choose to either use the sockets numbered '0' (to capture packets on
+-all buses), and skip to step #3, or find the bus used by your device with step #2.
++Now you can choose to either use the socket '0u' (to capture packets on all
++buses), and skip to step #3, or find the bus used by your device with step #2.
++This allows to filter away annoying devices that talk continuously.
+
+ 2. Find which bus connects to the desired device
+
+@@ -99,8 +100,9 @@ on the event type, but there is a set of
+
+ Here is the list of words, from left to right:
+
+-- URB Tag. This is used to identify URBs is normally a kernel mode address
+- of the URB structure in hexadecimal.
++- URB Tag. This is used to identify URBs, and is normally an in-kernel address
++ of the URB structure in hexadecimal, but can be a sequence number or any
++ other unique string, within reason.
+
+ - Timestamp in microseconds, a decimal number. The timestamp's resolution
+ depends on available clock, and so it can be much worse than a microsecond