diff options
35 files changed, 3 insertions, 3612 deletions
diff --git a/driver-core.current/block-drop-references-taken-by-class_find_device.patch b/driver-core.current/block-drop-references-taken-by-class_find_device.patch deleted file mode 100644 index f000e639b26e6a..00000000000000 --- a/driver-core.current/block-drop-references-taken-by-class_find_device.patch +++ /dev/null @@ -1,82 +0,0 @@ -From kay.sievers@vrfy.org Tue Aug 19 16:37:15 2008 -From: Kay Sievers <kay.sievers@vrfy.org> -Date: Sat, 16 Aug 2008 14:30:30 +0200 -Subject: block: drop references taken by class_find_device() -Message-ID: <1218889830.22035.11.camel@lgn.site> - - -Otherwise we leak references, which is not a good thing to do. - - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - block/genhd.c | 22 ++++++++++++++++------ - 1 file changed, 16 insertions(+), 6 deletions(-) - ---- a/block/genhd.c -+++ b/block/genhd.c -@@ -313,8 +313,10 @@ static void *part_start(struct seq_file - - mutex_lock(&block_class_lock); - dev = class_find_device(&block_class, NULL, &k, find_start); -- if (dev) -+ if (dev) { -+ put_device(dev); - return dev_to_disk(dev); -+ } - return NULL; - } - -@@ -331,8 +333,10 @@ static void *part_next(struct seq_file * - struct device *dev; - ++*pos; - dev = class_find_device(&block_class, &gp->dev, NULL, find_next); -- if (dev) -+ if (dev) { -+ put_device(dev); - return dev_to_disk(dev); -+ } - return NULL; - } - -@@ -573,8 +577,10 @@ static void *diskstats_start(struct seq_ - - mutex_lock(&block_class_lock); - dev = class_find_device(&block_class, NULL, &k, find_start); -- if (dev) -+ if (dev) { -+ put_device(dev); - return dev_to_disk(dev); -+ } - return NULL; - } - -@@ -585,8 +591,10 @@ static void *diskstats_next(struct seq_f - - ++*pos; - dev = class_find_device(&block_class, &gp->dev, NULL, find_next); -- if (dev) -+ if (dev) { -+ put_device(dev); - return dev_to_disk(dev); -+ } - return NULL; - } - -@@ -714,10 +722,12 @@ dev_t blk_lookup_devt(const char *name, - mutex_lock(&block_class_lock); - find.name = name; - find.part = part; -- dev = class_find_device(&block_class, NULL, (void *)&find, match_id); -- if (dev) -+ dev = class_find_device(&block_class, NULL, &find, match_id); -+ if (dev) { -+ put_device(dev); - devt = MKDEV(MAJOR(dev->devt), - MINOR(dev->devt) + part); -+ } - mutex_unlock(&block_class_lock); - - return devt; diff --git a/driver-core.current/block-fix-partial-read-of-proc-partitions-diskstats.patch b/driver-core.current/block-fix-partial-read-of-proc-partitions-diskstats.patch deleted file mode 100644 index 0200bf917e9b3c..00000000000000 --- a/driver-core.current/block-fix-partial-read-of-proc-partitions-diskstats.patch +++ /dev/null @@ -1,65 +0,0 @@ -From kay.sievers@vrfy.org Tue Aug 19 16:37:13 2008 -From: Kay Sievers <kay.sievers@vrfy.org> -Date: Sat, 16 Aug 2008 14:30:30 +0200 -Subject: block: fix partial read() of /proc/{partitions,diskstats} -Message-ID: <1218889830.22035.10.camel@lgn.site> - - -The proc files get truncated if they do not fit into the buffer with -a single read(). We need to move the seq_file index from the callback -of class_find_device() to the caller of class_find_device(), to keep -its value across multiple invocations of the callback. - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - block/genhd.c | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) - ---- a/block/genhd.c -+++ b/block/genhd.c -@@ -293,25 +293,26 @@ void __init printk_all_partitions(void) - /* iterator */ - static int find_start(struct device *dev, void *data) - { -- loff_t k = *(loff_t *)data; -+ loff_t *k = data; - - if (dev->type != &disk_type) - return 0; -- if (!k--) -+ if (!*k) - return 1; -+ (*k)--; - return 0; - } - - static void *part_start(struct seq_file *part, loff_t *pos) - { - struct device *dev; -- loff_t n = *pos; -+ loff_t k = *pos; - -- if (!n) -+ if (!k) - seq_puts(part, "major minor #blocks name\n\n"); - - mutex_lock(&block_class_lock); -- dev = class_find_device(&block_class, NULL, (void *)pos, find_start); -+ dev = class_find_device(&block_class, NULL, &k, find_start); - if (dev) - return dev_to_disk(dev); - return NULL; -@@ -568,9 +569,10 @@ static struct device_type disk_type = { - static void *diskstats_start(struct seq_file *part, loff_t *pos) - { - struct device *dev; -+ loff_t k = *pos; - - mutex_lock(&block_class_lock); -- dev = class_find_device(&block_class, NULL, (void *)pos, find_start); -+ dev = class_find_device(&block_class, NULL, &k, find_start); - if (dev) - return dev_to_disk(dev); - return NULL; diff --git a/driver-core.current/dev_printk-constify-the-dev-argument.patch b/driver-core.current/dev_printk-constify-the-dev-argument.patch deleted file mode 100644 index d5241f68f00b4e..00000000000000 --- a/driver-core.current/dev_printk-constify-the-dev-argument.patch +++ /dev/null @@ -1,56 +0,0 @@ -From akpm@linux-foundation.org Thu Jul 31 10:55:46 2008 -From: Jean Delvare <khali@linux-fr.org> -Date: Wed, 30 Jul 2008 12:29:21 -0700 -Subject: dev_printk(): constify the `dev' argument -To: greg@kroah.com -Cc: akpm@linux-foundation.org, khali@linux-fr.org -Message-ID: <200807301929.m6UJTLUh011927@imap1.linux-foundation.org> - -From: Jean Delvare <khali@linux-fr.org> - -Add const markings to dev_name and dev_driver_string to make it clear that -dev_printk doesn't modify dev. This is a prerequisite to adding more -const markings to other functions make it clearer, which functions can -modify dev and which can't. - -Signed-off-by: Jean Delvare <khali@linux-fr.org> -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Andrew Morton <akpm@linux-foundation.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/core.c | 2 +- - include/linux/device.h | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - ---- a/drivers/base/core.c -+++ b/drivers/base/core.c -@@ -53,7 +53,7 @@ static inline int device_is_not_partitio - * it is attached to. If it is not attached to a bus either, an empty - * string will be returned. - */ --const char *dev_driver_string(struct device *dev) -+const char *dev_driver_string(const struct device *dev) - { - return dev->driver ? dev->driver->name : - (dev->bus ? dev->bus->name : ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -406,7 +406,7 @@ struct device { - /* Get the wakeup routines, which depend on struct device */ - #include <linux/pm_wakeup.h> - --static inline const char *dev_name(struct device *dev) -+static inline const char *dev_name(const struct device *dev) - { - /* will be changed into kobject_name(&dev->kobj) in the near future */ - return dev->bus_id; -@@ -518,7 +518,7 @@ extern void device_shutdown(void); - extern void sysdev_shutdown(void); - - /* debugging and troubleshooting/diagnostic helpers. */ --extern const char *dev_driver_string(struct device *dev); -+extern const char *dev_driver_string(const struct device *dev); - #define dev_printk(level, dev, format, arg...) \ - printk(level "%s %s: " format , dev_driver_string(dev) , \ - dev_name(dev) , ## arg) diff --git a/driver-core.current/documentation-howto-ja_jp-sync-patch.patch b/driver-core.current/documentation-howto-ja_jp-sync-patch.patch deleted file mode 100644 index 5fedd13739c269..00000000000000 --- a/driver-core.current/documentation-howto-ja_jp-sync-patch.patch +++ /dev/null @@ -1,155 +0,0 @@ -From tshibata@ab.jp.nec.com Thu Aug 21 10:04:58 2008 -From: Tsugikazu Shibata <tshibata@ab.jp.nec.com> -Date: Thu, 21 Aug 2008 11:42:39 +0900 (JST) -Subject: Documentation: HOWTO-ja_JP-sync patch -To: gregkh@suse.de -Cc: tshibata@ab.jp.nec.com -Message-ID: <20080821.114239.124073037.tshibata@ab.jp.nec.com> - - -Here is a patch for Documentation/ja_JP/HOWTO sync with latest -Documentation/HOWTO. -It includes translation of changes done by Jon Corbet,Jiri Pirko and me: -http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=history;f=Documentation/HOWTO;h=c2371c5a98f99b5eaa785bd0affd6c40187e84e3;hb=HEAD - -Singed-off-by: Tsugikazu Shibata <tshibata@ab.jp.nec.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - - ---- - Documentation/ja_JP/HOWTO | 67 ++++++++++++++++++++++++++++++++-------------- - 1 file changed, 47 insertions(+), 20 deletions(-) - ---- a/Documentation/ja_JP/HOWTO -+++ b/Documentation/ja_JP/HOWTO -@@ -11,14 +11,14 @@ for non English (read: Japanese) speaker - fork. So if you have any comments or updates for this file, please try - to update the original English file first. - --Last Updated: 2007/11/16 -+Last Updated: 2008/08/21 - ================================== - これは、 --linux-2.6.24/Documentation/HOWTO -+linux-2.6.27/Documentation/HOWTO - の和訳です。 - - 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > --翻訳日: 2007/11/10 -+翻訳日: 2008/8/5 - 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> - 校正者: 松倉さん <nbh--mats at nifty dot com> - 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> -@@ -287,13 +287,15 @@ 以下のとおり- - に安定した状態にあると判断したときにリリースされます。目標は毎週新 - しい -rc カーネルをリリースすることです。 - -- - 以下の URL で各 -rc リリースに存在する既知の後戻り問題のリスト -- が追跡されます- -- http://kernelnewbies.org/known_regressions -- - - このプロセスはカーネルが 「準備ができた」と考えられるまで継続しま - す。このプロセスはだいたい 6週間継続します。 - -+ - 各リリースでの既知の後戻り問題(regression: このリリースの中で新規 -+ に作り込まれた問題を指す) はその都度 Linux-kernel メーリングリスト -+ に投稿されます。ゴールとしては、カーネルが 「準備ができた」と宣言 -+ する前にこのリストの長さをゼロに減らすことですが、現実には、数個の -+ 後戻り問題がリリース時にたびたび残ってしまいます。 -+ - Andrew Morton が Linux-kernel メーリングリストにカーネルリリースについ - て書いたことをここで言っておくことは価値があります- - 「カーネルがいつリリースされるかは誰も知りません。なぜなら、これは現 -@@ -303,18 +305,20 @@ Andrew Morton が Linux-kernel メーリ - 2.6.x.y -stable カーネルツリー - --------------------------- - --バージョンに4つ目の数字がついたカーネルは -stable カーネルです。これに --は、2.6.x カーネルで見つかったセキュリティ問題や重大な後戻りに対する比 --較的小さい重要な修正が含まれます。 -+バージョン番号が4つの数字に分かれているカーネルは -stable カーネルです。 -+これには、2.6.x カーネルで見つかったセキュリティ問題や重大な後戻りに対 -+する比較的小さい重要な修正が含まれます。 - - これは、開発/実験的バージョンのテストに協力することに興味が無く、 - 最新の安定したカーネルを使いたいユーザに推奨するブランチです。 - --もし、2.6.x.y カーネルが存在しない場合には、番号が一番大きい 2.6.x --が最新の安定版カーネルです。 -+もし、2.6.x.y カーネルが存在しない場合には、番号が一番大きい 2.6.x が -+最新の安定版カーネルです。 - --2.6.x.y は "stable" チーム <stable@kernel.org> でメンテされており、だ --いたい隔週でリリースされています。 -+2.6.x.y は "stable" チーム <stable@kernel.org> でメンテされており、必 -+要に応じてリリースされます。通常のリリース期間は 2週間毎ですが、差し迫っ -+た問題がなければもう少し長くなることもあります。セキュリティ関連の問題 -+の場合はこれに対してだいたいの場合、すぐにリリースがされます。 - - カーネルツリーに入っている、Documentation/stable_kernel_rules.txt ファ - イルにはどのような種類の変更が -stable ツリーに受け入れ可能か、またリ -@@ -341,7 +345,9 @@ linux-kernel メーリングリストで - メインラインへ入れるように Linus にプッシュします。 - - メインカーネルツリーに含めるために Linus に送る前に、すべての新しいパッ --チが -mm ツリーでテストされることが強く推奨されます。 -+チが -mm ツリーでテストされることが強く推奨されています。マージウィン -+ドウが開く前に -mm ツリーに現れなかったパッチはメインラインにマージさ -+れることは困難になります。 - - これらのカーネルは安定して動作すべきシステムとして使うのには適切ではあ - りませんし、カーネルブランチの中でももっとも動作にリスクが高いものです。 -@@ -395,13 +401,15 @@ 以下はさまざまなカーネルツ� - - pcmcia, Dominik Brodowski <linux@dominikbrodowski.net> - git.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6.git - -- - SCSI, James Bottomley <James.Bottomley@SteelEye.com> -+ - SCSI, James Bottomley <James.Bottomley@hansenpartnership.com> - git.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git - -+ - x86, Ingo Molnar <mingo@elte.hu> -+ git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git -+ - quilt ツリー- -- - USB, PCI ドライバコアと I2C, Greg Kroah-Hartman <gregkh@suse.de> -+ - USB, ドライバコアと I2C, Greg Kroah-Hartman <gregkh@suse.de> - kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/ -- - x86-64 と i386 の仲間 Andi Kleen <ak@suse.de> - - その他のカーネルツリーは http://git.kernel.org/ と MAINTAINERS ファ - イルに一覧表があります。 -@@ -412,13 +420,32 @@ 以下はさまざまなカーネルツ� - bugzilla.kernel.org は Linux カーネル開発者がカーネルのバグを追跡する - 場所です。ユーザは見つけたバグの全てをこのツールで報告すべきです。 - どう kernel bugzilla を使うかの詳細は、以下を参照してください- -- http://test.kernel.org/bugzilla/faq.html -- -+ http://bugzilla.kernel.org/page.cgi?id=faq.html - メインカーネルソースディレクトリにあるファイル REPORTING-BUGS はカーネ - ルバグらしいものについてどうレポートするかの良いテンプレートであり、問 - 題の追跡を助けるためにカーネル開発者にとってどんな情報が必要なのかの詳 - 細が書かれています。 - -+バグレポートの管理 -+------------------- -+ -+あなたのハッキングのスキルを訓練する最高の方法のひとつに、他人がレポー -+トしたバグを修正することがあります。あなたがカーネルをより安定化させる -+こに寄与するということだけでなく、あなたは 現実の問題を修正することを -+学び、自分のスキルも強化でき、また他の開発者があなたの存在に気がつき -+ます。バグを修正することは、多くの開発者の中から自分が功績をあげる最善 -+の道です、なぜなら多くの人は他人のバグの修正に時間を浪費することを好ま -+ないからです。 -+ -+すでにレポートされたバグのために仕事をするためには、 -+http://bugzilla.kernel.org に行ってください。もし今後のバグレポートに -+ついてアドバイスを受けたいのであれば、bugme-new メーリングリスト(新し -+いバグレポートだけがここにメールされる) または bugme-janitor メーリン -+グリスト(bugzilla の変更毎にここにメールされる)を購読できます。 -+ -+ http://lists.linux-foundation.org/mailman/listinfo/bugme-new -+ http://lists.linux-foundation.org/mailman/listinfo/bugme-janitors -+ - メーリングリスト - ------------- - diff --git a/driver-core.current/driver-core-add-init_name-to-struct-device.patch b/driver-core.current/driver-core-add-init_name-to-struct-device.patch deleted file mode 100644 index 17bf6b9f25df0a..00000000000000 --- a/driver-core.current/driver-core-add-init_name-to-struct-device.patch +++ /dev/null @@ -1,72 +0,0 @@ -From kay.sievers@vrfy.org Fri May 2 09:28:44 2008 -From: Greg Kroah-Hartman <gregkh@suse.de> -Date: Fri, 30 May 2008 10:45:12 -0700 -Subject: driver core: add init_name to struct device -Message-ID: <1209700961.3100.7.camel@linux.site> - -This gives us a way to handle both the bus_id and init_name values being -used for a while during the transition period. - -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/core.c | 20 +++++++++++++------- - include/linux/device.h | 1 + - 2 files changed, 14 insertions(+), 7 deletions(-) - ---- a/drivers/base/core.c -+++ b/drivers/base/core.c -@@ -844,13 +844,19 @@ int device_add(struct device *dev) - { - struct device *parent = NULL; - struct class_interface *class_intf; -- int error; -+ int error = -EINVAL; - - dev = get_device(dev); -- if (!dev || !strlen(dev->bus_id)) { -- error = -EINVAL; -- goto Done; -- } -+ if (!dev) -+ goto done; -+ -+ /* Temporarily support init_name if it is set. -+ * It will override bus_id for now */ -+ if (dev->init_name) -+ dev_set_name(dev, "%s", dev->init_name); -+ -+ if (!strlen(dev->bus_id)) -+ goto done; - - pr_debug("device: '%s': %s\n", dev->bus_id, __func__); - -@@ -919,7 +925,7 @@ int device_add(struct device *dev) - class_intf->add_dev(dev, class_intf); - mutex_unlock(&dev->class->p->class_mutex); - } -- Done: -+done: - put_device(dev); - return error; - DPMError: -@@ -946,7 +952,7 @@ int device_add(struct device *dev) - cleanup_device_parent(dev); - if (parent) - put_device(parent); -- goto Done; -+ goto done; - } - - /** ---- a/include/linux/device.h -+++ b/include/linux/device.h -@@ -358,6 +358,7 @@ struct device { - - struct kobject kobj; - char bus_id[BUS_ID_SIZE]; /* position on parent bus */ -+ const char *init_name; /* initial name of the device */ - struct device_type *type; - unsigned uevent_suppress:1; - diff --git a/driver-core.current/driver-model-anti-oopsing-medicine.patch b/driver-core.current/driver-model-anti-oopsing-medicine.patch deleted file mode 100644 index 0d34f58cfa18e4..00000000000000 --- a/driver-core.current/driver-model-anti-oopsing-medicine.patch +++ /dev/null @@ -1,52 +0,0 @@ -From david-b@pacbell.net Wed Aug 6 21:25:59 2008 -From: David Brownell <david-b@pacbell.net> -Date: Wed, 6 Aug 2008 18:52:44 -0700 -Subject: driver model: anti-oopsing medicine -To: Greg KH <greg@kroah.com> -Cc: linux-usb@vger.kernel.org -Message-ID: <200808061852.44765.david-b@pacbell.net> -Content-Disposition: inline - - -From: David Brownell <dbrownell@users.sourceforge.net> - -Anti-oops medicine for the class iterators ... the oops was -observed when a class was implicitly referenced before it -was initialized. - -[Modified by Greg to spit a warning back so someone knows to fix their code] - -Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/class.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - ---- a/drivers/base/class.c -+++ b/drivers/base/class.c -@@ -295,6 +295,12 @@ int class_for_each_device(struct class * - - if (!class) - return -EINVAL; -+ if (!class->p) { -+ WARN(1, "%s called for class '%s' before it was initialized", -+ __func__, class->name); -+ return -EINVAL; -+ } -+ - mutex_lock(&class->p->class_mutex); - list_for_each_entry(dev, &class->p->class_devices, node) { - if (start) { -@@ -344,6 +350,11 @@ struct device *class_find_device(struct - - if (!class) - return NULL; -+ if (!class->p) { -+ WARN(1, "%s called for class '%s' before it was initialized", -+ __func__, class->name); -+ return NULL; -+ } - - mutex_lock(&class->p->class_mutex); - list_for_each_entry(dev, &class->p->class_devices, node) { diff --git a/driver-core.current/drivers-base-driver.c-remove-unused-to_dev-macro.patch b/driver-core.current/drivers-base-driver.c-remove-unused-to_dev-macro.patch deleted file mode 100644 index 4ae6de0abe2524..00000000000000 --- a/driver-core.current/drivers-base-driver.c-remove-unused-to_dev-macro.patch +++ /dev/null @@ -1,31 +0,0 @@ -From akpm@linux-foundation.org Thu Jul 31 10:54:42 2008 -From: Joe Perches <joe@perches.com> -Date: Wed, 30 Jul 2008 12:29:20 -0700 -Subject: drivers/base/driver.c: remove unused to_dev() macro -To: greg@kroah.com -Cc: akpm@linux-foundation.org, joe@perches.com -Message-ID: <200807301929.m6UJTKip011923@imap1.linux-foundation.org> - - -From: Joe Perches <joe@perches.com> - -Signed-off-by: Joe Perches <joe@perches.com> -Signed-off-by: Andrew Morton <akpm@linux-foundation.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/driver.c | 3 --- - 1 file changed, 3 deletions(-) - ---- a/drivers/base/driver.c -+++ b/drivers/base/driver.c -@@ -16,9 +16,6 @@ - #include <linux/string.h> - #include "base.h" - --#define to_dev(node) container_of(node, struct device, driver_list) -- -- - static struct device *next_device(struct klist_iter *i) - { - struct klist_node *n = klist_next(i); diff --git a/driver-core.current/japanese-translation-of-documentation-submitchecklist.patch b/driver-core.current/japanese-translation-of-documentation-submitchecklist.patch deleted file mode 100644 index 9c82d9ffb26603..00000000000000 --- a/driver-core.current/japanese-translation-of-documentation-submitchecklist.patch +++ /dev/null @@ -1,138 +0,0 @@ -From t-nagano@ah.jp.nec.com Thu Jul 31 10:37:35 2008 -From: Takenori Nagano <t-nagano@ah.jp.nec.com> -Date: Tue, 15 Jul 2008 17:49:42 +0900 -Subject: Japanese translation of Documentation/SubmitChecklist -To: greg@kroah.com -Message-ID: <487C64A6.1020607@ah.jp.nec.com> - - -Hi, - -This patch adds SubmitChecklist translated into Japanese to -Documentation/ja_JP directory. -The translated SubmitChecklist has already been reviewed by JF project. - -SubmitChecklist is one of the important policy documents. -So, I would like to merge into 2.6.27. - -Signed-off-by: Takenori Nagano <t-nagano@ah.jp.nec.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - Documentation/ja_JP/SubmitChecklist | 111 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 111 insertions(+) - ---- /dev/null -+++ b/Documentation/ja_JP/SubmitChecklist -@@ -0,0 +1,111 @@ -+NOTE: -+This is a version of Documentation/SubmitChecklist into Japanese. -+This document is maintained by Takenori Nagano <t-nagano@ah.jp.nec.com> -+and the JF Project team <http://www.linux.or.jp/JF/>. -+If you find any difference between this document and the original file -+or a problem with the translation, -+please contact the maintainer of this file or JF project. -+ -+Please also note that the purpose of this file is to be easier to read -+for non English (read: Japanese) speakers and is not intended as a -+fork. So if you have any comments or updates of this file, please try -+to update the original English file first. -+ -+Last Updated: 2008/07/14 -+================================== -+これは、 -+linux-2.6.26/Documentation/SubmitChecklist の和訳です。 -+ -+翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > -+翻訳日: 2008/07/14 -+翻訳者: Takenori Nagano <t-nagano at ah dot jp dot nec dot com> -+校正者: Masanori Kobayashi さん <zap03216 at nifty dot ne dot jp> -+================================== -+ -+ -+Linux カーネルパッチ投稿者向けチェックリスト -+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+ -+本書では、パッチをより素早く取り込んでもらいたい開発者が実践すべき基本的な事柄 -+をいくつか紹介します。ここにある全ての事柄は、Documentation/SubmittingPatches -+などのLinuxカーネルパッチ投稿に際しての心得を補足するものです。 -+ -+ 1: 妥当なCONFIGオプションや変更されたCONFIGオプション、つまり =y, =m, =n -+ 全てで正しくビルドできることを確認してください。その際、gcc及びリンカが -+ warningやerrorを出していないことも確認してください。 -+ -+ 2: allnoconfig, allmodconfig オプションを用いて正しくビルドできることを -+ 確認してください。 -+ -+ 3: 手許のクロスコンパイルツールやOSDLのPLMのようなものを用いて、複数の -+ アーキテクチャにおいても正しくビルドできることを確認してください。 -+ -+ 4: 64bit長の'unsigned long'を使用しているppc64は、クロスコンパイルでの -+ チェックに適当なアーキテクチャです。 -+ -+ 5: カーネルコーディングスタイルに準拠しているかどうか確認してください(!) -+ -+ 6: CONFIGオプションの追加・変更をした場合には、CONFIGメニューが壊れていない -+ ことを確認してください。 -+ -+ 7: 新しくKconfigのオプションを追加する際には、必ずそのhelpも記述してください。 -+ -+ 8: 適切なKconfigの依存関係を考えながら慎重にチェックしてください。 -+ ただし、この作業はマシンを使ったテストできちんと行うのがとても困難です。 -+ うまくやるには、自分の頭で考えることです。 -+ -+ 9: sparseを利用してちゃんとしたコードチェックをしてください。 -+ -+10: 'make checkstack' と 'make namespacecheck' を利用し、問題が発見されたら -+ 修正してください。'make checkstack' は明示的に問題を示しませんが、どれか -+ 1つの関数が512バイトより大きいスタックを使っていれば、修正すべき候補と -+ なります。 -+ -+11: グローバルなkernel API を説明する kernel-doc をソースの中に含めてください。 -+ ( staticな関数においては必須ではありませんが、含めてもらっても結構です ) -+ そして、'make htmldocs' もしくは 'make mandocs' を利用して追記した -+ ドキュメントのチェックを行い、問題が見つかった場合には修正を行ってください。 -+ -+12: CONFIG_PREEMPT, CONFIG_DEBUG_PREEMPT, CONFIG_DEBUG_SLAB, -+ CONFIG_DEBUG_PAGEALLOC, CONFIG_DEBUG_MUTEXES, CONFIG_DEBUG_SPINLOCK, -+ CONFIG_DEBUG_SPINLOCK_SLEEP これら全てを同時に有効にして動作確認を -+ 行ってください。 -+ -+13: CONFIG_SMP, CONFIG_PREEMPT を有効にした場合と無効にした場合の両方で -+ ビルドした上、動作確認を行ってください。 -+ -+14: もしパッチがディスクのI/O性能などに影響を与えるようであれば、 -+ 'CONFIG_LBD'オプションを有効にした場合と無効にした場合の両方で -+ テストを実施してみてください。 -+ -+15: lockdepの機能を全て有効にした上で、全てのコードパスを評価してください。 -+ -+16: /proc に新しいエントリを追加した場合には、Documentation/ 配下に -+ 必ずドキュメントを追加してください。 -+ -+17: 新しいブートパラメータを追加した場合には、 -+ 必ずDocumentation/kernel-parameters.txt に説明を追加してください。 -+ -+18: 新しくmoduleにパラメータを追加した場合には、MODULE_PARM_DESC()を -+ 利用して必ずその説明を記述してください。 -+ -+19: 新しいuserspaceインタフェースを作成した場合には、Documentation/ABI/ に -+ Documentation/ABI/README を参考にして必ずドキュメントを追加してください。 -+ -+20: 'make headers_check'を実行して全く問題がないことを確認してください。 -+ -+21: 少なくともslabアロケーションとpageアロケーションに失敗した場合の -+ 挙動について、fault-injectionを利用して確認してください。 -+ Documentation/fault-injection/ を参照してください。 -+ -+ 追加したコードがかなりの量であったならば、サブシステム特有の -+ fault-injectionを追加したほうが良いかもしれません。 -+ -+22: 新たに追加したコードは、`gcc -W'でコンパイルしてください。 -+ このオプションは大量の不要なメッセージを出力しますが、 -+ "warning: comparison between signed and unsigned" のようなメッセージは、 -+ バグを見つけるのに役に立ちます。 -+ -+23: 投稿したパッチが -mm パッチセットにマージされた後、全ての既存のパッチや -+ VM, VFS およびその他のサブシステムに関する様々な変更と、現時点でも共存 -+ できることを確認するテストを行ってください。 diff --git a/driver-core.current/kobject-replace-all-occurrences-of-with-instead-of-only-the-first-one.patch b/driver-core.current/kobject-replace-all-occurrences-of-with-instead-of-only-the-first-one.patch deleted file mode 100644 index 59089b05b90658..00000000000000 --- a/driver-core.current/kobject-replace-all-occurrences-of-with-instead-of-only-the-first-one.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ioe-lkml@rameria.de Thu Jul 31 09:58:18 2008 -From: Ingo Oeser <ioe-lkml@rameria.de> -Date: Wed, 23 Jul 2008 01:25:01 +0200 -Subject: kobject: Replace ALL occurrences of '/' with '!' instead of only the first one. -To: Greg KH <gregkh@suse.de> -Cc: linux-kernel@vger.kernel.org, Kay Sievers <kay.sievers@vrfy.org> -Message-ID: <200807230125.02532.ioe-lkml@rameria.de> -Content-Disposition: inline - - -From: Ingo Oeser <ioe-lkml@rameria.de> - -A recent patch from Kay Sievers <kay.sievers@vrfy.org> -replaced the first occurrence of '/' with '!' as needed for block devices. - -Now do some cheap defensive coding and replace all of them to avoid future -issues in this area. - -Signed-off-by: Ingo Oeser <ioe-lkml@rameria.de> -Cc: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - lib/kobject.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - ---- a/lib/kobject.c -+++ b/lib/kobject.c -@@ -223,8 +223,7 @@ static int kobject_set_name_vargs(struct - return -ENOMEM; - - /* ewww... some of these buggers have '/' in the name ... */ -- s = strchr(kobj->name, '/'); -- if (s) -+ while ((s = strchr(kobj->name, '/'))) - s[0] = '!'; - - kfree(old_name); diff --git a/driver-core.current/pm-don-t-skip-device-pm-init-when-config_pm_sleep-isn-t-set-and-config_pm-is-set.patch b/driver-core.current/pm-don-t-skip-device-pm-init-when-config_pm_sleep-isn-t-set-and-config_pm-is-set.patch deleted file mode 100644 index 38b292b6d6329f..00000000000000 --- a/driver-core.current/pm-don-t-skip-device-pm-init-when-config_pm_sleep-isn-t-set-and-config_pm-is-set.patch +++ /dev/null @@ -1,133 +0,0 @@ -From stern@rowland.harvard.edu Thu Aug 7 15:06:36 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Thu, 7 Aug 2008 13:06:12 -0400 (EDT) -Subject: PM: don't skip device PM init when CONFIG_PM_SLEEP isn't set and CONFIG_PM is set -To: Greg KH <greg@kroah.com> -Cc: Linux-pm mailing list <linux-pm@lists.linux-foundation.org> -Message-ID: <Pine.LNX.4.44L0.0808071305210.2598-100000@iolanthe.rowland.org> - - -This patch (as1124) fixes a couple of bugs in the PM core. The new -dev->power.status field should be initialized regardless of whether -CONFIG_PM_SLEEP is enabled, and similarly dpm_sysfs_add() should be -called whenever CONFIG_PM is enabled. - -The patch separates out the call to dpm_sysfs_add() from the call to -device_pm_add(). As a result device_pm_add() can no longer return an -error, so its return type is changed to void. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Tested-by: Romit Dasgupta <romit@ti.com> -Acked-by: Rafael J. Wysocki <rjw@sisk.pl> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/core.c | 9 ++++++--- - drivers/base/power/main.c | 13 +++---------- - drivers/base/power/power.h | 9 +++++++-- - 3 files changed, 16 insertions(+), 15 deletions(-) - ---- a/drivers/base/core.c -+++ b/drivers/base/core.c -@@ -541,6 +541,7 @@ void device_initialize(struct device *de - spin_lock_init(&dev->devres_lock); - INIT_LIST_HEAD(&dev->devres_head); - device_init_wakeup(dev, 0); -+ device_pm_init(dev); - set_dev_node(dev, -1); - } - -@@ -897,9 +898,10 @@ int device_add(struct device *dev) - error = bus_add_device(dev); - if (error) - goto BusError; -- error = device_pm_add(dev); -+ error = dpm_sysfs_add(dev); - if (error) -- goto PMError; -+ goto DPMError; -+ device_pm_add(dev); - kobject_uevent(&dev->kobj, KOBJ_ADD); - bus_attach_device(dev); - if (parent) -@@ -920,7 +922,7 @@ int device_add(struct device *dev) - Done: - put_device(dev); - return error; -- PMError: -+ DPMError: - bus_remove_device(dev); - BusError: - if (dev->bus) -@@ -1007,6 +1009,7 @@ void device_del(struct device *dev) - struct class_interface *class_intf; - - device_pm_remove(dev); -+ dpm_sysfs_remove(dev); - if (parent) - klist_del(&dev->knode_parent); - if (MAJOR(dev->devt)) { ---- a/drivers/base/power/main.c -+++ b/drivers/base/power/main.c -@@ -67,10 +67,8 @@ void device_pm_unlock(void) - * device_pm_add - add a device to the list of active devices - * @dev: Device to be added to the list - */ --int device_pm_add(struct device *dev) -+void device_pm_add(struct device *dev) - { -- int error; -- - pr_debug("PM: Adding info for %s:%s\n", - dev->bus ? dev->bus->name : "No Bus", - kobject_name(&dev->kobj)); -@@ -89,13 +87,9 @@ int device_pm_add(struct device *dev) - */ - WARN_ON(true); - } -- error = dpm_sysfs_add(dev); -- if (!error) { -- dev->power.status = DPM_ON; -- list_add_tail(&dev->power.entry, &dpm_list); -- } -+ -+ list_add_tail(&dev->power.entry, &dpm_list); - mutex_unlock(&dpm_list_mtx); -- return error; - } - - /** -@@ -110,7 +104,6 @@ void device_pm_remove(struct device *dev - dev->bus ? dev->bus->name : "No Bus", - kobject_name(&dev->kobj)); - mutex_lock(&dpm_list_mtx); -- dpm_sysfs_remove(dev); - list_del_init(&dev->power.entry); - mutex_unlock(&dpm_list_mtx); - } ---- a/drivers/base/power/power.h -+++ b/drivers/base/power/power.h -@@ -1,3 +1,8 @@ -+static inline void device_pm_init(struct device *dev) -+{ -+ dev->power.status = DPM_ON; -+} -+ - #ifdef CONFIG_PM_SLEEP - - /* -@@ -11,12 +16,12 @@ static inline struct device *to_device(s - return container_of(entry, struct device, power.entry); - } - --extern int device_pm_add(struct device *); -+extern void device_pm_add(struct device *); - extern void device_pm_remove(struct device *); - - #else /* CONFIG_PM_SLEEP */ - --static inline int device_pm_add(struct device *dev) { return 0; } -+static inline void device_pm_add(struct device *dev) {} - static inline void device_pm_remove(struct device *dev) {} - - #endif diff --git a/driver-core.current/pm-remove-warn_on-from-device_pm_add.patch b/driver-core.current/pm-remove-warn_on-from-device_pm_add.patch deleted file mode 100644 index edaa421db64e7a..00000000000000 --- a/driver-core.current/pm-remove-warn_on-from-device_pm_add.patch +++ /dev/null @@ -1,44 +0,0 @@ -From rjw@sisk.pl Fri Aug 8 16:16:16 2008 -From: "Rafael J. Wysocki" <rjw@sisk.pl> -Date: Sat, 9 Aug 2008 01:05:13 +0200 -Subject: PM: Remove WARN_ON from device_pm_add -To: Greg KH <greg@kroah.com> -Cc: Adrian Bunk <bunk@kernel.org>, Alan Stern <stern@rowland.harvard.edu>, Andrew Morton <akpm@linux-foundation.org> -Message-ID: <200808090105.14770.rjw@sisk.pl> -Content-Disposition: inline - - -PM: Remove WARN_ON from device_pm_add - -Fix message in device_pm_add() saying that the device will not be -added to dpm_list, although in fact the device is going to be added -to the list regardless of the ordering violation. - -Remove the WARN_ON(true) triggered in that situation, because it is -hit by USB very often and spams the users' logs. - -This patch fixes bug #11263 - -Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/base/power/main.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - ---- a/drivers/base/power/main.c -+++ b/drivers/base/power/main.c -@@ -74,11 +74,9 @@ void device_pm_add(struct device *dev) - kobject_name(&dev->kobj)); - mutex_lock(&dpm_list_mtx); - if (dev->parent) { -- if (dev->parent->power.status >= DPM_SUSPENDING) { -- dev_warn(dev, "parent %s is sleeping, will not add\n", -+ if (dev->parent->power.status >= DPM_SUSPENDING) -+ dev_warn(dev, "parent %s should not be sleeping\n", - dev->parent->bus_id); -- WARN_ON(true); -- } - } else if (transition_started) { - /* - * We refuse to register parentless devices while a PM diff --git a/driver-core.current/pnp-fix-add-acpi-modalias-entries.patch b/driver-core.current/pnp-fix-add-acpi-modalias-entries.patch deleted file mode 100644 index 046ef7961b6576..00000000000000 --- a/driver-core.current/pnp-fix-add-acpi-modalias-entries.patch +++ /dev/null @@ -1,50 +0,0 @@ -From kay.sievers@vrfy.org Thu Aug 21 08:39:05 2008 -From: Kay Sievers <kay.sievers@vrfy.org> -Date: Thu, 21 Aug 2008 15:28:56 +0200 -Subject: pnp: fix "add acpi:* modalias entries" -To: "Rafael J. Wysocki" <rjw@sisk.pl> -Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>, Frans Pop <elendil@planet.nl>, linux-kernel@vger.kernel.org, Marcel Selhorst <tpm@selhorst.net>, Thomas Renninger <trenn@suse.de>, Adam Belay <ambx1@neo.rr.com>, Andrew Morton <akpm@linux-foundation.org>, Greg KH <greg@kroah.com> -Message-ID: <1219325336.20723.32.camel@lgn.site> - - -From: Kay Sievers <kay.sievers@vrfy.org> - -With 22454cb99fc39f2629ad06a7eccb3df312f8830e we added only the -first entry of the device table. We need to loop over the whole -device list. - -Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - scripts/mod/file2alias.c | 16 +++++++++++----- - 1 file changed, 11 insertions(+), 5 deletions(-) - ---- a/scripts/mod/file2alias.c -+++ b/scripts/mod/file2alias.c -@@ -344,14 +344,20 @@ static void do_pnp_device_entry(void *sy - struct module *mod) - { - const unsigned long id_size = sizeof(struct pnp_device_id); -- const struct pnp_device_id *id = symval; -+ const unsigned int count = (size / id_size)-1; -+ const struct pnp_device_id *devs = symval; -+ unsigned int i; - - device_id_check(mod->name, "pnp", size, id_size, symval); - -- buf_printf(&mod->dev_table_buf, -- "MODULE_ALIAS(\"pnp:d%s*\");\n", id->id); -- buf_printf(&mod->dev_table_buf, -- "MODULE_ALIAS(\"acpi*:%s:*\");\n", id->id); -+ for (i = 0; i < count; i++) { -+ const char *id = (char *)devs[i].id; -+ -+ buf_printf(&mod->dev_table_buf, -+ "MODULE_ALIAS(\"pnp:d%s*\");\n", id); -+ buf_printf(&mod->dev_table_buf, -+ "MODULE_ALIAS(\"acpi*:%s:*\");\n", id); -+ } - } - - /* looks like: "pnp:dD" for every device of the card */ diff --git a/driver-core.current/uio-generic-irq-handling-for-some-uio-platform-devices.patch b/driver-core.current/uio-generic-irq-handling-for-some-uio-platform-devices.patch deleted file mode 100644 index 3e375965516ba3..00000000000000 --- a/driver-core.current/uio-generic-irq-handling-for-some-uio-platform-devices.patch +++ /dev/null @@ -1,256 +0,0 @@ -From foo@baz Tue Apr 9 12:12:43 2002 -From: Magnus Damm <magnus.damm@gmail.com> -Date: Fri, 11 Jul 2008 18:55:27 +0900 -Subject: UIO: generic irq handling for some uio platform devices -To: linux-kernel@vger.kernel.org -Cc: Uwe.Kleine-Koenig@digi.com, gregkh@suse.de, akpm@linux-foundation.org, hjk@linutronix.de, lethal@linux-sh.org, tglx@linutronix.de, alan@lxorguk.ukuu.org.uk -Message-ID: <20080714223048.GG3217@local> - - -This is V3 of uio_pdrv_genirq.c, a platform driver for UIO with -generic IRQ handling code. This driver is very similar to the regular -UIO platform driver, but is only suitable for devices that are -connected to the interrupt controller using unique interrupt lines. - -The uio_pdrv_genirq driver includes generic interrupt handling code -which disables the serviced interrupt in the interrupt controller -and makes the user space driver responsible for acknowledging the -interrupt in the device and reenabling the interrupt in the interrupt -controller. - -Shared interrupts are not supported since the in-kernel interrupt -handler will disable the interrupt line in the interrupt controller, -and in a shared interrupt configuration this will stop other devices -from delivering interrupts. - -Signed-off-by: Magnus Damm <damm@igel.co.jp> -Signed-off-by: Hans J. Koch <hjk@linutronix.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/uio/Kconfig | 13 ++ - drivers/uio/Makefile | 1 - drivers/uio/uio_pdrv_genirq.c | 188 ++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 202 insertions(+) - ---- a/drivers/uio/Kconfig -+++ b/drivers/uio/Kconfig -@@ -33,6 +33,19 @@ config UIO_PDRV - - If you don't know what to do here, say N. - -+config UIO_PDRV_GENIRQ -+ tristate "Userspace I/O platform driver with generic IRQ handling" -+ help -+ Platform driver for Userspace I/O devices, including generic -+ interrupt handling code. Shared interrupts are not supported. -+ -+ This kernel driver requires that the matching userspace driver -+ handles interrupts in a special way. Userspace is responsible -+ for acknowledging the hardware device if needed, and re-enabling -+ interrupts in the interrupt controller using the write() syscall. -+ -+ If you don't know what to do here, say N. -+ - config UIO_SMX - tristate "SMX cryptengine UIO interface" - default n ---- a/drivers/uio/Makefile -+++ b/drivers/uio/Makefile -@@ -1,4 +1,5 @@ - obj-$(CONFIG_UIO) += uio.o - obj-$(CONFIG_UIO_CIF) += uio_cif.o - obj-$(CONFIG_UIO_PDRV) += uio_pdrv.o -+obj-$(CONFIG_UIO_PDRV_GENIRQ) += uio_pdrv_genirq.o - obj-$(CONFIG_UIO_SMX) += uio_smx.o ---- /dev/null -+++ b/drivers/uio/uio_pdrv_genirq.c -@@ -0,0 +1,188 @@ -+/* -+ * drivers/uio/uio_pdrv_genirq.c -+ * -+ * Userspace I/O platform driver with generic IRQ handling code. -+ * -+ * Copyright (C) 2008 Magnus Damm -+ * -+ * Based on uio_pdrv.c by Uwe Kleine-Koenig, -+ * Copyright (C) 2008 by Digi International Inc. -+ * All rights reserved. -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 as published by -+ * the Free Software Foundation. -+ */ -+ -+#include <linux/platform_device.h> -+#include <linux/uio_driver.h> -+#include <linux/spinlock.h> -+#include <linux/bitops.h> -+#include <linux/interrupt.h> -+#include <linux/stringify.h> -+ -+#define DRIVER_NAME "uio_pdrv_genirq" -+ -+struct uio_pdrv_genirq_platdata { -+ struct uio_info *uioinfo; -+ spinlock_t lock; -+ unsigned long flags; -+}; -+ -+static irqreturn_t uio_pdrv_genirq_handler(int irq, struct uio_info *dev_info) -+{ -+ struct uio_pdrv_genirq_platdata *priv = dev_info->priv; -+ -+ /* Just disable the interrupt in the interrupt controller, and -+ * remember the state so we can allow user space to enable it later. -+ */ -+ -+ if (!test_and_set_bit(0, &priv->flags)) -+ disable_irq_nosync(irq); -+ -+ return IRQ_HANDLED; -+} -+ -+static int uio_pdrv_genirq_irqcontrol(struct uio_info *dev_info, s32 irq_on) -+{ -+ struct uio_pdrv_genirq_platdata *priv = dev_info->priv; -+ unsigned long flags; -+ -+ /* Allow user space to enable and disable the interrupt -+ * in the interrupt controller, but keep track of the -+ * state to prevent per-irq depth damage. -+ * -+ * Serialize this operation to support multiple tasks. -+ */ -+ -+ spin_lock_irqsave(&priv->lock, flags); -+ if (irq_on) { -+ if (test_and_clear_bit(0, &priv->flags)) -+ enable_irq(dev_info->irq); -+ } else { -+ if (!test_and_set_bit(0, &priv->flags)) -+ disable_irq(dev_info->irq); -+ } -+ spin_unlock_irqrestore(&priv->lock, flags); -+ -+ return 0; -+} -+ -+static int uio_pdrv_genirq_probe(struct platform_device *pdev) -+{ -+ struct uio_info *uioinfo = pdev->dev.platform_data; -+ struct uio_pdrv_genirq_platdata *priv; -+ struct uio_mem *uiomem; -+ int ret = -EINVAL; -+ int i; -+ -+ if (!uioinfo || !uioinfo->name || !uioinfo->version) { -+ dev_err(&pdev->dev, "missing platform_data\n"); -+ goto bad0; -+ } -+ -+ if (uioinfo->handler || uioinfo->irqcontrol || uioinfo->irq_flags) { -+ dev_err(&pdev->dev, "interrupt configuration error\n"); -+ goto bad0; -+ } -+ -+ priv = kzalloc(sizeof(*priv), GFP_KERNEL); -+ if (!priv) { -+ ret = -ENOMEM; -+ dev_err(&pdev->dev, "unable to kmalloc\n"); -+ goto bad0; -+ } -+ -+ priv->uioinfo = uioinfo; -+ spin_lock_init(&priv->lock); -+ priv->flags = 0; /* interrupt is enabled to begin with */ -+ -+ uiomem = &uioinfo->mem[0]; -+ -+ for (i = 0; i < pdev->num_resources; ++i) { -+ struct resource *r = &pdev->resource[i]; -+ -+ if (r->flags != IORESOURCE_MEM) -+ continue; -+ -+ if (uiomem >= &uioinfo->mem[MAX_UIO_MAPS]) { -+ dev_warn(&pdev->dev, "device has more than " -+ __stringify(MAX_UIO_MAPS) -+ " I/O memory resources.\n"); -+ break; -+ } -+ -+ uiomem->memtype = UIO_MEM_PHYS; -+ uiomem->addr = r->start; -+ uiomem->size = r->end - r->start + 1; -+ ++uiomem; -+ } -+ -+ while (uiomem < &uioinfo->mem[MAX_UIO_MAPS]) { -+ uiomem->size = 0; -+ ++uiomem; -+ } -+ -+ /* This driver requires no hardware specific kernel code to handle -+ * interrupts. Instead, the interrupt handler simply disables the -+ * interrupt in the interrupt controller. User space is responsible -+ * for performing hardware specific acknowledge and re-enabling of -+ * the interrupt in the interrupt controller. -+ * -+ * Interrupt sharing is not supported. -+ */ -+ -+ uioinfo->irq_flags = IRQF_DISABLED; -+ uioinfo->handler = uio_pdrv_genirq_handler; -+ uioinfo->irqcontrol = uio_pdrv_genirq_irqcontrol; -+ uioinfo->priv = priv; -+ -+ ret = uio_register_device(&pdev->dev, priv->uioinfo); -+ if (ret) { -+ dev_err(&pdev->dev, "unable to register uio device\n"); -+ goto bad1; -+ } -+ -+ platform_set_drvdata(pdev, priv); -+ return 0; -+ bad1: -+ kfree(priv); -+ bad0: -+ return ret; -+} -+ -+static int uio_pdrv_genirq_remove(struct platform_device *pdev) -+{ -+ struct uio_pdrv_genirq_platdata *priv = platform_get_drvdata(pdev); -+ -+ uio_unregister_device(priv->uioinfo); -+ kfree(priv); -+ return 0; -+} -+ -+static struct platform_driver uio_pdrv_genirq = { -+ .probe = uio_pdrv_genirq_probe, -+ .remove = uio_pdrv_genirq_remove, -+ .driver = { -+ .name = DRIVER_NAME, -+ .owner = THIS_MODULE, -+ }, -+}; -+ -+static int __init uio_pdrv_genirq_init(void) -+{ -+ return platform_driver_register(&uio_pdrv_genirq); -+} -+ -+static void __exit uio_pdrv_genirq_exit(void) -+{ -+ platform_driver_unregister(&uio_pdrv_genirq); -+} -+ -+module_init(uio_pdrv_genirq_init); -+module_exit(uio_pdrv_genirq_exit); -+ -+MODULE_AUTHOR("Magnus Damm"); -+MODULE_DESCRIPTION("Userspace I/O platform driver with generic IRQ handling"); -+MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("platform:" DRIVER_NAME); diff --git a/driver-core.current/uio-uio_pdrv-fix-license-specification.patch b/driver-core.current/uio-uio_pdrv-fix-license-specification.patch deleted file mode 100644 index 9c7da57b77a423..00000000000000 --- a/driver-core.current/uio-uio_pdrv-fix-license-specification.patch +++ /dev/null @@ -1,29 +0,0 @@ -From Uwe.Kleine-Koenig@digi.com Wed Aug 20 13:45:09 2008 -From: Uwe Kleine-K�nig <Uwe.Kleine-Koenig@digi.com> -Date: Fri, 11 Jul 2008 11:10:37 +0200 -Subject: UIO: uio_pdrv: fix license specification -To: Greg KH <greg@kroah.com>, "Hans J. Koch" <hjk@linutronix.de> -Cc: Magnus Damm <magnus.damm@gmail.com>, <linux-kernel@vger.kernel.org> -Message-ID: <1215767437-20583-3-git-send-email-Uwe.Kleine-Koenig@digi.com> - - -Thanks to Magnus Damm for pointing that out. - -Signed-off-by: Uwe Kleine-K�nig <Uwe.Kleine-Koenig@digi.com> -Cc: Magnus Damm <magnus.damm@gmail.com> -Acked-by: Hans J. Koch <hjk@linutronix.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/uio/uio_pdrv.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/uio/uio_pdrv.c -+++ b/drivers/uio/uio_pdrv.c -@@ -116,5 +116,5 @@ module_exit(uio_pdrv_exit); - - MODULE_AUTHOR("Uwe Kleine-Koenig"); - MODULE_DESCRIPTION("Userspace I/O platform driver"); --MODULE_LICENSE("GPL"); -+MODULE_LICENSE("GPL v2"); - MODULE_ALIAS("platform:" DRIVER_NAME); diff --git a/driver-core.current/uio-uio_pdrv-fix-memory-leak.patch b/driver-core.current/uio-uio_pdrv-fix-memory-leak.patch deleted file mode 100644 index 7824ac14388e0f..00000000000000 --- a/driver-core.current/uio-uio_pdrv-fix-memory-leak.patch +++ /dev/null @@ -1,31 +0,0 @@ -From Uwe.Kleine-Koenig@digi.com Wed Aug 20 13:44:18 2008 -From: Uwe Kleine-K�nig <Uwe.Kleine-Koenig@digi.com> -Date: Fri, 11 Jul 2008 11:10:36 +0200 -Subject: UIO: uio_pdrv: fix memory leak -To: Greg KH <greg@kroah.com>, "Hans J. Koch" <hjk@linutronix.de> -Cc: Magnus Damm <magnus.damm@gmail.com>, <linux-kernel@vger.kernel.org> -Message-ID: <1215767437-20583-2-git-send-email-Uwe.Kleine-Koenig@digi.com> - - -Thanks to Magnus Damm for pointing that out. - -Signed-off-by: Uwe Kleine-K�nig <Uwe.Kleine-Koenig@digi.com> -Cc: Magnus Damm <magnus.damm@gmail.com> -Acked-by: Hans J. Koch <hjk@linutronix.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/uio/uio_pdrv.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/uio/uio_pdrv.c -+++ b/drivers/uio/uio_pdrv.c -@@ -88,6 +88,8 @@ static int uio_pdrv_remove(struct platfo - - uio_unregister_device(pdata->uioinfo); - -+ kfree(pdata); -+ - return 0; - } - diff --git a/driver-core/driver-core-basic-infrastructure-for-per-module-dynamic-debug-messages.patch b/driver-core/driver-core-basic-infrastructure-for-per-module-dynamic-debug-messages.patch index 6a8b096ca8d974..afc1b5117691cc 100644 --- a/driver-core/driver-core-basic-infrastructure-for-per-module-dynamic-debug-messages.patch +++ b/driver-core/driver-core-basic-infrastructure-for-per-module-dynamic-debug-messages.patch @@ -88,7 +88,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt -@@ -1677,6 +1677,11 @@ and is between 256 and 4096 characters. +@@ -1680,6 +1680,11 @@ and is between 256 and 4096 characters. autoconfiguration. Ranges are in pairs (memory base and size). @@ -12,42 +12,10 @@ gregkh/detect-atomic-counter-underflows.patch # Driver core patches for 2.6.27 ################################# -driver-core.current/kobject-replace-all-occurrences-of-with-instead-of-only-the-first-one.patch -driver-core.current/japanese-translation-of-documentation-submitchecklist.patch -driver-core.current/documentation-howto-ja_jp-sync-patch.patch -driver-core.current/drivers-base-driver.c-remove-unused-to_dev-macro.patch -driver-core.current/dev_printk-constify-the-dev-argument.patch -driver-core.current/driver-model-anti-oopsing-medicine.patch -driver-core.current/pm-don-t-skip-device-pm-init-when-config_pm_sleep-isn-t-set-and-config_pm-is-set.patch -driver-core.current/driver-core-add-init_name-to-struct-device.patch -driver-core.current/pm-remove-warn_on-from-device_pm_add.patch -driver-core.current/block-fix-partial-read-of-proc-partitions-diskstats.patch -driver-core.current/block-drop-references-taken-by-class_find_device.patch -driver-core.current/uio-uio_pdrv-fix-memory-leak.patch -driver-core.current/uio-uio_pdrv-fix-license-specification.patch -driver-core.current/uio-generic-irq-handling-for-some-uio-platform-devices.patch -driver-core.current/pnp-fix-add-acpi-modalias-entries.patch - ################################# # USB patches for 2.6.27 ################################# -usb.current/usb-isp1760-fixed-trivial-math-in-comment.patch -usb.current/usb-serial-option-support-hsdpa-modem-a2502.patch -usb.current/usb-fix-bug-in-usb_unlink_anchored_urbs.patch -usb.current/usb-cdc-acm-quirk-for-conexant-cx93010-usb-modem.patch -usb.current/usb-fix-pxa27x_udc-usb-speed-handling.patch -usb.current/usb-musb-get-rid-of-procfs-entry.patch -usb.current/usb-musb-get-rid-of-musb_loglevel-and-use-parameter.patch -usb.current/musb-fix-index-register-corruption-seen-with-g_ether-and-windows-host.patch -usb.current/usb-cdc-acm-don-t-unlock-acm-mutex-on-error-path.patch - -usb.current/usb-add-udev-argument-to-interface-suspend-resume-functions.patch -usb.current/usb-defer-set-interface-for-suspended-devices.patch -usb.current/usb-add-new-pm-callback-methods-for-usb.patch -usb.current/usb-don-t-rebind-before-complete-callback.patch -usb.current/usb-automatically-enable-rhsc-interrupts.patch -usb.current/usb-sisusbvga-add-usb-id-for-0711-0918-magic-control-technology-corp.patch ##################################################################### @@ -126,7 +94,6 @@ usb/drivers-usb-class-usblp.c-adjust-error-handling-code.patch usb/usb-kill-urbs-permanently.patch usb/usb-extend-poisoning-to-anchors.patch usb/ub-remove-sg_stat.patch -usb/usb-removed-unused-include-version.h.patch usb/usb-let-some-usb-host-controllers-get-irq-flags-from-resource.patch usb/usb-gadget-kconfig-cleanup.patch usb/usb-gadget-dummy_hcd-implement-set_wedge.patch diff --git a/usb.current/musb-fix-index-register-corruption-seen-with-g_ether-and-windows-host.patch b/usb.current/musb-fix-index-register-corruption-seen-with-g_ether-and-windows-host.patch deleted file mode 100644 index 35a9879793bdfa..00000000000000 --- a/usb.current/musb-fix-index-register-corruption-seen-with-g_ether-and-windows-host.patch +++ /dev/null @@ -1,50 +0,0 @@ -From gadiyar@ti.com Thu Aug 21 08:40:33 2008 -From: "Gadiyar, Anand" <gadiyar@ti.com> -Date: Thu, 21 Aug 2008 20:21:00 +0530 -Subject: MUSB: Fix index register corruption seen with g_ether and Windows host -To: "greg@kroah.com" <greg@kroah.com>, "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org> -Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>, "felipe.balbi@nokia.com" <felipe.balbi@nokia.com>, Tony Lindgren <tony@atomide.com> -Message-ID: <5A47E75E594F054BAF48C5E4FC4B92AB02C3E31565@dbde02.ent.ti.com> - - -From: Anand Gadiyar <gadiyar@ti.com> - -If Indexed Mode register accesses are enabled, the ep0_rxstate() -function calls musb_g_ep0_giveback() before writing to the CSR -register. When control returns to this ep0_rxstate, the index -register contents are over-written. This causes the CSR register -write to fail. - -Fixed by writing the correct value into the index register before -writing to the CSR. - -This was observed only in ep0_rxstate() with g_ether loaded and -the device connected to a MS Windows host PC. Anticipatively fixed -ep0_txstate() as well. - -Signed-off-by: Anand Gadiyar <gadiyar@ti.com> -Acked-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/musb_gadget_ep0.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/usb/musb/musb_gadget_ep0.c -+++ b/drivers/usb/musb/musb_gadget_ep0.c -@@ -476,6 +476,7 @@ static void ep0_rxstate(struct musb *mus - return; - musb->ackpend = 0; - } -+ musb_ep_select(musb->mregs, 0); - musb_writew(regs, MUSB_CSR0, tmp); - } - -@@ -528,6 +529,7 @@ static void ep0_txstate(struct musb *mus - } - - /* send it out, triggering a "txpktrdy cleared" irq */ -+ musb_ep_select(musb->mregs, 0); - musb_writew(regs, MUSB_CSR0, csr); - } - diff --git a/usb.current/usb-add-new-pm-callback-methods-for-usb.patch b/usb.current/usb-add-new-pm-callback-methods-for-usb.patch deleted file mode 100644 index 8ec19a4c62b787..00000000000000 --- a/usb.current/usb-add-new-pm-callback-methods-for-usb.patch +++ /dev/null @@ -1,184 +0,0 @@ -From stern+48acf28e@rowland.harvard.edu Tue Aug 12 11:34:16 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Tue, 12 Aug 2008 14:34:10 -0400 (EDT) -Subject: USB: Add new PM callback methods for USB -To: Greg KH <greg@kroah.com> -Cc: USB list <linux-usb@vger.kernel.org> -Message-ID: <Pine.LNX.4.44L0.0808121430520.2248-100000@iolanthe.rowland.org> - - -This patch (as1129) adds support for the new PM callbacks to usbcore. -The new callbacks merely invoke the same old USB power management -routines as the old ones did. - -A minor improvement is that the callbacks are present only in the -"USB-device" device_type structure, rather than in the bus_type -structure. This way they will be invoked only for USB devices, not -for USB interfaces. The core USB PM routines automatically handle -suspending and resuming interfaces along with their devices. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/driver.c | 15 +-------- - drivers/usb/core/usb.c | 73 ++++++++++++++++++++++++++++++++++++++++++---- - drivers/usb/core/usb.h | 3 + - 3 files changed, 72 insertions(+), 19 deletions(-) - ---- a/drivers/usb/core/driver.c -+++ b/drivers/usb/core/driver.c -@@ -1630,12 +1630,10 @@ int usb_external_resume_device(struct us - return status; - } - --static int usb_suspend(struct device *dev, pm_message_t message) -+int usb_suspend(struct device *dev, pm_message_t message) - { - struct usb_device *udev; - -- if (!is_usb_device(dev)) /* Ignore PM for interfaces */ -- return 0; - udev = to_usb_device(dev); - - /* If udev is already suspended, we can skip this suspend and -@@ -1654,12 +1652,10 @@ static int usb_suspend(struct device *de - return usb_external_suspend_device(udev, message); - } - --static int usb_resume(struct device *dev) -+int usb_resume(struct device *dev) - { - struct usb_device *udev; - -- if (!is_usb_device(dev)) /* Ignore PM for interfaces */ -- return 0; - udev = to_usb_device(dev); - - /* If udev->skip_sys_resume is set then udev was already suspended -@@ -1671,17 +1667,10 @@ static int usb_resume(struct device *dev - return usb_external_resume_device(udev); - } - --#else -- --#define usb_suspend NULL --#define usb_resume NULL -- - #endif /* CONFIG_PM */ - - struct bus_type usb_bus_type = { - .name = "usb", - .match = usb_device_match, - .uevent = usb_uevent, -- .suspend = usb_suspend, -- .resume = usb_resume, - }; ---- a/drivers/usb/core/usb.c -+++ b/drivers/usb/core/usb.c -@@ -219,12 +219,6 @@ static int usb_dev_uevent(struct device - } - #endif /* CONFIG_HOTPLUG */ - --struct device_type usb_device_type = { -- .name = "usb_device", -- .release = usb_release_dev, -- .uevent = usb_dev_uevent, --}; -- - #ifdef CONFIG_PM - - static int ksuspend_usb_init(void) -@@ -244,13 +238,80 @@ static void ksuspend_usb_cleanup(void) - destroy_workqueue(ksuspend_usb_wq); - } - -+/* USB device Power-Management thunks. -+ * There's no need to distinguish here between quiescing a USB device -+ * and powering it down; the generic_suspend() routine takes care of -+ * it by skipping the usb_port_suspend() call for a quiesce. And for -+ * USB interfaces there's no difference at all. -+ */ -+ -+static int usb_dev_prepare(struct device *dev) -+{ -+ return 0; /* Implement eventually? */ -+} -+ -+static void usb_dev_complete(struct device *dev) -+{ -+ /* Currently used only for rebinding interfaces */ -+ usb_resume(dev); /* Implement eventually? */ -+} -+ -+static int usb_dev_suspend(struct device *dev) -+{ -+ return usb_suspend(dev, PMSG_SUSPEND); -+} -+ -+static int usb_dev_resume(struct device *dev) -+{ -+ return usb_resume(dev); -+} -+ -+static int usb_dev_freeze(struct device *dev) -+{ -+ return usb_suspend(dev, PMSG_FREEZE); -+} -+ -+static int usb_dev_thaw(struct device *dev) -+{ -+ return usb_resume(dev); -+} -+ -+static int usb_dev_poweroff(struct device *dev) -+{ -+ return usb_suspend(dev, PMSG_HIBERNATE); -+} -+ -+static int usb_dev_restore(struct device *dev) -+{ -+ return usb_resume(dev); -+} -+ -+static struct pm_ops usb_device_pm_ops = { -+ .prepare = usb_dev_prepare, -+ .complete = usb_dev_complete, -+ .suspend = usb_dev_suspend, -+ .resume = usb_dev_resume, -+ .freeze = usb_dev_freeze, -+ .thaw = usb_dev_thaw, -+ .poweroff = usb_dev_poweroff, -+ .restore = usb_dev_restore, -+}; -+ - #else - - #define ksuspend_usb_init() 0 - #define ksuspend_usb_cleanup() do {} while (0) -+#define usb_device_pm_ops (* (struct pm_ops *) 0) - - #endif /* CONFIG_PM */ - -+struct device_type usb_device_type = { -+ .name = "usb_device", -+ .release = usb_release_dev, -+ .uevent = usb_dev_uevent, -+ .pm = &usb_device_pm_ops, -+}; -+ - - /* Returns 1 if @usb_bus is WUSB, 0 otherwise */ - static unsigned usb_bus_is_wusb(struct usb_bus *bus) ---- a/drivers/usb/core/usb.h -+++ b/drivers/usb/core/usb.h -@@ -41,6 +41,9 @@ extern void usb_host_cleanup(void); - - #ifdef CONFIG_PM - -+extern int usb_suspend(struct device *dev, pm_message_t msg); -+extern int usb_resume(struct device *dev); -+ - extern void usb_autosuspend_work(struct work_struct *work); - extern int usb_port_suspend(struct usb_device *dev); - extern int usb_port_resume(struct usb_device *dev); diff --git a/usb.current/usb-add-udev-argument-to-interface-suspend-resume-functions.patch b/usb.current/usb-add-udev-argument-to-interface-suspend-resume-functions.patch deleted file mode 100644 index 1dda0e579fe670..00000000000000 --- a/usb.current/usb-add-udev-argument-to-interface-suspend-resume-functions.patch +++ /dev/null @@ -1,97 +0,0 @@ -From stern+48acf28e@rowland.harvard.edu Tue Aug 12 11:33:28 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Tue, 12 Aug 2008 14:33:27 -0400 (EDT) -Subject: USB: Add udev argument to interface suspend/resume functions -To: Greg KH <greg@kroah.com> -Cc: USB list <linux-usb@vger.kernel.org> -Message-ID: <Pine.LNX.4.44L0.0808121429120.2248-100000@iolanthe.rowland.org> - - -This patch (as1127) makes a minor change to the prototypes of the -usb_suspend_interface() and usb_resume_interface() routines. Now the -usb_device structure is passed as an argument, instead of being -computed on-the-fly from the usb_interface argument. - -It makes the code look simpler, even if it really isn't much different -from before. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/driver.c | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - ---- a/drivers/usb/core/driver.c -+++ b/drivers/usb/core/driver.c -@@ -926,14 +926,14 @@ static int usb_resume_device(struct usb_ - } - - /* Caller has locked intf's usb_device's pm mutex */ --static int usb_suspend_interface(struct usb_interface *intf, pm_message_t msg) -+static int usb_suspend_interface(struct usb_device *udev, -+ struct usb_interface *intf, pm_message_t msg) - { - struct usb_driver *driver; - int status = 0; - - /* with no hardware, USB interfaces only use FREEZE and ON states */ -- if (interface_to_usbdev(intf)->state == USB_STATE_NOTATTACHED || -- !is_active(intf)) -+ if (udev->state == USB_STATE_NOTATTACHED || !is_active(intf)) - goto done; - - if (intf->condition == USB_INTERFACE_UNBOUND) /* This can't happen */ -@@ -944,7 +944,7 @@ static int usb_suspend_interface(struct - status = driver->suspend(intf, msg); - if (status == 0) - mark_quiesced(intf); -- else if (!interface_to_usbdev(intf)->auto_pm) -+ else if (!udev->auto_pm) - dev_err(&intf->dev, "%s error %d\n", - "suspend", status); - } else { -@@ -961,13 +961,13 @@ static int usb_suspend_interface(struct - } - - /* Caller has locked intf's usb_device's pm_mutex */ --static int usb_resume_interface(struct usb_interface *intf, int reset_resume) -+static int usb_resume_interface(struct usb_device *udev, -+ struct usb_interface *intf, int reset_resume) - { - struct usb_driver *driver; - int status = 0; - -- if (interface_to_usbdev(intf)->state == USB_STATE_NOTATTACHED || -- is_active(intf)) -+ if (udev->state == USB_STATE_NOTATTACHED || is_active(intf)) - goto done; - - /* Don't let autoresume interfere with unbinding */ -@@ -1151,7 +1151,7 @@ static int usb_suspend_both(struct usb_d - if (udev->actconfig) { - for (; i < udev->actconfig->desc.bNumInterfaces; i++) { - intf = udev->actconfig->interface[i]; -- status = usb_suspend_interface(intf, msg); -+ status = usb_suspend_interface(udev, intf, msg); - if (status != 0) - break; - } -@@ -1163,7 +1163,7 @@ static int usb_suspend_both(struct usb_d - if (status != 0) { - while (--i >= 0) { - intf = udev->actconfig->interface[i]; -- usb_resume_interface(intf, 0); -+ usb_resume_interface(udev, intf, 0); - } - - /* Try another autosuspend when the interfaces aren't busy */ -@@ -1276,7 +1276,7 @@ static int usb_resume_both(struct usb_de - if (status == 0 && udev->actconfig) { - for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) { - intf = udev->actconfig->interface[i]; -- usb_resume_interface(intf, udev->reset_resume); -+ usb_resume_interface(udev, intf, udev->reset_resume); - } - } - diff --git a/usb.current/usb-automatically-enable-rhsc-interrupts.patch b/usb.current/usb-automatically-enable-rhsc-interrupts.patch deleted file mode 100644 index d5e23e15a9a50b..00000000000000 --- a/usb.current/usb-automatically-enable-rhsc-interrupts.patch +++ /dev/null @@ -1,419 +0,0 @@ -From stern@rowland.harvard.edu Wed Aug 20 15:16:23 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Wed, 20 Aug 2008 17:22:05 -0400 (EDT) -Subject: USB: automatically enable RHSC interrupts -To: Greg KH <greg@kroah.com> -Cc: USB list <linux-usb@vger.kernel.org> -Message-ID: <Pine.LNX.4.44L0.0808201713110.14505-100000@iolanthe.rowland.org> - - -This patch (as1069c) changes the way OHCI root-hub status-change -interrupts are enabled. Currently a special HCD method, -hub_irq_enable(), is called when the hub driver is finished using a -root hub. This approach turns out to be subject to races, resulting -in unnecessary polling. - -The patch does away with the method entirely. Instead, the driver -automatically enables the RHSC interrupt when no more status changes -are present. This scheme is safe with controllers using -level-triggered semantics for their interrupt flags. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/hcd.c | 9 ------ - drivers/usb/core/hcd.h | 4 --- - drivers/usb/core/hub.c | 9 ------ - drivers/usb/host/ohci-at91.c | 1 - drivers/usb/host/ohci-au1xxx.c | 1 - drivers/usb/host/ohci-ep93xx.c | 1 - drivers/usb/host/ohci-hub.c | 53 +++++++++++++++++++++++----------------- - drivers/usb/host/ohci-lh7a404.c | 1 - drivers/usb/host/ohci-omap.c | 1 - drivers/usb/host/ohci-pci.c | 1 - drivers/usb/host/ohci-pnx4008.c | 1 - drivers/usb/host/ohci-pnx8550.c | 1 - drivers/usb/host/ohci-ppc-of.c | 1 - drivers/usb/host/ohci-ppc-soc.c | 1 - drivers/usb/host/ohci-ps3.c | 1 - drivers/usb/host/ohci-pxa27x.c | 1 - drivers/usb/host/ohci-s3c2410.c | 1 - drivers/usb/host/ohci-sa1111.c | 1 - drivers/usb/host/ohci-sh.c | 1 - drivers/usb/host/ohci-sm501.c | 1 - drivers/usb/host/ohci-ssb.c | 1 - drivers/usb/host/u132-hcd.c | 11 -------- - 22 files changed, 31 insertions(+), 72 deletions(-) - ---- a/drivers/usb/core/hcd.c -+++ b/drivers/usb/core/hcd.c -@@ -924,15 +924,6 @@ static int register_root_hub(struct usb_ - return retval; - } - --void usb_enable_root_hub_irq (struct usb_bus *bus) --{ -- struct usb_hcd *hcd; -- -- hcd = container_of (bus, struct usb_hcd, self); -- if (hcd->driver->hub_irq_enable && hcd->state != HC_STATE_HALT) -- hcd->driver->hub_irq_enable (hcd); --} -- - - /*-------------------------------------------------------------------------*/ - ---- a/drivers/usb/core/hcd.h -+++ b/drivers/usb/core/hcd.h -@@ -212,8 +212,6 @@ struct hc_driver { - int (*bus_suspend)(struct usb_hcd *); - int (*bus_resume)(struct usb_hcd *); - int (*start_port_reset)(struct usb_hcd *, unsigned port_num); -- void (*hub_irq_enable)(struct usb_hcd *); -- /* Needed only if port-change IRQs are level-triggered */ - - /* force handover of high-speed port to full-speed companion */ - void (*relinquish_port)(struct usb_hcd *, int); -@@ -379,8 +377,6 @@ extern struct list_head usb_bus_list; - extern struct mutex usb_bus_list_lock; - extern wait_queue_head_t usb_kill_urb_queue; - --extern void usb_enable_root_hub_irq(struct usb_bus *bus); -- - extern int usb_find_interface_driver(struct usb_device *dev, - struct usb_interface *interface); - ---- a/drivers/usb/core/hub.c -+++ b/drivers/usb/core/hub.c -@@ -2102,8 +2102,6 @@ int usb_port_resume(struct usb_device *u - } - - clear_bit(port1, hub->busy_bits); -- if (!hub->hdev->parent && !hub->busy_bits[0]) -- usb_enable_root_hub_irq(hub->hdev->bus); - - status = check_port_resume_type(udev, - hub, port1, status, portchange, portstatus); -@@ -3081,11 +3079,6 @@ static void hub_events(void) - } - } - -- /* If this is a root hub, tell the HCD it's okay to -- * re-enable port-change interrupts now. */ -- if (!hdev->parent && !hub->busy_bits[0]) -- usb_enable_root_hub_irq(hdev->bus); -- - loop_autopm: - /* Allow autosuspend if we're not going to run again */ - if (list_empty(&hub->event_list)) -@@ -3311,8 +3304,6 @@ static int usb_reset_and_verify_device(s - break; - } - clear_bit(port1, parent_hub->busy_bits); -- if (!parent_hdev->parent && !parent_hub->busy_bits[0]) -- usb_enable_root_hub_irq(parent_hdev->bus); - - if (ret < 0) - goto re_enumerate; ---- a/drivers/usb/host/ohci-at91.c -+++ b/drivers/usb/host/ohci-at91.c -@@ -260,7 +260,6 @@ static const struct hc_driver ohci_at91_ - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-au1xxx.c -+++ b/drivers/usb/host/ohci-au1xxx.c -@@ -163,7 +163,6 @@ static const struct hc_driver ohci_au1xx - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-ep93xx.c -+++ b/drivers/usb/host/ohci-ep93xx.c -@@ -134,7 +134,6 @@ static struct hc_driver ohci_ep93xx_hc_d - .get_frame_number = ohci_get_frame, - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-hub.c -+++ b/drivers/usb/host/ohci-hub.c -@@ -36,18 +36,6 @@ - - /*-------------------------------------------------------------------------*/ - --/* hcd->hub_irq_enable() */ --static void ohci_rhsc_enable (struct usb_hcd *hcd) --{ -- struct ohci_hcd *ohci = hcd_to_ohci (hcd); -- -- spin_lock_irq(&ohci->lock); -- if (!ohci->autostop) -- del_timer(&hcd->rh_timer); /* Prevent next poll */ -- ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable); -- spin_unlock_irq(&ohci->lock); --} -- - #define OHCI_SCHED_ENABLES \ - (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE) - -@@ -374,18 +362,28 @@ static int ohci_root_hub_state_changes(s - int any_connected) - { - int poll_rh = 1; -+ int rhsc; - -+ rhsc = ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC; - switch (ohci->hc_control & OHCI_CTRL_HCFS) { - - case OHCI_USB_OPER: -- /* keep on polling until we know a device is connected -- * and RHSC is enabled */ -+ /* If no status changes are pending, enable status-change -+ * interrupts. -+ */ -+ if (!rhsc && !changed) { -+ rhsc = OHCI_INTR_RHSC; -+ ohci_writel(ohci, rhsc, &ohci->regs->intrenable); -+ } -+ -+ /* Keep on polling until we know a device is connected -+ * and RHSC is enabled, or until we autostop. -+ */ - if (!ohci->autostop) { - if (any_connected || - !device_may_wakeup(&ohci_to_hcd(ohci) - ->self.root_hub->dev)) { -- if (ohci_readl(ohci, &ohci->regs->intrenable) & -- OHCI_INTR_RHSC) -+ if (rhsc) - poll_rh = 0; - } else { - ohci->autostop = 1; -@@ -398,12 +396,13 @@ static int ohci_root_hub_state_changes(s - ohci->autostop = 0; - ohci->next_statechange = jiffies + - STATECHANGE_DELAY; -- } else if (time_after_eq(jiffies, -+ } else if (rhsc && time_after_eq(jiffies, - ohci->next_statechange) - && !ohci->ed_rm_list - && !(ohci->hc_control & - OHCI_SCHED_ENABLES)) { - ohci_rh_suspend(ohci, 1); -+ poll_rh = 0; - } - } - break; -@@ -417,6 +416,12 @@ static int ohci_root_hub_state_changes(s - else - usb_hcd_resume_root_hub(ohci_to_hcd(ohci)); - } else { -+ if (!rhsc && (ohci->autostop || -+ ohci_to_hcd(ohci)->self.root_hub-> -+ do_remote_wakeup)) -+ ohci_writel(ohci, OHCI_INTR_RHSC, -+ &ohci->regs->intrenable); -+ - /* everything is idle, no need for polling */ - poll_rh = 0; - } -@@ -438,12 +443,16 @@ static inline int ohci_rh_resume(struct - static int ohci_root_hub_state_changes(struct ohci_hcd *ohci, int changed, - int any_connected) - { -- int poll_rh = 1; -- -- /* keep on polling until RHSC is enabled */ -+ /* If RHSC is enabled, don't poll */ - if (ohci_readl(ohci, &ohci->regs->intrenable) & OHCI_INTR_RHSC) -- poll_rh = 0; -- return poll_rh; -+ return 0; -+ -+ /* If no status changes are pending, enable status-change interrupts */ -+ if (!changed) { -+ ohci_writel(ohci, OHCI_INTR_RHSC, &ohci->regs->intrenable); -+ return 0; -+ } -+ return 1; - } - - #endif /* CONFIG_PM */ ---- a/drivers/usb/host/ohci-lh7a404.c -+++ b/drivers/usb/host/ohci-lh7a404.c -@@ -193,7 +193,6 @@ static const struct hc_driver ohci_lh7a4 - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-omap.c -+++ b/drivers/usb/host/ohci-omap.c -@@ -470,7 +470,6 @@ static const struct hc_driver ohci_omap_ - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-pci.c -+++ b/drivers/usb/host/ohci-pci.c -@@ -459,7 +459,6 @@ static const struct hc_driver ohci_pci_h - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-pnx4008.c -+++ b/drivers/usb/host/ohci-pnx4008.c -@@ -277,7 +277,6 @@ static const struct hc_driver ohci_pnx40 - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-pnx8550.c -+++ b/drivers/usb/host/ohci-pnx8550.c -@@ -201,7 +201,6 @@ static const struct hc_driver ohci_pnx85 - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-ppc-of.c -+++ b/drivers/usb/host/ohci-ppc-of.c -@@ -72,7 +72,6 @@ static const struct hc_driver ohci_ppc_o - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-ppc-soc.c -+++ b/drivers/usb/host/ohci-ppc-soc.c -@@ -172,7 +172,6 @@ static const struct hc_driver ohci_ppc_s - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-ps3.c -+++ b/drivers/usb/host/ohci-ps3.c -@@ -68,7 +68,6 @@ static const struct hc_driver ps3_ohci_h - .get_frame_number = ohci_get_frame, - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - .start_port_reset = ohci_start_port_reset, - #if defined(CONFIG_PM) - .bus_suspend = ohci_bus_suspend, ---- a/drivers/usb/host/ohci-pxa27x.c -+++ b/drivers/usb/host/ohci-pxa27x.c -@@ -298,7 +298,6 @@ static const struct hc_driver ohci_pxa27 - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-s3c2410.c -+++ b/drivers/usb/host/ohci-s3c2410.c -@@ -466,7 +466,6 @@ static const struct hc_driver ohci_s3c24 - */ - .hub_status_data = ohci_s3c2410_hub_status_data, - .hub_control = ohci_s3c2410_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-sa1111.c -+++ b/drivers/usb/host/ohci-sa1111.c -@@ -231,7 +231,6 @@ static const struct hc_driver ohci_sa111 - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-sh.c -+++ b/drivers/usb/host/ohci-sh.c -@@ -68,7 +68,6 @@ static const struct hc_driver ohci_sh_hc - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-sm501.c -+++ b/drivers/usb/host/ohci-sm501.c -@@ -75,7 +75,6 @@ static const struct hc_driver ohci_sm501 - */ - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/ohci-ssb.c -+++ b/drivers/usb/host/ohci-ssb.c -@@ -81,7 +81,6 @@ static const struct hc_driver ssb_ohci_h - - .hub_status_data = ohci_hub_status_data, - .hub_control = ohci_hub_control, -- .hub_irq_enable = ohci_rhsc_enable, - #ifdef CONFIG_PM - .bus_suspend = ohci_bus_suspend, - .bus_resume = ohci_bus_resume, ---- a/drivers/usb/host/u132-hcd.c -+++ b/drivers/usb/host/u132-hcd.c -@@ -2934,16 +2934,6 @@ static int u132_start_port_reset(struct - return 0; - } - --static void u132_hub_irq_enable(struct usb_hcd *hcd) --{ -- struct u132 *u132 = hcd_to_u132(hcd); -- if (u132->going > 1) { -- dev_err(&u132->platform_dev->dev, "device has been removed %d\n" -- , u132->going); -- } else if (u132->going > 0) -- dev_err(&u132->platform_dev->dev, "device is being removed\n"); --} -- - - #ifdef CONFIG_PM - static int u132_bus_suspend(struct usb_hcd *hcd) -@@ -2995,7 +2985,6 @@ static struct hc_driver u132_hc_driver = - .bus_suspend = u132_bus_suspend, - .bus_resume = u132_bus_resume, - .start_port_reset = u132_start_port_reset, -- .hub_irq_enable = u132_hub_irq_enable, - }; - - /* diff --git a/usb.current/usb-cdc-acm-don-t-unlock-acm-mutex-on-error-path.patch b/usb.current/usb-cdc-acm-don-t-unlock-acm-mutex-on-error-path.patch deleted file mode 100644 index 14ccfcc6c69077..00000000000000 --- a/usb.current/usb-cdc-acm-don-t-unlock-acm-mutex-on-error-path.patch +++ /dev/null @@ -1,41 +0,0 @@ -From akpm@linux-foundation.org Wed Aug 20 17:15:12 2008 -From: Alexey Dobriyan <adobriyan@gmail.com> -Date: Wed, 20 Aug 2008 16:56:04 -0700 -Subject: USB: cdc-acm: don't unlock acm->mutex on error path -To: greg@kroah.com -Cc: linux-usb@vger.kernel.org, akpm@linux-foundation.org, adobriyan@gmail.com, andrei.popa@i-neo.ro, stable@kernel.org -Message-ID: <200808202356.m7KNu4Cg006328@imap1.linux-foundation.org> - - -From: Alexey Dobriyan <adobriyan@gmail.com> - -On Wed, Jul 23, 2008 at 03:52:36PM +0300, Andrei Popa wrote: -> I installed gnokii-0.6.22-r2 and gave the command "gnokii --identify" -> and the kernel oopsed: -> -> BUG: unable to handle kernel NULL pointer dereference at 00000458 -> IP: [<c0444b52>] mutex_unlock+0x0/0xb -> [<c03830ae>] acm_tty_open+0x4c/0x214 - -Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> -Tested-by: Andrei Popa <andrei.popa@i-neo.ro> -Cc: stable <stable@kernel.org> [2.6.25.x, 2.6.26.x] -Signed-off-by: Andrew Morton <akpm@linux-foundation.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/class/cdc-acm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/usb/class/cdc-acm.c -+++ b/drivers/usb/class/cdc-acm.c -@@ -589,8 +589,8 @@ static int acm_tty_open(struct tty_struc - tasklet_schedule(&acm->urb_task); - - done: --err_out: - mutex_unlock(&acm->mutex); -+err_out: - mutex_unlock(&open_mutex); - return rv; - diff --git a/usb.current/usb-cdc-acm-quirk-for-conexant-cx93010-usb-modem.patch b/usb.current/usb-cdc-acm-quirk-for-conexant-cx93010-usb-modem.patch deleted file mode 100644 index 00c203fd84b33c..00000000000000 --- a/usb.current/usb-cdc-acm-quirk-for-conexant-cx93010-usb-modem.patch +++ /dev/null @@ -1,33 +0,0 @@ -From sandeen@sandeen.net Thu Aug 14 06:25:45 2008 -From: Eric Sandeen <sandeen@sandeen.net> -Date: Thu, 14 Aug 2008 08:25:40 -0500 -Subject: USB: cdc-acm: quirk for Conexant CX93010 USB modem -To: linux-usb@vger.kernel.org -Cc: oliver@neukum.name, Greg KH <greg@kroah.com> -Message-ID: <48A43254.6070400@sandeen.net> - - -This patch gets my Rosewill RNX-56USB USB modem (with Conexant CX93010 -chipset) up and running to the point where I can send AT commands and -retrieve caller ID data, which is all I want to do with it. - -Signed-off-by: Eric Sandeen <sandeen@sandeen.net> -Acked-by: Oliver Neukum <oneukum@suse.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/class/cdc-acm.c | 3 +++ - 1 file changed, 3 insertions(+) - ---- a/drivers/usb/class/cdc-acm.c -+++ b/drivers/usb/class/cdc-acm.c -@@ -1362,6 +1362,9 @@ static struct usb_device_id acm_ids[] = - { USB_DEVICE(0x0803, 0x3095), /* Zoom Telephonics Model 3095F USB MODEM */ - .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ - }, -+ { USB_DEVICE(0x0572, 0x1321), /* Conexant USB MODEM CX93010 */ -+ .driver_info = NO_UNION_NORMAL, /* has no union descriptor */ -+ }, - - /* control interfaces with various AT-command sets */ - { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM, diff --git a/usb.current/usb-defer-set-interface-for-suspended-devices.patch b/usb.current/usb-defer-set-interface-for-suspended-devices.patch deleted file mode 100644 index 34182fb8969ac9..00000000000000 --- a/usb.current/usb-defer-set-interface-for-suspended-devices.patch +++ /dev/null @@ -1,103 +0,0 @@ -From stern+48acf28e@rowland.harvard.edu Tue Aug 12 11:34:06 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Tue, 12 Aug 2008 14:33:59 -0400 (EDT) -Subject: USB: Defer Set-Interface for suspended devices -To: Greg KH <greg@kroah.com> -Cc: USB list <linux-usb@vger.kernel.org> -Message-ID: <Pine.LNX.4.44L0.0808121430030.2248-100000@iolanthe.rowland.org> - - -This patch (as1128) fixes one of the problems related to the new PM -infrastructure. We are not allowed to register new child devices -during the middle of a system sleep transition, but unbinding a USB -driver causes the core to automatically install altsetting 0 and -thereby create new endpoint pseudo-devices. - -The patch fixes this problem (and the related problem that installing -altsetting 0 will fail if the device is suspended) by deferring the -Set-Interface call until some later time when it is legal and can -succeed. Possible later times are: when a new driver is being probed -for the interface, and when the interface is being resumed. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/driver.c | 31 ++++++++++++++++++++++++++++--- - include/linux/usb.h | 3 +++ - 2 files changed, 31 insertions(+), 3 deletions(-) - ---- a/drivers/usb/core/driver.c -+++ b/drivers/usb/core/driver.c -@@ -230,6 +230,13 @@ static int usb_probe_interface(struct de - */ - intf->pm_usage_cnt = !(driver->supports_autosuspend); - -+ /* Carry out a deferred switch to altsetting 0 */ -+ if (intf->needs_altsetting0) { -+ usb_set_interface(udev, intf->altsetting[0]. -+ desc.bInterfaceNumber, 0); -+ intf->needs_altsetting0 = 0; -+ } -+ - error = driver->probe(intf, id); - if (error) { - mark_quiesced(intf); -@@ -266,8 +273,17 @@ static int usb_unbind_interface(struct d - - driver->disconnect(intf); - -- /* reset other interface state */ -- usb_set_interface(udev, intf->altsetting[0].desc.bInterfaceNumber, 0); -+ /* Reset other interface state. -+ * We cannot do a Set-Interface if the device is suspended or -+ * if it is prepared for a system sleep (since installing a new -+ * altsetting means creating new endpoint device entries). -+ * When either of these happens, defer the Set-Interface. -+ */ -+ if (!error && intf->dev.power.status == DPM_ON) -+ usb_set_interface(udev, intf->altsetting[0]. -+ desc.bInterfaceNumber, 0); -+ else -+ intf->needs_altsetting0 = 1; - usb_set_intfdata(intf, NULL); - - intf->condition = USB_INTERFACE_UNBOUND; -@@ -975,8 +991,17 @@ static int usb_resume_interface(struct u - goto done; - - /* Can't resume it if it doesn't have a driver. */ -- if (intf->condition == USB_INTERFACE_UNBOUND) -+ if (intf->condition == USB_INTERFACE_UNBOUND) { -+ -+ /* Carry out a deferred switch to altsetting 0 */ -+ if (intf->needs_altsetting0 && -+ intf->dev.power.status == DPM_ON) { -+ usb_set_interface(udev, intf->altsetting[0]. -+ desc.bInterfaceNumber, 0); -+ intf->needs_altsetting0 = 0; -+ } - goto done; -+ } - - /* Don't resume if the interface is marked for rebinding */ - if (intf->needs_binding) ---- a/include/linux/usb.h -+++ b/include/linux/usb.h -@@ -110,6 +110,8 @@ enum usb_interface_condition { - * @sysfs_files_created: sysfs attributes exist - * @needs_remote_wakeup: flag set when the driver requires remote-wakeup - * capability during autosuspend. -+ * @needs_altsetting0: flag set when a set-interface request for altsetting 0 -+ * has been deferred. - * @needs_binding: flag set when the driver should be re-probed or unbound - * following a reset or suspend operation it doesn't support. - * @dev: driver model's view of this device -@@ -162,6 +164,7 @@ struct usb_interface { - unsigned is_active:1; /* the interface is not suspended */ - unsigned sysfs_files_created:1; /* the sysfs attributes exist */ - unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ -+ unsigned needs_altsetting0:1; /* switch to altsetting 0 is pending */ - unsigned needs_binding:1; /* needs delayed unbind/rebind */ - - struct device dev; /* interface specific device info */ diff --git a/usb.current/usb-don-t-rebind-before-complete-callback.patch b/usb.current/usb-don-t-rebind-before-complete-callback.patch deleted file mode 100644 index dfee12fb4994d2..00000000000000 --- a/usb.current/usb-don-t-rebind-before-complete-callback.patch +++ /dev/null @@ -1,92 +0,0 @@ -From linux-usb-owner@vger.kernel.org Tue Aug 12 11:34:22 2008 -From: Alan Stern <stern@rowland.harvard.edu> -Date: Tue, 12 Aug 2008 14:34:14 -0400 (EDT) -Subject: USB: Don't rebind before "complete" callback -To: Greg KH <greg@kroah.com> -Cc: USB list <linux-usb@vger.kernel.org> -Message-ID: <Pine.LNX.4.44L0.0808121431290.2248-100000@iolanthe.rowland.org> - - -This patch (as1130) fixes an incompatibility between the new PM -infrastructure and USB power management. We are not allowed to call -drivers' probe routines during a system sleep transition between the -"prepare" and "complete" callbacks, but that's exactly what we do when -a driver doesn't have full suspend/resume support. Such drivers are -unbound during the "suspend" call and reprobed during the "resume" call. - -The patch causes the reprobe step to be skipped if the "complete" -callback hasn't been issued yet, i.e., if the interface's -dev.power.status field is not equal to DPM_ON. Thus during the -"resume" callback nothing bad will happen, and during the final -"complete" callback the reprobing will occur as desired. - -This fixes the problem reported in Bugzilla #11263. - -Signed-off-by: Alan Stern <stern@rowland.harvard.edu> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/driver.c | 30 +++++++++--------------------- - 1 file changed, 9 insertions(+), 21 deletions(-) - ---- a/drivers/usb/core/driver.c -+++ b/drivers/usb/core/driver.c -@@ -814,7 +814,8 @@ void usb_forced_unbind_intf(struct usb_i - * The caller must hold @intf's device's lock, but not its pm_mutex - * and not @intf->dev.sem. - * -- * FIXME: The caller must block system sleep transitions. -+ * Note: Rebinds will be skipped if a system sleep transition is in -+ * progress and the PM "complete" callback hasn't occurred yet. - */ - void usb_rebind_intf(struct usb_interface *intf) - { -@@ -830,10 +831,12 @@ void usb_rebind_intf(struct usb_interfac - } - - /* Try to rebind the interface */ -- intf->needs_binding = 0; -- rc = device_attach(&intf->dev); -- if (rc < 0) -- dev_warn(&intf->dev, "rebind failed: %d\n", rc); -+ if (intf->dev.power.status == DPM_ON) { -+ intf->needs_binding = 0; -+ rc = device_attach(&intf->dev); -+ if (rc < 0) -+ dev_warn(&intf->dev, "rebind failed: %d\n", rc); -+ } - } - - #ifdef CONFIG_PM -@@ -845,7 +848,6 @@ void usb_rebind_intf(struct usb_interfac - * or rebind interfaces that have been unbound, according to @action. - * - * The caller must hold @udev's device lock. -- * FIXME: For rebinds, the caller must block system sleep transitions. - */ - static void do_unbind_rebind(struct usb_device *udev, int action) - { -@@ -867,22 +869,8 @@ static void do_unbind_rebind(struct usb_ - } - break; - case DO_REBIND: -- if (intf->needs_binding) { -- -- /* FIXME: The next line is needed because we are going to probe -- * the interface, but as far as the PM core is concerned the -- * interface is still suspended. The problem wouldn't exist -- * if we could rebind the interface during the interface's own -- * resume() call, but at the time the usb_device isn't locked! -- * -- * The real solution will be to carry this out during the device's -- * complete() callback. Until that is implemented, we have to -- * use this hack. -- */ --// intf->dev.power.sleeping = 0; -- -+ if (intf->needs_binding) - usb_rebind_intf(intf); -- } - break; - } - } diff --git a/usb.current/usb-fix-bug-in-usb_unlink_anchored_urbs.patch b/usb.current/usb-fix-bug-in-usb_unlink_anchored_urbs.patch deleted file mode 100644 index 00197a9e1ad930..00000000000000 --- a/usb.current/usb-fix-bug-in-usb_unlink_anchored_urbs.patch +++ /dev/null @@ -1,45 +0,0 @@ -From oliver@neukum.org Mon Aug 18 07:35:56 2008 -From: Oliver Neukum <oliver@neukum.org> -Date: Mon, 18 Aug 2008 16:36:52 +0200 -Subject: USB: fix bug in usb_unlink_anchored_urbs() -To: Greg KH <greg@kroah.com> -Cc: linux-usb@vger.kernel.org, Marcel Holtmann <marcel@holtmann.org> -Message-ID: <200808181636.52529.oliver@neukum.org> -Content-Disposition: inline - - -Irqs must not accidentally be reenabled. - -Signed-off-by: Oliver Neukum <oneukum@suse.de> -Acked-by: Marcel Holtmann <marcel@holtmann.org> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/core/urb.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - ---- a/drivers/usb/core/urb.c -+++ b/drivers/usb/core/urb.c -@@ -601,15 +601,20 @@ EXPORT_SYMBOL_GPL(usb_kill_anchored_urbs - void usb_unlink_anchored_urbs(struct usb_anchor *anchor) - { - struct urb *victim; -+ unsigned long flags; - -- spin_lock_irq(&anchor->lock); -+ spin_lock_irqsave(&anchor->lock, flags); - while (!list_empty(&anchor->urb_list)) { - victim = list_entry(anchor->urb_list.prev, struct urb, - anchor_list); -+ usb_get_urb(victim); -+ spin_unlock_irqrestore(&anchor->lock, flags); - /* this will unanchor the URB */ - usb_unlink_urb(victim); -+ usb_put_urb(victim); -+ spin_lock_irqsave(&anchor->lock, flags); - } -- spin_unlock_irq(&anchor->lock); -+ spin_unlock_irqrestore(&anchor->lock, flags); - } - EXPORT_SYMBOL_GPL(usb_unlink_anchored_urbs); - diff --git a/usb.current/usb-fix-pxa27x_udc-usb-speed-handling.patch b/usb.current/usb-fix-pxa27x_udc-usb-speed-handling.patch deleted file mode 100644 index 09a2a6b18379a0..00000000000000 --- a/usb.current/usb-fix-pxa27x_udc-usb-speed-handling.patch +++ /dev/null @@ -1,35 +0,0 @@ -From linux-usb-owner@vger.kernel.org Mon Aug 11 09:28:31 2008 -From: Robert Jarzmik <robert.jarzmik@free.fr> -Date: Mon, 11 Aug 2008 18:28:13 +0200 -Subject: USB: Fix pxa27x_udc usb speed handling. -To: linux-usb@vger.kernel.org -Cc: david-b@pacbell.net, Robert Jarzmik <robert.jarzmik@free.fr> -Message-ID: <1218472093-18732-1-git-send-email-robert.jarzmik@free.fr> - - -The new composite framework revealed a weakness in the -pxa27x_udc driver gadget register function. Instead of -checking if speed asked for was USB_LOW_SPEED upon -usb_gadget_register() to deny service, it checked only -for USB_FULL_SPEED, thus denying service to usb high -speed capable gadgets (like g_ether). - -Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> -Cc: David Brownell <david-b@pacbell.net> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/gadget/pxa27x_udc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/usb/gadget/pxa27x_udc.c -+++ b/drivers/usb/gadget/pxa27x_udc.c -@@ -1622,7 +1622,7 @@ int usb_gadget_register_driver(struct us - struct pxa_udc *udc = the_controller; - int retval; - -- if (!driver || driver->speed != USB_SPEED_FULL || !driver->bind -+ if (!driver || driver->speed < USB_SPEED_FULL || !driver->bind - || !driver->disconnect || !driver->setup) - return -EINVAL; - if (!udc) diff --git a/usb.current/usb-isp1760-fixed-trivial-math-in-comment.patch b/usb.current/usb-isp1760-fixed-trivial-math-in-comment.patch deleted file mode 100644 index 12154b48fba191..00000000000000 --- a/usb.current/usb-isp1760-fixed-trivial-math-in-comment.patch +++ /dev/null @@ -1,28 +0,0 @@ -From linux-usb-owner@vger.kernel.org Tue Aug 19 15:10:36 2008 -From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> -Date: Wed, 20 Aug 2008 00:06:22 +0200 -Subject: USB: ISP1760: fixed trivial math in comment -To: linux-usb@vger.kernel.org -Cc: sebastian@breakpoint.cc, Enrico Scholz <enrico.scholz@sigma-chemnitz.de> -Message-ID: <1219183582-1556-1-git-send-email-enrico.scholz@sigma-chemnitz.de> - - -Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> -Acked-by: Sebastian Siewior <sebastian@breakpoint.cc> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/host/isp1760-hcd.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/usb/host/isp1760-hcd.c -+++ b/drivers/usb/host/isp1760-hcd.c -@@ -988,7 +988,7 @@ static void do_atl_int(struct usb_hcd *u - /* - * write bank1 address twice to ensure the 90ns delay (time - * between BANK0 write and the priv_read_copy() call is at -- * least 3*t_WHWL + 2*t_w11 = 3*25ns + 2*17ns = 92ns) -+ * least 3*t_WHWL + 2*t_w11 = 3*25ns + 2*17ns = 109ns) - */ - isp1760_writel(payload + ISP_BANK(1), usb_hcd->regs + - HC_MEMORY_REG); diff --git a/usb.current/usb-musb-get-rid-of-musb_loglevel-and-use-parameter.patch b/usb.current/usb-musb-get-rid-of-musb_loglevel-and-use-parameter.patch deleted file mode 100644 index 086868794d3129..00000000000000 --- a/usb.current/usb-musb-get-rid-of-musb_loglevel-and-use-parameter.patch +++ /dev/null @@ -1,118 +0,0 @@ -From me@felipebalbi.com Wed Aug 20 13:30:38 2008 -From: Felipe Balbi <me@felipebalbi.com> -Date: Sun, 10 Aug 2008 21:22:35 +0300 -Subject: usb: musb: get rid of MUSB_LOGLEVEL and use parameter -To: linux-usb@vger.kernel.org -Cc: Greg KH <gregkh@suse.de>, Felipe Balbi <felipe.balbi@nokia.com>, Anand Gadiyar <gadiyar@ti.com>, Bryan Wu <bryan.wu@analog.com>, David Brownell <david-b@pacbell.net> -Message-ID: <1218392555-708-3-git-send-email-me@felipebalbi.com> - - -From: Felipe Balbi <felipe.balbi@nokia.com> - -We can change debugging level on the fly via -/sys/module/musb_hdrc/parameters/debug. - -We can also get rid of the LOGLEVEL facility in Kconfig -and rely only in module parameter. - -Cc: Anand Gadiyar <gadiyar@ti.com> -Cc: Bryan Wu <bryan.wu@analog.com> -Cc: David Brownell <david-b@pacbell.net> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/Kconfig | 13 ++++++------- - drivers/usb/musb/Makefile | 16 ++-------------- - drivers/usb/musb/musb_core.c | 17 ++++------------- - drivers/usb/musb/musb_debug.h | 4 ---- - 4 files changed, 12 insertions(+), 38 deletions(-) - ---- a/drivers/usb/musb/Kconfig -+++ b/drivers/usb/musb/Kconfig -@@ -165,12 +165,11 @@ config USB_TUSB_OMAP_DMA - help - Enable DMA transfers on TUSB 6010 when OMAP DMA is available. - --config USB_MUSB_LOGLEVEL -+config USB_MUSB_DEBUG - depends on USB_MUSB_HDRC -- int 'Logging Level (0 - none / 3 - annoying / ... )' -- default 0 -+ bool "Enable debugging messages" -+ default n - help -- Set the logging level. 0 disables the debugging altogether, -- although when USB_DEBUG is set the value is at least 1. -- Starting at level 3, per-transfer (urb, usb_request, packet, -- or dma transfer) tracing may kick in. -+ This enables musb debugging. To set the logging level use the debug -+ module parameter. Starting at level 3, per-transfer (urb, usb_request, -+ packet, or dma transfer) tracing may kick in. ---- a/drivers/usb/musb/Makefile -+++ b/drivers/usb/musb/Makefile -@@ -64,18 +64,6 @@ endif - - # Debugging - --MUSB_DEBUG:=$(CONFIG_USB_MUSB_LOGLEVEL) -- --ifeq ("$(strip $(MUSB_DEBUG))","") -- ifdef CONFIG_USB_DEBUG -- MUSB_DEBUG:=1 -- else -- MUSB_DEBUG:=0 -- endif --endif -- --ifneq ($(MUSB_DEBUG),0) -- EXTRA_CFLAGS += -DDEBUG -+ifeq ($(CONFIG_USB_MUSB_DEBUG),y) -+ EXTRA_CFLAGS += -DDEBUG - endif -- --EXTRA_CFLAGS += -DMUSB_DEBUG=$(MUSB_DEBUG) ---- a/drivers/usb/musb/musb_core.c -+++ b/drivers/usb/musb/musb_core.c -@@ -114,23 +114,14 @@ - - - --#if MUSB_DEBUG > 0 --unsigned debug = MUSB_DEBUG; --module_param(debug, uint, 0); --MODULE_PARM_DESC(debug, "initial debug message level"); -- --#define MUSB_VERSION_SUFFIX "/dbg" --#endif -+unsigned debug = 0; -+module_param(debug, uint, S_IRUGO | S_IWUSR); -+MODULE_PARM_DESC(debug, "Debug message level. Default = 0"); - - #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia" - #define DRIVER_DESC "Inventra Dual-Role USB Controller Driver" - --#define MUSB_VERSION_BASE "6.0" -- --#ifndef MUSB_VERSION_SUFFIX --#define MUSB_VERSION_SUFFIX "" --#endif --#define MUSB_VERSION MUSB_VERSION_BASE MUSB_VERSION_SUFFIX -+#define MUSB_VERSION "6.0" - - #define DRIVER_INFO DRIVER_DESC ", v" MUSB_VERSION - ---- a/drivers/usb/musb/musb_debug.h -+++ b/drivers/usb/musb/musb_debug.h -@@ -48,11 +48,7 @@ - __func__, __LINE__ , ## args); \ - } } while (0) - --#if MUSB_DEBUG > 0 - extern unsigned debug; --#else --#define debug 0 --#endif - - static inline int _dbg_level(unsigned l) - { diff --git a/usb.current/usb-musb-get-rid-of-procfs-entry.patch b/usb.current/usb-musb-get-rid-of-procfs-entry.patch deleted file mode 100644 index 743736ebe445fe..00000000000000 --- a/usb.current/usb-musb-get-rid-of-procfs-entry.patch +++ /dev/null @@ -1,952 +0,0 @@ -From me@felipebalbi.com Wed Aug 20 13:29:41 2008 -From: Felipe Balbi <me@felipebalbi.com> -Date: Sun, 10 Aug 2008 21:22:34 +0300 -Subject: usb: musb: get rid of procfs entry -To: linux-usb@vger.kernel.org -Cc: Greg KH <gregkh@suse.de>, Felipe Balbi <felipe.balbi@nokia.com>, Anand Gadiyar <gadiyar@ti.com>, Bryan Wu <bryan.wu@analog.com>, David Brownell <david-b@pacbell.net> -Message-ID: <1218392555-708-2-git-send-email-me@felipebalbi.com> - - -From: Felipe Balbi <felipe.balbi@nokia.com> - -Drivers should not add procfs. The functionality in the old -procfs file will be moved to debugfs. - -Cc: Anand Gadiyar <gadiyar@ti.com> -Cc: Bryan Wu <bryan.wu@analog.com> -Cc: David Brownell <david-b@pacbell.net> -Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/musb/Makefile | 5 - drivers/usb/musb/musb_core.c | 21 - - drivers/usb/musb/musb_core.h | 19 - drivers/usb/musb/musb_procfs.c | 830 ----------------------------------------- - 4 files changed, 11 insertions(+), 864 deletions(-) - ---- a/drivers/usb/musb/Makefile -+++ b/drivers/usb/musb/Makefile -@@ -76,11 +76,6 @@ endif - - ifneq ($(MUSB_DEBUG),0) - EXTRA_CFLAGS += -DDEBUG -- -- ifeq ($(CONFIG_PROC_FS),y) -- musb_hdrc-objs += musb_procfs.o -- endif -- - endif - - EXTRA_CFLAGS += -DMUSB_DEBUG=$(MUSB_DEBUG) ---- a/drivers/usb/musb/musb_core.c -+++ b/drivers/usb/musb/musb_core.c -@@ -2037,6 +2037,8 @@ bad_config: - musb->xceiv.state = OTG_STATE_A_IDLE; - - status = usb_add_hcd(musb_to_hcd(musb), -1, 0); -+ if (status) -+ goto fail; - - DBG(1, "%s mode, status %d, devctl %02x %c\n", - "HOST", status, -@@ -2051,6 +2053,8 @@ bad_config: - musb->xceiv.state = OTG_STATE_B_IDLE; - - status = musb_gadget_setup(musb); -+ if (status) -+ goto fail; - - DBG(1, "%s mode, status %d, dev%02x\n", - is_otg_enabled(musb) ? "OTG" : "PERIPHERAL", -@@ -2059,16 +2063,14 @@ bad_config: - - } - -- if (status == 0) -- musb_debug_create("driver/musb_hdrc", musb); -- else { -+ return 0; -+ - fail: -- if (musb->clock) -- clk_put(musb->clock); -- device_init_wakeup(dev, 0); -- musb_free(musb); -- return status; -- } -+ if (musb->clock) -+ clk_put(musb->clock); -+ device_init_wakeup(dev, 0); -+ musb_free(musb); -+ return status; - - #ifdef CONFIG_SYSFS - status = device_create_file(dev, &dev_attr_mode); -@@ -2131,7 +2133,6 @@ static int __devexit musb_remove(struct - * - OTG mode: both roles are deactivated (or never-activated) - */ - musb_shutdown(pdev); -- musb_debug_delete("driver/musb_hdrc", musb); - #ifdef CONFIG_USB_MUSB_HDRC_HCD - if (musb->board_mode == MUSB_HOST) - usb_remove_hcd(musb_to_hcd(musb)); ---- a/drivers/usb/musb/musb_core.h -+++ b/drivers/usb/musb/musb_core.h -@@ -485,23 +485,4 @@ extern int musb_platform_get_vbus_status - extern int __init musb_platform_init(struct musb *musb); - extern int musb_platform_exit(struct musb *musb); - --/*-------------------------- ProcFS definitions ---------------------*/ -- --struct proc_dir_entry; -- --#if (MUSB_DEBUG > 0) && defined(MUSB_CONFIG_PROC_FS) --extern struct proc_dir_entry *musb_debug_create(char *name, struct musb *data); --extern void musb_debug_delete(char *name, struct musb *data); -- --#else --static inline struct proc_dir_entry * --musb_debug_create(char *name, struct musb *data) --{ -- return NULL; --} --static inline void musb_debug_delete(char *name, struct musb *data) --{ --} --#endif -- - #endif /* __MUSB_CORE_H__ */ ---- a/drivers/usb/musb/musb_procfs.c -+++ /dev/null -@@ -1,830 +0,0 @@ --/* -- * MUSB OTG driver debug support -- * -- * Copyright 2005 Mentor Graphics Corporation -- * Copyright (C) 2005-2006 by Texas Instruments -- * Copyright (C) 2006-2007 Nokia Corporation -- * -- * This program is free software; you can redistribute it and/or -- * modify it under the terms of the GNU General Public License -- * version 2 as published by the Free Software Foundation. -- * -- * This program is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write to the Free Software -- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -- * 02110-1301 USA -- * -- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -- * NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, -- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- * -- */ -- --#include <linux/kernel.h> --#include <linux/proc_fs.h> --#include <linux/seq_file.h> --#include <linux/uaccess.h> /* FIXME remove procfs writes */ --#include <asm/arch/hardware.h> -- --#include "musb_core.h" -- --#include "davinci.h" -- --#ifdef CONFIG_USB_MUSB_HDRC_HCD -- --static int dump_qh(struct musb_qh *qh, char *buf, unsigned max) --{ -- int count; -- int tmp; -- struct usb_host_endpoint *hep = qh->hep; -- struct urb *urb; -- -- count = snprintf(buf, max, " qh %p dev%d ep%d%s max%d\n", -- qh, qh->dev->devnum, qh->epnum, -- ({ char *s; switch (qh->type) { -- case USB_ENDPOINT_XFER_BULK: -- s = "-bulk"; break; -- case USB_ENDPOINT_XFER_INT: -- s = "-int"; break; -- case USB_ENDPOINT_XFER_CONTROL: -- s = ""; break; -- default: -- s = "iso"; break; -- }; s; }), -- qh->maxpacket); -- if (count <= 0) -- return 0; -- buf += count; -- max -= count; -- -- list_for_each_entry(urb, &hep->urb_list, urb_list) { -- tmp = snprintf(buf, max, "\t%s urb %p %d/%d\n", -- usb_pipein(urb->pipe) ? "in" : "out", -- urb, urb->actual_length, -- urb->transfer_buffer_length); -- if (tmp <= 0) -- break; -- tmp = min(tmp, (int)max); -- count += tmp; -- buf += tmp; -- max -= tmp; -- } -- return count; --} -- --static int --dump_queue(struct list_head *q, char *buf, unsigned max) --{ -- int count = 0; -- struct musb_qh *qh; -- -- list_for_each_entry(qh, q, ring) { -- int tmp; -- -- tmp = dump_qh(qh, buf, max); -- if (tmp <= 0) -- break; -- tmp = min(tmp, (int)max); -- count += tmp; -- buf += tmp; -- max -= tmp; -- } -- return count; --} -- --#endif /* HCD */ -- --#ifdef CONFIG_USB_GADGET_MUSB_HDRC --static int dump_ep(struct musb_ep *ep, char *buffer, unsigned max) --{ -- char *buf = buffer; -- int code = 0; -- void __iomem *regs = ep->hw_ep->regs; -- char *mode = "1buf"; -- -- if (ep->is_in) { -- if (ep->hw_ep->tx_double_buffered) -- mode = "2buf"; -- } else { -- if (ep->hw_ep->rx_double_buffered) -- mode = "2buf"; -- } -- -- do { -- struct usb_request *req; -- -- code = snprintf(buf, max, -- "\n%s (hw%d): %s%s, csr %04x maxp %04x\n", -- ep->name, ep->current_epnum, -- mode, ep->dma ? " dma" : "", -- musb_readw(regs, -- (ep->is_in || !ep->current_epnum) -- ? MUSB_TXCSR -- : MUSB_RXCSR), -- musb_readw(regs, ep->is_in -- ? MUSB_TXMAXP -- : MUSB_RXMAXP) -- ); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- -- if (is_cppi_enabled() && ep->current_epnum) { -- unsigned cppi = ep->current_epnum - 1; -- void __iomem *base = ep->musb->ctrl_base; -- unsigned off1 = cppi << 2; -- void __iomem *ram = base; -- char tmp[16]; -- -- if (ep->is_in) { -- ram += DAVINCI_TXCPPI_STATERAM_OFFSET(cppi); -- tmp[0] = 0; -- } else { -- ram += DAVINCI_RXCPPI_STATERAM_OFFSET(cppi); -- snprintf(tmp, sizeof tmp, "%d left, ", -- musb_readl(base, -- DAVINCI_RXCPPI_BUFCNT0_REG + off1)); -- } -- -- code = snprintf(buf, max, "%cX DMA%d: %s" -- "%08x %08x, %08x %08x; " -- "%08x %08x %08x .. %08x\n", -- ep->is_in ? 'T' : 'R', -- ep->current_epnum - 1, tmp, -- musb_readl(ram, 0 * 4), -- musb_readl(ram, 1 * 4), -- musb_readl(ram, 2 * 4), -- musb_readl(ram, 3 * 4), -- musb_readl(ram, 4 * 4), -- musb_readl(ram, 5 * 4), -- musb_readl(ram, 6 * 4), -- musb_readl(ram, 7 * 4)); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } -- -- if (list_empty(&ep->req_list)) { -- code = snprintf(buf, max, "\t(queue empty)\n"); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- break; -- } -- list_for_each_entry(req, &ep->req_list, list) { -- code = snprintf(buf, max, "\treq %p, %s%s%d/%d\n", -- req, -- req->zero ? "zero, " : "", -- req->short_not_ok ? "!short, " : "", -- req->actual, req->length); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } -- } while (0); -- return buf - buffer; --} --#endif -- --static int --dump_end_info(struct musb *musb, u8 epnum, char *aBuffer, unsigned max) --{ -- int code = 0; -- char *buf = aBuffer; -- struct musb_hw_ep *hw_ep = &musb->endpoints[epnum]; -- -- do { -- musb_ep_select(musb->mregs, epnum); --#ifdef CONFIG_USB_MUSB_HDRC_HCD -- if (is_host_active(musb)) { -- int dump_rx, dump_tx; -- void __iomem *regs = hw_ep->regs; -- -- /* TEMPORARY (!) until we have a real periodic -- * schedule tree ... -- */ -- if (!epnum) { -- /* control is shared, uses RX queue -- * but (mostly) shadowed tx registers -- */ -- dump_tx = !list_empty(&musb->control); -- dump_rx = 0; -- } else if (hw_ep == musb->bulk_ep) { -- dump_tx = !list_empty(&musb->out_bulk); -- dump_rx = !list_empty(&musb->in_bulk); -- } else if (musb->periodic[epnum]) { -- struct usb_host_endpoint *hep; -- -- hep = musb->periodic[epnum]->hep; -- dump_rx = hep->desc.bEndpointAddress -- & USB_ENDPOINT_DIR_MASK; -- dump_tx = !dump_rx; -- } else -- break; -- /* END TEMPORARY */ -- -- -- if (dump_rx) { -- code = snprintf(buf, max, -- "\nRX%d: %s rxcsr %04x interval %02x " -- "max %04x type %02x; " -- "dev %d hub %d port %d" -- "\n", -- epnum, -- hw_ep->rx_double_buffered -- ? "2buf" : "1buf", -- musb_readw(regs, MUSB_RXCSR), -- musb_readb(regs, MUSB_RXINTERVAL), -- musb_readw(regs, MUSB_RXMAXP), -- musb_readb(regs, MUSB_RXTYPE), -- /* FIXME: assumes multipoint */ -- musb_readb(musb->mregs, -- MUSB_BUSCTL_OFFSET(epnum, -- MUSB_RXFUNCADDR)), -- musb_readb(musb->mregs, -- MUSB_BUSCTL_OFFSET(epnum, -- MUSB_RXHUBADDR)), -- musb_readb(musb->mregs, -- MUSB_BUSCTL_OFFSET(epnum, -- MUSB_RXHUBPORT)) -- ); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- -- if (is_cppi_enabled() -- && epnum -- && hw_ep->rx_channel) { -- unsigned cppi = epnum - 1; -- unsigned off1 = cppi << 2; -- void __iomem *base; -- void __iomem *ram; -- char tmp[16]; -- -- base = musb->ctrl_base; -- ram = DAVINCI_RXCPPI_STATERAM_OFFSET( -- cppi) + base; -- snprintf(tmp, sizeof tmp, "%d left, ", -- musb_readl(base, -- DAVINCI_RXCPPI_BUFCNT0_REG -- + off1)); -- -- code = snprintf(buf, max, -- " rx dma%d: %s" -- "%08x %08x, %08x %08x; " -- "%08x %08x %08x .. %08x\n", -- cppi, tmp, -- musb_readl(ram, 0 * 4), -- musb_readl(ram, 1 * 4), -- musb_readl(ram, 2 * 4), -- musb_readl(ram, 3 * 4), -- musb_readl(ram, 4 * 4), -- musb_readl(ram, 5 * 4), -- musb_readl(ram, 6 * 4), -- musb_readl(ram, 7 * 4)); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } -- -- if (hw_ep == musb->bulk_ep -- && !list_empty( -- &musb->in_bulk)) { -- code = dump_queue(&musb->in_bulk, -- buf, max); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } else if (musb->periodic[epnum]) { -- code = dump_qh(musb->periodic[epnum], -- buf, max); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } -- } -- -- if (dump_tx) { -- code = snprintf(buf, max, -- "\nTX%d: %s txcsr %04x interval %02x " -- "max %04x type %02x; " -- "dev %d hub %d port %d" -- "\n", -- epnum, -- hw_ep->tx_double_buffered -- ? "2buf" : "1buf", -- musb_readw(regs, MUSB_TXCSR), -- musb_readb(regs, MUSB_TXINTERVAL), -- musb_readw(regs, MUSB_TXMAXP), -- musb_readb(regs, MUSB_TXTYPE), -- /* FIXME: assumes multipoint */ -- musb_readb(musb->mregs, -- MUSB_BUSCTL_OFFSET(epnum, -- MUSB_TXFUNCADDR)), -- musb_readb(musb->mregs, -- MUSB_BUSCTL_OFFSET(epnum, -- MUSB_TXHUBADDR)), -- musb_readb(musb->mregs, -- MUSB_BUSCTL_OFFSET(epnum, -- MUSB_TXHUBPORT)) -- ); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- -- if (is_cppi_enabled() -- && epnum -- && hw_ep->tx_channel) { -- unsigned cppi = epnum - 1; -- void __iomem *base; -- void __iomem *ram; -- -- base = musb->ctrl_base; -- ram = DAVINCI_RXCPPI_STATERAM_OFFSET( -- cppi) + base; -- code = snprintf(buf, max, -- " tx dma%d: " -- "%08x %08x, %08x %08x; " -- "%08x %08x %08x .. %08x\n", -- cppi, -- musb_readl(ram, 0 * 4), -- musb_readl(ram, 1 * 4), -- musb_readl(ram, 2 * 4), -- musb_readl(ram, 3 * 4), -- musb_readl(ram, 4 * 4), -- musb_readl(ram, 5 * 4), -- musb_readl(ram, 6 * 4), -- musb_readl(ram, 7 * 4)); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } -- -- if (hw_ep == musb->control_ep -- && !list_empty( -- &musb->control)) { -- code = dump_queue(&musb->control, -- buf, max); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } else if (hw_ep == musb->bulk_ep -- && !list_empty( -- &musb->out_bulk)) { -- code = dump_queue(&musb->out_bulk, -- buf, max); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } else if (musb->periodic[epnum]) { -- code = dump_qh(musb->periodic[epnum], -- buf, max); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } -- } -- } --#endif --#ifdef CONFIG_USB_GADGET_MUSB_HDRC -- if (is_peripheral_active(musb)) { -- code = 0; -- -- if (hw_ep->ep_in.desc || !epnum) { -- code = dump_ep(&hw_ep->ep_in, buf, max); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } -- if (hw_ep->ep_out.desc) { -- code = dump_ep(&hw_ep->ep_out, buf, max); -- if (code <= 0) -- break; -- code = min(code, (int) max); -- buf += code; -- max -= code; -- } -- } --#endif -- } while (0); -- -- return buf - aBuffer; --} -- --/* Dump the current status and compile options. -- * @param musb the device driver instance -- * @param buffer where to dump the status; it must be big enough to hold the -- * result otherwise "BAD THINGS HAPPENS(TM)". -- */ --static int dump_header_stats(struct musb *musb, char *buffer) --{ -- int code, count = 0; -- const void __iomem *mbase = musb->mregs; -- -- *buffer = 0; -- count = sprintf(buffer, "Status: %sHDRC, Mode=%s " -- "(Power=%02x, DevCtl=%02x)\n", -- (musb->is_multipoint ? "M" : ""), MUSB_MODE(musb), -- musb_readb(mbase, MUSB_POWER), -- musb_readb(mbase, MUSB_DEVCTL)); -- if (count <= 0) -- return 0; -- buffer += count; -- -- code = sprintf(buffer, "OTG state: %s; %sactive\n", -- otg_state_string(musb), -- musb->is_active ? "" : "in"); -- if (code <= 0) -- goto done; -- buffer += code; -- count += code; -- -- code = sprintf(buffer, -- "Options: " --#ifdef CONFIG_MUSB_PIO_ONLY -- "pio" --#elif defined(CONFIG_USB_TI_CPPI_DMA) -- "cppi-dma" --#elif defined(CONFIG_USB_INVENTRA_DMA) -- "musb-dma" --#elif defined(CONFIG_USB_TUSB_OMAP_DMA) -- "tusb-omap-dma" --#else -- "?dma?" --#endif -- ", " --#ifdef CONFIG_USB_MUSB_OTG -- "otg (peripheral+host)" --#elif defined(CONFIG_USB_GADGET_MUSB_HDRC) -- "peripheral" --#elif defined(CONFIG_USB_MUSB_HDRC_HCD) -- "host" --#endif -- ", debug=%d [eps=%d]\n", -- debug, -- musb->nr_endpoints); -- if (code <= 0) -- goto done; -- count += code; -- buffer += code; -- --#ifdef CONFIG_USB_GADGET_MUSB_HDRC -- code = sprintf(buffer, "Peripheral address: %02x\n", -- musb_readb(musb->ctrl_base, MUSB_FADDR)); -- if (code <= 0) -- goto done; -- buffer += code; -- count += code; --#endif -- --#ifdef CONFIG_USB_MUSB_HDRC_HCD -- code = sprintf(buffer, "Root port status: %08x\n", -- musb->port1_status); -- if (code <= 0) -- goto done; -- buffer += code; -- count += code; --#endif -- --#ifdef CONFIG_ARCH_DAVINCI -- code = sprintf(buffer, -- "DaVinci: ctrl=%02x stat=%1x phy=%03x\n" -- "\trndis=%05x auto=%04x intsrc=%08x intmsk=%08x" -- "\n", -- musb_readl(musb->ctrl_base, DAVINCI_USB_CTRL_REG), -- musb_readl(musb->ctrl_base, DAVINCI_USB_STAT_REG), -- __raw_readl((void __force __iomem *) -- IO_ADDRESS(USBPHY_CTL_PADDR)), -- musb_readl(musb->ctrl_base, DAVINCI_RNDIS_REG), -- musb_readl(musb->ctrl_base, DAVINCI_AUTOREQ_REG), -- musb_readl(musb->ctrl_base, -- DAVINCI_USB_INT_SOURCE_REG), -- musb_readl(musb->ctrl_base, -- DAVINCI_USB_INT_MASK_REG)); -- if (code <= 0) -- goto done; -- count += code; -- buffer += code; --#endif /* DAVINCI */ -- --#ifdef CONFIG_USB_TUSB6010 -- code = sprintf(buffer, -- "TUSB6010: devconf %08x, phy enable %08x drive %08x" -- "\n\totg %03x timer %08x" -- "\n\tprcm conf %08x mgmt %08x; int src %08x mask %08x" -- "\n", -- musb_readl(musb->ctrl_base, TUSB_DEV_CONF), -- musb_readl(musb->ctrl_base, TUSB_PHY_OTG_CTRL_ENABLE), -- musb_readl(musb->ctrl_base, TUSB_PHY_OTG_CTRL), -- musb_readl(musb->ctrl_base, TUSB_DEV_OTG_STAT), -- musb_readl(musb->ctrl_base, TUSB_DEV_OTG_TIMER), -- musb_readl(musb->ctrl_base, TUSB_PRCM_CONF), -- musb_readl(musb->ctrl_base, TUSB_PRCM_MNGMT), -- musb_readl(musb->ctrl_base, TUSB_INT_SRC), -- musb_readl(musb->ctrl_base, TUSB_INT_MASK)); -- if (code <= 0) -- goto done; -- count += code; -- buffer += code; --#endif /* DAVINCI */ -- -- if (is_cppi_enabled() && musb->dma_controller) { -- code = sprintf(buffer, -- "CPPI: txcr=%d txsrc=%01x txena=%01x; " -- "rxcr=%d rxsrc=%01x rxena=%01x " -- "\n", -- musb_readl(musb->ctrl_base, -- DAVINCI_TXCPPI_CTRL_REG), -- musb_readl(musb->ctrl_base, -- DAVINCI_TXCPPI_RAW_REG), -- musb_readl(musb->ctrl_base, -- DAVINCI_TXCPPI_INTENAB_REG), -- musb_readl(musb->ctrl_base, -- DAVINCI_RXCPPI_CTRL_REG), -- musb_readl(musb->ctrl_base, -- DAVINCI_RXCPPI_RAW_REG), -- musb_readl(musb->ctrl_base, -- DAVINCI_RXCPPI_INTENAB_REG)); -- if (code <= 0) -- goto done; -- count += code; -- buffer += code; -- } -- --#ifdef CONFIG_USB_GADGET_MUSB_HDRC -- if (is_peripheral_enabled(musb)) { -- code = sprintf(buffer, "Gadget driver: %s\n", -- musb->gadget_driver -- ? musb->gadget_driver->driver.name -- : "(none)"); -- if (code <= 0) -- goto done; -- count += code; -- buffer += code; -- } --#endif -- --done: -- return count; --} -- --/* Write to ProcFS -- * -- * C soft-connect -- * c soft-disconnect -- * I enable HS -- * i disable HS -- * s stop session -- * F force session (OTG-unfriendly) -- * E rElinquish bus (OTG) -- * H request host mode -- * h cancel host request -- * T start sending TEST_PACKET -- * D<num> set/query the debug level -- */ --static int musb_proc_write(struct file *file, const char __user *buffer, -- unsigned long count, void *data) --{ -- char cmd; -- u8 reg; -- struct musb *musb = (struct musb *)data; -- void __iomem *mbase = musb->mregs; -- -- /* MOD_INC_USE_COUNT; */ -- -- if (unlikely(copy_from_user(&cmd, buffer, 1))) -- return -EFAULT; -- -- switch (cmd) { -- case 'C': -- if (mbase) { -- reg = musb_readb(mbase, MUSB_POWER) -- | MUSB_POWER_SOFTCONN; -- musb_writeb(mbase, MUSB_POWER, reg); -- } -- break; -- -- case 'c': -- if (mbase) { -- reg = musb_readb(mbase, MUSB_POWER) -- & ~MUSB_POWER_SOFTCONN; -- musb_writeb(mbase, MUSB_POWER, reg); -- } -- break; -- -- case 'I': -- if (mbase) { -- reg = musb_readb(mbase, MUSB_POWER) -- | MUSB_POWER_HSENAB; -- musb_writeb(mbase, MUSB_POWER, reg); -- } -- break; -- -- case 'i': -- if (mbase) { -- reg = musb_readb(mbase, MUSB_POWER) -- & ~MUSB_POWER_HSENAB; -- musb_writeb(mbase, MUSB_POWER, reg); -- } -- break; -- -- case 'F': -- reg = musb_readb(mbase, MUSB_DEVCTL); -- reg |= MUSB_DEVCTL_SESSION; -- musb_writeb(mbase, MUSB_DEVCTL, reg); -- break; -- -- case 'H': -- if (mbase) { -- reg = musb_readb(mbase, MUSB_DEVCTL); -- reg |= MUSB_DEVCTL_HR; -- musb_writeb(mbase, MUSB_DEVCTL, reg); -- /* MUSB_HST_MODE( ((struct musb*)data) ); */ -- /* WARNING("Host Mode\n"); */ -- } -- break; -- -- case 'h': -- if (mbase) { -- reg = musb_readb(mbase, MUSB_DEVCTL); -- reg &= ~MUSB_DEVCTL_HR; -- musb_writeb(mbase, MUSB_DEVCTL, reg); -- } -- break; -- -- case 'T': -- if (mbase) { -- musb_load_testpacket(musb); -- musb_writeb(mbase, MUSB_TESTMODE, -- MUSB_TEST_PACKET); -- } -- break; -- --#if (MUSB_DEBUG > 0) -- /* set/read debug level */ -- case 'D':{ -- if (count > 1) { -- char digits[8], *p = digits; -- int i = 0, level = 0, sign = 1; -- int len = min(count - 1, (unsigned long)8); -- -- if (copy_from_user(&digits, &buffer[1], len)) -- return -EFAULT; -- -- /* optional sign */ -- if (*p == '-') { -- len -= 1; -- sign = -sign; -- p++; -- } -- -- /* read it */ -- while (i++ < len && *p > '0' && *p < '9') { -- level = level * 10 + (*p - '0'); -- p++; -- } -- -- level *= sign; -- DBG(1, "debug level %d\n", level); -- debug = level; -- } -- } -- break; -- -- -- case '?': -- INFO("?: you are seeing it\n"); -- INFO("C/c: soft connect enable/disable\n"); -- INFO("I/i: hispeed enable/disable\n"); -- INFO("F: force session start\n"); -- INFO("H: host mode\n"); -- INFO("T: start sending TEST_PACKET\n"); -- INFO("D: set/read dbug level\n"); -- break; --#endif -- -- default: -- ERR("Command %c not implemented\n", cmd); -- break; -- } -- -- musb_platform_try_idle(musb, 0); -- -- return count; --} -- --static int musb_proc_read(char *page, char **start, -- off_t off, int count, int *eof, void *data) --{ -- char *buffer = page; -- int code = 0; -- unsigned long flags; -- struct musb *musb = data; -- unsigned epnum; -- -- count -= off; -- count -= 1; /* for NUL at end */ -- if (count <= 0) -- return -EINVAL; -- -- spin_lock_irqsave(&musb->lock, flags); -- -- code = dump_header_stats(musb, buffer); -- if (code > 0) { -- buffer += code; -- count -= code; -- } -- -- /* generate the report for the end points */ -- /* REVISIT ... not unless something's connected! */ -- for (epnum = 0; count >= 0 && epnum < musb->nr_endpoints; -- epnum++) { -- code = dump_end_info(musb, epnum, buffer, count); -- if (code > 0) { -- buffer += code; -- count -= code; -- } -- } -- -- musb_platform_try_idle(musb, 0); -- -- spin_unlock_irqrestore(&musb->lock, flags); -- *eof = 1; -- -- return buffer - page; --} -- --void __devexit musb_debug_delete(char *name, struct musb *musb) --{ -- if (musb->proc_entry) -- remove_proc_entry(name, NULL); --} -- --struct proc_dir_entry *__init --musb_debug_create(char *name, struct musb *data) --{ -- struct proc_dir_entry *pde; -- -- /* FIXME convert everything to seq_file; then later, debugfs */ -- -- if (!name) -- return NULL; -- -- pde = create_proc_entry(name, S_IFREG | S_IRUGO | S_IWUSR, NULL); -- data->proc_entry = pde; -- if (pde) { -- pde->data = data; -- /* pde->owner = THIS_MODULE; */ -- -- pde->read_proc = musb_proc_read; -- pde->write_proc = musb_proc_write; -- -- pde->size = 0; -- -- pr_debug("Registered /proc/%s\n", name); -- } else { -- pr_debug("Cannot create a valid proc file entry"); -- } -- -- return pde; --} diff --git a/usb.current/usb-serial-option-support-hsdpa-modem-a2502.patch b/usb.current/usb-serial-option-support-hsdpa-modem-a2502.patch deleted file mode 100644 index d058c4338f6407..00000000000000 --- a/usb.current/usb-serial-option-support-hsdpa-modem-a2502.patch +++ /dev/null @@ -1,43 +0,0 @@ -From linux-usb-owner@vger.kernel.org Tue Aug 19 02:26:49 2008 -From: Hiroshi Miura <miurahr@nttdata.co.jp> -Date: Tue, 19 Aug 2008 10:58:25 +0200 -Subject: usb-serial: option support HSDPA modem A2502 -To: linux-usb@vger.kernel.org, greg.kh@suse.de -Message-ID: <20080819085825.GG7982@smurf.noris.de> -Content-Disposition: inline - -From: Hiroshi Miura <miurahr@nttdata.co.jp> - -This patch support NTT DoCoMo A2502 3G/HSDPA modem on option driver. -It is produced by AnyDATA Corp. and also sold as KT Freetelecom (Korea) ADU 620UW. - -It support 3.6Mbps/7.2Mbps hight speed communication. -I have tested A2502 with NTT DoCoMo MoperaU ISP service. - - -Signed-off-by: Hiroshi Miura <miurahr@nttdata.co.jp> -Signed-off-by: Matthias Urlichs <matthias@urlichs.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/serial/option.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/drivers/usb/serial/option.c -+++ b/drivers/usb/serial/option.c -@@ -173,6 +173,7 @@ static int option_send_setup(struct tty - #define KYOCERA_PRODUCT_KPC680 0x180a - - #define ANYDATA_VENDOR_ID 0x16d5 -+#define ANYDATA_PRODUCT_ADU_620UW 0x6202 - #define ANYDATA_PRODUCT_ADU_E100A 0x6501 - #define ANYDATA_PRODUCT_ADU_500A 0x6502 - -@@ -318,6 +319,7 @@ static struct usb_device_id option_ids[] - { USB_DEVICE(DELL_VENDOR_ID, 0x8138) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */ - { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) }, - { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) }, -+ { USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) }, - { USB_DEVICE(AXESSTEL_VENDOR_ID, AXESSTEL_PRODUCT_MV110H) }, - { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_MSA501HS) }, - { USB_DEVICE(ONDA_VENDOR_ID, ONDA_PRODUCT_ET502HS) }, diff --git a/usb.current/usb-sisusbvga-add-usb-id-for-0711-0918-magic-control-technology-corp.patch b/usb.current/usb-sisusbvga-add-usb-id-for-0711-0918-magic-control-technology-corp.patch deleted file mode 100644 index b9ec93b4ad4381..00000000000000 --- a/usb.current/usb-sisusbvga-add-usb-id-for-0711-0918-magic-control-technology-corp.patch +++ /dev/null @@ -1,37 +0,0 @@ -From s.L-H@gmx.de Thu Aug 21 08:50:46 2008 -From: Stefan Lippers-Hollmann <s.L-H@gmx.de> -Date: Thu, 21 Aug 2008 13:46:11 +0200 -Subject: USB: sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp. -To: Thomas Winischhofer <thomas@winischhofer.net> -Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org -Message-ID: <200808211346.13628.s.L-H@gmx.de> -Content-Disposition: inline - - -sisusbvga: add USB ID for 0711:0918 Magic Control Technology Corp. - -usb 1-2: new high speed USB device using ehci_hcd and address 4 -usb 1-2: configuration #1 chosen from 1 choice -usb 1-2: USB2VGA dongle found at address 4 -usb 1-2: Allocated 8 output buffers -usb 1-2: 8MB 1 ch/1 r SDR SDRAM, bus width 32 -usb 1-2: New USB device found, idVendor=0711, idProduct=0918 -usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0 - -Signed-off-by: Stefan Lippers-Hollmann <s.L-H@gmx.de> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/misc/sisusbvga/sisusb.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/usb/misc/sisusbvga/sisusb.c -+++ b/drivers/usb/misc/sisusbvga/sisusb.c -@@ -3270,6 +3270,7 @@ static struct usb_device_id sisusb_table - { USB_DEVICE(0x0711, 0x0900) }, - { USB_DEVICE(0x0711, 0x0901) }, - { USB_DEVICE(0x0711, 0x0902) }, -+ { USB_DEVICE(0x0711, 0x0918) }, - { USB_DEVICE(0x182d, 0x021c) }, - { USB_DEVICE(0x182d, 0x0269) }, - { } diff --git a/usb/usb-remove-info-macro-from-usb.h.patch b/usb/usb-remove-info-macro-from-usb.h.patch index 0cedd0ef3eae56..79a10f5ec05044 100644 --- a/usb/usb-remove-info-macro-from-usb.h.patch +++ b/usb/usb-remove-info-macro-from-usb.h.patch @@ -2463,7 +2463,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> usb_serial_deregister(&ftdi_sio_device); --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c -@@ -1585,7 +1585,8 @@ static int __init garmin_init(void) +@@ -1584,7 +1584,8 @@ static int __init garmin_init(void) retval = usb_register(&garmin_driver); if (retval) goto failed_usb_register; diff --git a/usb/usb-removed-unused-include-version.h.patch b/usb/usb-removed-unused-include-version.h.patch deleted file mode 100644 index 5ffb431e80d86d..00000000000000 --- a/usb/usb-removed-unused-include-version.h.patch +++ /dev/null @@ -1,67 +0,0 @@ -From weiyi.huang@gmail.com Sat Aug 16 16:51:45 2008 -From: Huang Weiyi <weiyi.huang@gmail.com> -Date: Sun, 17 Aug 2008 07:51:23 +0800 -Subject: USB: removed unused #include <version.h> -To: gregkh@suse.de, greg@kroah.com -Cc: linux-usb@vger.kernel.org -Message-ID: <20080817073231.1634.WEIYI.HUANG@gmail.com> - - -The driver(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION. - drivers/usb/atm/ueagle-atm.c - drivers/usb/gadget/amd5536udc.c - drivers/usb/misc/iowarrior.c - drivers/usb/serial/garmin_gps.c - -This patch removes the said #include <version.h>. - -Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/usb/atm/ueagle-atm.c | 1 - - drivers/usb/gadget/amd5536udc.c | 1 - - drivers/usb/misc/iowarrior.c | 1 - - drivers/usb/serial/garmin_gps.c | 1 - - 4 files changed, 4 deletions(-) - ---- a/drivers/usb/atm/ueagle-atm.c -+++ b/drivers/usb/atm/ueagle-atm.c -@@ -64,7 +64,6 @@ - #include <linux/ctype.h> - #include <linux/sched.h> - #include <linux/kthread.h> --#include <linux/version.h> - #include <linux/mutex.h> - #include <linux/freezer.h> - ---- a/drivers/usb/gadget/amd5536udc.c -+++ b/drivers/usb/gadget/amd5536udc.c -@@ -44,7 +44,6 @@ - #include <linux/module.h> - #include <linux/pci.h> - #include <linux/kernel.h> --#include <linux/version.h> - #include <linux/delay.h> - #include <linux/ioport.h> - #include <linux/sched.h> ---- a/drivers/usb/misc/iowarrior.c -+++ b/drivers/usb/misc/iowarrior.c -@@ -19,7 +19,6 @@ - #include <linux/slab.h> - #include <linux/sched.h> - #include <linux/poll.h> --#include <linux/version.h> - #include <linux/usb/iowarrior.h> - - /* Version Information */ ---- a/drivers/usb/serial/garmin_gps.c -+++ b/drivers/usb/serial/garmin_gps.c -@@ -38,7 +38,6 @@ - #include <linux/usb.h> - #include <linux/usb/serial.h> - --#include <linux/version.h> - - /* the mode to be set when the port ist opened */ - static int initial_mode = 1; @@ -1 +1 @@ -2.6.27-rc4 +2.6.27-rc4-git3 |
