public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 00/29] fixes for 2.6.13-rc4
@ 2005-07-29 19:12 ` Greg KH
  2005-07-29 19:13   ` [patch 02/29] sysfs: fix sysfs_chmod_file Greg KH
                     ` (28 more replies)
  0 siblings, 29 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:12 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here are a series of patches against 2.6.13-rc4 that fix a number of
different bugs in the USB, I2C, driver core, and PCI subsystems.  They
also add a few new device ids, and add one new USB host controller
driver (adding new drivers was ok at this time frame, right?)

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 01/29] stable_api_nonsense.txt fixes
       [not found] <20050729184950.014589000@press.kroah.org>
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
@ 2005-07-29 19:13 ` Greg KH
  1 sibling, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:13 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, dwalker

From: Daniel Walker <dwalker@mvista.com>

Signed-off-by: Daniel Walker <dwalker@mvista.com> 
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 Documentation/stable_api_nonsense.txt |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- gregkh-2.6.orig/Documentation/stable_api_nonsense.txt	2005-07-29 11:31:38.000000000 -0700
+++ gregkh-2.6/Documentation/stable_api_nonsense.txt	2005-07-29 11:33:48.000000000 -0700
@@ -132,7 +132,7 @@
 their work on their own time, asking programmers to do extra work for no
 gain, for free, is not a possibility.
 
-Security issues are also a very important for Linux.  When a
+Security issues are also very important for Linux.  When a
 security issue is found, it is fixed in a very short amount of time.  A
 number of times this has caused internal kernel interfaces to be
 reworked to prevent the security problem from occurring.  When this

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 02/29] sysfs: fix sysfs_chmod_file
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
@ 2005-07-29 19:13   ` Greg KH
  2005-07-29 19:14   ` [patch 01/29] stable_api_nonsense.txt fixes Greg KH
                     ` (27 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:13 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, maneesh

From: Maneesh Soni <maneesh@in.ibm.com>

o sysfs_chmod_file() must update the new iattr field in sysfs_dirent else
  the mode change will not be persistent in case of inode evacuation from
  cache.


Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 fs/sysfs/file.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

--- gregkh-2.6.orig/fs/sysfs/file.c	2005-07-29 11:30:03.000000000 -0700
+++ gregkh-2.6/fs/sysfs/file.c	2005-07-29 11:33:51.000000000 -0700
@@ -437,8 +437,8 @@
 {
 	struct dentry *dir = kobj->dentry;
 	struct dentry *victim;
-	struct sysfs_dirent *sd;
-	umode_t umode = (mode & S_IALLUGO) | S_IFREG;
+	struct inode * inode;
+	struct iattr newattrs;
 	int res = -ENOENT;
 
 	down(&dir->d_inode->i_sem);
@@ -446,13 +446,15 @@
 	if (!IS_ERR(victim)) {
 		if (victim->d_inode &&
 		    (victim->d_parent->d_inode == dir->d_inode)) {
-			sd = victim->d_fsdata;
-			attr->mode = mode;
-			sd->s_mode = umode;
-			victim->d_inode->i_mode = umode;
-			dput(victim);
-			res = 0;
+			inode = victim->d_inode;
+			down(&inode->i_sem);
+			newattrs.ia_mode = (mode & S_IALLUGO) |
+						(inode->i_mode & ~S_IALLUGO);
+			newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
+			res = notify_change(victim, &newattrs);
+			up(&inode->i_sem);
 		}
+		dput(victim);
 	}
 	up(&dir->d_inode->i_sem);
 

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 01/29] stable_api_nonsense.txt fixes
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
  2005-07-29 19:13   ` [patch 02/29] sysfs: fix sysfs_chmod_file Greg KH
@ 2005-07-29 19:14   ` Greg KH
  2005-07-29 19:14   ` [patch 03/29] sysfs: fix sysfs_setattr Greg KH
                     ` (26 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:14 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, dwalker

[resend with proper threading this time, sorry about that...]

From: Daniel Walker <dwalker@mvista.com>

Signed-off-by: Daniel Walker <dwalker@mvista.com> 
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 Documentation/stable_api_nonsense.txt |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- gregkh-2.6.orig/Documentation/stable_api_nonsense.txt	2005-07-29 11:31:38.000000000 -0700
+++ gregkh-2.6/Documentation/stable_api_nonsense.txt	2005-07-29 11:33:48.000000000 -0700
@@ -132,7 +132,7 @@
 their work on their own time, asking programmers to do extra work for no
 gain, for free, is not a possibility.
 
-Security issues are also a very important for Linux.  When a
+Security issues are also very important for Linux.  When a
 security issue is found, it is fixed in a very short amount of time.  A
 number of times this has caused internal kernel interfaces to be
 reworked to prevent the security problem from occurring.  When this

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 03/29] sysfs: fix sysfs_setattr
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
  2005-07-29 19:13   ` [patch 02/29] sysfs: fix sysfs_chmod_file Greg KH
  2005-07-29 19:14   ` [patch 01/29] stable_api_nonsense.txt fixes Greg KH
@ 2005-07-29 19:14   ` Greg KH
  2005-07-29 19:14   ` [patch 04/29] DEBUG_FS must depend on SYSFS Greg KH
                     ` (25 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:14 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, maneesh


From: Maneesh Soni <maneesh@in.ibm.com>

o sysfs_dirent's s_mode field should also be updated in sysfs_setattr(), else
  there could be inconsistency in the two fields. s_mode is used while
  ->readdir so as not to bring in the inode to cache.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 fs/sysfs/inode.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- gregkh-2.6.orig/fs/sysfs/inode.c	2005-07-29 11:30:03.000000000 -0700
+++ gregkh-2.6/fs/sysfs/inode.c	2005-07-29 11:33:53.000000000 -0700
@@ -85,7 +85,7 @@
 
 		if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
 			mode &= ~S_ISGID;
-		sd_iattr->ia_mode = mode;
+		sd_iattr->ia_mode = sd->s_mode = mode;
 	}
 
 	return error;

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 04/29] DEBUG_FS must depend on SYSFS
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (2 preceding siblings ...)
  2005-07-29 19:14   ` [patch 03/29] sysfs: fix sysfs_setattr Greg KH
@ 2005-07-29 19:14   ` Greg KH
  2005-07-29 19:14   ` [patch 05/29] Add the rules about the -stable kernel releases to the Documentation directory Greg KH
                     ` (24 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:14 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, bunk

From: Adrian Bunk <bunk@stusta.de>

CONFIG_DEBUG_FS=y and CONFIG_SYSFS=n results in the following compile 
error:

<--  snip  -->

...
  LD      vmlinux
fs/built-in.o: In function `debugfs_init':
inode.c:(.init.text+0x31be): undefined reference to `kernel_subsys'
make: *** [vmlinux] Error 1

<--  snip  -->


Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 lib/Kconfig.debug |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- gregkh-2.6.orig/lib/Kconfig.debug	2005-07-29 11:30:02.000000000 -0700
+++ gregkh-2.6/lib/Kconfig.debug	2005-07-29 11:33:58.000000000 -0700
@@ -141,7 +141,7 @@
 
 config DEBUG_FS
 	bool "Debug Filesystem"
-	depends on DEBUG_KERNEL
+	depends on DEBUG_KERNEL && SYSFS
 	help
 	  debugfs is a virtual file system that kernel developers use to put
 	  debugging files into.  Enable this option to be able to read and

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 05/29] Add the rules about the -stable kernel releases to the Documentation directory
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (3 preceding siblings ...)
  2005-07-29 19:14   ` [patch 04/29] DEBUG_FS must depend on SYSFS Greg KH
@ 2005-07-29 19:14   ` Greg KH
  2005-07-29 19:14   ` [patch 06/29] I2C-MPC: Restore code removed Greg KH
                     ` (23 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:14 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel


This was the last agreed upon set of rules, it's probably time we actually add
them to the kernel tree to make them "official".

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 Documentation/stable_kernel_rules.txt |   58 ++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+)

--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gregkh-2.6/Documentation/stable_kernel_rules.txt	2005-07-29 11:34:01.000000000 -0700
@@ -0,0 +1,58 @@
+Everything you ever wanted to know about Linux 2.6 -stable releases.
+
+Rules on what kind of patches are accepted, and what ones are not, into
+the "-stable" tree:
+
+ - It must be obviously correct and tested.
+ - It can not bigger than 100 lines, with context.
+ - It must fix only one thing.
+ - It must fix a real bug that bothers people (not a, "This could be a
+   problem..." type thing.)
+ - It must fix a problem that causes a build error (but not for things
+   marked CONFIG_BROKEN), an oops, a hang, data corruption, a real
+   security issue, or some "oh, that's not good" issue.  In short,
+   something critical.
+ - No "theoretical race condition" issues, unless an explanation of how
+   the race can be exploited.
+ - It can not contain any "trivial" fixes in it (spelling changes,
+   whitespace cleanups, etc.)
+ - It must be accepted by the relevant subsystem maintainer.
+ - It must follow Documentation/SubmittingPatches rules.
+
+
+Procedure for submitting patches to the -stable tree:
+
+ - Send the patch, after verifying that it follows the above rules, to
+   stable@kernel.org.
+ - The sender will receive an ack when the patch has been accepted into
+   the queue, or a nak if the patch is rejected.  This response might
+   take a few days, according to the developer's schedules.
+ - If accepted, the patch will be added to the -stable queue, for review
+   by other developers.
+ - Security patches should not be sent to this alias, but instead to the
+   documented security@kernel.org.
+
+
+Review cycle:
+
+ - When the -stable maintainers decide for a review cycle, the patches
+   will be sent to the review committee, and the maintainer of the
+   affected area of the patch (unless the submitter is the maintainer of
+   the area) and CC: to the linux-kernel mailing list.
+ - The review committee has 48 hours in which to ack or nak the patch.
+ - If the patch is rejected by a member of the committee, or linux-kernel
+   members object to the patch, bringing up issues that the maintainers
+   and members did not realize, the patch will be dropped from the
+   queue.
+ - At the end of the review cycle, the acked patches will be added to
+   the latest -stable release, and a new -stable release will happen.
+ - Security patches will be accepted into the -stable tree directly from
+   the security kernel team, and not go through the normal review cycle.
+   Contact the kernel security team for more details on this procedure.
+
+
+Review committe:
+
+ - This will be made up of a number of kernel developers who have
+   volunteered for this task, and a few that haven't.
+

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 06/29] I2C-MPC: Restore code removed
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (4 preceding siblings ...)
  2005-07-29 19:14   ` [patch 05/29] Add the rules about the -stable kernel releases to the Documentation directory Greg KH
@ 2005-07-29 19:14   ` Greg KH
  2005-07-29 19:15   ` [patch 07/29] I2C: ds1337 - fix 12/24 hour mode bug Greg KH
                     ` (22 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:14 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, kumar.gala

From: Kumar Gala <galak@freescale.com>

I2C-MPC: Restore code removed

A previous patch to remove support for the OCP device model was way
to generious and moved some of the platform device model code, oops.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/i2c/busses/i2c-mpc.c |   94 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 94 insertions(+)

--- gregkh-2.6.orig/drivers/i2c/busses/i2c-mpc.c	2005-07-29 11:30:00.000000000 -0700
+++ gregkh-2.6/drivers/i2c/busses/i2c-mpc.c	2005-07-29 11:34:01.000000000 -0700
@@ -382,6 +382,100 @@
 module_init(fsl_i2c_init);
 module_exit(fsl_i2c_exit);
 
+static int fsl_i2c_probe(struct device *device)
+{
+	int result = 0;
+	struct mpc_i2c *i2c;
+	struct platform_device *pdev = to_platform_device(device);
+	struct fsl_i2c_platform_data *pdata;
+	struct resource *r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+	pdata = (struct fsl_i2c_platform_data *) pdev->dev.platform_data;
+
+	if (!(i2c = kmalloc(sizeof(*i2c), GFP_KERNEL))) {
+		return -ENOMEM;
+	}
+	memset(i2c, 0, sizeof(*i2c));
+
+	i2c->irq = platform_get_irq(pdev, 0);
+	i2c->flags = pdata->device_flags;
+	init_waitqueue_head(&i2c->queue);
+
+	i2c->base = ioremap((phys_addr_t)r->start, MPC_I2C_REGION);
+
+	if (!i2c->base) {
+		printk(KERN_ERR "i2c-mpc - failed to map controller\n");
+		result = -ENOMEM;
+		goto fail_map;
+	}
+
+	if (i2c->irq != 0)
+		if ((result = request_irq(i2c->irq, mpc_i2c_isr,
+					  SA_SHIRQ, "i2c-mpc", i2c)) < 0) {
+			printk(KERN_ERR
+			       "i2c-mpc - failed to attach interrupt\n");
+			goto fail_irq;
+		}
+
+	mpc_i2c_setclock(i2c);
+	dev_set_drvdata(device, i2c);
+
+	i2c->adap = mpc_ops;
+	i2c_set_adapdata(&i2c->adap, i2c);
+	i2c->adap.dev.parent = &pdev->dev;
+	if ((result = i2c_add_adapter(&i2c->adap)) < 0) {
+		printk(KERN_ERR "i2c-mpc - failed to add adapter\n");
+		goto fail_add;
+	}
+
+	return result;
+
+      fail_add:
+	if (i2c->irq != 0)
+		free_irq(i2c->irq, NULL);
+      fail_irq:
+	iounmap(i2c->base);
+      fail_map:
+	kfree(i2c);
+	return result;
+};
+
+static int fsl_i2c_remove(struct device *device)
+{
+	struct mpc_i2c *i2c = dev_get_drvdata(device);
+
+	i2c_del_adapter(&i2c->adap);
+	dev_set_drvdata(device, NULL);
+
+	if (i2c->irq != 0)
+		free_irq(i2c->irq, i2c);
+
+	iounmap(i2c->base);
+	kfree(i2c);
+	return 0;
+};
+
+/* Structure for a device driver */
+static struct device_driver fsl_i2c_driver = {
+	.name = "fsl-i2c",
+	.bus = &platform_bus_type,
+	.probe = fsl_i2c_probe,
+	.remove = fsl_i2c_remove,
+};
+
+static int __init fsl_i2c_init(void)
+{
+	return driver_register(&fsl_i2c_driver);
+}
+
+static void __exit fsl_i2c_exit(void)
+{
+	driver_unregister(&fsl_i2c_driver);
+}
+
+module_init(fsl_i2c_init);
+module_exit(fsl_i2c_exit);
+
 MODULE_AUTHOR("Adrian Cox <adrian@humboldt.co.uk>");
 MODULE_DESCRIPTION
     ("I2C-Bus adapter for MPC107 bridge and MPC824x/85xx/52xx processors");

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 07/29] I2C: ds1337 - fix 12/24 hour mode bug
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (5 preceding siblings ...)
  2005-07-29 19:14   ` [patch 06/29] I2C-MPC: Restore code removed Greg KH
@ 2005-07-29 19:15   ` Greg KH
  2005-07-29 19:15   ` [patch 08/29] I2C: Missing space in split strings Greg KH
                     ` (21 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:15 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, ladis

From: Ladislav Michl <ladis@linux-mips.org>

DS1339 manual, page 6, chapter Date and time operation:
  The DS1339 can be run in either 12-hour or 24-hour mode. Bit 6 of the
  hours register is defined as the 12-hour or 24-hour mode-select bit.
  When high, the 12-hour mode is selected.
 
Patch below makes ds1337 driver work as documented in manual.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/i2c/chips/ds1337.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

--- gregkh-2.6.orig/drivers/i2c/chips/ds1337.c	2005-07-29 11:30:00.000000000 -0700
+++ gregkh-2.6/drivers/i2c/chips/ds1337.c	2005-07-29 11:34:02.000000000 -0700
@@ -165,7 +165,7 @@
 	buf[0] = 0;		/* reg offset */
 	buf[1] = BIN2BCD(dt->tm_sec);
 	buf[2] = BIN2BCD(dt->tm_min);
-	buf[3] = BIN2BCD(dt->tm_hour) | (1 << 6);
+	buf[3] = BIN2BCD(dt->tm_hour);
 	buf[4] = BIN2BCD(dt->tm_wday) + 1;
 	buf[5] = BIN2BCD(dt->tm_mday);
 	buf[6] = BIN2BCD(dt->tm_mon) + 1;
@@ -344,9 +344,9 @@
 
 	/* Ensure that device is set in 24-hour mode */
 	val = i2c_smbus_read_byte_data(client, DS1337_REG_HOUR);
-	if ((val >= 0) && (val & (1 << 6)) == 0)
+	if ((val >= 0) && (val & (1 << 6)))
 		i2c_smbus_write_byte_data(client, DS1337_REG_HOUR,
-					  val | (1 << 6));
+					  val & 0x3f);
 }
 
 static int ds1337_detach_client(struct i2c_client *client)

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 08/29] I2C: Missing space in split strings
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (6 preceding siblings ...)
  2005-07-29 19:15   ` [patch 07/29] I2C: ds1337 - fix 12/24 hour mode bug Greg KH
@ 2005-07-29 19:15   ` Greg KH
  2005-07-29 19:15   ` [patch 09/29] I2C: use time_after in 3 chip drivers Greg KH
                     ` (20 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:15 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, khali

From: Jean Delvare <khali@linux-fr.org>

A few split string in i2c (and now hwmon) drivers lack a joining space,
causing them to display incorrectly. This trivial patch fixes that up.
Please apply, thanks.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 drivers/hwmon/adm1026.c       |    2 +-
 drivers/hwmon/max1619.c       |    2 +-
 drivers/hwmon/pc87360.c       |    2 +-
 drivers/i2c/busses/i2c-i801.c |    6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

--- gregkh-2.6.orig/drivers/hwmon/pc87360.c	2005-07-29 11:30:00.000000000 -0700
+++ gregkh-2.6/drivers/hwmon/pc87360.c	2005-07-29 11:34:03.000000000 -0700
@@ -1043,7 +1043,7 @@
 	if (init >= 2 && data->innr) {
 		reg = pc87360_read_value(data, LD_IN, NO_BANK,
 					 PC87365_REG_IN_CONVRATE);
-		dev_info(&client->dev, "VLM conversion set to"
+		dev_info(&client->dev, "VLM conversion set to "
 			 "1s period, 160us delay\n");
 		pc87360_write_value(data, LD_IN, NO_BANK,
 				    PC87365_REG_IN_CONVRATE,
--- gregkh-2.6.orig/drivers/i2c/busses/i2c-i801.c	2005-07-29 11:30:00.000000000 -0700
+++ gregkh-2.6/drivers/i2c/busses/i2c-i801.c	2005-07-29 11:34:03.000000000 -0700
@@ -137,7 +137,7 @@
 		pci_read_config_word(I801_dev, SMBBA, &i801_smba);
 		i801_smba &= 0xfff0;
 		if(i801_smba == 0) {
-			dev_err(&dev->dev, "SMB base address uninitialized"
+			dev_err(&dev->dev, "SMB base address uninitialized "
 				"- upgrade BIOS or use force_addr=0xaddr\n");
 			return -ENODEV;
 		}
@@ -186,7 +186,7 @@
 	int result = 0;
 	int timeout = 0;
 
-	dev_dbg(&I801_dev->dev, "Transaction (pre): CNT=%02x, CMD=%02x,"
+	dev_dbg(&I801_dev->dev, "Transaction (pre): CNT=%02x, CMD=%02x, "
 		"ADD=%02x, DAT0=%02x, DAT1=%02x\n", inb_p(SMBHSTCNT),
 		inb_p(SMBHSTCMD), inb_p(SMBHSTADD), inb_p(SMBHSTDAT0),
 		inb_p(SMBHSTDAT1));
@@ -240,7 +240,7 @@
 		outb_p(inb(SMBHSTSTS), SMBHSTSTS);
 
 	if ((temp = (0x1f & inb_p(SMBHSTSTS))) != 0x00) {
-		dev_dbg(&I801_dev->dev, "Failed reset at end of transaction"
+		dev_dbg(&I801_dev->dev, "Failed reset at end of transaction "
 			"(%02x)\n", temp);
 	}
 	dev_dbg(&I801_dev->dev, "Transaction (post): CNT=%02x, CMD=%02x, "
--- gregkh-2.6.orig/drivers/hwmon/adm1026.c	2005-07-29 11:30:00.000000000 -0700
+++ gregkh-2.6/drivers/hwmon/adm1026.c	2005-07-29 11:34:03.000000000 -0700
@@ -393,7 +393,7 @@
 
 	value = data->config3;
 	if (data->config3 & CFG3_GPIO16_ENABLE) {
-		dev_dbg(&client->dev, "GPIO16 enabled.  THERM"
+		dev_dbg(&client->dev, "GPIO16 enabled.  THERM "
 			"pin disabled.\n");
 	} else {
 		dev_dbg(&client->dev, "THERM pin enabled.  "
--- gregkh-2.6.orig/drivers/hwmon/max1619.c	2005-07-29 11:30:00.000000000 -0700
+++ gregkh-2.6/drivers/hwmon/max1619.c	2005-07-29 11:34:03.000000000 -0700
@@ -363,7 +363,7 @@
 	i2c_del_driver(&max1619_driver);
 }
 
-MODULE_AUTHOR("Alexey Fisher <fishor@mail.ru> and"
+MODULE_AUTHOR("Alexey Fisher <fishor@mail.ru> and "
 	"Jean Delvare <khali@linux-fr.org>");
 MODULE_DESCRIPTION("MAX1619 sensor driver");
 MODULE_LICENSE("GPL");

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 09/29] I2C: use time_after in 3 chip drivers
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (7 preceding siblings ...)
  2005-07-29 19:15   ` [patch 08/29] I2C: Missing space in split strings Greg KH
@ 2005-07-29 19:15   ` Greg KH
  2005-07-29 19:15   ` [patch 10/29] I2C: missing new lines in i2c-core messages Greg KH
                     ` (19 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:15 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, khali, marcelo

From: Jean Delvare <khali@linux-fr.org>

A few i2c drivers were not updated to use time_after() yet.

Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 drivers/hwmon/atxp1.c   |    5 ++---
 drivers/hwmon/fscpos.c  |    4 ++--
 drivers/hwmon/gl520sm.c |    4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)

--- gregkh-2.6.orig/drivers/hwmon/atxp1.c	2005-07-29 11:29:59.000000000 -0700
+++ gregkh-2.6/drivers/hwmon/atxp1.c	2005-07-29 11:34:03.000000000 -0700
@@ -21,6 +21,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/jiffies.h>
 #include <linux/i2c.h>
 #include <linux/i2c-sensor.h>
 #include <linux/i2c-vid.h>
@@ -80,9 +81,7 @@
 
 	down(&data->update_lock);
 
-	if ((jiffies - data->last_updated > HZ) ||
-	    (jiffies < data->last_updated) ||
-	    !data->valid) {
+	if (time_after(jiffies, data->last_updated + HZ) || !data->valid) {
 
 		/* Update local register data */
 		data->reg.vid = i2c_smbus_read_byte_data(client, ATXP1_VID);
--- gregkh-2.6.orig/drivers/hwmon/fscpos.c	2005-07-29 11:29:59.000000000 -0700
+++ gregkh-2.6/drivers/hwmon/fscpos.c	2005-07-29 11:34:03.000000000 -0700
@@ -32,6 +32,7 @@
 
 #include <linux/module.h>
 #include <linux/slab.h>
+#include <linux/jiffies.h>
 #include <linux/i2c.h>
 #include <linux/i2c-sensor.h>
 #include <linux/init.h>
@@ -572,8 +573,7 @@
 
 	down(&data->update_lock);
 
-	if ((jiffies - data->last_updated > 2 * HZ) ||
-			(jiffies < data->last_updated) || !data->valid) {
+	if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) {
 		int i;
 
 		dev_dbg(&client->dev, "Starting fscpos update\n");
--- gregkh-2.6.orig/drivers/hwmon/gl520sm.c	2005-07-29 11:29:59.000000000 -0700
+++ gregkh-2.6/drivers/hwmon/gl520sm.c	2005-07-29 11:34:03.000000000 -0700
@@ -24,6 +24,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/jiffies.h>
 #include <linux/i2c.h>
 #include <linux/i2c-sensor.h>
 #include <linux/i2c-vid.h>
@@ -678,8 +679,7 @@
 
 	down(&data->update_lock);
 
-	if ((jiffies - data->last_updated > 2 * HZ) ||
-	    (jiffies < data->last_updated) || !data->valid) {
+	if (time_after(jiffies, data->last_updated + 2 * HZ) || !data->valid) {
 
 		dev_dbg(&client->dev, "Starting gl520sm update\n");
 

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 10/29] I2C: missing new lines in i2c-core messages
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (8 preceding siblings ...)
  2005-07-29 19:15   ` [patch 09/29] I2C: use time_after in 3 chip drivers Greg KH
@ 2005-07-29 19:15   ` Greg KH
  2005-07-29 19:15   ` [patch 11/29] I2C: 24RF08 corruption prevention (again) Greg KH
                     ` (18 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:15 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, khali

From: Jean Delvare <khali@linux-fr.org>

Two log messages lack their trailing new line in i2c-core. I'd swear I had
fixed them already, but it seems not. Bonus: improved coding style.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/i2c/i2c-core.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

--- gregkh-2.6.orig/drivers/i2c/i2c-core.c	2005-07-29 11:29:59.000000000 -0700
+++ gregkh-2.6/drivers/i2c/i2c-core.c	2005-07-29 11:34:04.000000000 -0700
@@ -231,8 +231,8 @@
 		if (driver->detach_adapter)
 			if ((res = driver->detach_adapter(adap))) {
 				dev_warn(&adap->dev, "can't detach adapter "
-					 "while detaching driver %s: driver not "
-					 "detached!", driver->name);
+					 "while detaching driver %s: driver "
+					 "not detached!\n", driver->name);
 				goto out_unlock;
 			}
 	}
@@ -456,8 +456,8 @@
 		res = adapter->client_unregister(client);
 		if (res) {
 			dev_err(&client->dev,
-			       "client_unregister [%s] failed, "
-			       "client not detached", client->name);
+				"client_unregister [%s] failed, "
+				"client not detached\n", client->name);
 			goto out;
 		}
 	}

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 11/29] I2C: 24RF08 corruption prevention (again)
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (9 preceding siblings ...)
  2005-07-29 19:15   ` [patch 10/29] I2C: missing new lines in i2c-core messages Greg KH
@ 2005-07-29 19:15   ` Greg KH
  2005-07-29 19:15   ` [patch 12/29] w1: kconfig/Makefile fix Greg KH
                     ` (17 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:15 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, khali

From: Jean Delvare <khali@linux-fr.org>

The 24RF08 corruption prevention in the eeprom and max6875 drivers wasn't
complete. For one thing, the additional quick write should happen as soon
as possible and unconditionally, while both drivers had error paths before.
For another, when a given chip is forced, the core does not emit a quick
write, so a second quick write would cause the corruption rather than
prevent it.

I plan to move the corruption prevention in the core in the long run, so
that individual drivers don't have to care anymore. But I need to merge
i2c_probe and i2c_detect before I do (work in progress).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/i2c/chips/eeprom.c  |    8 +++++---
 drivers/i2c/chips/max6875.c |    8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

--- gregkh-2.6.orig/drivers/i2c/chips/eeprom.c	2005-07-29 11:36:14.000000000 -0700
+++ gregkh-2.6/drivers/i2c/chips/eeprom.c	2005-07-29 11:36:18.000000000 -0700
@@ -163,6 +163,11 @@
 	struct eeprom_data *data;
 	int err = 0;
 
+	/* prevent 24RF08 corruption */
+	if (kind < 0)
+		i2c_smbus_xfer(adapter, address, 0, 0, 0,
+			       I2C_SMBUS_QUICK, NULL);
+
 	/* There are three ways we can read the EEPROM data:
 	   (1) I2C block reads (faster, but unsupported by most adapters)
 	   (2) Consecutive byte reads (100% overhead)
@@ -187,9 +192,6 @@
 	new_client->driver = &eeprom_driver;
 	new_client->flags = 0;
 
-	/* prevent 24RF08 corruption */
-	i2c_smbus_write_quick(new_client, 0);
-
 	/* Fill in the remaining client fields */
 	strlcpy(new_client->name, "eeprom", I2C_NAME_SIZE);
 	data->valid = 0;
--- gregkh-2.6.orig/drivers/i2c/chips/max6875.c	2005-07-29 11:36:14.000000000 -0700
+++ gregkh-2.6/drivers/i2c/chips/max6875.c	2005-07-29 11:36:18.000000000 -0700
@@ -343,6 +343,11 @@
 	struct max6875_data *data;
 	int err = 0;
 
+	/* Prevent 24RF08 corruption (in case of user error) */
+	if (kind < 0)
+		i2c_smbus_xfer(adapter, address, 0, 0, 0,
+			       I2C_SMBUS_QUICK, NULL);
+
 	/* There are three ways we can read the EEPROM data:
 	   (1) I2C block reads (faster, but unsupported by most adapters)
 	   (2) Consecutive byte reads (100% overhead)
@@ -370,9 +375,6 @@
 	new_client->driver = &max6875_driver;
 	new_client->flags = 0;
 
-	/* Prevent 24RF08 corruption */
-	i2c_smbus_write_quick(new_client, 0);
-
 	/* Setup the user section */
 	data->blocks[max6875_eeprom_user].type    = max6875_eeprom_user;
 	data->blocks[max6875_eeprom_user].slices  = USER_EEPROM_SLICES;

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 12/29] w1: kconfig/Makefile fix.
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (10 preceding siblings ...)
  2005-07-29 19:15   ` [patch 11/29] I2C: 24RF08 corruption prevention (again) Greg KH
@ 2005-07-29 19:15   ` Greg KH
  2005-07-29 19:15   ` [patch 13/29] PCI: Hidden SMBus bridge on Toshiba Tecra M2 Greg KH
                     ` (16 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:15 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, johnpol

From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>

This patch was sent first time very long time ago, 
but magically was disapeared, it probably exists
in your queue, but to be sure, I resend it.
If can not be applied cleanly after your w1 queue is flushed
into upstrem tree, just drop it.
Thanks.

Patch from Michael Farmbauer <michl@baldrian.franken.de>.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/w1/Kconfig |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- gregkh-2.6.orig/drivers/w1/Kconfig	2005-07-29 11:29:58.000000000 -0700
+++ gregkh-2.6/drivers/w1/Kconfig	2005-07-29 11:36:20.000000000 -0700
@@ -30,7 +30,7 @@
 	  This support is also available as a module.  If so, the module
 	  will be called ds9490r.ko.
 
-config W1_DS9490R_BRIDGE
+config W1_DS9490_BRIDGE
 	tristate "DS9490R USB <-> W1 transport layer for 1-wire"
 	depends on W1_DS9490
 	help

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 13/29] PCI: Hidden SMBus bridge on Toshiba Tecra M2
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (11 preceding siblings ...)
  2005-07-29 19:15   ` [patch 12/29] w1: kconfig/Makefile fix Greg KH
@ 2005-07-29 19:15   ` Greg KH
  2005-07-29 19:16   ` [patch 14/29] PCI: Adjust PCI rom code to handle more broken ROMs Greg KH
                     ` (15 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:15 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, d.gaffuri

From: "Daniele Gaffuri" <d.gaffuri@reply.it>

Patch against 2.6.12 to unhide SMBus on Toshiba Centrino laptops using
Intel 82855PM chipset.  Tested on Toshiba Tecra M2.

Signed-off-by: Daniele Gaffuri <d.gaffuri@reply.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/pci/quirks.c |    5 +++++
 1 files changed, 5 insertions(+)

--- gregkh-2.6.orig/drivers/pci/quirks.c	2005-07-29 11:29:50.000000000 -0700
+++ gregkh-2.6/drivers/pci/quirks.c	2005-07-29 11:36:21.000000000 -0700
@@ -820,6 +820,11 @@
 			case 0x0001: /* Toshiba Satellite A40 */
 				asus_hides_smbus = 1;
 			}
+		if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB)
+			switch(dev->subsystem_device) {
+			case 0x0001: /* Toshiba Tecra M2 */
+				asus_hides_smbus = 1;
+			}
        } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG)) {
                if (dev->device ==  PCI_DEVICE_ID_INTEL_82855PM_HB)
                        switch(dev->subsystem_device) {

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 14/29] PCI: Adjust PCI rom code to handle more broken ROMs
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (12 preceding siblings ...)
  2005-07-29 19:15   ` [patch 13/29] PCI: Hidden SMBus bridge on Toshiba Tecra M2 Greg KH
@ 2005-07-29 19:16   ` Greg KH
  2005-07-29 19:16   ` [patch 15/29] PCI: remove PCI_BRIDGE_CTL_VGA handling from setup-bus.c Greg KH
                     ` (14 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:16 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, jonsmirl

From: Jon Smirl <jonsmirl@gmail.com>

There are ROMs reporting that their size exceeds their PCI ROM
resource window. This patch returns the minimum of the resource window
size or the size in the ROM.  An example of this breakage is the XGI
Volari Z7.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/pci/rom.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

--- gregkh-2.6.orig/drivers/pci/rom.c	2005-07-29 11:29:50.000000000 -0700
+++ gregkh-2.6/drivers/pci/rom.c	2005-07-29 11:36:22.000000000 -0700
@@ -125,7 +125,9 @@
 		image += readw(pds + 16) * 512;
 	} while (!last_image);
 
-	*size = image - rom;
+	/* never return a size larger than the PCI resource window */
+	/* there are known ROMs that get the size wrong */
+	*size = min((size_t)(image - rom), *size);
 
 	return rom;
 }

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 15/29] PCI: remove PCI_BRIDGE_CTL_VGA handling from setup-bus.c
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (13 preceding siblings ...)
  2005-07-29 19:16   ` [patch 14/29] PCI: Adjust PCI rom code to handle more broken ROMs Greg KH
@ 2005-07-29 19:16   ` Greg KH
  2005-07-29 19:16   ` [patch 16/29] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n -- bug? Greg KH
                     ` (13 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:16 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, ink

From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

The setup-bus code doesn't work correctly for configurations
with more than one display adapter in the same PCI domain.
This stuff actually is a leftover of an early 2.4 PCI setup code
and apparently it stopped working after some "bridge_ctl" changes.
So the best thing we can do is just to remove it and rely on the fact
that any firmware *has* to configure VGA port forwarding for the boot
display device properly.

But then we need to ensure that the bus->bridge_ctl will always
contain valid information collected at the probe time, therefore
the following change in pci_scan_bridge() is needed.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/pci/probe.c     |    2 +-
 drivers/pci/setup-bus.c |   12 ------------
 2 files changed, 1 insertion(+), 13 deletions(-)

--- gregkh-2.6.orig/drivers/pci/probe.c	2005-07-29 11:29:50.000000000 -0700
+++ gregkh-2.6/drivers/pci/probe.c	2005-07-29 11:36:23.000000000 -0700
@@ -507,7 +507,7 @@
 		pci_write_config_dword(dev, PCI_PRIMARY_BUS, buses);
 
 		if (!is_cardbus) {
-			child->bridge_ctl = PCI_BRIDGE_CTL_NO_ISA;
+			child->bridge_ctl = bctl | PCI_BRIDGE_CTL_NO_ISA;
 			/*
 			 * Adjust subordinate busnr in parent buses.
 			 * We do this before scanning for children because
--- gregkh-2.6.orig/drivers/pci/setup-bus.c	2005-07-29 11:29:50.000000000 -0700
+++ gregkh-2.6/drivers/pci/setup-bus.c	2005-07-29 11:36:23.000000000 -0700
@@ -51,8 +51,6 @@
 	struct resource_list head, *list, *tmp;
 	int idx;
 
-	bus->bridge_ctl &= ~PCI_BRIDGE_CTL_VGA;
-
 	head.next = NULL;
 	list_for_each_entry(dev, &bus->devices, bus_list) {
 		u16 class = dev->class >> 8;
@@ -62,10 +60,6 @@
 		    class == PCI_CLASS_BRIDGE_HOST)
 			continue;
 
-		if (class == PCI_CLASS_DISPLAY_VGA ||
-		    class == PCI_CLASS_NOT_DEFINED_VGA)
-			bus->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
-
 		pdev_sort_resources(dev, &head);
 	}
 
@@ -509,12 +503,6 @@
 
 	pbus_assign_resources_sorted(bus);
 
-	if (bus->bridge_ctl & PCI_BRIDGE_CTL_VGA) {
-		/* Propagate presence of the VGA to upstream bridges */
-		for (b = bus; b->parent; b = b->parent) {
-			b->bridge_ctl |= PCI_BRIDGE_CTL_VGA;
-		}
-	}
 	list_for_each_entry(dev, &bus->devices, bus_list) {
 		b = dev->subordinate;
 		if (!b)

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 16/29] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n -- bug?
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (14 preceding siblings ...)
  2005-07-29 19:16   ` [patch 15/29] PCI: remove PCI_BRIDGE_CTL_VGA handling from setup-bus.c Greg KH
@ 2005-07-29 19:16   ` Greg KH
  2005-07-29 19:16   ` [patch 17/29] USB: ftdi_sio: new microHAM and Evolution Robotics devices Greg KH
                     ` (12 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:16 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, galak

From: Kumar Gala <galak@freescale.com>

In the patch from:

http://www.uwsg.iu.edu/hypermail/linux/kernel/0506.3/0985.html

Is the the following line suppose inside the if CONFIG_PCI=n

  #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0)

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 include/linux/pci.h |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

--- gregkh-2.6.orig/include/linux/pci.h	2005-07-29 11:29:50.000000000 -0700
+++ gregkh-2.6/include/linux/pci.h	2005-07-29 11:36:24.000000000 -0700
@@ -971,6 +971,8 @@
 
 #define	isa_bridge	((struct pci_dev *)NULL)
 
+#define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0)
+
 #else
 
 /*
@@ -985,9 +987,6 @@
 	return 0;
 }
 #endif
-
-#define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0)
-
 #endif /* !CONFIG_PCI */
 
 /* these helpers provide future and backwards compatibility

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 17/29] USB: ftdi_sio: new microHAM and Evolution Robotics devices
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (15 preceding siblings ...)
  2005-07-29 19:16   ` [patch 16/29] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n -- bug? Greg KH
@ 2005-07-29 19:16   ` Greg KH
  2005-07-29 19:16   ` [patch 18/29] USB: ftdi_sio: Update RTS and DTR simultaneously Greg KH
                     ` (11 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:16 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, abbotti

[-- Attachment #1: usb-ftdi_sio-new-devices.patch --]
[-- Type: text/plain, Size: 1977 bytes --]

From: Ian Abbott <abbotti@mev.co.uk>

The attached patch adds the following new devices to the ftdi_sio driver:

* microHAM USB-Y6 and USB-Y8 devices submitted by Justin Burket (KL1RL).
* Evolution Robotics ER1 Control Module submitted by Shawn M.  Lavelle.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c |    3 +++
 drivers/usb/serial/ftdi_sio.h |   14 ++++++++++++++
 2 files changed, 17 insertions(+)

--- gregkh-2.6.orig/drivers/usb/serial/ftdi_sio.c	2005-07-29 11:29:48.000000000 -0700
+++ gregkh-2.6/drivers/usb/serial/ftdi_sio.c	2005-07-29 11:36:25.000000000 -0700
@@ -429,6 +429,9 @@
 	{ USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID) },
 	{ USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_ACTIVE_ROBOTS_PID) },
+	{ USB_DEVICE(FTDI_VID, FTDI_MHAM_Y6_PID) },
+	{ USB_DEVICE(FTDI_VID, FTDI_MHAM_Y8_PID) },
+	{ USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) },
 	{ }						/* Terminating entry */
 };
 
--- gregkh-2.6.orig/drivers/usb/serial/ftdi_sio.h	2005-07-29 11:29:48.000000000 -0700
+++ gregkh-2.6/drivers/usb/serial/ftdi_sio.h	2005-07-29 11:36:25.000000000 -0700
@@ -265,10 +265,24 @@
 #define MOBILITY_USB_SERIAL_PID		0x0202	/* EasiDock USB 200 serial */
 
 /*
+ * microHAM product IDs (http://www.microham.com).
+ * Submitted by Justin Burket (KL1RL) <zorton@jtan.com>.
+ */
+#define FTDI_MHAM_Y6_PID 0xEEEA		/* USB-Y6 interface */
+#define FTDI_MHAM_Y8_PID 0xEEEB		/* USB-Y8 interface */
+
+/*
  * Active Robots product ids.
  */
 #define FTDI_ACTIVE_ROBOTS_PID	0xE548	/* USB comms board */
 
+/*
+ * Evolution Robotics products (http://www.evolution.com/).
+ * Submitted by Shawn M. Lavelle.
+ */
+#define EVOLUTION_VID		0xDEEE	/* Vendor ID */
+#define EVOLUTION_ER1_PID	0x0300	/* ER1 Control Module */
+
 /* Commands */
 #define FTDI_SIO_RESET 		0 /* Reset the port */
 #define FTDI_SIO_MODEM_CTRL 	1 /* Set the modem control register */

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 18/29] USB: ftdi_sio: Update RTS and DTR simultaneously
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (16 preceding siblings ...)
  2005-07-29 19:16   ` [patch 17/29] USB: ftdi_sio: new microHAM and Evolution Robotics devices Greg KH
@ 2005-07-29 19:16   ` Greg KH
  2005-07-29 19:16   ` [patch 19/29] USB: ftdi_sio: fix a couple of timeouts Greg KH
                     ` (10 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:16 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, abbotti

[-- Attachment #1: usb-ftdi_sio-rts-dtr.patch --]
[-- Type: text/plain, Size: 6127 bytes --]

From: Ian Abbott <abbotti@mev.co.uk>

ftdi_sio: Update RTS and DTR simultaneously, using a single control URB
instead of separate control URBs for RTS and DTR.  Reinhard Bergmann
observed time differences of up to 680 ms with his application on a
2.4.22 kernel when RTS and DTR were updated using separate control
URBs, which is unacceptable.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c |  138 +++++++++++++-----------------------------
 1 files changed, 43 insertions(+), 95 deletions(-)

--- gregkh-2.6.orig/drivers/usb/serial/ftdi_sio.c	2005-07-29 11:36:25.000000000 -0700
+++ gregkh-2.6/drivers/usb/serial/ftdi_sio.c	2005-07-29 11:36:26.000000000 -0700
@@ -596,62 +596,59 @@
 	 return(ftdi_232bm_baud_base_to_divisor(baud, 48000000));
 }
 
-static int set_rts(struct usb_serial_port *port, int high_or_low)
+#define set_mctrl(port, set)		update_mctrl((port), (set), 0)
+#define clear_mctrl(port, clear)	update_mctrl((port), 0, (clear))
+
+static int update_mctrl(struct usb_serial_port *port, unsigned int set, unsigned int clear)
 {
 	struct ftdi_private *priv = usb_get_serial_port_data(port);
 	char *buf;
-	unsigned ftdi_high_or_low;
+	unsigned urb_value;
 	int rv;
-	
-	buf = kmalloc(1, GFP_NOIO);
-	if (!buf)
-		return -ENOMEM;
-	
-	if (high_or_low) {
-		ftdi_high_or_low = FTDI_SIO_SET_RTS_HIGH;
-		priv->last_dtr_rts |= TIOCM_RTS;
-	} else {
-		ftdi_high_or_low = FTDI_SIO_SET_RTS_LOW;
-		priv->last_dtr_rts &= ~TIOCM_RTS;
-	}
-	rv = usb_control_msg(port->serial->dev,
-			       usb_sndctrlpipe(port->serial->dev, 0),
-			       FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
-			       FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
-			       ftdi_high_or_low, priv->interface, 
-			       buf, 0, WDR_TIMEOUT);
-
-	kfree(buf);
-	return rv;
-}
 
+	if (((set | clear) & (TIOCM_DTR | TIOCM_RTS)) == 0) {
+		dbg("%s - DTR|RTS not being set|cleared", __FUNCTION__);
+		return 0;	/* no change */
+	}
 
-static int set_dtr(struct usb_serial_port *port, int high_or_low)
-{
-	struct ftdi_private *priv = usb_get_serial_port_data(port);
-	char *buf;
-	unsigned ftdi_high_or_low;
-	int rv;
-	
 	buf = kmalloc(1, GFP_NOIO);
-	if (!buf)
+	if (!buf) {
 		return -ENOMEM;
-
-	if (high_or_low) {
-		ftdi_high_or_low = FTDI_SIO_SET_DTR_HIGH;
-		priv->last_dtr_rts |= TIOCM_DTR;
-	} else {
-		ftdi_high_or_low = FTDI_SIO_SET_DTR_LOW;
-		priv->last_dtr_rts &= ~TIOCM_DTR;
 	}
+
+	clear &= ~set;	/* 'set' takes precedence over 'clear' */
+	urb_value = 0;
+	if (clear & TIOCM_DTR)
+		urb_value |= FTDI_SIO_SET_DTR_LOW;
+	if (clear & TIOCM_RTS)
+		urb_value |= FTDI_SIO_SET_RTS_LOW;
+	if (set & TIOCM_DTR)
+		urb_value |= FTDI_SIO_SET_DTR_HIGH;
+	if (set & TIOCM_RTS)
+		urb_value |= FTDI_SIO_SET_RTS_HIGH;
 	rv = usb_control_msg(port->serial->dev,
 			       usb_sndctrlpipe(port->serial->dev, 0),
 			       FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
 			       FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
-			       ftdi_high_or_low, priv->interface, 
+			       urb_value, priv->interface,
 			       buf, 0, WDR_TIMEOUT);
 
 	kfree(buf);
+	if (rv < 0) {
+		err("%s Error from MODEM_CTRL urb: DTR %s, RTS %s",
+				__FUNCTION__,
+				(set & TIOCM_DTR) ? "HIGH" :
+				(clear & TIOCM_DTR) ? "LOW" : "unchanged",
+				(set & TIOCM_RTS) ? "HIGH" :
+				(clear & TIOCM_RTS) ? "LOW" : "unchanged");
+	} else {
+		dbg("%s - DTR %s, RTS %s", __FUNCTION__,
+				(set & TIOCM_DTR) ? "HIGH" :
+				(clear & TIOCM_DTR) ? "LOW" : "unchanged",
+				(set & TIOCM_RTS) ? "HIGH" :
+				(clear & TIOCM_RTS) ? "LOW" : "unchanged");
+		priv->last_dtr_rts = (priv->last_dtr_rts & ~clear) | set;
+	}
 	return rv;
 }
 
@@ -1222,12 +1219,7 @@
 	/* FIXME: Flow control might be enabled, so it should be checked -
 	   we have no control of defaults! */
 	/* Turn on RTS and DTR since we are not flow controlling by default */
-	if (set_dtr(port, HIGH) < 0) {
-		err("%s Error from DTR HIGH urb", __FUNCTION__);
-	}
-	if (set_rts(port, HIGH) < 0){
-		err("%s Error from RTS HIGH urb", __FUNCTION__);
-	}
+	set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
 
 	/* Not throttled */
 	spin_lock_irqsave(&priv->rx_lock, flags);
@@ -1277,14 +1269,8 @@
 			err("error from flowcontrol urb");
 		}	    
 
-		/* drop DTR */
-		if (set_dtr(port, LOW) < 0){
-			err("Error from DTR LOW urb");
-		}
-		/* drop RTS */
-		if (set_rts(port, LOW) < 0) {
-			err("Error from RTS LOW urb");
-		}
+		/* drop RTS and DTR */
+		clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
 	} /* Note change no line if hupcl is off */
 
 	/* cancel any scheduled reading */
@@ -1815,25 +1801,14 @@
 			err("%s error from disable flowcontrol urb", __FUNCTION__);
 		}	    
 		/* Drop RTS and DTR */
-		if (set_dtr(port, LOW) < 0){
-			err("%s Error from DTR LOW urb", __FUNCTION__);
-		}
-		if (set_rts(port, LOW) < 0){
-			err("%s Error from RTS LOW urb", __FUNCTION__);
-		}	
-		
+		clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
 	} else {
 		/* set the baudrate determined before */
 		if (change_speed(port)) {
 			err("%s urb failed to set baurdrate", __FUNCTION__);
 		}
 		/* Ensure  RTS and DTR are raised */
-		else if (set_dtr(port, HIGH) < 0){
-			err("%s Error from DTR HIGH urb", __FUNCTION__);
-		}
-		else if (set_rts(port, HIGH) < 0){
-			err("%s Error from RTS HIGH urb", __FUNCTION__);
-		}	
+		set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
 	}
 
 	/* Set flow control */
@@ -1945,35 +1920,8 @@
 
 static int ftdi_tiocmset(struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear)
 {
-	int ret;
-	
 	dbg("%s TIOCMSET", __FUNCTION__);
-	if (set & TIOCM_DTR){
-		if ((ret = set_dtr(port, HIGH)) < 0) {
-			err("Urb to set DTR failed");
-			return(ret);
-		}
-	}
-	if (set & TIOCM_RTS) {
-		if ((ret = set_rts(port, HIGH)) < 0){
-			err("Urb to set RTS failed");
-			return(ret);
-		}
-	}
-	
-	if (clear & TIOCM_DTR){
-		if ((ret = set_dtr(port, LOW)) < 0){
-			err("Urb to unset DTR failed");
-			return(ret);
-		}
-	}	
-	if (clear & TIOCM_RTS) {
-		if ((ret = set_rts(port, LOW)) < 0){
-			err("Urb to unset RTS failed");
-			return(ret);
-		}
-	}
-	return(0);
+	return update_mctrl(port, set, clear);
 }
 
 

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 19/29] USB: ftdi_sio: fix a couple of timeouts
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (17 preceding siblings ...)
  2005-07-29 19:16   ` [patch 18/29] USB: ftdi_sio: Update RTS and DTR simultaneously Greg KH
@ 2005-07-29 19:16   ` Greg KH
  2005-07-29 19:16   ` [patch 20/29] USB: usbfs: Don't leak uninitialized data Greg KH
                     ` (9 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:16 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, abbotti

[-- Attachment #1: usb-ftdi_sio-timeout-fix.patch --]
[-- Type: text/plain, Size: 1231 bytes --]

From: Ian Abbott <abbotti@mev.co.uk>

ftdi_sio: Fix timeouts in a couple of usb_control_msg() calls due to
change of units from jiffies to milliseconds in 2.6.12.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/serial/ftdi_sio.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

--- gregkh-2.6.orig/drivers/usb/serial/ftdi_sio.c	2005-07-29 11:36:26.000000000 -0700
+++ gregkh-2.6/drivers/usb/serial/ftdi_sio.c	2005-07-29 11:36:27.000000000 -0700
@@ -548,6 +548,7 @@
 
 
 #define WDR_TIMEOUT 5000 /* default urb timeout */
+#define WDR_SHORT_TIMEOUT 1000	/* shorter urb timeout */
 
 /* High and low are for DTR, RTS etc etc */
 #define HIGH 1
@@ -681,7 +682,7 @@
 			    FTDI_SIO_SET_BAUDRATE_REQUEST,
 			    FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
 			    urb_value, urb_index,
-			    buf, 0, 100);
+			    buf, 0, WDR_SHORT_TIMEOUT);
 
 	kfree(buf);
 	return rv;
@@ -1786,7 +1787,7 @@
 			    FTDI_SIO_SET_DATA_REQUEST, 
 			    FTDI_SIO_SET_DATA_REQUEST_TYPE,
 			    urb_value , priv->interface,
-			    buf, 0, 100) < 0) {
+			    buf, 0, WDR_SHORT_TIMEOUT) < 0) {
 		err("%s FAILED to set databits/stopbits/parity", __FUNCTION__);
 	}	   
 

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 20/29] USB: usbfs: Don't leak uninitialized data
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (18 preceding siblings ...)
  2005-07-29 19:16   ` [patch 19/29] USB: ftdi_sio: fix a couple of timeouts Greg KH
@ 2005-07-29 19:16   ` Greg KH
  2005-07-29 19:17   ` [patch 21/29] USB: drivers/usb/net/: remove two unused multicast_filter_limit variables Greg KH
                     ` (8 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:16 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, stern

[-- Attachment #1: usb-usbfs-dont-leak-data.patch --]
[-- Type: text/plain, Size: 2195 bytes --]

From: Alan Stern <stern@rowland.harvard.edu>

This patch fixes an information leak in the usbfs snoop facility:
uninitialized data from __get_free_page can be returned to userspace and
written to the system log.  It also improves the snoop output by printing
the wLength value.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/devio.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

--- gregkh-2.6.orig/drivers/usb/core/devio.c	2005-07-29 11:29:48.000000000 -0700
+++ gregkh-2.6/drivers/usb/core/devio.c	2005-07-29 11:36:28.000000000 -0700
@@ -569,8 +569,11 @@
 			free_page((unsigned long)tbuf);
 			return -EINVAL;
 		}
-		snoop(&dev->dev, "control read: bRequest=%02x bRrequestType=%02x wValue=%04x wIndex=%04x\n", 
-			ctrl.bRequest, ctrl.bRequestType, ctrl.wValue, ctrl.wIndex);
+		snoop(&dev->dev, "control read: bRequest=%02x "
+				"bRrequestType=%02x wValue=%04x "
+				"wIndex=%04x wLength=%04x\n",
+			ctrl.bRequest, ctrl.bRequestType, ctrl.wValue,
+				ctrl.wIndex, ctrl.wLength);
 
 		usb_unlock_device(dev);
 		i = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), ctrl.bRequest, ctrl.bRequestType,
@@ -579,11 +582,11 @@
 		if ((i > 0) && ctrl.wLength) {
 			if (usbfs_snoop) {
 				dev_info(&dev->dev, "control read: data ");
-				for (j = 0; j < ctrl.wLength; ++j)
+				for (j = 0; j < i; ++j)
 					printk ("%02x ", (unsigned char)(tbuf)[j]);
 				printk("\n");
 			}
-			if (copy_to_user(ctrl.data, tbuf, ctrl.wLength)) {
+			if (copy_to_user(ctrl.data, tbuf, i)) {
 				free_page((unsigned long)tbuf);
 				return -EFAULT;
 			}
@@ -595,8 +598,11 @@
 				return -EFAULT;
 			}
 		}
-		snoop(&dev->dev, "control write: bRequest=%02x bRrequestType=%02x wValue=%04x wIndex=%04x\n", 
-			ctrl.bRequest, ctrl.bRequestType, ctrl.wValue, ctrl.wIndex);
+		snoop(&dev->dev, "control write: bRequest=%02x "
+				"bRrequestType=%02x wValue=%04x "
+				"wIndex=%04x wLength=%04x\n",
+			ctrl.bRequest, ctrl.bRequestType, ctrl.wValue,
+				ctrl.wIndex, ctrl.wLength);
 		if (usbfs_snoop) {
 			dev_info(&dev->dev, "control write: data: ");
 			for (j = 0; j < ctrl.wLength; ++j)

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 21/29] USB: drivers/usb/net/: remove two unused multicast_filter_limit variables
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (19 preceding siblings ...)
  2005-07-29 19:16   ` [patch 20/29] USB: usbfs: Don't leak uninitialized data Greg KH
@ 2005-07-29 19:17   ` Greg KH
  2005-07-29 19:17   ` [patch 22/29] USB: Usbcore: Don't try to delete unregistered interfaces Greg KH
                     ` (7 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:17 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, bunk

From: Adrian Bunk <bunk@stusta.de>

The only uses of both variables were recently removed.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/net/pegasus.c |    1 -
 drivers/usb/net/rtl8150.c |    2 --
 2 files changed, 3 deletions(-)

--- gregkh-2.6.orig/drivers/usb/net/pegasus.c	2005-07-29 11:29:48.000000000 -0700
+++ gregkh-2.6/drivers/usb/net/pegasus.c	2005-07-29 11:36:28.000000000 -0700
@@ -59,7 +59,6 @@
 
 static int loopback = 0;
 static int mii_mode = 0;
-static int multicast_filter_limit = 32;
 
 static struct usb_eth_dev usb_dev_id[] = {
 #define	PEGASUS_DEV(pn, vid, pid, flags)	\
--- gregkh-2.6.orig/drivers/usb/net/rtl8150.c	2005-07-29 11:29:48.000000000 -0700
+++ gregkh-2.6/drivers/usb/net/rtl8150.c	2005-07-29 11:36:28.000000000 -0700
@@ -167,8 +167,6 @@
 
 typedef struct rtl8150 rtl8150_t;
 
-static unsigned long multicast_filter_limit = 32;
-
 static void fill_skb_pool(rtl8150_t *);
 static void free_skb_pool(rtl8150_t *);
 static inline struct sk_buff *pull_skb(rtl8150_t *);

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 22/29] USB: Usbcore: Don't try to delete unregistered interfaces
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (20 preceding siblings ...)
  2005-07-29 19:17   ` [patch 21/29] USB: drivers/usb/net/: remove two unused multicast_filter_limit variables Greg KH
@ 2005-07-29 19:17   ` Greg KH
  2005-07-29 19:17   ` [patch 23/29] USB: ldusb fixes Greg KH
                     ` (6 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:17 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, stern

[-- Attachment #1: usb-dont-delete-unregistered-interfaces.patch --]
[-- Type: text/plain, Size: 1437 bytes --]

From: Alan Stern <stern@rowland.harvard.edu>

This patch handles a rarely-encountered failure mode in usbcore.  It's
legal for device_add to fail (although now it happens even more rarely
than before since failure to bind a driver is no longer fatal).  So when
we destroy the interfaces in a configuration, we shouldn't try to delete
ones which weren't successfully registered.  Also, failure to register an
interface shouldn't be fatal either -- I think; you may disagree about
this part of the patch.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/core/message.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

--- gregkh-2.6.orig/drivers/usb/core/message.c	2005-07-29 11:29:48.000000000 -0700
+++ gregkh-2.6/drivers/usb/core/message.c	2005-07-29 11:36:29.000000000 -0700
@@ -985,8 +985,10 @@
 		for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
 			struct usb_interface	*interface;
 
-			/* remove this interface */
+			/* remove this interface if it has been registered */
 			interface = dev->actconfig->interface[i];
+			if (!klist_node_attached(&interface->dev.knode_bus))
+				continue;
 			dev_dbg (&dev->dev, "unregistering interface %s\n",
 				interface->dev.bus_id);
 			usb_remove_sysfs_intf_files(interface);
@@ -1439,7 +1441,7 @@
 		}
 	}
 
-	return ret;
+	return 0;
 }
 
 // synchronous request completion model

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 23/29] USB: ldusb fixes
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (21 preceding siblings ...)
  2005-07-29 19:17   ` [patch 22/29] USB: Usbcore: Don't try to delete unregistered interfaces Greg KH
@ 2005-07-29 19:17   ` Greg KH
  2005-07-29 19:17   ` [patch 24/29] USB: Patch for KYOCERA AH-K3001V support Greg KH
                     ` (5 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:17 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, mhund

[-- Attachment #1: usb-ldusb-fixes.patch --]
[-- Type: text/plain, Size: 1379 bytes --]

From: Michael Hund <mhund@ld-didactic.de>

below you will find the forgotten kmalloc check (sorry).

Signed-off-by: Michael Hund <mhund@ld-didactic.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/misc/ldusb.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

--- gregkh-2.6.orig/drivers/usb/misc/ldusb.c	2005-07-29 11:29:48.000000000 -0700
+++ gregkh-2.6/drivers/usb/misc/ldusb.c	2005-07-29 11:36:30.000000000 -0700
@@ -23,6 +23,7 @@
  *
  * V0.1  (mh) Initial version
  * V0.11 (mh) Added raw support for HID 1.0 devices (no interrupt out endpoint)
+ * V0.12 (mh) Added kmalloc check for string buffer
  */
 
 #include <linux/config.h>
@@ -84,7 +85,7 @@
 	{ }					/* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, ld_usb_table);
-MODULE_VERSION("V0.11");
+MODULE_VERSION("V0.12");
 MODULE_AUTHOR("Michael Hund <mhund@ld-didactic.de>");
 MODULE_DESCRIPTION("LD USB Driver");
 MODULE_LICENSE("GPL");
@@ -635,6 +636,10 @@
 	     (le16_to_cpu(udev->descriptor.idProduct) == USB_DEVICE_ID_COM3LAB)) &&
 	    (le16_to_cpu(udev->descriptor.bcdDevice) <= 0x103)) {
 		buffer = kmalloc(256, GFP_KERNEL);
+		if (buffer == NULL) {
+			dev_err(&intf->dev, "Couldn't allocate string buffer\n");
+			goto error;
+		}
 		/* usb_string makes SETUP+STALL to leave always ControlReadLoop */
 		usb_string(udev, 255, buffer, 256);
 		kfree(buffer);

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 24/29] USB: Patch for KYOCERA AH-K3001V support
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (22 preceding siblings ...)
  2005-07-29 19:17   ` [patch 23/29] USB: ldusb fixes Greg KH
@ 2005-07-29 19:17   ` Greg KH
  2005-07-29 19:17   ` [patch 25/29] USB: drivers/net/usb/zd1201.c: Gigabyte GN-WLBZ201 dongle usbid Greg KH
                     ` (4 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:17 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, omote

[-- Attachment #1: usb-cdc_acp-kyocera-device-add.patch --]
[-- Type: text/plain, Size: 1151 bytes --]

From: Masahito Omote <omote@utyuuzin.net>

This patch enables a support of KYOCERA AH-K3001V, one of the most
popular cell phone in Japan. This device has vendor specific ID but works
with acm driver by adding USB ID. This device already works on
FreeBSD and OS X by native USB ACM driver with USB ID added.

This device is probed as NO_UNION_NORMAL not to hang up when probing.

Signed-off-by: Masahito Omote <omote@utyuuzin.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/class/cdc-acm.c |    3 +++
 1 files changed, 3 insertions(+)

--- gregkh-2.6.orig/drivers/usb/class/cdc-acm.c	2005-07-29 11:29:47.000000000 -0700
+++ gregkh-2.6/drivers/usb/class/cdc-acm.c	2005-07-29 11:36:31.000000000 -0700
@@ -980,6 +980,9 @@
 	{ USB_DEVICE(0x0870, 0x0001), /* Metricom GS Modem */
 	.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
 	},
+	{ USB_DEVICE(0x0482, 0x0203), /* KYOCERA AH-K3001V */
+	.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,
 		USB_CDC_ACM_PROTO_AT_V25TER) },

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 25/29] USB: drivers/net/usb/zd1201.c: Gigabyte GN-WLBZ201 dongle usbid
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (23 preceding siblings ...)
  2005-07-29 19:17   ` [patch 24/29] USB: Patch for KYOCERA AH-K3001V support Greg KH
@ 2005-07-29 19:17   ` Greg KH
  2005-07-29 19:18   ` [patch 26/29] USB: add S3C24XX USB Host driver support Greg KH
                     ` (3 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:17 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, matt

From: "Mathieu" <matt@minas-morgul.org>

Gigabyte GN-WLBZ201 wifi usb dongle works very well, using the zd1201
driver. the only missing part is that the corresponding usbid is not
declared. The following patch should fix this.

From: "Mathieu" <matt@minas-morgul.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/net/zd1201.c |    1 +
 1 files changed, 1 insertion(+)

--- gregkh-2.6.orig/drivers/usb/net/zd1201.c	2005-07-29 11:29:47.000000000 -0700
+++ gregkh-2.6/drivers/usb/net/zd1201.c	2005-07-29 11:36:32.000000000 -0700
@@ -29,6 +29,7 @@
 	{USB_DEVICE(0x0ace, 0x1201)}, /* ZyDAS ZD1201 Wireless USB Adapter */
 	{USB_DEVICE(0x050d, 0x6051)}, /* Belkin F5D6051 usb  adapter */
 	{USB_DEVICE(0x0db0, 0x6823)}, /* MSI UB11B usb  adapter */
+	{USB_DEVICE(0x1044, 0x8005)}, /* GIGABYTE GN-WLBZ201 usb adapter */
 	{}
 };
 

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 26/29] USB: add S3C24XX USB Host driver support
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (24 preceding siblings ...)
  2005-07-29 19:17   ` [patch 25/29] USB: drivers/net/usb/zd1201.c: Gigabyte GN-WLBZ201 dongle usbid Greg KH
@ 2005-07-29 19:18   ` Greg KH
  2005-07-29 19:18   ` [patch 27/29] USB: fix Bug in usb-skeleton.c Greg KH
                     ` (2 subsequent siblings)
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:18 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, ben-linux

From: Ben Dooks <ben-linux-usb@fluff.org>

USB (OHCI) Host driver for S3C2410/S3C2440 based systems

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/Kconfig             |    1 
 drivers/usb/host/ohci-hcd.c     |    5 
 drivers/usb/host/ohci-s3c2410.c |  496 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 502 insertions(+)

--- gregkh-2.6.orig/drivers/usb/Kconfig	2005-07-29 11:29:47.000000000 -0700
+++ gregkh-2.6/drivers/usb/Kconfig	2005-07-29 11:36:32.000000000 -0700
@@ -20,6 +20,7 @@
 	default y if SA1111
 	default y if ARCH_OMAP
 	default y if ARCH_LH7A404
+	default y if ARCH_S3C2410
 	default y if PXA27x
 	# PPC:
 	default y if STB03xxx
--- gregkh-2.6.orig/drivers/usb/host/ohci-hcd.c	2005-07-29 11:29:47.000000000 -0700
+++ gregkh-2.6/drivers/usb/host/ohci-hcd.c	2005-07-29 11:36:32.000000000 -0700
@@ -887,6 +887,10 @@
 #include "ohci-sa1111.c"
 #endif
 
+#ifdef CONFIG_ARCH_S3C2410
+#include "ohci-s3c2410.c"
+#endif
+
 #ifdef CONFIG_ARCH_OMAP
 #include "ohci-omap.c"
 #endif
@@ -909,6 +913,7 @@
 
 #if !(defined(CONFIG_PCI) \
       || defined(CONFIG_SA1111) \
+      || defined(CONFIG_ARCH_S3C2410) \
       || defined(CONFIG_ARCH_OMAP) \
       || defined (CONFIG_ARCH_LH7A404) \
       || defined (CONFIG_PXA27x) \
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ gregkh-2.6/drivers/usb/host/ohci-s3c2410.c	2005-07-29 11:36:32.000000000 -0700
@@ -0,0 +1,496 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
+ * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
+ * (C) Copyright 2002 Hewlett-Packard Company
+ *
+ * USB Bus Glue for Samsung S3C2410
+ *
+ * Written by Christopher Hoover <ch@hpl.hp.com>
+ * Based on fragments of previous driver by Rusell King et al.
+ *
+ * Modified for S3C2410 from ohci-sa1111.c, ohci-omap.c and ohci-lh7a40.c
+ *	by Ben Dooks, <ben@simtec.co.uk>
+ *	Copyright (C) 2004 Simtec Electronics
+ *
+ * Thanks to basprog@mail.ru for updates to newer kernels
+ *
+ * This file is licenced under the GPL.
+*/
+
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/hardware/clock.h>
+#include <asm/arch/usb-control.h>
+
+#define valid_port(idx) ((idx) == 1 || (idx) == 2)
+
+/* clock device associated with the hcd */
+
+static struct clk *clk;
+
+/* forward definitions */
+
+static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc);
+
+/* conversion functions */
+
+struct s3c2410_hcd_info *to_s3c2410_info(struct usb_hcd *hcd)
+{
+	return hcd->self.controller->platform_data;
+}
+
+static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd)
+{
+	struct s3c2410_hcd_info *info = dev->dev.platform_data;
+
+	dev_dbg(&dev->dev, "s3c2410_start_hc:\n");
+	clk_enable(clk);
+
+	if (info != NULL) {
+		info->hcd	= hcd;
+		info->report_oc = s3c2410_hcd_oc;
+
+		if (info->enable_oc != NULL) {
+			(info->enable_oc)(info, 1);
+		}
+	}
+}
+
+static void s3c2410_stop_hc(struct platform_device *dev)
+{
+	struct s3c2410_hcd_info *info = dev->dev.platform_data;
+
+	dev_dbg(&dev->dev, "s3c2410_stop_hc:\n");
+
+	if (info != NULL) {
+		info->report_oc = NULL;
+		info->hcd	= NULL;
+
+		if (info->enable_oc != NULL) {
+			(info->enable_oc)(info, 0);
+		}
+	}
+
+	clk_disable(clk);
+}
+
+/* ohci_s3c2410_hub_status_data
+ *
+ * update the status data from the hub with anything that
+ * has been detected by our system
+*/
+
+static int
+ohci_s3c2410_hub_status_data (struct usb_hcd *hcd, char *buf)
+{
+	struct s3c2410_hcd_info *info = to_s3c2410_info(hcd);
+	struct s3c2410_hcd_port *port;
+	int orig;
+	int portno;
+
+	orig  = ohci_hub_status_data (hcd, buf);
+
+	if (info == NULL)
+		return orig;
+
+	port = &info->port[0];
+
+	/* mark any changed port as changed */
+
+	for (portno = 0; portno < 2; port++, portno++) {
+		if (port->oc_changed == 1 &&
+		    port->flags & S3C_HCDFLG_USED) {
+			dev_dbg(hcd->self.controller,
+				"oc change on port %d\n", portno);
+
+			if (orig < 1)
+				orig = 1;
+
+			buf[0] |= 1<<(portno+1);
+		}
+	}
+
+	return orig;
+}
+
+/* s3c2410_usb_set_power
+ *
+ * configure the power on a port, by calling the platform device
+ * routine registered with the platform device
+*/
+
+static void s3c2410_usb_set_power(struct s3c2410_hcd_info *info,
+				  int port, int to)
+{
+	if (info == NULL)
+		return;
+
+	if (info->power_control != NULL) {
+		info->port[port-1].power = to;
+		(info->power_control)(port, to);
+	}
+}
+
+/* ohci_s3c2410_hub_control
+ *
+ * look at control requests to the hub, and see if we need
+ * to take any action or over-ride the results from the
+ * request.
+*/
+
+static int ohci_s3c2410_hub_control (
+	struct usb_hcd	*hcd,
+	u16		typeReq,
+	u16		wValue,
+	u16		wIndex,
+	char		*buf,
+	u16		wLength)
+{
+	struct s3c2410_hcd_info *info = to_s3c2410_info(hcd);
+	struct usb_hub_descriptor *desc;
+	int ret = -EINVAL;
+	u32 *data = (u32 *)buf;
+
+	dev_dbg(hcd->self.controller,
+		"s3c2410_hub_control(%p,0x%04x,0x%04x,0x%04x,%p,%04x)\n",
+		hcd, typeReq, wValue, wIndex, buf, wLength);
+
+	/* if we are only an humble host without any special capabilites
+	 * process the request straight away and exit */
+
+	if (info == NULL) {
+		ret = ohci_hub_control(hcd, typeReq, wValue,
+				       wIndex, buf, wLength);
+		goto out;
+	}
+
+	/* check the request to see if it needs handling */
+
+	switch (typeReq) {
+	case SetPortFeature:
+		if (wValue == USB_PORT_FEAT_POWER) {
+			dev_dbg(hcd->self.controller, "SetPortFeat: POWER\n");
+			s3c2410_usb_set_power(info, wIndex, 1);
+			goto out;
+		}
+		break;
+
+	case ClearPortFeature:
+		switch (wValue) {
+		case USB_PORT_FEAT_C_OVER_CURRENT:
+			dev_dbg(hcd->self.controller,
+				"ClearPortFeature: C_OVER_CURRENT\n");
+
+			if (valid_port(wIndex)) {
+				info->port[wIndex-1].oc_changed = 0;
+				info->port[wIndex-1].oc_status = 0;
+			}
+
+			goto out;
+
+		case USB_PORT_FEAT_OVER_CURRENT:
+			dev_dbg(hcd->self.controller,
+				"ClearPortFeature: OVER_CURRENT\n");
+
+			if (valid_port(wIndex)) {
+				info->port[wIndex-1].oc_status = 0;
+			}
+
+			goto out;
+
+		case USB_PORT_FEAT_POWER:
+			dev_dbg(hcd->self.controller,
+				"ClearPortFeature: POWER\n");
+
+			if (valid_port(wIndex)) {
+				s3c2410_usb_set_power(info, wIndex, 0);
+				return 0;
+			}
+		}
+		break;
+	}
+
+	ret = ohci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength);
+	if (ret)
+		goto out;
+
+	switch (typeReq) {
+	case GetHubDescriptor:
+
+		/* update the hub's descriptor */
+
+		desc = (struct usb_hub_descriptor *)buf;
+
+		if (info->power_control == NULL)
+			return ret;
+
+		dev_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n",
+			desc->wHubCharacteristics);
+
+		/* remove the old configurations for power-switching, and
+		 * over-current protection, and insert our new configuration
+		 */
+
+		desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_LPSM);
+		desc->wHubCharacteristics |= cpu_to_le16(0x0001);
+
+		if (info->enable_oc) {
+			desc->wHubCharacteristics &= ~cpu_to_le16(HUB_CHAR_OCPM);
+			desc->wHubCharacteristics |=  cpu_to_le16(0x0008|0x0001);
+		}
+
+		dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n",
+			desc->wHubCharacteristics);
+
+		return ret;
+
+	case GetPortStatus:
+		/* check port status */
+
+		dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex);
+
+		if (valid_port(wIndex)) {
+			if (info->port[wIndex-1].oc_changed) {
+				*data |= cpu_to_le32(RH_PS_OCIC);
+			}
+
+			if (info->port[wIndex-1].oc_status) {
+				*data |= cpu_to_le32(RH_PS_POCI);
+			}
+		}
+	}
+
+ out:
+	return ret;
+}
+
+/* s3c2410_hcd_oc
+ *
+ * handle an over-current report
+*/
+
+static void s3c2410_hcd_oc(struct s3c2410_hcd_info *info, int port_oc)
+{
+	struct s3c2410_hcd_port *port;
+	struct usb_hcd *hcd;
+	unsigned long flags;
+	int portno;
+
+	if (info == NULL)
+		return;
+
+	port = &info->port[0];
+	hcd = info->hcd;
+
+	local_irq_save(flags);
+
+	for (portno = 0; portno < 2; port++, portno++) {
+		if (port_oc & (1<<portno) &&
+		    port->flags & S3C_HCDFLG_USED) {
+			port->oc_status = 1;
+			port->oc_changed = 1;
+
+			/* ok, once over-current is detected,
+			   the port needs to be powered down */
+			s3c2410_usb_set_power(info, portno+1, 0);
+		}
+	}
+
+	local_irq_restore(flags);
+}
+
+/* may be called without controller electrically present */
+/* may be called with controller, bus, and devices active */
+
+/*
+ * usb_hcd_s3c2410_remove - shutdown processing for HCD
+ * @dev: USB Host Controller being removed
+ * Context: !in_interrupt()
+ *
+ * Reverses the effect of usb_hcd_3c2410_probe(), first invoking
+ * the HCD's stop() method.  It is always called from a thread
+ * context, normally "rmmod", "apmd", or something similar.
+ *
+*/
+
+void usb_hcd_s3c2410_remove (struct usb_hcd *hcd, struct platform_device *dev)
+{
+	usb_remove_hcd(hcd);
+	s3c2410_stop_hc(dev);
+	iounmap(hcd->regs);
+	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+	usb_put_hcd(hcd);
+}
+
+/**
+ * usb_hcd_s3c2410_probe - initialize S3C2410-based HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ */
+int usb_hcd_s3c2410_probe (const struct hc_driver *driver,
+			   struct platform_device *dev)
+{
+	struct usb_hcd *hcd = NULL;
+	int retval;
+
+	s3c2410_usb_set_power(dev->dev.platform_data, 0, 1);
+	s3c2410_usb_set_power(dev->dev.platform_data, 1, 1);
+
+	hcd = usb_create_hcd(driver, &dev->dev, "s3c24xx");
+	if (hcd == NULL)
+		return -ENOMEM;
+
+	hcd->rsrc_start = dev->resource[0].start;
+	hcd->rsrc_len   = dev->resource[0].end - dev->resource[0].start + 1;
+
+	if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
+		dev_err(&dev->dev, "request_mem_region failed");
+		retval = -EBUSY;
+		goto err0;
+	}
+
+	clk = clk_get(NULL, "usb-host");
+	if (IS_ERR(clk)) {
+		dev_err(&dev->dev, "cannot get usb-host clock\n");
+		retval = -ENOENT;
+		goto err1;
+	}
+
+	clk_use(clk);
+	s3c2410_start_hc(dev, hcd);
+
+	hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
+	if (!hcd->regs) {
+		dev_err(&dev->dev, "ioremap failed\n");
+		retval = -ENOMEM;
+		goto err2;
+	}
+
+	ohci_hcd_init(hcd_to_ohci(hcd));
+
+	retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT);
+	if (retval != 0)
+		goto err2;
+
+	return 0;
+
+ err2:
+	s3c2410_stop_hc(dev);
+	iounmap(hcd->regs);
+	clk_unuse(clk);
+	clk_put(clk);
+
+ err1:
+	release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+
+ err0:
+	usb_put_hcd(hcd);
+	return retval;
+}
+
+/*-------------------------------------------------------------------------*/
+
+static int
+ohci_s3c2410_start (struct usb_hcd *hcd)
+{
+	struct ohci_hcd	*ohci = hcd_to_ohci (hcd);
+	int ret;
+
+	if ((ret = ohci_init(ohci)) < 0)
+		return ret;
+
+	if ((ret = ohci_run (ohci)) < 0) {
+		err ("can't start %s", hcd->self.bus_name);
+		ohci_stop (hcd);
+		return ret;
+	}
+
+	return 0;
+}
+
+
+static const struct hc_driver ohci_s3c2410_hc_driver = {
+	.description =		hcd_name,
+	.product_desc =		"S3C24XX OHCI",
+	.hcd_priv_size =	sizeof(struct ohci_hcd),
+
+	/*
+	 * generic hardware linkage
+	 */
+	.irq =			ohci_irq,
+	.flags =		HCD_USB11 | HCD_MEMORY,
+
+	/*
+	 * basic lifecycle operations
+	 */
+	.start =		ohci_s3c2410_start,
+	.stop =			ohci_stop,
+
+	/*
+	 * managing i/o requests and associated device resources
+	 */
+	.urb_enqueue =		ohci_urb_enqueue,
+	.urb_dequeue =		ohci_urb_dequeue,
+	.endpoint_disable =	ohci_endpoint_disable,
+
+	/*
+	 * scheduling support
+	 */
+	.get_frame_number =	ohci_get_frame,
+
+	/*
+	 * root hub support
+	 */
+	.hub_status_data =	ohci_s3c2410_hub_status_data,
+	.hub_control =		ohci_s3c2410_hub_control,
+
+#if defined(CONFIG_USB_SUSPEND) && 0
+	.hub_suspend =		ohci_hub_suspend,
+	.hub_resume =		ohci_hub_resume,
+#endif
+};
+
+/* device driver */
+
+static int ohci_hcd_s3c2410_drv_probe(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	return usb_hcd_s3c2410_probe(&ohci_s3c2410_hc_driver, pdev);
+}
+
+static int ohci_hcd_s3c2410_drv_remove(struct device *dev)
+{
+	struct platform_device *pdev = to_platform_device(dev);
+	struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+	usb_hcd_s3c2410_remove(hcd, pdev);
+	return 0;
+}
+
+static struct device_driver ohci_hcd_s3c2410_driver = {
+	.name		= "s3c2410-ohci",
+	.bus		= &platform_bus_type,
+	.probe		= ohci_hcd_s3c2410_drv_probe,
+	.remove		= ohci_hcd_s3c2410_drv_remove,
+	/*.suspend	= ohci_hcd_s3c2410_drv_suspend, */
+	/*.resume	= ohci_hcd_s3c2410_drv_resume, */
+};
+
+static int __init ohci_hcd_s3c2410_init (void)
+{
+	return driver_register(&ohci_hcd_s3c2410_driver);
+}
+
+static void __exit ohci_hcd_s3c2410_cleanup (void)
+{
+	driver_unregister(&ohci_hcd_s3c2410_driver);
+}
+
+module_init (ohci_hcd_s3c2410_init);
+module_exit (ohci_hcd_s3c2410_cleanup);

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 27/29] USB: fix Bug in usb-skeleton.c
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (25 preceding siblings ...)
  2005-07-29 19:18   ` [patch 26/29] USB: add S3C24XX USB Host driver support Greg KH
@ 2005-07-29 19:18   ` Greg KH
  2005-07-29 19:18   ` [patch 28/29] USB: fix in usb_calc_bus_time Greg KH
  2005-07-29 19:18   ` [patch 29/29] USB: hidinput_hid_event() oops fix Greg KH
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:18 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, CHRIS.A.CONGER

[-- Attachment #1: usb-skeleton-fix.patch --]
[-- Type: text/plain, Size: 1223 bytes --]

From: "Conger, Chris A." <CHRIS.A.CONGER@saic.com>

Compare endpoint address to USB_ENDPOINT_DIR_MASK to determine endpoint
direction...


From: "Conger, Chris A." <CHRIS.A.CONGER@saic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/usb-skeleton.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

--- gregkh-2.6.orig/drivers/usb/usb-skeleton.c	2005-07-29 11:29:47.000000000 -0700
+++ gregkh-2.6/drivers/usb/usb-skeleton.c	2005-07-29 11:36:33.000000000 -0700
@@ -257,7 +257,8 @@
 		endpoint = &iface_desc->endpoint[i].desc;
 
 		if (!dev->bulk_in_endpointAddr &&
-		    (endpoint->bEndpointAddress & USB_DIR_IN) &&
+		    ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
+					== USB_DIR_IN) &&
 		    ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
 					== USB_ENDPOINT_XFER_BULK)) {
 			/* we found a bulk in endpoint */
@@ -272,7 +273,8 @@
 		}
 
 		if (!dev->bulk_out_endpointAddr &&
-		    !(endpoint->bEndpointAddress & USB_DIR_OUT) &&
+		    ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
+					== USB_DIR_OUT) &&
 		    ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
 					== USB_ENDPOINT_XFER_BULK)) {
 			/* we found a bulk out endpoint */

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 28/29] USB: fix in usb_calc_bus_time
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (26 preceding siblings ...)
  2005-07-29 19:18   ` [patch 27/29] USB: fix Bug in usb-skeleton.c Greg KH
@ 2005-07-29 19:18   ` Greg KH
  2005-07-29 19:18   ` [patch 29/29] USB: hidinput_hid_event() oops fix Greg KH
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:18 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, ddstreet

[-- Attachment #1: usb-fix-usb_calc_bus_time.patch --]
[-- Type: text/plain, Size: 2928 bytes --]

From: Dan Streetman <ddstreet@ieee.org>

This patch does the same swap, i.e. use the ISO macro if (isoc).  
Additionally, it fixes the return value - the usb_calc_bus_time function 
returns the time in nanoseconds (I didn't notice that before) while the 
HS_USECS and HS_USECS_ISO are microseconds.  This fixes the function to 
return nanoseconds always, and adjusts ehci-q.c (the only high-speed 
caller of the function) to wrap the call in NS_TO_US().

Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


---
 drivers/usb/core/hcd.c    |    4 ++--
 drivers/usb/core/hcd.h    |    8 +++++---
 drivers/usb/host/ehci-q.c |    4 ++--
 3 files changed, 9 insertions(+), 7 deletions(-)

--- gregkh-2.6.orig/drivers/usb/core/hcd.c	2005-07-29 11:30:03.000000000 -0700
+++ gregkh-2.6/drivers/usb/core/hcd.c	2005-07-29 11:36:34.000000000 -0700
@@ -939,9 +939,9 @@
 	case USB_SPEED_HIGH:	/* ISOC or INTR */
 		// FIXME adjust for input vs output
 		if (isoc)
-			tmp = HS_USECS (bytecount);
+			tmp = HS_NSECS_ISO (bytecount);
 		else
-			tmp = HS_USECS_ISO (bytecount);
+			tmp = HS_NSECS (bytecount);
 		return tmp;
 	default:
 		pr_debug ("%s: bogus device speed!\n", usbcore_name);
--- gregkh-2.6.orig/drivers/usb/core/hcd.h	2005-07-29 11:29:47.000000000 -0700
+++ gregkh-2.6/drivers/usb/core/hcd.h	2005-07-29 11:36:34.000000000 -0700
@@ -334,17 +334,19 @@
 extern int usb_check_bandwidth (struct usb_device *dev, struct urb *urb);
 
 /*
- * Ceiling microseconds (typical) for that many bytes at high speed
+ * Ceiling [nano/micro]seconds (typical) for that many bytes at high speed
  * ISO is a bit less, no ACK ... from USB 2.0 spec, 5.11.3 (and needed
  * to preallocate bandwidth)
  */
 #define USB2_HOST_DELAY	5	/* nsec, guess */
-#define HS_USECS(bytes) NS_TO_US ( ((55 * 8 * 2083)/1000) \
+#define HS_NSECS(bytes) ( ((55 * 8 * 2083)/1000) \
 	+ ((2083UL * (3167 + BitTime (bytes)))/1000) \
 	+ USB2_HOST_DELAY)
-#define HS_USECS_ISO(bytes) NS_TO_US ( ((38 * 8 * 2083)/1000) \
+#define HS_NSECS_ISO(bytes) ( ((38 * 8 * 2083)/1000) \
 	+ ((2083UL * (3167 + BitTime (bytes)))/1000) \
 	+ USB2_HOST_DELAY)
+#define HS_USECS(bytes) NS_TO_US (HS_NSECS(bytes))
+#define HS_USECS_ISO(bytes) NS_TO_US (HS_NSECS_ISO(bytes))
 
 extern long usb_calc_bus_time (int speed, int is_input,
 			int isoc, int bytecount);
--- gregkh-2.6.orig/drivers/usb/host/ehci-q.c	2005-07-29 11:29:47.000000000 -0700
+++ gregkh-2.6/drivers/usb/host/ehci-q.c	2005-07-29 11:36:34.000000000 -0700
@@ -657,8 +657,8 @@
 	 * For control/bulk requests, the HC or TT handles these.
 	 */
 	if (type == PIPE_INTERRUPT) {
-		qh->usecs = usb_calc_bus_time (USB_SPEED_HIGH, is_input, 0,
-				hb_mult (maxp) * max_packet (maxp));
+		qh->usecs = NS_TO_US (usb_calc_bus_time (USB_SPEED_HIGH, is_input, 0,
+				hb_mult (maxp) * max_packet (maxp)));
 		qh->start = NO_FRAME;
 
 		if (urb->dev->speed == USB_SPEED_HIGH) {

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

* [patch 29/29] USB: hidinput_hid_event() oops fix
  2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
                     ` (27 preceding siblings ...)
  2005-07-29 19:18   ` [patch 28/29] USB: fix in usb_calc_bus_time Greg KH
@ 2005-07-29 19:18   ` Greg KH
  28 siblings, 0 replies; 31+ messages in thread
From: Greg KH @ 2005-07-29 19:18 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, zaitcev

[-- Attachment #1: usb-hidinput_hid_event-oops-fix.patch --]
[-- Type: text/plain, Size: 953 bytes --]

From: Pete Zaitcev <zaitcev@redhat.com>

It seems that I see a bug in hidinput_hid_event.  The check for NULL can never
work, becaue &hidinput->input is nonzero at all times.

Cc: <vojtech@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/input/hid-input.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

--- gregkh-2.6.orig/drivers/usb/input/hid-input.c	2005-07-29 11:29:47.000000000 -0700
+++ gregkh-2.6/drivers/usb/input/hid-input.c	2005-07-29 11:36:35.000000000 -0700
@@ -397,11 +397,12 @@
 
 void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value, struct pt_regs *regs)
 {
-	struct input_dev *input = &field->hidinput->input;
+	struct input_dev *input;
 	int *quirks = &hid->quirks;
 
-	if (!input)
+	if (!field->hidinput)
 		return;
+	input = &field->hidinput->input;
 
 	input_regs(input, regs);
 

--

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2005-07-30  2:10 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20050729184950.014589000@press.kroah.org>
2005-07-29 19:12 ` [patch 00/29] fixes for 2.6.13-rc4 Greg KH
2005-07-29 19:13   ` [patch 02/29] sysfs: fix sysfs_chmod_file Greg KH
2005-07-29 19:14   ` [patch 01/29] stable_api_nonsense.txt fixes Greg KH
2005-07-29 19:14   ` [patch 03/29] sysfs: fix sysfs_setattr Greg KH
2005-07-29 19:14   ` [patch 04/29] DEBUG_FS must depend on SYSFS Greg KH
2005-07-29 19:14   ` [patch 05/29] Add the rules about the -stable kernel releases to the Documentation directory Greg KH
2005-07-29 19:14   ` [patch 06/29] I2C-MPC: Restore code removed Greg KH
2005-07-29 19:15   ` [patch 07/29] I2C: ds1337 - fix 12/24 hour mode bug Greg KH
2005-07-29 19:15   ` [patch 08/29] I2C: Missing space in split strings Greg KH
2005-07-29 19:15   ` [patch 09/29] I2C: use time_after in 3 chip drivers Greg KH
2005-07-29 19:15   ` [patch 10/29] I2C: missing new lines in i2c-core messages Greg KH
2005-07-29 19:15   ` [patch 11/29] I2C: 24RF08 corruption prevention (again) Greg KH
2005-07-29 19:15   ` [patch 12/29] w1: kconfig/Makefile fix Greg KH
2005-07-29 19:15   ` [patch 13/29] PCI: Hidden SMBus bridge on Toshiba Tecra M2 Greg KH
2005-07-29 19:16   ` [patch 14/29] PCI: Adjust PCI rom code to handle more broken ROMs Greg KH
2005-07-29 19:16   ` [patch 15/29] PCI: remove PCI_BRIDGE_CTL_VGA handling from setup-bus.c Greg KH
2005-07-29 19:16   ` [patch 16/29] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n -- bug? Greg KH
2005-07-29 19:16   ` [patch 17/29] USB: ftdi_sio: new microHAM and Evolution Robotics devices Greg KH
2005-07-29 19:16   ` [patch 18/29] USB: ftdi_sio: Update RTS and DTR simultaneously Greg KH
2005-07-29 19:16   ` [patch 19/29] USB: ftdi_sio: fix a couple of timeouts Greg KH
2005-07-29 19:16   ` [patch 20/29] USB: usbfs: Don't leak uninitialized data Greg KH
2005-07-29 19:17   ` [patch 21/29] USB: drivers/usb/net/: remove two unused multicast_filter_limit variables Greg KH
2005-07-29 19:17   ` [patch 22/29] USB: Usbcore: Don't try to delete unregistered interfaces Greg KH
2005-07-29 19:17   ` [patch 23/29] USB: ldusb fixes Greg KH
2005-07-29 19:17   ` [patch 24/29] USB: Patch for KYOCERA AH-K3001V support Greg KH
2005-07-29 19:17   ` [patch 25/29] USB: drivers/net/usb/zd1201.c: Gigabyte GN-WLBZ201 dongle usbid Greg KH
2005-07-29 19:18   ` [patch 26/29] USB: add S3C24XX USB Host driver support Greg KH
2005-07-29 19:18   ` [patch 27/29] USB: fix Bug in usb-skeleton.c Greg KH
2005-07-29 19:18   ` [patch 28/29] USB: fix in usb_calc_bus_time Greg KH
2005-07-29 19:18   ` [patch 29/29] USB: hidinput_hid_event() oops fix Greg KH
2005-07-29 19:13 ` [patch 01/29] stable_api_nonsense.txt fixes Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox