diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-14 16:11:01 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-12-14 16:11:01 -0800 |
| commit | a4b2fa6d1401e32711d7fcddc3ec81624d2a4095 (patch) | |
| tree | 10000505c24eb44a28c4e185e70b092b53891735 | |
| parent | bb44fdbc5f4ae62420db5f253474ea45fe6efdf0 (diff) | |
| download | patches-a4b2fa6d1401e32711d7fcddc3ec81624d2a4095.tar.gz | |
patches added
21 files changed, 2002 insertions, 12 deletions
diff --git a/driver/add-documentation-for-fair_user_sched-sysfs-files.patch b/driver/add-documentation-for-fair_user_sched-sysfs-files.patch new file mode 100644 index 00000000000000..8d30c00000d8c2 --- /dev/null +++ b/driver/add-documentation-for-fair_user_sched-sysfs-files.patch @@ -0,0 +1,37 @@ +From dhaval@linux.vnet.ibm.com Tue Dec 11 21:51:17 2007 +From: Dhaval Giani <dhaval@linux.vnet.ibm.com> +Date: Wed, 12 Dec 2007 11:18:59 +0530 +Subject: Add Documentation for FAIR_USER_SCHED sysfs files +To: Greg KH <gregkh@suse.de> +Cc: lkml <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>, Andrew Morton <akpm@linux-foundation.org>, Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>, Balbir Singh <balbir@in.ibm.com> +Message-ID: <20071212054859.GC1486@linux.vnet.ibm.com> +Content-Disposition: inline + +This patch adds documentation about /sys/kernel/uids/<uid>/cpu_share +to Documentation/ABI. + +Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> +Cc: Ingo Molnar <mingo@elte.hu> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + Documentation/ABI/testing/sysfs-kernel-uids | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- /dev/null ++++ b/Documentation/ABI/testing/sysfs-kernel-uids +@@ -0,0 +1,14 @@ ++What: /sys/kernel/uids/<uid>/cpu_shares ++Date: December 2007 ++Contact: Dhaval Giani <dhaval@linux.vnet.ibm.com> ++ Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> ++Description: ++ The /sys/kernel/uids/<uid>/cpu_shares tunable is used ++ to set the cpu bandwidth a user is allowed. This is a ++ propotional value. What that means is that if there ++ are two users logged in, each with an equal number of ++ shares, then they will get equal CPU bandwidth. Another ++ example would be, if User A has shares = 1024 and user ++ B has shares = 2048, User B will get twice the CPU ++ bandwidth user A will. For more details refer ++ Documentation/sched-design-CFS.txt diff --git a/driver/howto-change-addresses-of-maintainer-and-lxr-url-for-korean-howto.patch b/driver/howto-change-addresses-of-maintainer-and-lxr-url-for-korean-howto.patch new file mode 100644 index 00000000000000..82fc0be17a9df4 --- /dev/null +++ b/driver/howto-change-addresses-of-maintainer-and-lxr-url-for-korean-howto.patch @@ -0,0 +1,49 @@ +From minchan.kim@gmail.com Wed Dec 12 18:47:27 2007 +From: "minchan kim" <minchan.kim@gmail.com> +Date: Thu, 13 Dec 2007 11:47:17 +0900 +Subject: HOWTO: change addresses of maintainer and lxr url for Korean HOWTO +To: "Greg KH" <greg@kroah.com> +Cc: LeoLi@freescale.com, tshibata@ab.jp.nec.com, mtk.manpages@googlemail.com, linux-kernel@vger.kernel.org +Message-ID: <28c262360712121847l211d791r116971e116a6543b@mail.gmail.com> +Content-Disposition: inline + + +So sorry. again My mail is set with EUC-kR. +I'll resend with UTF-8. + +Signed-off-by: barrios <minchan.kim@gmail.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + Documentation/ko_KR/HOWTO | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/Documentation/ko_KR/HOWTO ++++ b/Documentation/ko_KR/HOWTO +@@ -90,7 +90,7 @@ GPL에 관한 잦은 질문들과 답변 + 그 기능을 어떻게 사용하는지에 관한 설명을 위하여 새로운 문서 파일을 + 추가하는 것을 권장한다. 커널이 유저스페이스로 노출하는 인터페이스를 + 변경하게 되면 변경을 설명하는 메뉴얼 페이지들에 대한 패치나 정보를 +-mtk-manpages@gmx.net의 메인트너에게 보낼 것을 권장한다. ++mtk.manpages@gmail.com의 메인트너에게 보낼 것을 권장한다. + + 다음은 커널 소스 트리에 있는 읽어야 할 파일들의 리스트이다. + README +@@ -212,7 +212,7 @@ Documentation/DocBook/ 디렉토리 내� + 것은 Linux Cross-Reference project이며 그것은 자기 참조 방식이며 + 소스코드를 인덱스된 웹 페이지들의 형태로 보여준다. 최신의 멋진 커널 + 코드 저장소는 다음을 통하여 참조할 수 있다. +- http://sosdg.org/~coywolf/lxr/ ++ http://users.sosdg.org/~qiyong/lxr/ + + + 개발 프로세스 +@@ -327,7 +327,7 @@ Andrew Morton에 의해 배포된 실험 + - ACPI development tree, Len Brown <len.brown@intel.com > + git.kernel.org:/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git + +- - Block development tree, Jens Axboe <axboe@suse.de> ++ - Block development tree, Jens Axboe <jens.axboe@oracle.com> + git.kernel.org:/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git + + - DRM development tree, Dave Airlie <airlied@linux.ie> diff --git a/driver/howto-change-man-page-maintainer-address-for-japanese-howto.patch b/driver/howto-change-man-page-maintainer-address-for-japanese-howto.patch new file mode 100644 index 00000000000000..0ab16ae869361d --- /dev/null +++ b/driver/howto-change-man-page-maintainer-address-for-japanese-howto.patch @@ -0,0 +1,49 @@ +From tshibata@ab.jp.nec.com Fri Nov 30 04:07:45 2007 +From: Tsugikazu Shibata <tshibata@ab.jp.nec.com> +Date: Fri, 30 Nov 2007 18:59:18 +0900 (JST) +Subject: HOWTO: Change man-page maintainer address for Japanese HOWTO +To: greg@kroah.com, mtk.manpages@googlemail.com, linux-kerne@vger.kernel.org +Cc: tshibata@ab.jp.nec.com +Message-ID: <20071130.185918.34745235.tshibata@ab.jp.nec.com> + +Below is a patch to change email address of man-page maintainer for +Japanese HOWTO document (Documentation/ja_JP/HOWTO). +This is for sync to Documentation/HOWTO that Michael Kerrisk mentioned +to me. + +From: Tsugikazu Shibata <tshibata@ab.jp.nec.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + Documentation/ja_JP/HOWTO | 8 ++++---- + 1 file changed, 4 insertions(+), 4 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/09/23 ++Last Updated: 2007/11/16 + ================================== + これは、 +-linux-2.6.23/Documentation/HOWTO ++linux-2.6.24/Documentation/HOWTO + の和訳です。 + + 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > +-翻訳日: 2007/09/19 ++翻訳日: 2007/11/10 + 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> + 校正者: 松倉さん <nbh--mats at nifty dot com> + 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> +@@ -110,7 +110,7 @@ Linux カーネルソースツリーは� + 新しいドキュメントファイルも追加することを勧めます。 + カーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの + 変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報 +-をマニュアルページのメンテナ mtk-manpages@gmx.net に送ることを勧めま ++をマニュアルページのメンテナ mtk.manpages@gmail.com に送ることを勧めま + す。 + + 以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で diff --git a/driver/tipar-remove-obsolete-module.patch b/driver/tipar-remove-obsolete-module.patch new file mode 100644 index 00000000000000..4ee3b3ce1859df --- /dev/null +++ b/driver/tipar-remove-obsolete-module.patch @@ -0,0 +1,775 @@ +From lkml@lievin.net Fri Nov 30 23:51:27 2007 +From: Romain Li�vin <lkml@lievin.net> +Date: Sat, 01 Dec 2007 08:51:58 +0100 +Subject: tipar: remove obsolete module +To: Greg KH <greg@kroah.com> +Message-ID: <4751129E.5080207@lievin.net> + + +From: Romain Li�vin <lkml@lievin.net> + +tipar: remove obsolete module + +The tipar character driver was used to implement bit-banging access +to Texas Instruments parallel link cable. A user-land method now +exists thru PPDEV & PARPORT. + +Signed-off-by: Romain Li�vin <roms@lpg.ticalc.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + Documentation/tipar.txt | 93 -------- + MAINTAINERS | 5 + drivers/char/Kconfig | 22 - + drivers/char/tipar.c | 557 ------------------------------------------------ + include/linux/ticable.h | 44 --- + 5 files changed, 721 deletions(-) + +--- a/Documentation/tipar.txt ++++ /dev/null +@@ -1,93 +0,0 @@ +- +- Parallel link cable for Texas Instruments handhelds +- =================================================== +- +- +-Author: Romain Lievin +-Homepage: http://lpg.ticalc.org/prj_tidev/index.html +- +- +-INTRODUCTION: +- +-This is a driver for the very common home-made parallel link cable, a cable +-designed for connecting TI8x/9x graphing calculators (handhelds) to a computer +-or workstation (Alpha, Sparc). Given that driver is built on parport, the +-parallel port abstraction layer, this driver is architecture-independent. +- +-It can also be used with another device plugged on the same port (such as a +-ZIP drive). I have a 100MB ZIP and both of them work fine! +- +-If you need more information, please visit the 'TI drivers' homepage at the URL +-above. +- +-WHAT YOU NEED: +- +-A TI calculator and a program capable of communicating with your calculator. +- +-TiLP will work for sure (since I am its developer!). yal92 may be able to use +-it by changing tidev for tipar (may require some hacking...). +- +-HOW TO USE IT: +- +-You must have first compiled parport support (CONFIG_PARPORT_DEV): either +-compiled in your kernel, either as a module. +- +-Next, (as root): +- +- modprobe parport +- modprobe tipar +- +-If it is not already there (it usually is), create the device: +- +- mknod /dev/tipar0 c 115 0 +- mknod /dev/tipar1 c 115 1 +- mknod /dev/tipar2 c 115 2 +- +-You will have to set permissions on this device to allow you to read/write +-from it: +- +- chmod 666 /dev/tipar[0..2] +- +-Now you are ready to run a linking program such as TiLP. Be sure to configure +-it properly (RTFM). +- +-MODULE PARAMETERS: +- +- You can set these with: modprobe tipar NAME=VALUE +- There is currently no way to set these on a per-cable basis. +- +- NAME: timeout +- TYPE: integer +- DEFAULT: 15 +- DESC: Timeout value in tenth of seconds. If no data is available once this +- time has expired then the driver will return with a timeout error. +- +- NAME: delay +- TYPE: integer +- DEFAULT: 10 +- DESC: Inter-bit delay in micro-seconds. A lower value gives an higher data +- rate but makes transmission less reliable. +- +-These parameters can be changed at run time by any program via ioctl(2) calls +-as listed in ./include/linux/ticable.h. +- +-Rather than write 50 pages describing the ioctl() and so on, it is +-perhaps more useful you look at ticables library (dev_link.c) that demonstrates +-how to use them, and demonstrates the features of the driver. This is +-probably a lot more useful to people interested in writing applications +-that will be using this driver. +- +-QUIRKS/BUGS: +- +-None. +- +-HOW TO CONTACT US: +- +-You can email me at roms@lpg.ticalc.org. Please prefix the subject line +-with "TIPAR: " so that I am certain to notice your message. +-You can also mail JB at jb@jblache.org. He packaged these drivers for Debian. +- +-CREDITS: +- +-The code is based on tidev.c & parport.c. +-The driver has been developed independently of Texas Instruments. +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -3699,11 +3699,6 @@ M: nagar@watson.ibm.com + L: linux-kernel@vger.kernel.org + S: Maintained + +-TI PARALLEL LINK CABLE DRIVER +-P: Romain Lievin +-M: roms@lpg.ticalc.org +-S: Maintained +- + TIPC NETWORK LAYER + P: Per Liden + M: per.liden@ericsson.com +--- a/drivers/char/Kconfig ++++ b/drivers/char/Kconfig +@@ -543,28 +543,6 @@ config PPDEV + + If unsure, say N. + +-config TIPAR +- tristate "Texas Instruments parallel link cable support" +- depends on PARPORT +- ---help--- +- If you own a Texas Instruments graphing calculator and use a +- parallel link cable, then you might be interested in this driver. +- +- If you enable this driver, you will be able to communicate with +- your calculator through a set of device nodes under /dev. The +- main advantage of this driver is that you don't have to be root +- to use this precise link cable (depending on the permissions on +- the device nodes, though). +- +- To compile this driver as a module, choose M here: the +- module will be called tipar. +- +- If you don't know what a parallel link cable is or what a Texas +- Instruments graphing calculator is, then you probably don't need this +- driver. +- +- If unsure, say N. +- + config HVC_DRIVER + bool + help +--- a/drivers/char/tipar.c ++++ /dev/null +@@ -1,557 +0,0 @@ +-/* Hey EMACS -*- linux-c -*- +- * +- * tipar - low level driver for handling a parallel link cable designed +- * for Texas Instruments graphing calculators (http://lpg.ticalc.org). +- * A part of the TiLP project. +- * +- * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org> +- * under the terms of the GNU General Public License. +- * +- * Various fixes & clean-up from the Linux Kernel Mailing List +- * (Alan Cox, Richard B. Johnson, Christoph Hellwig). +- */ +- +-/* This driver should, in theory, work with any parallel port that has an +- * appropriate low-level driver; all I/O is done through the parport +- * abstraction layer. +- * +- * If this driver is built into the kernel, you can configure it using the +- * kernel command-line. For example: +- * +- * tipar=timeout,delay (set timeout and delay) +- * +- * If the driver is loaded as a module, similar functionality is available +- * using module parameters. The equivalent of the above commands would be: +- * +- * # insmod tipar timeout=15 delay=10 +- */ +- +-/* COMPATIBILITY WITH OLD KERNELS +- * +- * Usually, parallel cables were bound to ports at +- * particular I/O addresses, as follows: +- * +- * tipar0 0x378 +- * tipar1 0x278 +- * tipar2 0x3bc +- * +- * +- * This driver, by default, binds tipar devices according to parport and +- * the minor number. +- * +- */ +-#undef DEBUG /* change to #define to get debugging +- * output - for pr_debug() */ +-#include <linux/module.h> +-#include <linux/types.h> +-#include <linux/errno.h> +-#include <linux/kernel.h> +-#include <linux/sched.h> +-#include <linux/delay.h> +-#include <linux/fcntl.h> +-#include <linux/fs.h> +-#include <linux/init.h> +-#include <asm/uaccess.h> +-#include <linux/ioport.h> +-#include <asm/io.h> +-#include <linux/bitops.h> +-#include <linux/parport.h> /* Our code depend on parport */ +-#include <linux/device.h> +- +-/* +- * TI definitions +- */ +-#include <linux/ticable.h> +- +-/* +- * Version Information +- */ +-#define DRIVER_VERSION "1.19" +-#define DRIVER_AUTHOR "Romain Lievin <roms@lpg.ticalc.org>" +-#define DRIVER_DESC "Device driver for TI/PC parallel link cables" +-#define DRIVER_LICENSE "GPL" +- +-#define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq)) +- +-/* ----- global variables --------------------------------------------- */ +- +-struct tipar_struct { +- struct pardevice *dev; /* Parport device entry */ +-}; +- +-#define PP_NO 3 +-static struct tipar_struct table[PP_NO]; +- +-static int delay = IO_DELAY; /* inter-bit delay in microseconds */ +-static int timeout = TIMAXTIME; /* timeout in tenth of seconds */ +- +-static unsigned int tp_count; /* tipar count */ +-static unsigned long opened; /* opened devices */ +- +-static struct class *tipar_class; +- +-/* --- macros for parport access -------------------------------------- */ +- +-#define r_dtr(x) (parport_read_data(table[(x)].dev->port)) +-#define r_str(x) (parport_read_status(table[(x)].dev->port)) +-#define w_ctr(x,y) (parport_write_control(table[(x)].dev->port, (y))) +-#define w_dtr(x,y) (parport_write_data(table[(x)].dev->port, (y))) +- +-/* --- setting states on the D-bus with the right timing: ------------- */ +- +-static inline void +-outbyte(int value, int minor) +-{ +- w_dtr(minor, value); +-} +- +-static inline int +-inbyte(int minor) +-{ +- return (r_str(minor)); +-} +- +-static inline void +-init_ti_parallel(int minor) +-{ +- outbyte(3, minor); +-} +- +-/* ----- global defines ----------------------------------------------- */ +- +-#define START(x) { x = jiffies + (HZ * timeout) / 10; } +-#define WAIT(x) { \ +- if (time_before((x), jiffies)) return -1; \ +- if (need_resched()) schedule(); } +- +-/* ----- D-bus bit-banging functions ---------------------------------- */ +- +-/* D-bus protocol (45kbit/s max): +- 1 0 0 +- _______ ______|______ __________|________ __________ +-Red : ________ | ____ | ____ +- _ ____________|________ ______|__________ _____ +-White: ________ | ______ | _______ +-*/ +- +-/* Try to transmit a byte on the specified port (-1 if error). */ +-static int +-put_ti_parallel(int minor, unsigned char data) +-{ +- unsigned int bit; +- unsigned long max; +- +- for (bit = 0; bit < 8; bit++) { +- if (data & 1) { +- outbyte(2, minor); +- START(max); +- do { +- WAIT(max); +- } while (inbyte(minor) & 0x10); +- +- outbyte(3, minor); +- START(max); +- do { +- WAIT(max); +- } while (!(inbyte(minor) & 0x10)); +- } else { +- outbyte(1, minor); +- START(max); +- do { +- WAIT(max); +- } while (inbyte(minor) & 0x20); +- +- outbyte(3, minor); +- START(max); +- do { +- WAIT(max); +- } while (!(inbyte(minor) & 0x20)); +- } +- +- data >>= 1; +- udelay(delay); +- +- if (need_resched()) +- schedule(); +- } +- +- return 0; +-} +- +-/* Receive a byte on the specified port or -1 if error. */ +-static int +-get_ti_parallel(int minor) +-{ +- unsigned int bit; +- unsigned char v, data = 0; +- unsigned long max; +- +- for (bit = 0; bit < 8; bit++) { +- START(max); +- do { +- WAIT(max); +- } while ((v = inbyte(minor) & 0x30) == 0x30); +- +- if (v == 0x10) { +- data = (data >> 1) | 0x80; +- outbyte(1, minor); +- START(max); +- do { +- WAIT(max); +- } while (!(inbyte(minor) & 0x20)); +- outbyte(3, minor); +- } else { +- data = data >> 1; +- outbyte(2, minor); +- START(max); +- do { +- WAIT(max); +- } while (!(inbyte(minor) & 0x10)); +- outbyte(3, minor); +- } +- +- udelay(delay); +- if (need_resched()) +- schedule(); +- } +- +- return (int) data; +-} +- +-/* Try to detect a parallel link cable on the specified port */ +-static int +-probe_ti_parallel(int minor) +-{ +- int i; +- int seq[] = { 0x00, 0x20, 0x10, 0x30 }; +- int data; +- +- for (i = 3; i >= 0; i--) { +- outbyte(3, minor); +- outbyte(i, minor); +- udelay(delay); +- data = inbyte(minor) & 0x30; +- pr_debug("tipar: Probing -> %i: 0x%02x 0x%02x\n", i, +- data, seq[i]); +- if (data != seq[i]) { +- outbyte(3, minor); +- return -1; +- } +- } +- +- outbyte(3, minor); +- return 0; +-} +- +-/* ----- kernel module functions--------------------------------------- */ +- +-static int +-tipar_open(struct inode *inode, struct file *file) +-{ +- unsigned int minor = iminor(inode) - TIPAR_MINOR; +- +- if (tp_count == 0 || minor > tp_count - 1) +- return -ENXIO; +- +- if (test_and_set_bit(minor, &opened)) +- return -EBUSY; +- +- if (!table[minor].dev) { +- printk(KERN_ERR "%s: NULL device for minor %u\n", +- __FUNCTION__, minor); +- return -ENXIO; +- } +- parport_claim_or_block(table[minor].dev); +- init_ti_parallel(minor); +- parport_release(table[minor].dev); +- +- return nonseekable_open(inode, file); +-} +- +-static int +-tipar_close(struct inode *inode, struct file *file) +-{ +- unsigned int minor = iminor(inode) - TIPAR_MINOR; +- +- if (minor > tp_count - 1) +- return -ENXIO; +- +- clear_bit(minor, &opened); +- +- return 0; +-} +- +-static ssize_t +-tipar_write (struct file *file, const char __user *buf, size_t count, +- loff_t * ppos) +-{ +- unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR; +- ssize_t n; +- +- parport_claim_or_block(table[minor].dev); +- +- for (n = 0; n < count; n++) { +- unsigned char b; +- +- if (get_user(b, buf + n)) { +- n = -EFAULT; +- goto out; +- } +- +- if (put_ti_parallel(minor, b) == -1) { +- init_ti_parallel(minor); +- n = -ETIMEDOUT; +- goto out; +- } +- } +- out: +- parport_release(table[minor].dev); +- return n; +-} +- +-static ssize_t +-tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos) +-{ +- int b = 0; +- unsigned int minor = iminor(file->f_path.dentry->d_inode) - TIPAR_MINOR; +- ssize_t retval = 0; +- ssize_t n = 0; +- +- if (count == 0) +- return 0; +- +- parport_claim_or_block(table[minor].dev); +- +- while (n < count) { +- b = get_ti_parallel(minor); +- if (b == -1) { +- init_ti_parallel(minor); +- retval = -ETIMEDOUT; +- goto out; +- } else { +- if (put_user(b, buf + n)) { +- retval = -EFAULT; +- break; +- } else +- retval = ++n; +- } +- +- /* Non-blocking mode : try again ! */ +- if (file->f_flags & O_NONBLOCK) { +- retval = -EAGAIN; +- goto out; +- } +- +- /* Signal pending, try again ! */ +- if (signal_pending(current)) { +- retval = -ERESTARTSYS; +- goto out; +- } +- +- if (need_resched()) +- schedule(); +- } +- +- out: +- parport_release(table[minor].dev); +- return retval; +-} +- +-static int +-tipar_ioctl(struct inode *inode, struct file *file, +- unsigned int cmd, unsigned long arg) +-{ +- int retval = 0; +- +- switch (cmd) { +- case IOCTL_TIPAR_DELAY: +- delay = (int)arg; //get_user(delay, &arg); +- break; +- case IOCTL_TIPAR_TIMEOUT: +- if (arg != 0) +- timeout = (int)arg; +- else +- retval = -EINVAL; +- break; +- default: +- retval = -ENOTTY; +- break; +- } +- +- return retval; +-} +- +-/* ----- kernel module registering ------------------------------------ */ +- +-static const struct file_operations tipar_fops = { +- .owner = THIS_MODULE, +- .llseek = no_llseek, +- .read = tipar_read, +- .write = tipar_write, +- .ioctl = tipar_ioctl, +- .open = tipar_open, +- .release = tipar_close, +-}; +- +-/* --- initialisation code ------------------------------------- */ +- +-#ifndef MODULE +-/* You must set these - there is no sane way to probe for this cable. +- * You can use 'tipar=timeout,delay' to set these now. */ +-static int __init +-tipar_setup(char *str) +-{ +- int ints[3]; +- +- str = get_options(str, ARRAY_SIZE(ints), ints); +- +- if (ints[0] > 0) { +- if (ints[1] != 0) +- timeout = ints[1]; +- else +- printk(KERN_WARNING "tipar: bad timeout value (0), " +- "using default value instead"); +- if (ints[0] > 1) { +- delay = ints[2]; +- } +- } +- +- return 1; +-} +-#endif +- +-/* +- * Register our module into parport. +- * Pass also 2 callbacks functions to parport: a pre-emptive function and an +- * interrupt handler function (unused). +- * Display a message such "tipar0: using parport0 (polling)". +- */ +-static int +-tipar_register(int nr, struct parport *port) +-{ +- int err = 0; +- +- /* Register our module into parport */ +- table[nr].dev = parport_register_device(port, "tipar", +- NULL, NULL, NULL, 0, +- (void *) &table[nr]); +- +- if (table[nr].dev == NULL) { +- err = 1; +- goto out; +- } +- +- device_create(tipar_class, port->dev, MKDEV(TIPAR_MAJOR, +- TIPAR_MINOR + nr), "par%d", nr); +- +- /* Display informations */ +- pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == +- PARPORT_IRQ_NONE) ? "polling" : "interrupt-driven"); +- +- if (probe_ti_parallel(nr) != -1) +- pr_info("tipar%d: link cable found\n", nr); +- else +- pr_info("tipar%d: link cable not found\n", nr); +- +- err = 0; +- +-out: +- return err; +-} +- +-static void +-tipar_attach(struct parport *port) +-{ +- if (tp_count == PP_NO) { +- pr_info("tipar: ignoring parallel port (max. %d)\n", PP_NO); +- return; +- } +- +- if (!tipar_register(tp_count, port)) +- tp_count++; +-} +- +-static void +-tipar_detach(struct parport *port) +-{ +- /* Nothing to do */ +-} +- +-static struct parport_driver tipar_driver = { +- .name = "tipar", +- .attach = tipar_attach, +- .detach = tipar_detach, +-}; +- +-static int __init +-tipar_init_module(void) +-{ +- int err = 0; +- +- pr_info("tipar: parallel link cable driver, version %s\n", +- DRIVER_VERSION); +- +- if (register_chrdev(TIPAR_MAJOR, "tipar", &tipar_fops)) { +- printk(KERN_ERR "tipar: unable to get major %d\n", TIPAR_MAJOR); +- err = -EIO; +- goto out; +- } +- +- tipar_class = class_create(THIS_MODULE, "ticables"); +- if (IS_ERR(tipar_class)) { +- err = PTR_ERR(tipar_class); +- goto out_chrdev; +- } +- if (parport_register_driver(&tipar_driver)) { +- printk(KERN_ERR "tipar: unable to register with parport\n"); +- err = -EIO; +- goto out_class; +- } +- +- err = 0; +- goto out; +- +-out_class: +- class_destroy(tipar_class); +- +-out_chrdev: +- unregister_chrdev(TIPAR_MAJOR, "tipar"); +-out: +- return err; +-} +- +-static void __exit +-tipar_cleanup_module(void) +-{ +- unsigned int i; +- +- /* Unregistering module */ +- parport_unregister_driver(&tipar_driver); +- +- unregister_chrdev(TIPAR_MAJOR, "tipar"); +- +- for (i = 0; i < PP_NO; i++) { +- if (table[i].dev == NULL) +- continue; +- parport_unregister_device(table[i].dev); +- device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); +- } +- class_destroy(tipar_class); +- +- pr_info("tipar: module unloaded\n"); +-} +- +-/* --------------------------------------------------------------------- */ +- +-__setup("tipar=", tipar_setup); +-module_init(tipar_init_module); +-module_exit(tipar_cleanup_module); +- +-MODULE_AUTHOR(DRIVER_AUTHOR); +-MODULE_DESCRIPTION(DRIVER_DESC); +-MODULE_LICENSE(DRIVER_LICENSE); +- +-module_param(timeout, int, 0); +-MODULE_PARM_DESC(timeout, "Timeout (default=1.5 seconds)"); +-module_param(delay, int, 0); +-MODULE_PARM_DESC(delay, "Inter-bit delay (default=10 microseconds)"); +--- a/include/linux/ticable.h ++++ /dev/null +@@ -1,44 +0,0 @@ +-/* Hey EMACS -*- linux-c -*- +- * +- * tipar/tiser/tiusb - low level driver for handling link cables +- * designed for Texas Instruments graphing calculators. +- * +- * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org> +- * +- * Redistribution of this file is permitted under the terms of the GNU +- * Public License (GPL) +- */ +- +-#ifndef _TICABLE_H +-#define _TICABLE_H 1 +- +-/* Internal default constants for the kernel module */ +-#define TIMAXTIME 15 /* 1.5 seconds */ +-#define IO_DELAY 10 /* 10 micro-seconds */ +- +-/* Major & minor number for character devices */ +-#define TIPAR_MAJOR 115 /* 0 to 7 */ +-#define TIPAR_MINOR 0 +- +-#define TISER_MAJOR 115 /* 8 to 15 */ +-#define TISER_MINOR 8 +- +-#define TIUSB_MAJOR 115 /* 16 to 31 */ +-#define TIUSB_MINOR 16 +- +-/* +- * Request values for the 'ioctl' function. +- */ +-#define IOCTL_TIPAR_DELAY _IOW('p', 0xa8, int) /* set delay */ +-#define IOCTL_TIPAR_TIMEOUT _IOW('p', 0xa9, int) /* set timeout */ +- +-#define IOCTL_TISER_DELAY _IOW('p', 0xa0, int) /* set delay */ +-#define IOCTL_TISER_TIMEOUT _IOW('p', 0xa1, int) /* set timeout */ +- +-#define IOCTL_TIUSB_TIMEOUT _IOW('N', 0x20, int) /* set timeout */ +-#define IOCTL_TIUSB_RESET_DEVICE _IOW('N', 0x21, int) /* reset device */ +-#define IOCTL_TIUSB_RESET_PIPES _IOW('N', 0x22, int) /* reset both pipes*/ +-#define IOCTL_TIUSB_GET_MAXPS _IOR('N', 0x23, int) /* max packet size */ +-#define IOCTL_TIUSB_GET_DEVID _IOR('N', 0x24, int) /* get device type */ +- +-#endif /* TICABLE_H */ diff --git a/pci/pci-add-missing-space-in-printk-messages.patch b/pci/pci-add-missing-space-in-printk-messages.patch index 81497822274122..818b328955585a 100644 --- a/pci/pci-add-missing-space-in-printk-messages.patch +++ b/pci/pci-add-missing-space-in-printk-messages.patch @@ -31,7 +31,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c -@@ -656,13 +656,13 @@ int pci_scan_bridge(struct pci_bus *bus, +@@ -657,13 +657,13 @@ int pci_scan_bridge(struct pci_bus *bus, (child->number > bus->subordinate) || (child->number < bus->number) || (child->subordinate < bus->number)) { diff --git a/pci/pci-always-export-pci_scan_single_device.patch b/pci/pci-always-export-pci_scan_single_device.patch index e5aca8323f36da..727fdbcc44f0e5 100644 --- a/pci/pci-always-export-pci_scan_single_device.patch +++ b/pci/pci-always-export-pci_scan_single_device.patch @@ -25,7 +25,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c -@@ -988,6 +988,7 @@ struct pci_dev *pci_scan_single_device(s +@@ -989,6 +989,7 @@ struct pci_dev *pci_scan_single_device(s return dev; } @@ -33,7 +33,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /** * pci_scan_slot - scan a PCI slot on a bus for devices. -@@ -1175,7 +1176,6 @@ EXPORT_SYMBOL(pci_add_new_bus); +@@ -1176,7 +1177,6 @@ EXPORT_SYMBOL(pci_add_new_bus); EXPORT_SYMBOL(pci_do_scan_bus); EXPORT_SYMBOL(pci_scan_slot); EXPORT_SYMBOL(pci_scan_bridge); diff --git a/pci/pci-drivers-pci-remove-unused-exports.patch b/pci/pci-drivers-pci-remove-unused-exports.patch index 5e45fb3bee60bb..80f19c396ac019 100644 --- a/pci/pci-drivers-pci-remove-unused-exports.patch +++ b/pci/pci-drivers-pci-remove-unused-exports.patch @@ -50,7 +50,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * pci_osc_control_set - commit requested control to Firmware --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c -@@ -1157,7 +1157,6 @@ err_out: +@@ -1158,7 +1158,6 @@ err_out: kfree(b); return NULL; } diff --git a/pci/pci-remove-additional-pci_scan_child_bus-prototype.patch b/pci/pci-remove-additional-pci_scan_child_bus-prototype.patch index 4e7d4638f22f98..18f93fda738111 100644 --- a/pci/pci-remove-additional-pci_scan_child_bus-prototype.patch +++ b/pci/pci-remove-additional-pci_scan_child_bus-prototype.patch @@ -22,7 +22,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c -@@ -486,8 +486,6 @@ static void pci_fixup_parent_subordinate +@@ -487,8 +487,6 @@ static void pci_fixup_parent_subordinate } } diff --git a/pci/pci-restore-pci-expansion-rom-p2p-prefetch-window-creation.patch b/pci/pci-restore-pci-expansion-rom-p2p-prefetch-window-creation.patch new file mode 100644 index 00000000000000..dbc237da2f1fdb --- /dev/null +++ b/pci/pci-restore-pci-expansion-rom-p2p-prefetch-window-creation.patch @@ -0,0 +1,36 @@ +From garyhade@us.ibm.com Tue Dec 11 17:09:24 2007 +From: Gary Hade <garyhade@us.ibm.com> +Date: Tue, 11 Dec 2007 17:09:13 -0800 +Subject: PCI: Restore PCI expansion ROM P2P prefetch window creation +To: gregkh@suse.de, linux-pci@atrey.karlin.mff.cuni.cz +Cc: jbeulich@novell.com, linux-kernel@vger.kernel.org, j-nomura@ce.jp.nec.com, lcm@us.ibm.com +Message-ID: <20071212010913.GC6755@us.ibm.com> +Content-Disposition: inline + + + +Restore PCI expansion ROM P2P prefetch window creation. + +This patch reverts previous "Avoid creating P2P prefetch +window for expansion ROMs" change due to regressions that +were spotted on some systems. + +Signed-off-by: Gary Hade <garyhade@us.ibm.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/pci/probe.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/pci/probe.c ++++ b/drivers/pci/probe.c +@@ -276,7 +276,8 @@ static void pci_read_bases(struct pci_de + sz = pci_size(l, sz, (u32)PCI_ROM_ADDRESS_MASK); + if (sz) { + res->flags = (l & IORESOURCE_ROM_ENABLE) | +- IORESOURCE_MEM | IORESOURCE_READONLY; ++ IORESOURCE_MEM | IORESOURCE_PREFETCH | ++ IORESOURCE_READONLY | IORESOURCE_CACHEABLE; + res->start = l & PCI_ROM_ADDRESS_MASK; + res->end = res->start + (unsigned long) sz; + } diff --git a/pci/pci_bridge-device.patch b/pci/pci_bridge-device.patch index 9bc2b0e002e16c..af2b6ceed2ab93 100644 --- a/pci/pci_bridge-device.patch +++ b/pci/pci_bridge-device.patch @@ -170,7 +170,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> }; static int __init pcibus_class_init(void) -@@ -391,7 +392,6 @@ pci_alloc_child_bus(struct pci_bus *pare +@@ -392,7 +393,6 @@ pci_alloc_child_bus(struct pci_bus *pare { struct pci_bus *child; int i; @@ -178,7 +178,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* * Allocate a new bus, and inherit stuff from the parent.. -@@ -407,15 +407,12 @@ pci_alloc_child_bus(struct pci_bus *pare +@@ -408,15 +408,12 @@ pci_alloc_child_bus(struct pci_bus *pare child->bus_flags = parent->bus_flags; child->bridge = get_device(&bridge->dev); @@ -200,7 +200,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* * Set up the primary, secondary and subordinate -@@ -433,12 +430,6 @@ pci_alloc_child_bus(struct pci_bus *pare +@@ -434,12 +431,6 @@ pci_alloc_child_bus(struct pci_bus *pare bridge->subordinate = child; return child; @@ -213,7 +213,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) -@@ -1119,32 +1110,27 @@ struct pci_bus * pci_create_bus(struct d +@@ -1120,32 +1111,27 @@ struct pci_bus * pci_create_bus(struct d goto dev_reg_err; b->bridge = get_device(dev); @@ -8,6 +8,10 @@ gregkh/gcc43-workaround.diff # driver patches queued for 2.6.24 driver/kobject-fix-the-documentation-of-how-kobject_set_name-works.patch +driver/tipar-remove-obsolete-module.patch +driver/howto-change-man-page-maintainer-address-for-japanese-howto.patch +driver/add-documentation-for-fair_user_sched-sysfs-files.patch +driver/howto-change-addresses-of-maintainer-and-lxr-url-for-korean-howto.patch # driver patches for after 2.6.24 is out driver/nozomi.patch @@ -158,6 +162,7 @@ driver/sysfs-crash-debugging.patch # pci patches queued for 2.6.24 (bugfixes, new ids, etc.) +pci/pci-restore-pci-expansion-rom-p2p-prefetch-window-creation.patch # pci patches for after 2.6.24 is out pci/pci-make-pci_restore_bars-static.patch @@ -190,6 +195,11 @@ pci/pci_bridge-device.patch # usb patches queued for 2.6.24 (bugfixes, new ids, etc.) +usb/usb-sierra-fix-product-id.patch +usb/usb-storage-fix-devices-that-cannot-handle-32k-transfers.patch +usb/usb-cp2101-new-device-id.patch +usb/usb-option-bind-to-the-correct-interface-of-the-huawei-e220.patch +usb/usb.h-fix-kernel-doc-warning.patch # usb stuff for after 2.6.24 is out usb/usb-convert-from-class_device-to-device-for-usb-core.patch @@ -222,6 +232,8 @@ usb/usb-usb-peripheral-controller-driver-oops-avoidance.patch usb/usb-force-handover-port-to-companion-when-hub_port_connect_change-fails.patch usb/usb-dummy_hcd-don-t-register-drivers-on-the-platform-bus.patch usb/always-announce-new-usb-devices.patch +usb/usb-convert-ohci-debug-files-to-use-debugfs-instead-of-sysfs.patch +usb/usb-convert-ehci-debug-files-to-use-debugfs-instead-of-sysfs.patch # my ols tutorial driver, never in mainline usb/usb-gotemp.patch @@ -233,3 +245,5 @@ f2.patch k1.patch k2.patch + + diff --git a/usb/usb-convert-ehci-debug-files-to-use-debugfs-instead-of-sysfs.patch b/usb/usb-convert-ehci-debug-files-to-use-debugfs-instead-of-sysfs.patch new file mode 100644 index 00000000000000..ae76df1e2a2879 --- /dev/null +++ b/usb/usb-convert-ehci-debug-files-to-use-debugfs-instead-of-sysfs.patch @@ -0,0 +1,413 @@ +From foo@baz Tue Apr 9 12:12:43 2002 +Date: Tue, 11 Sep 2007 14:07:31 -0700 +From: Tony Jones <tonyj@suse.de> +To: Greg KH <greg@kroah.com> +Subject: USB: convert ehci debug files to use debugfs instead of sysfs + +We should not have multiple line files in sysfs, this moves the data to +debugfs instead, like the UHCI driver. + +Signed-off-by: Tony Jones <tonyj@suse.de> +Cc: Kay Sievers <kay.sievers@vrfy.org> +Cc: David Brownell <david-b@pacbell.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ehci-dbg.c | 227 ++++++++++++++++++++++++++++++++++++-------- + drivers/usb/host/ehci-hcd.c | 28 +++++ + drivers/usb/host/ehci.h | 8 + + 3 files changed, 223 insertions(+), 40 deletions(-) + +--- a/drivers/usb/host/ehci-dbg.c ++++ b/drivers/usb/host/ehci-dbg.c +@@ -323,7 +323,43 @@ static inline void remove_debug_files (s + + #else + +-/* troubleshooting help: expose state in sysfs */ ++/* troubleshooting help: expose state in debugfs */ ++ ++static int debug_async_open(struct inode *, struct file *); ++static int debug_periodic_open(struct inode *, struct file *); ++static int debug_registers_open(struct inode *, struct file *); ++static int debug_async_open(struct inode *, struct file *); ++static ssize_t debug_output(struct file*, char __user*, size_t, loff_t*); ++static int debug_close(struct inode *, struct file *); ++ ++static const struct file_operations debug_async_fops = { ++ .owner = THIS_MODULE, ++ .open = debug_async_open, ++ .read = debug_output, ++ .release = debug_close, ++}; ++static const struct file_operations debug_periodic_fops = { ++ .owner = THIS_MODULE, ++ .open = debug_periodic_open, ++ .read = debug_output, ++ .release = debug_close, ++}; ++static const struct file_operations debug_registers_fops = { ++ .owner = THIS_MODULE, ++ .open = debug_registers_open, ++ .read = debug_output, ++ .release = debug_close, ++}; ++ ++static struct dentry *ehci_debug_root = NULL; ++ ++struct debug_buffer { ++ ssize_t (*fill_func)(struct debug_buffer*); /* fill method */ ++ struct usb_bus *bus; ++ struct mutex mutex; /* protect filling of buffer */ ++ size_t count; /* number of characters filled into buffer */ ++ char *page; ++}; + + #define speed_char(info1) ({ char tmp; \ + switch (info1 & (3 << 12)) { \ +@@ -441,10 +477,8 @@ done: + *nextp = next; + } + +-static ssize_t +-show_async(struct device *dev, struct device_attribute *attr, char *buf) ++static ssize_t fill_async_buffer(struct debug_buffer *buf) + { +- struct usb_bus *bus; + struct usb_hcd *hcd; + struct ehci_hcd *ehci; + unsigned long flags; +@@ -452,14 +486,13 @@ show_async(struct device *dev, struct de + char *next; + struct ehci_qh *qh; + +- *buf = 0; +- +- bus = dev_get_drvdata(dev); +- hcd = bus_to_hcd(bus); ++ hcd = bus_to_hcd(buf->bus); + ehci = hcd_to_ehci (hcd); +- next = buf; ++ next = buf->page; + size = PAGE_SIZE; + ++ *next = 0; ++ + /* dumps a snapshot of the async schedule. + * usually empty except for long-term bulk reads, or head. + * one QH per line, and TDs we know about +@@ -477,16 +510,12 @@ show_async(struct device *dev, struct de + } + spin_unlock_irqrestore (&ehci->lock, flags); + +- return strlen (buf); ++ return strlen(buf->page); + } +-static DEVICE_ATTR(async, S_IRUGO, show_async, NULL); + + #define DBG_SCHED_LIMIT 64 +- +-static ssize_t +-show_periodic(struct device *dev, struct device_attribute *attr, char *buf) ++static ssize_t fill_periodic_buffer(struct debug_buffer *buf) + { +- struct usb_bus *bus; + struct usb_hcd *hcd; + struct ehci_hcd *ehci; + unsigned long flags; +@@ -500,10 +529,9 @@ show_periodic(struct device *dev, struct + return 0; + seen_count = 0; + +- bus = dev_get_drvdata(dev); +- hcd = bus_to_hcd(bus); ++ hcd = bus_to_hcd(buf->bus); + ehci = hcd_to_ehci (hcd); +- next = buf; ++ next = buf->page; + size = PAGE_SIZE; + + temp = scnprintf (next, size, "size = %d\n", ehci->periodic_size); +@@ -623,14 +651,10 @@ show_periodic(struct device *dev, struct + + return PAGE_SIZE - size; + } +-static DEVICE_ATTR(periodic, S_IRUGO, show_periodic, NULL); +- + #undef DBG_SCHED_LIMIT + +-static ssize_t +-show_registers(struct device *dev, struct device_attribute *attr, char *buf) ++static ssize_t fill_registers_buffer(struct debug_buffer *buf) + { +- struct usb_bus *bus; + struct usb_hcd *hcd; + struct ehci_hcd *ehci; + unsigned long flags; +@@ -639,15 +663,14 @@ show_registers(struct device *dev, struc + static char fmt [] = "%*s\n"; + static char label [] = ""; + +- bus = dev_get_drvdata(dev); +- hcd = bus_to_hcd(bus); ++ hcd = bus_to_hcd(buf->bus); + ehci = hcd_to_ehci (hcd); +- next = buf; ++ next = buf->page; + size = PAGE_SIZE; + + spin_lock_irqsave (&ehci->lock, flags); + +- if (bus->controller->power.power_state.event) { ++ if (buf->bus->controller->power.power_state.event) { + size = scnprintf (next, size, + "bus %s, device %s (driver " DRIVER_VERSION ")\n" + "%s\n" +@@ -789,26 +812,152 @@ done: + + return PAGE_SIZE - size; + } +-static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL); ++ ++static struct debug_buffer* ++alloc_buffer(struct usb_bus *bus, ssize_t (*fill_func)(struct debug_buffer*)) ++{ ++ struct debug_buffer *buf; ++ ++ buf = kzalloc(sizeof (struct debug_buffer), GFP_KERNEL); ++ ++ if (buf) { ++ buf->bus = bus; ++ buf->fill_func=fill_func; ++ mutex_init(&buf->mutex); ++ } ++ ++ return buf; ++} ++ ++static int fill_buffer(struct debug_buffer *buf) ++{ ++ int ret=0; ++ ++ if (!buf->page) ++ buf->page = (char *)get_zeroed_page(GFP_KERNEL); ++ ++ if (!buf->page) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ ++ ret = buf->fill_func(buf); ++ ++ if (ret >= 0) { ++ buf->count = ret; ++ ret = 0; ++ } ++ ++out: ++ return ret; ++} ++ ++static ssize_t debug_output(struct file *file, char __user *user_buf, ++ size_t len, loff_t *offset) ++{ ++ struct debug_buffer *buf = file->private_data; ++ int ret = 0; ++ ++ mutex_lock(&buf->mutex); ++ if (buf->count == 0) { ++ ret = fill_buffer(buf); ++ if (ret != 0) { ++ mutex_unlock(&buf->mutex); ++ goto out; ++ } ++ } ++ mutex_unlock(&buf->mutex); ++ ++ ret = simple_read_from_buffer(user_buf, len, offset, ++ buf->page, buf->count); ++ ++out: ++ return ret; ++ ++} ++ ++static int debug_close(struct inode *inode, struct file *file) ++{ ++ struct debug_buffer *buf = file->private_data; ++ ++ if (buf) { ++ if (buf->page) ++ free_page((unsigned long)buf->page); ++ kfree(buf); ++ } ++ ++ return 0; ++} ++static int debug_async_open(struct inode *inode, struct file *file) ++{ ++ file->private_data = alloc_buffer(inode->i_private, fill_async_buffer); ++ ++ return file->private_data ? 0 : -ENOMEM; ++} ++ ++static int debug_periodic_open(struct inode *inode, struct file *file) ++{ ++ file->private_data = alloc_buffer(inode->i_private, ++ fill_periodic_buffer); ++ ++ return file->private_data ? 0 : -ENOMEM; ++} ++ ++static int debug_registers_open(struct inode *inode, struct file *file) ++{ ++ file->private_data = alloc_buffer(inode->i_private, ++ fill_registers_buffer); ++ ++ return file->private_data ? 0 : -ENOMEM; ++} + + static inline void create_debug_files (struct ehci_hcd *ehci) + { +- struct device *dev = ehci_to_hcd(ehci)->self.dev; +- int retval; ++ struct usb_bus *bus = &ehci_to_hcd(ehci)->self; + +- retval = device_create_file(dev, &dev_attr_async); +- retval = device_create_file(dev, &dev_attr_periodic); +- retval = device_create_file(dev, &dev_attr_registers); ++ ehci->debug_dir=debugfs_create_dir(bus->bus_name, ehci_debug_root); ++ if (!ehci->debug_dir || IS_ERR(ehci->debug_dir)) { ++ ehci->debug_dir = NULL; ++ goto done; ++ } ++ ++ ehci->debug_async = ++ debugfs_create_file("async", S_IRUGO, ehci->debug_dir, ++ bus, &debug_async_fops); ++ if (!ehci->debug_async || IS_ERR(ehci->debug_async)) ++ goto async_error; ++ ++ ehci->debug_periodic = ++ debugfs_create_file("periodic", S_IRUGO, ehci->debug_dir, ++ bus, &debug_periodic_fops); ++ if (!ehci->debug_periodic || IS_ERR(ehci->debug_periodic)) ++ goto periodic_error; ++ ++ ehci->debug_registers = ++ debugfs_create_file("registers", S_IRUGO, ehci->debug_dir, ++ bus, &debug_registers_fops); ++ if (!ehci->debug_registers || IS_ERR(ehci->debug_registers)) ++ goto registers_error; ++ ++ goto done; ++ ++registers_error: ++ debugfs_remove(ehci->debug_periodic); ehci->debug_periodic = NULL; ++periodic_error: ++ debugfs_remove(ehci->debug_async); ehci->debug_async = NULL; ++async_error: ++ debugfs_remove(ehci->debug_dir); ehci->debug_dir = NULL; ++ ++done: ++ return; + } + + static inline void remove_debug_files (struct ehci_hcd *ehci) + { +- struct device *dev = ehci_to_hcd(ehci)->self.dev; +- +- device_remove_file(dev, &dev_attr_async); +- device_remove_file(dev, &dev_attr_periodic); +- device_remove_file(dev, &dev_attr_registers); ++ debugfs_remove(ehci->debug_registers); ++ debugfs_remove(ehci->debug_periodic); ++ debugfs_remove(ehci->debug_async); ++ debugfs_remove(ehci->debug_dir); + } + + #endif /* STUB_DEBUG_FILES */ +- +--- a/drivers/usb/host/ehci-hcd.c ++++ b/drivers/usb/host/ehci-hcd.c +@@ -33,6 +33,7 @@ + #include <linux/usb.h> + #include <linux/moduleparam.h> + #include <linux/dma-mapping.h> ++#include <linux/debugfs.h> + + #include "../core/hcd.h" + +@@ -978,15 +979,34 @@ static int __init ehci_hcd_init(void) + sizeof(struct ehci_qh), sizeof(struct ehci_qtd), + sizeof(struct ehci_itd), sizeof(struct ehci_sitd)); + ++#ifdef DEBUG ++ ehci_debug_root=debugfs_create_dir("ehci", NULL); ++ if (!ehci_debug_root || IS_ERR(ehci_debug_root)) { ++ if (!ehci_debug_root) ++ retval = -ENOENT; ++ else ++ retval = PTR_ERR(ehci_debug_root); ++ ++ return retval; ++ } ++#endif ++ + #ifdef PLATFORM_DRIVER + retval = platform_driver_register(&PLATFORM_DRIVER); +- if (retval < 0) ++ if (retval < 0) { ++#ifdef DEBUG ++ debugfs_remove(ehci_debug_root); ehci_debug_root=NULL; ++#endif + return retval; ++ } + #endif + + #ifdef PCI_DRIVER + retval = pci_register_driver(&PCI_DRIVER); + if (retval < 0) { ++#ifdef DEBUG ++ debugfs_remove(ehci_debug_root); ehci_debug_root=NULL; ++#endif + #ifdef PLATFORM_DRIVER + platform_driver_unregister(&PLATFORM_DRIVER); + #endif +@@ -997,6 +1017,9 @@ static int __init ehci_hcd_init(void) + #ifdef PS3_SYSTEM_BUS_DRIVER + retval = ps3_ehci_driver_register(&PS3_SYSTEM_BUS_DRIVER); + if (retval < 0) { ++#ifdef DEBUG ++ debugfs_remove(ehci_debug_root); ehci_debug_root=NULL; ++#endif + #ifdef PLATFORM_DRIVER + platform_driver_unregister(&PLATFORM_DRIVER); + #endif +@@ -1022,6 +1045,9 @@ static void __exit ehci_hcd_cleanup(void + #ifdef PS3_SYSTEM_BUS_DRIVER + ps3_ehci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); + #endif ++#ifdef DEBUG ++ debugfs_remove(ehci_debug_root); ++#endif + } + module_exit(ehci_hcd_cleanup); + +--- a/drivers/usb/host/ehci.h ++++ b/drivers/usb/host/ehci.h +@@ -127,6 +127,14 @@ struct ehci_hcd { /* one per controlle + #else + # define COUNT(x) do {} while (0) + #endif ++ ++ /* debug files */ ++#ifdef DEBUG ++ struct dentry *debug_dir; ++ struct dentry *debug_async; ++ struct dentry *debug_periodic; ++ struct dentry *debug_registers; ++#endif + }; + + /* convert between an HCD pointer and the corresponding EHCI_HCD */ diff --git a/usb/usb-convert-from-class_device-to-device-for-usb-core.patch b/usb/usb-convert-from-class_device-to-device-for-usb-core.patch index bda182a6bc3cda..1621f7b275333e 100644 --- a/usb/usb-convert-from-class_device-to-device-for-usb-core.patch +++ b/usb/usb-convert-from-class_device-to-device-for-usb-core.patch @@ -330,7 +330,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #endif --- a/include/linux/usb.h +++ b/include/linux/usb.h -@@ -317,7 +317,7 @@ struct usb_bus { +@@ -318,7 +318,7 @@ struct usb_bus { #ifdef CONFIG_USB_DEVICEFS struct dentry *usbfs_dentry; /* usbfs dentry entry for the bus */ #endif diff --git a/usb/usb-convert-ohci-debug-files-to-use-debugfs-instead-of-sysfs.patch b/usb/usb-convert-ohci-debug-files-to-use-debugfs-instead-of-sysfs.patch new file mode 100644 index 00000000000000..0a7748052887a2 --- /dev/null +++ b/usb/usb-convert-ohci-debug-files-to-use-debugfs-instead-of-sysfs.patch @@ -0,0 +1,386 @@ +From foo@baz Tue Apr 9 12:12:43 2002 +Date: Tue, 11 Sep 2007 14:07:31 -0700 +From: Tony Jones <tonyj@suse.de> +To: Greg KH <greg@kroah.com> +Subject: USB: convert ohci debug files to use debugfs instead of sysfs + +We should not have multiple line files in sysfs, this moves the data to +debugfs instead, like the UHCI driver. + +Signed-off-by: Tony Jones <tonyj@suse.de> +Cc: Kay Sievers <kay.sievers@vrfy.org> +Cc: David Brownell <david-b@pacbell.net> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/host/ohci-dbg.c | 217 ++++++++++++++++++++++++++++++++++++++------ + drivers/usb/host/ohci-hcd.c | 21 ++++ + drivers/usb/host/ohci.h | 7 + + 3 files changed, 216 insertions(+), 29 deletions(-) + +--- a/drivers/usb/host/ohci-dbg.c ++++ b/drivers/usb/host/ohci-dbg.c +@@ -401,6 +401,42 @@ static inline void remove_debug_files (s + + #else + ++static int debug_async_open(struct inode *, struct file *); ++static int debug_periodic_open(struct inode *, struct file *); ++static int debug_registers_open(struct inode *, struct file *); ++static int debug_async_open(struct inode *, struct file *); ++static ssize_t debug_output(struct file*, char __user*, size_t, loff_t*); ++static int debug_close(struct inode *, struct file *); ++ ++static const struct file_operations debug_async_fops = { ++ .owner = THIS_MODULE, ++ .open = debug_async_open, ++ .read = debug_output, ++ .release = debug_close, ++}; ++static const struct file_operations debug_periodic_fops = { ++ .owner = THIS_MODULE, ++ .open = debug_periodic_open, ++ .read = debug_output, ++ .release = debug_close, ++}; ++static const struct file_operations debug_registers_fops = { ++ .owner = THIS_MODULE, ++ .open = debug_registers_open, ++ .read = debug_output, ++ .release = debug_close, ++}; ++ ++static struct dentry *ohci_debug_root = NULL; ++ ++struct debug_buffer { ++ ssize_t (*fill_func)(struct debug_buffer*); /* fill method */ ++ struct device *dev; ++ struct mutex mutex; /* protect filling of buffer */ ++ size_t count; /* number of characters filled into buffer */ ++ char *page; ++}; ++ + static ssize_t + show_list (struct ohci_hcd *ohci, char *buf, size_t count, struct ed *ed) + { +@@ -467,8 +503,7 @@ show_list (struct ohci_hcd *ohci, char * + return count - size; + } + +-static ssize_t +-show_async(struct device *dev, struct device_attribute *attr, char *buf) ++static ssize_t fill_async_buffer(struct debug_buffer *buf) + { + struct usb_bus *bus; + struct usb_hcd *hcd; +@@ -476,25 +511,23 @@ show_async(struct device *dev, struct de + size_t temp; + unsigned long flags; + +- bus = dev_get_drvdata(dev); ++ bus = (struct usb_bus *)dev_get_drvdata(buf->dev); + hcd = bus_to_hcd(bus); + ohci = hcd_to_ohci(hcd); + + /* display control and bulk lists together, for simplicity */ + spin_lock_irqsave (&ohci->lock, flags); +- temp = show_list (ohci, buf, PAGE_SIZE, ohci->ed_controltail); +- temp += show_list (ohci, buf + temp, PAGE_SIZE - temp, ohci->ed_bulktail); ++ temp = show_list (ohci, buf->page, buf->count, ohci->ed_controltail); ++ temp += show_list (ohci, buf->page + temp, buf->count - temp, ++ ohci->ed_bulktail); + spin_unlock_irqrestore (&ohci->lock, flags); + + return temp; + } +-static DEVICE_ATTR(async, S_IRUGO, show_async, NULL); +- + + #define DBG_SCHED_LIMIT 64 + +-static ssize_t +-show_periodic(struct device *dev, struct device_attribute *attr, char *buf) ++static ssize_t fill_periodic_buffer(struct debug_buffer *buf) + { + struct usb_bus *bus; + struct usb_hcd *hcd; +@@ -509,10 +542,10 @@ show_periodic(struct device *dev, struct + return 0; + seen_count = 0; + +- bus = dev_get_drvdata(dev); ++ bus = (struct usb_bus *)dev_get_drvdata(buf->dev); + hcd = bus_to_hcd(bus); + ohci = hcd_to_ohci(hcd); +- next = buf; ++ next = buf->page; + size = PAGE_SIZE; + + temp = scnprintf (next, size, "size = %d\n", NUM_INTS); +@@ -589,13 +622,9 @@ show_periodic(struct device *dev, struct + + return PAGE_SIZE - size; + } +-static DEVICE_ATTR(periodic, S_IRUGO, show_periodic, NULL); +- +- + #undef DBG_SCHED_LIMIT + +-static ssize_t +-show_registers(struct device *dev, struct device_attribute *attr, char *buf) ++static ssize_t fill_registers_buffer(struct debug_buffer *buf) + { + struct usb_bus *bus; + struct usb_hcd *hcd; +@@ -606,11 +635,11 @@ show_registers(struct device *dev, struc + char *next; + u32 rdata; + +- bus = dev_get_drvdata(dev); ++ bus = (struct usb_bus *)dev_get_drvdata(buf->dev); + hcd = bus_to_hcd(bus); + ohci = hcd_to_ohci(hcd); + regs = ohci->regs; +- next = buf; ++ next = buf->page; + size = PAGE_SIZE; + + spin_lock_irqsave (&ohci->lock, flags); +@@ -677,29 +706,159 @@ show_registers(struct device *dev, struc + + done: + spin_unlock_irqrestore (&ohci->lock, flags); ++ + return PAGE_SIZE - size; + } +-static DEVICE_ATTR(registers, S_IRUGO, show_registers, NULL); + ++static struct debug_buffer* ++alloc_buffer(struct device *dev, ssize_t (*fill_func)(struct debug_buffer*)) ++{ ++ struct debug_buffer *buf; ++ ++ buf = kzalloc(sizeof (struct debug_buffer), GFP_KERNEL); ++ ++ if (buf) { ++ buf->dev = dev; ++ buf->fill_func=fill_func; ++ mutex_init(&buf->mutex); ++ } ++ ++ return buf; ++} ++ ++static int fill_buffer(struct debug_buffer *buf) ++{ ++ int ret=0; ++ ++ if (!buf->page) ++ buf->page = (char *)get_zeroed_page(GFP_KERNEL); ++ ++ if (!buf->page) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ ++ ret = buf->fill_func(buf); ++ ++ if (ret >= 0) { ++ buf->count = ret; ++ ret = 0; ++ } ++ ++out: ++ return ret; ++} ++ ++static ssize_t debug_output(struct file *file, char __user *user_buf, ++ size_t len, loff_t *offset) ++{ ++ struct debug_buffer *buf = file->private_data; ++ int ret = 0; + ++ mutex_lock(&buf->mutex); ++ if (buf->count == 0) { ++ ret = fill_buffer(buf); ++ if (ret != 0) { ++ mutex_unlock(&buf->mutex); ++ goto out; ++ } ++ } ++ mutex_unlock(&buf->mutex); ++ ++ ret = simple_read_from_buffer(user_buf, len, offset, ++ buf->page, buf->count); ++ ++out: ++ return ret; ++ ++} ++ ++static int debug_close(struct inode *inode, struct file *file) ++{ ++ struct debug_buffer *buf = file->private_data; ++ ++ if (buf) { ++ if (buf->page) ++ free_page((unsigned long)buf->page); ++ kfree(buf); ++ } ++ ++ return 0; ++} ++static int debug_async_open(struct inode *inode, struct file *file) ++{ ++ file->private_data = alloc_buffer(inode->i_private, fill_async_buffer); ++ ++ return file->private_data ? 0 : -ENOMEM; ++} ++ ++static int debug_periodic_open(struct inode *inode, struct file *file) ++{ ++ file->private_data = alloc_buffer(inode->i_private, ++ fill_periodic_buffer); ++ ++ return file->private_data ? 0 : -ENOMEM; ++} ++ ++static int debug_registers_open(struct inode *inode, struct file *file) ++{ ++ file->private_data = alloc_buffer(inode->i_private, ++ fill_registers_buffer); ++ ++ return file->private_data ? 0 : -ENOMEM; ++} + static inline void create_debug_files (struct ohci_hcd *ohci) + { +- struct device *dev = ohci_to_hcd(ohci)->self.dev; +- int retval; ++ struct usb_bus *bus = &ohci_to_hcd(ohci)->self; ++ struct device *dev = bus->dev; ++ ++ ohci->debug_dir=debugfs_create_dir(bus->bus_name, ohci_debug_root); ++ if (!ohci->debug_dir || IS_ERR(ohci->debug_dir)) { ++ ohci->debug_dir = NULL; ++ goto done; ++ } ++ ++ ohci->debug_async = ++ debugfs_create_file("async", S_IRUGO, ohci->debug_dir, ++ dev, &debug_async_fops); ++ if (!ohci->debug_async || IS_ERR(ohci->debug_async)) ++ goto async_error; ++ ++ ohci->debug_periodic = ++ debugfs_create_file("periodic", S_IRUGO, ohci->debug_dir, ++ dev, &debug_periodic_fops); ++ ++ if (!ohci->debug_periodic || IS_ERR(ohci->debug_periodic)) ++ goto periodic_error; ++ ++ ohci->debug_registers = ++ debugfs_create_file("registers", S_IRUGO, ohci->debug_dir, ++ dev, &debug_registers_fops); ++ ++ if (!ohci->debug_registers || IS_ERR(ohci->debug_registers)) ++ goto registers_error; ++ ++ goto done; ++ ++registers_error: ++ debugfs_remove(ohci->debug_periodic); ohci->debug_periodic = NULL; ++periodic_error: ++ debugfs_remove(ohci->debug_async); ohci->debug_async = NULL; ++async_error: ++ debugfs_remove(ohci->debug_dir); ohci->debug_dir = NULL; ++ ++done: ++ return; + +- retval = device_create_file(dev, &dev_attr_async); +- retval = device_create_file(dev, &dev_attr_periodic); +- retval = device_create_file(dev, &dev_attr_registers); + ohci_dbg (ohci, "created debug files\n"); + } + + static inline void remove_debug_files (struct ohci_hcd *ohci) + { +- struct device *dev = ohci_to_hcd(ohci)->self.dev; +- +- device_remove_file(dev, &dev_attr_async); +- device_remove_file(dev, &dev_attr_periodic); +- device_remove_file(dev, &dev_attr_registers); ++ debugfs_remove(ohci->debug_registers); ++ debugfs_remove(ohci->debug_periodic); ++ debugfs_remove(ohci->debug_async); ++ debugfs_remove(ohci->debug_dir); + } + + #endif +--- a/drivers/usb/host/ohci-hcd.c ++++ b/drivers/usb/host/ohci-hcd.c +@@ -36,6 +36,7 @@ + #include <linux/dmapool.h> + #include <linux/reboot.h> + #include <linux/workqueue.h> ++#include <linux/debugfs.h> + + #include <asm/io.h> + #include <asm/irq.h> +@@ -1065,6 +1066,18 @@ static int __init ohci_hcd_mod_init(void + pr_debug ("%s: block sizes: ed %Zd td %Zd\n", hcd_name, + sizeof (struct ed), sizeof (struct td)); + ++#ifdef DEBUG ++ ohci_debug_root=debugfs_create_dir("ohci", NULL); ++ if (!ohci_debug_root || IS_ERR(ohci_debug_root)) { ++ if (!ohci_debug_root) ++ retval = -ENOENT; ++ else ++ retval = PTR_ERR(ohci_debug_root); ++ ++ goto error_debug; ++ } ++#endif ++ + #ifdef PS3_SYSTEM_BUS_DRIVER + retval = ps3_ohci_driver_register(&PS3_SYSTEM_BUS_DRIVER); + if (retval < 0) +@@ -1127,6 +1140,11 @@ static int __init ohci_hcd_mod_init(void + ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); + error_ps3: + #endif ++#ifdef DEBUG ++ debugfs_remove(ohci_debug_root); ohci_debug_root = NULL; ++ error_debug: ++#endif ++ + return retval; + } + module_init(ohci_hcd_mod_init); +@@ -1151,6 +1169,9 @@ static void __exit ohci_hcd_mod_exit(voi + #ifdef PS3_SYSTEM_BUS_DRIVER + ps3_ohci_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); + #endif ++#ifdef DEBUG ++ debugfs_remove(ohci_debug_root); ++#endif + } + module_exit(ohci_hcd_mod_exit); + +--- a/drivers/usb/host/ohci.h ++++ b/drivers/usb/host/ohci.h +@@ -408,6 +408,13 @@ struct ohci_hcd { + unsigned eds_scheduled; + struct ed *ed_to_check; + unsigned zf_delay; ++ ++#ifdef DEBUG ++ struct dentry *debug_dir; ++ struct dentry *debug_async; ++ struct dentry *debug_periodic; ++ struct dentry *debug_registers; ++#endif + }; + + #ifdef CONFIG_PCI diff --git a/usb/usb-cp2101-new-device-id.patch b/usb/usb-cp2101-new-device-id.patch new file mode 100644 index 00000000000000..30fb15c6638bd3 --- /dev/null +++ b/usb/usb-cp2101-new-device-id.patch @@ -0,0 +1,42 @@ +From jefflong@mitre.org Wed Nov 28 08:03:46 2007 +From: Jeff Long <JeffLong@mitre.org> +Date: Wed, 28 Nov 2007 11:02:09 -0500 +Subject: USB: cp2101: new device id +To: gregkh@suse.de +Message-ID: <474D9101.7060201@MITRE.ORG> + + +This adds a device ID for the Aerocomm Radio Modem, which uses the +cp2102. I'm sure changing num_bulk_in/num_bulk_out to NUM_DONT_CARE +is the wrong fix, but this is the only device I have with a cp2102, +so I have no idea what a good global value would be, if there is one. +Zero didn't work with this device. + +From: Jeff Long <JeffLong@mitre.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/cp2101.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/cp2101.c ++++ b/drivers/usb/serial/cp2101.c +@@ -71,6 +71,7 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ + { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ + { USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */ ++ { USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */ + { USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, HARP-1 */ + { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ + { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ +@@ -98,8 +99,8 @@ static struct usb_serial_driver cp2101_d + .usb_driver = &cp2101_driver, + .id_table = id_table, + .num_interrupt_in = 0, +- .num_bulk_in = 0, +- .num_bulk_out = 0, ++ .num_bulk_in = NUM_DONT_CARE, ++ .num_bulk_out = NUM_DONT_CARE, + .num_ports = 1, + .open = cp2101_open, + .close = cp2101_close, diff --git a/usb/usb-option-bind-to-the-correct-interface-of-the-huawei-e220.patch b/usb/usb-option-bind-to-the-correct-interface-of-the-huawei-e220.patch new file mode 100644 index 00000000000000..7bad197eddb0bf --- /dev/null +++ b/usb/usb-option-bind-to-the-correct-interface-of-the-huawei-e220.patch @@ -0,0 +1,35 @@ +From jsagarribay@gmail.com Fri Nov 30 08:28:22 2007 +From: Jaime Velasco Juan <jsagarribay@gmail.com> +Date: Fri, 30 Nov 2007 16:30:11 +0000 +Subject: USB: option: Bind to the correct interface of the Huawei E220 +To: Oliver Neukum <oliver@neukum.org> +Cc: Johann Wilhelm <johann.wilhelm@student.tugraz.at>, Rui Santos <rsantos@grupopie.com>, Pete Zaitcev <zaitcev@redhat.com>, linux-usb@vger.kernel.org, preining@logic.at, kristoffer.ericson@gmail.com, drussell@redhat.com, linux-kernel@vger.kernel.org, greg@kroah.com +Message-ID: <20071130163011.GA4223@singular.local> +Content-Disposition: inline + + +This fixes a bunch of problems we are having with the Huawei devices... + + +Signed-off-by: Oliver Neukum <oneukum@suse.de> +Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com> +Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/option.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/usb/serial/option.c ++++ b/drivers/usb/serial/option.c +@@ -158,8 +158,8 @@ static struct usb_device_id option_ids[] + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_NETWORK) }, + { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, +- { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) }, +- { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, ++ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */ diff --git a/usb/usb-sierra-fix-product-id.patch b/usb/usb-sierra-fix-product-id.patch new file mode 100644 index 00000000000000..60029929634869 --- /dev/null +++ b/usb/usb-sierra-fix-product-id.patch @@ -0,0 +1,43 @@ +From agilmore@wirelessbeehive.com Fri Dec 14 15:28:16 2007 +From: agilmore@wirelessbeehive.com +Date: Tue, 4 Dec 2007 11:37:12 -0700 (MST) +Subject: USB: sierra: fix product id +To: "Greg KH" <greg@kroah.com> +Cc: "Kevin Lloyd" <klloyd@sierrawireless.com>, linux-usb@vger.kernel.org +Message-ID: <37559.204.8.226.130.1196793432.squirrel@mail.wirelessbeehive.com> + +Attached is a patch to fix the addition of the new product ids I sent. + +It is against 2.6.24-rc4, as Linus included the broken version of the +patch I sent you in that tree. :( + +Not sure if this is the right method to go about this, but hopefully I got +it right this time. + +Signed-off-by: Andrew Gilmore <agilmore@wirelessbeehive.com> +CC: Kevin Lloyd <klloyd@sierrawireless.com> +Cc: stable <stable@kernel.org> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/serial/sierra.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/serial/sierra.c ++++ b/drivers/usb/serial/sierra.c +@@ -100,6 +100,7 @@ static struct usb_device_id id_table [] + { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x0f30, 0x1b1d) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ ++ { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ + { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U */ +@@ -137,7 +138,6 @@ static struct usb_device_id id_table_3po + { USB_DEVICE(0x1199, 0x0218) }, /* Sierra Wireless MC5720 */ + { USB_DEVICE(0x1199, 0x0020) }, /* Sierra Wireless MC5725 */ + { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ +- { USB_DEVICE(0x1199, 0x0220) }, /* Sierra Wireless MC5725 */ + { USB_DEVICE(0x1199, 0x0019) }, /* Sierra Wireless AirCard 595 */ + { USB_DEVICE(0x1199, 0x0021) }, /* Sierra Wireless AirCard 597E */ + { USB_DEVICE(0x1199, 0x0120) }, /* Sierra Wireless USB Dongle 595U*/ diff --git a/usb/usb-storage-fix-devices-that-cannot-handle-32k-transfers.patch b/usb/usb-storage-fix-devices-that-cannot-handle-32k-transfers.patch new file mode 100644 index 00000000000000..28b22d85c80f70 --- /dev/null +++ b/usb/usb-storage-fix-devices-that-cannot-handle-32k-transfers.patch @@ -0,0 +1,80 @@ +From dwm@enoyolf.org Wed Dec 5 21:36:47 2007 +From: Doug Maxey <dwm@enoyolf.org> +Date: Wed, 05 Dec 2007 23:36:45 -0600 +Subject: usb-storage: Fix devices that cannot handle 32k transfers +To: Greg Kroah-Hartman <greg@kroah.com> +Cc: Alan Stern <stern@rowland.harvard.edu>, Matthew Dharm <mdharm-usb@one-eyed-alien.net>, Pete Zaitcev <zaitcev@redhat.com>, linux-usb-devel@lists.sourceforge.net +Message-ID: <15712.1196919405@bebe.enoyolf.org> + + +When a device cannot handle the smallest previously limited transfer +size (64 blocks) without stalling, limit the device to the amount of +packets that fit in a platform native page. + +The lowest possible limit is PAGE_CACHE_SIZE, so if the device is ever +used on a platform that has larger than 8K pages, you lose unless you +can convince the device firmware folks to fix the issue. + +Cc: Mathew Dharm <mdharm-scsi@one-eyed-alien.net> +Cc: Alan Stern <stern@rowland.harvard.edu> +Cc: Pete Zaitcev <zaitcev@redhat.com> +Signed-off-by: Doug Maxey <dwm@austin.ibm.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + drivers/usb/storage/scsiglue.c | 12 +++++++++--- + drivers/usb/storage/unusual_devs.h | 7 +++++++ + include/linux/usb_usual.h | 5 ++++- + 3 files changed, 20 insertions(+), 4 deletions(-) + +--- a/drivers/usb/storage/scsiglue.c ++++ b/drivers/usb/storage/scsiglue.c +@@ -114,9 +114,15 @@ static int slave_configure(struct scsi_d + * while others have trouble with more than 64K. At this time we + * are limiting both to 32K (64 sectores). + */ +- if ((us->flags & US_FL_MAX_SECTORS_64) && +- sdev->request_queue->max_sectors > 64) +- blk_queue_max_sectors(sdev->request_queue, 64); ++ if (us->flags & (US_FL_MAX_SECTORS_64 | US_FL_MAX_SECTORS_MIN)) { ++ unsigned int max_sectors = 64; ++ ++ if (us->flags & US_FL_MAX_SECTORS_MIN) ++ max_sectors = PAGE_CACHE_SIZE >> 9; ++ if (sdev->request_queue->max_sectors > max_sectors) ++ blk_queue_max_sectors(sdev->request_queue, ++ max_sectors); ++ } + + /* We can't put these settings in slave_alloc() because that gets + * called before the device type is known. Consequently these +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -376,6 +376,13 @@ UNUSUAL_DEV( 0x04b0, 0x0417, 0x0100, 0x + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY), + ++/* Reported by Doug Maxey (dwm@austin.ibm.com) */ ++UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110, ++ "IBM", ++ "IBM RSA2", ++ US_SC_DEVICE, US_PR_CB, NULL, ++ US_FL_MAX_SECTORS_MIN), ++ + /* BENQ DC5330 + * Reported by Manuel Fombuena <mfombuena@ya.com> and + * Frank Copeland <fjc@thingy.apana.org.au> */ +--- a/include/linux/usb_usual.h ++++ b/include/linux/usb_usual.h +@@ -48,7 +48,10 @@ + US_FLAG(IGNORE_DEVICE, 0x00000800) \ + /* Don't claim device */ \ + US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ +- /* sometimes sizes is too big */ ++ /* sometimes sizes is too big */ \ ++ US_FLAG(MAX_SECTORS_MIN,0x00002000) \ ++ /* Sets max_sectors to arch min */ ++ + + #define US_FLAG(name, value) US_FL_##name = value , + enum { US_DO_ALL_FLAGS }; diff --git a/usb/usb-usb-storage-new-lockable-subclass-0x07.patch b/usb/usb-usb-storage-new-lockable-subclass-0x07.patch index 3edcfdf31b546f..97863890062eb6 100644 --- a/usb/usb-usb-storage-new-lockable-subclass-0x07.patch +++ b/usb/usb-usb-storage-new-lockable-subclass-0x07.patch @@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h -@@ -77,10 +77,9 @@ enum { US_DO_ALL_FLAGS }; +@@ -80,10 +80,9 @@ enum { US_DO_ALL_FLAGS }; #define US_SC_UFI 0x04 /* Floppy */ #define US_SC_8070 0x05 /* Removable media */ #define US_SC_SCSI 0x06 /* Transparent */ diff --git a/usb/usb.h-fix-kernel-doc-warning.patch b/usb/usb.h-fix-kernel-doc-warning.patch new file mode 100644 index 00000000000000..3106a5b4febaef --- /dev/null +++ b/usb/usb.h-fix-kernel-doc-warning.patch @@ -0,0 +1,31 @@ +From linux-usb-owner@vger.kernel.org Mon Dec 3 14:15:59 2007 +From: Randy Dunlap <randy.dunlap@oracle.com> +Date: Mon, 3 Dec 2007 14:14:16 -0800 +Subject: usb.h: fix kernel-doc warning +To: linux-usb@vger.kernel.org +Cc: gregkh <greg@kroah.com> +Message-ID: <20071203141416.10126e12.randy.dunlap@oracle.com> + + +From: Randy Dunlap <randy.dunlap@oracle.com> + +Fix kernel-doc warning in usb.h: +Warning(linux-2.6.24-rc3-git7//include/linux/usb.h:166): No description found for parameter 'sysfs_files_created' + +Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + +--- + include/linux/usb.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/linux/usb.h ++++ b/include/linux/usb.h +@@ -107,6 +107,7 @@ enum usb_interface_condition { + * @condition: binding state of the interface: not bound, binding + * (in probe()), bound to a driver, or unbinding (in disconnect()) + * @is_active: flag set when the interface is bound and not suspended. ++ * @sysfs_files_created: sysfs attributes exist + * @needs_remote_wakeup: flag set when the driver requires remote-wakeup + * capability during autosuspend. + * @dev: driver model's view of this device @@ -1 +1 @@ -2.6.24-rc5 +2.6.24-rc5-git3 |
