linux-2.6
16 years agokobject: should use kobject_put() in kset-example
Li Zefan [Fri, 13 Jun 2008 03:09:16 +0000 (11:09 +0800)] 
kobject: should use kobject_put() in kset-example

We should call kobject_put() instead of kfree() if kobject_init_and_add()
returns an error, shouldn't we? Don't set up a bad example ;)

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: reorder kobject to save space on 64 bit builds
Richard Kennedy [Mon, 2 Jun 2008 10:07:25 +0000 (11:07 +0100)] 
kobject: reorder kobject to save space on 64 bit builds

reorder kobject to save space on 64 bit builds.
shrinks from 72 to 64 bytes & moves allocated kobject to a smaller
slab.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUIO: minor style and comment fixes
Uwe Kleine-König [Tue, 10 Jun 2008 07:14:48 +0000 (09:14 +0200)] 
UIO: minor style and comment fixes

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
16 years agoUIO: add generic UIO platform driver
Uwe Kleine-König [Sat, 31 May 2008 09:37:27 +0000 (11:37 +0200)] 
UIO: add generic UIO platform driver

This patch adds a generic UIO platform driver. It eliminates the need for a
dedicated kernel module for simple platform devices. Users only need to
implement their irq handler in platform code and fill a struct uio_info
there. This helps avoiding code duplication as UIO platform drivers often
share a lot of common code.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUIO: Add write function to allow irq masking
Hans J. Koch [Fri, 23 May 2008 11:50:14 +0000 (13:50 +0200)] 
UIO: Add write function to allow irq masking

Sometimes it is necessary to enable/disable the interrupt of a UIO device
from the userspace part of the driver. With this patch, the UIO kernel driver
can implement an "irqcontrol()" function that does this. Userspace can write
an s32 value to /dev/uioX (usually 0 or 1 to turn the irq off or on). The
UIO core will then call the driver's irqcontrol function.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Acked-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Acked-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUIO: fix UIO Kconfig dependencies
Uwe Kleine-König [Sat, 31 May 2008 09:37:27 +0000 (11:37 +0200)] 
UIO: fix UIO Kconfig dependencies

ae210f188614bb3d1ee3f19c64e28e3cdd44877c introduced a big "if UIO"/"endif"
where all uio drivers are defined.  So know there is no need for them to
depend explicitly on UIO.

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agopnp: add acpi:* modalias entries
Kay Sievers [Wed, 28 May 2008 21:06:47 +0000 (23:06 +0200)] 
pnp: add acpi:* modalias entries

Along with the non-modalias conformant "pnp:*" aliases, we add "acpi:*"
entries to PNP drivers, to allow module autoloading by ACPI PNP device
entries, which export proper modalias information, without any specific
userspace modprobe mangling.

Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodriver core: fix a lot of printk usages of bus_id
Greg Kroah-Hartman [Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)] 
driver core: fix a lot of printk usages of bus_id

We have the dev_printk() variants for this kind of thing, use them
instead of directly trying to access the bus_id field of struct device.

This is done in order to remove bus_id entirely.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodriver core: remove DEVICE_ID_SIZE define
Greg Kroah-Hartman [Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)] 
driver core: remove DEVICE_ID_SIZE define

There is no such thing as a "device id size" in the driver core, so
remove the define and fix up any users of this odd define in the rest of
the kernel.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodriver core: remove DEVICE_NAME_SIZE define
Kay Sievers [Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)] 
driver core: remove DEVICE_NAME_SIZE define

There is no such thing as a "device name size" in the driver core, so
remove the define and fix up any users of this odd define in the rest of
the kernel.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodriver core: remove KOBJ_NAME_LEN define
Kay Sievers [Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)] 
driver core: remove KOBJ_NAME_LEN define

Kobjects do not have a limit in name size since a while, so stop
pretending that they do.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoclass: change internal semaphore to a mutex
Dave Young [Wed, 28 May 2008 16:28:39 +0000 (09:28 -0700)] 
class: change internal semaphore to a mutex

Now that the lockdep infrastructure in the class core is in place, we
should be able to properly change the internal class semaphore to be a
mutex.

David wrote the original patch, and Greg fixed it up to apply properly
due to all of the recent changes in this area.

From: Dave Young <hidave.darkstar@gmail.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoclass: add lockdep infrastructure
Matthew Wilcox [Wed, 28 May 2008 16:28:39 +0000 (09:28 -0700)] 
class: add lockdep infrastructure

This adds the infrastructure to properly handle lockdep issues when the
internal class semaphore is changed to a mutex.

Matthew wrote the original patch, and Greg fixed it up to work properly
with the class_create() function.

From: Matthew Wilcox <matthew@wil.cx>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Dave Young <hidave.darkstar@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoclass: fix docbook comments for class_private structure
Greg Kroah-Hartman [Wed, 28 May 2008 16:28:39 +0000 (09:28 -0700)] 
class: fix docbook comments for class_private structure

Removes a field that has been deleted, and adds a description fo the
class_dirs field which was previously undocumented.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoclass: rename "sem" to "class_sem" in internal class structure
Greg Kroah-Hartman [Wed, 28 May 2008 16:28:39 +0000 (09:28 -0700)] 
class: rename "sem" to "class_sem" in internal class structure

This renames the struct class "sem" field to be "class_sem" to make
things easier when struct bus_type and struct class merge in the future.
It also makes grepping for fields easier as well.

Based on an idea from Kay.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoclass: rename "subsys" to "class_subsys" in internal class structure
Greg Kroah-Hartman [Wed, 28 May 2008 16:28:39 +0000 (09:28 -0700)] 
class: rename "subsys" to "class_subsys" in internal class structure

This renames the struct class "subsys" field to be "class_subsys" to
make things easier when struct bus_type and struct class merge in the
future.  It also makes grepping for fields easier as well.

Based on an idea from Kay.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoclass: rename "interfaces" to "class_interfaces" in internal class structure
Greg Kroah-Hartman [Wed, 28 May 2008 16:28:39 +0000 (09:28 -0700)] 
class: rename "interfaces" to "class_interfaces" in internal class structure

This renames the struct class "interfaces" field to be
"class_interfaces" to make things easier when struct bus_type and struct
class merge in the future.  It also makes grepping for fields easier as
well.

Based on an idea from Kay.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoclass: rename "devices" to "class_devices" in internal class structure
Greg Kroah-Hartman [Wed, 28 May 2008 16:28:39 +0000 (09:28 -0700)] 
class: rename "devices" to "class_devices" in internal class structure

This renames the struct class "devices" field to be "class_devices" to
make things easier when struct bus_type and struct class merge in the
future.  It also makes grepping for fields easier as well.

Based on an idea from Kay.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoclass: move driver core specific parts to a private structure
Greg Kroah-Hartman [Tue, 22 Jan 2008 23:17:41 +0000 (18:17 -0500)] 
class: move driver core specific parts to a private structure

This moves the portions of struct class that are dynamic (kobject and
lock and lists) out of the main structure and into a dynamic, private,
structure.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agobluetooth: remove improper bluetooth class symlinks.
Greg Kroah-Hartman [Tue, 27 May 2008 18:50:16 +0000 (11:50 -0700)] 
bluetooth: remove improper bluetooth class symlinks.

Don't create symlinks in a class to a device that is not owned by the
class.  If the bluetooth subsystem really wants to point to all of the
devices it controls, it needs to create real devices, not fake symlinks.

Cc: Maxim Krasnyansky <maxk@qualcomm.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoinfiniband: make cm_device use a struct device and not a kobject.
Greg Kroah-Hartman [Tue, 27 May 2008 07:17:53 +0000 (10:17 +0300)] 
infiniband: make cm_device use a struct device and not a kobject.

This object really should be a struct device, or at least contain a
pointer to a struct device, as it is trying to create a separate device
tree outside of the main device tree.  This patch fixes this problem.

It is needed for the class core rework that is being done in the driver
core.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoinfiniband: rename "device" to "ib_device" in cm_device
Greg Kroah-Hartman [Tue, 27 May 2008 07:17:53 +0000 (10:17 +0300)] 
infiniband: rename "device" to "ib_device" in cm_device

This pointer really is a struct ib_device, not a struct device, so name
it properly to help prevent confusion.

This makes the followon patch in this series much smaller and easier to
understand as well.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoblock: make /proc/partitions and /proc/diskstats use class_find_device()
Greg Kroah-Hartman [Thu, 22 May 2008 21:21:08 +0000 (17:21 -0400)] 
block: make /proc/partitions and /proc/diskstats use class_find_device()

Use the proper class iterator function instead of mucking around in the
internals of the class structures.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoblock: move header for /proc/partitions to seq_start
Greg Kroah-Hartman [Thu, 22 May 2008 21:21:08 +0000 (17:21 -0400)] 
block: move header for /proc/partitions to seq_start

The seq_start call is the better place for the header for the file, that
way we don't have to be mucking in the class structure to try to figure
out if this is the first partition or not.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoblock: make proc files seq_start use the class_find_device()
Greg Kroah-Hartman [Thu, 22 May 2008 21:21:08 +0000 (17:21 -0400)] 
block: make proc files seq_start use the class_find_device()

Use the proper class iterator function instead of mucking around in the
internals of the class structures.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoblock: make /proc/diskstats only build if CONFIG_PROC_FS is enabled
Randy Dunlap [Fri, 23 May 2008 16:44:11 +0000 (09:44 -0700)] 
block: make /proc/diskstats only build if CONFIG_PROC_FS is enabled

These functions are only needed if CONFIG_PROC_FS is enabled, so save
the space when it is not.

This also makes it easier for a patch later in this series to work
properly if CONFIG_PROC_FS is not enabled.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoblock: make blk_lookup_devt use the class iterator function
Greg Kroah-Hartman [Thu, 22 May 2008 21:21:08 +0000 (17:21 -0400)] 
block: make blk_lookup_devt use the class iterator function

Use the proper class iterator function instead of mucking around in the
internals of the class structures.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoblock: make printk_partition use the class iterator function
Greg Kroah-Hartman [Thu, 22 May 2008 21:21:08 +0000 (17:21 -0400)] 
block: make printk_partition use the class iterator function

Use the proper class iterator function instead of mucking around in the
internals of the class structures.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoblock: fix compiler warning in genhd.c
Greg Kroah-Hartman [Thu, 22 May 2008 21:21:08 +0000 (17:21 -0400)] 
block: fix compiler warning in genhd.c

Warn if something really bad happens if we can't create this link.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoDriver Core: add ability for class_find_device to start in middle of list
Greg Kroah-Hartman [Thu, 22 May 2008 21:21:08 +0000 (17:21 -0400)] 
Driver Core: add ability for class_find_device to start in middle of list

This mirrors the functionality that driver_find_device has as well.

We add a start variable, and all callers of the function are fixed up at
the same time.

The block layer will be using this new functionality in a follow-on
patch.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoDriver Core: add ability for class_for_each_device to start in middle of list
Greg Kroah-Hartman [Thu, 22 May 2008 21:21:08 +0000 (17:21 -0400)] 
Driver Core: add ability for class_for_each_device to start in middle of list

This mirrors the functionality that driver_for_each_device has as well.

We add a start variable, and all callers of the function are fixed up at
the same time.

The block layer will be using this new functionality in a follow-on
patch.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: convert device_create_drvdata to device_create
Greg Kroah-Hartman [Tue, 22 Jul 2008 03:03:34 +0000 (20:03 -0700)] 
device create: convert device_create_drvdata to device_create

Now that device_create() has been audited, rename things back to the
original call to be sane.

Keep the device_create_drvdata macro around to make merges easier.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodriver core: remove device_create()
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
driver core: remove device_create()

There are no more users of this, and it is racy.  Use
device_create_drvdata() or device_create_vargs() instead.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: x86: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: x86: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: usb: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: usb: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: spi: convert device_create to device_create_drvdata
David Brownell [Fri, 6 Jun 2008 20:48:07 +0000 (15:48 -0500)] 
device create: spi: convert device_create to device_create_drvdata

Switch over to use the shiny new device_create_drvdata() call
instead of the original device_create() calls, so this continues
to work after device_create() is  removed.

Note that this driver never had the race which motivated removing
the original call; it locked correctly.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: sound: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: sound: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: scsi: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: scsi: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: s390: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: s390: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: net: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: net: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: mtd: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: mtd: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: misc: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: misc: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: mips: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: mips: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: macintosh: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: macintosh: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: isdn: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: isdn: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: infiniband: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: infiniband: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Roland Dreier <rolandd@cisco.com>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hal Rosenstock <hal.rosenstock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: ieee1394: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: ieee1394: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Ben Collins <ben.collins@ubuntu.com>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: ide: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: ide: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: i2c: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: i2c: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: hwmon: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: hwmon: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: hid: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: hid: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: framebuffer: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: framebuffer: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: dvb: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: dvb: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: dca: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: dca: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: coda: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: coda: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: char: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: char: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodevice create: block: convert device_create to device_create_drvdata
Greg Kroah-Hartman [Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)] 
device create: block: convert device_create to device_create_drvdata

device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoFirmware: fix typo in example code
Greg Kroah-Hartman [Wed, 21 May 2008 22:21:38 +0000 (18:21 -0400)] 
Firmware: fix typo in example code

It's not like this stuff even builds right now, but this will make
Randy's scripts happy :)

Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agodebugfs: Add a reference to the debugfs API documentation.
Robert P. J. Day [Mon, 19 May 2008 22:06:00 +0000 (00:06 +0200)] 
debugfs: Add a reference to the debugfs API documentation.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agokobject: replace '/' with '!' in name
Kay Sievers [Tue, 6 May 2008 20:24:04 +0000 (22:24 +0200)] 
kobject: replace '/' with '!' in name

Some (block) devices have a '/' in the name, and need special
handling. Let's have that rule to the core, so we can remove it
from the block class.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agosysfs: add /sys/dev/{char,block} to lookup sysfs path by major:minor
Dan Williams [Mon, 21 Apr 2008 17:51:07 +0000 (10:51 -0700)] 
sysfs: add /sys/dev/{char,block} to lookup sysfs path by major:minor

Why?:
There are occasions where userspace would like to access sysfs
attributes for a device but it may not know how sysfs has named the
device or the path.  For example what is the sysfs path for
/dev/disk/by-id/ata-ST3160827AS_5MT004CK?  With this change a call to
stat(2) returns the major:minor then userspace can see that
/sys/dev/block/8:32 links to /sys/block/sdc.

What are the alternatives?:
1/ Add an ioctl to return the path: Doable, but sysfs is meant to reduce
   the need to proliferate ioctl interfaces into the kernel, so this
   seems counter productive.

2/ Use udev to create these symlinks: Also doable, but it adds a
   udev dependency to utilities that might be running in a limited
   environment like an initramfs.

3/ Do a full-tree search of sysfs.

[kay.sievers@vrfy.org: fix duplicate registrations]
[kay.sievers@vrfy.org: cleanup suggestions]

Cc: Neil Brown <neilb@suse.de>
Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Reviewed-by: SL Baur <steve@xemacs.org>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: Mark Lord <lkml@rtr.ca>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agotcp: Fix bitmask test in tcp_syn_options()
David S. Miller [Tue, 22 Jul 2008 01:45:34 +0000 (18:45 -0700)] 
tcp: Fix bitmask test in tcp_syn_options()

As reported by Alexey Dobriyan:

  CHECK   net/ipv4/tcp_output.c
net/ipv4/tcp_output.c:475:7: warning: dubious: !x & y

And sparse is damn right!

if (unlikely(!OPTION_TS & opts->options))
    ^^^
size += TCPOLEN_SACKPERM_ALIGNED;

OPTION_TS is (1 << 1), so condition will never trigger.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agopowerpc: Fix build bug with binutils < 2.18 and GCC < 4.2
Segher Boessenkool [Mon, 21 Jul 2008 23:03:45 +0000 (09:03 +1000)] 
powerpc: Fix build bug with binutils < 2.18 and GCC < 4.2

binutils < 2.18 has a bug that makes it misbehave when taking an
ELF file with all segments at load address 0 as input.  This
happens when running "strip" on vmlinux, because of the AT() magic
in this linker script.  People using GCC >= 4.2 won't run into
this problem, because the "build-id" support will put some data
into the "notes" segment (at a non-zero load address).

To work around this, we force some data into both the "dummy"
segment and the kernel segment, so the dummy segment will get a
non-zero load address.  It's not enough to always create the
"notes" segment, since if nothing gets assigned to it, its load
address will be zero.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Tested-By: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/eeh: Don't panic when EEH_MAX_FAILS is exceeded
Mike Mason [Mon, 21 Jul 2008 16:40:17 +0000 (02:40 +1000)] 
powerpc/eeh: Don't panic when EEH_MAX_FAILS is exceeded

This patch changes the EEH_MAX_FAILS action from panic to printing an
error message.  Panicking under under this condition is too harsh.
Although performance will be affected and the device may not recover,
the system is still running, which at the very least should allow for a
more graceful shutdown. The patch also removes the msleep() within a
spinlock, which can lead to a deadlock and is not recommended.

Signed-off-by: Mike Mason <mmlnx@us.ibm.com>
Acked-by: Linas Vepstas <linasvepstas@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agofbdev: Teaches offb about palette on radeon r5xx/r6xx
Benjamin Herrenschmidt [Thu, 17 Jul 2008 05:05:22 +0000 (15:05 +1000)] 
fbdev: Teaches offb about palette on radeon r5xx/r6xx

The offb driver already has a collection of hacks to be able to set
the palette on various chips. This adds support for r5xx/r6xx radeons.

This is needed as offb is the only console solution on these currently
and the firmware in some cases sets a really bad color palette. This
fixes using some Radeon X16xx on the Powerstation for example.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/cell/edac: Log a syndrome code in case of correctable error
Maxim Shchetynin [Tue, 15 Jul 2008 19:51:40 +0000 (05:51 +1000)] 
powerpc/cell/edac: Log a syndrome code in case of correctable error

If correctable error occurs the syndrome code was logged as 0. This patch
lets EDAC to log a correct syndrome code to make problem investigation
easier.

Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/cell: Add DMA_ATTR_WEAK_ORDERING dma attribute and use in Cell IOMMU code
Mark Nelson [Fri, 18 Jul 2008 13:03:34 +0000 (23:03 +1000)] 
powerpc/cell: Add DMA_ATTR_WEAK_ORDERING dma attribute and use in Cell IOMMU code

Introduce a new dma attriblue DMA_ATTR_WEAK_ORDERING to use weak ordering
on DMA mappings in the Cell processor. Add the code to the Cell's IOMMU
implementation to use this code.

Dynamic mappings can be weakly or strongly ordered on an individual basis
but the fixed mapping has to be either completely strong or completely weak.
This is currently decided by a kernel boot option (pass iommu_fixed=weak
for a weakly ordered fixed linear mapping, strongly ordered is the default).

Signed-off-by: Mark Nelson <markn@au1.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc: Indicate which oprofile counters to use while in compat mode
Torez Smith [Thu, 17 Jul 2008 20:42:07 +0000 (06:42 +1000)] 
powerpc: Indicate which oprofile counters to use while in compat mode

While running on a system with new hardware and a kernel where the
cpu_specs[] table does not recognize the new hardware, the identify_cpu()
routine will select the default case as it searches through cpu_specs[]
in an attempt to match the real PVR. Once the default case is selected,
non of the oprofile counters and/or fields have been set up or defined.

When identify_cpu() is called once more with the logical PVR, some of
the cpu specific fields are replaced with the exception of the oprofile
related ones. However, in the case where we have actually taken the
default case while searching for the real PVR, we need to tell
oprofile that we are now running in compatibility mode so it can pick up
the correct counters. We do this by setting the oprofile_cpu_type field
to be that taken from the cpu_specs[] for the cpu we are now emulating.

This change will detect that we are now altering the real PVR and determine
if we also need to update the oprofile_cpu_type field.

Signed-off-by: Torez Smith <lnxtorez@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/boot: Change spaces to tabs
Adrian Bunk [Thu, 17 Jul 2008 18:18:54 +0000 (04:18 +1000)] 
powerpc/boot: Change spaces to tabs

For C code spaces versus tabs is just a religious issue,
but for Makefiles it actually matters.

This patch fixes he following errors:
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/powerpc/boot/Makefile:166: *** missing separator.  Stop.
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/powerpc/boot/Makefile:171: *** missing separator.  Stop.

Since this was inside an ifdef DTC_GENPARSER it was not a problem unless
someone wanted to regenerate the shipped generated files.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc: Remove duplicate 6xx option in Kconfig
Adrian Bunk [Thu, 17 Jul 2008 18:18:28 +0000 (04:18 +1000)] 
powerpc: Remove duplicate 6xx option in Kconfig

The real option is above in the same Kconfig file.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc: Use PPC_LONG and PPC_LONG_ALIGN in lib/string.S
Michael Ellerman [Thu, 17 Jul 2008 07:17:52 +0000 (17:17 +1000)] 
powerpc: Use PPC_LONG and PPC_LONG_ALIGN in lib/string.S

Replace ifdef clutter with the PPC_LONG and PPC_LONG_ALIGN macros
for readability.

No change to the generated code.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc: Use PPC_LONG_ALIGN in uaccess.h
Michael Ellerman [Thu, 17 Jul 2008 07:17:52 +0000 (17:17 +1000)] 
powerpc: Use PPC_LONG_ALIGN in uaccess.h

Use the new PPC_LONG_ALIGN macro instead of passing an argument
to the asm for consistency.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc: Add a #define for aligning to a long-sized boundary
Michael Ellerman [Thu, 17 Jul 2008 07:17:51 +0000 (17:17 +1000)] 
powerpc: Add a #define for aligning to a long-sized boundary

Add a #define for aligning to a long-sized boundary. It would be nice
to use sizeof(long) for this, but that requires generating the value
with asm-offsets.c, and asm-offsets.c includes asm-compat.h and we
descend into some sort of recursive include hell.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc: Fix OF parsing of 64 bits PCI addresses
Benjamin Herrenschmidt [Thu, 17 Jul 2008 05:53:31 +0000 (15:53 +1000)] 
powerpc: Fix OF parsing of 64 bits PCI addresses

The OF parsing code for PCI addresses isn't always treating properly
the address space indication 0b11 (ie. 0x3) as meaning 64 bits
memory space.

This means that it fails to parse addresses for PCI BARs that have
this encoding set by the firmware, which happens on some SLOF
versions and breaks offb palette handling on Powerstation.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
16 years agopowerpc: Use WARN_ON(1) instead of __WARN()
Michael Ellerman [Thu, 17 Jul 2008 04:46:00 +0000 (14:46 +1000)] 
powerpc: Use WARN_ON(1) instead of __WARN()

__WARN() is not defined for all configs, use WARN_ON(1) instead.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc: Fix support for latencytop
Arnd Bergmann [Wed, 16 Jul 2008 22:12:25 +0000 (08:12 +1000)] 
powerpc: Fix support for latencytop

We need to pass the kernel stack pointer instead of the user space
stack pointer in save_stack_trace_tsk().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/ps3: Update ps3_defconfig
Geoff Levand [Wed, 16 Jul 2008 21:22:26 +0000 (07:22 +1000)] 
powerpc/ps3: Update ps3_defconfig

Update ps3_defconfig.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/ps3: Add a sub-match id to ps3_system_bus
Masakazu Mokuno [Wed, 16 Jul 2008 21:22:19 +0000 (07:22 +1000)] 
powerpc/ps3: Add a sub-match id to ps3_system_bus

Add sub match id for ps3 system bus so that two different system bus
devices can be connected to a shared device.

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc: Add a 6xx defconfig
Kumar Gala [Wed, 16 Jul 2008 13:43:06 +0000 (23:43 +1000)] 
powerpc: Add a 6xx defconfig

This is a defconfig from Dave Jones and should be similar (if not
identical) to the fedora ppc32 defconfig.  The intent is to cover all
cache coherent 6xx based chips and platforms as reasonable.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/dma: Use the struct dma_attrs in iommu code
Mark Nelson [Tue, 15 Jul 2008 19:51:47 +0000 (05:51 +1000)] 
powerpc/dma: Use the struct dma_attrs in iommu code

Update iommu_alloc() to take the struct dma_attrs and pass them on to
tce_build(). This change propagates down to the tce_build functions of
all the platforms.

Signed-off-by: Mark Nelson <markn@au1.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/cell: Add support for power button of future IBM cell blades
Christian Krafft [Tue, 15 Jul 2008 19:51:45 +0000 (05:51 +1000)] 
powerpc/cell: Add support for power button of future IBM cell blades

This patch adds support for the power button on future IBM cell blades.
It actually doesn't shut down the machine. Instead it exposes an
input device /dev/input/event0 to userspace which sends KEY_POWER
if power button has been pressed.
haldaemon actually recognizes the button, so a plattform independent acpid
replacement should handle it correctly.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/cell: Cleanup sysreset_hack for IBM cell blades
Christian Krafft [Tue, 15 Jul 2008 19:51:44 +0000 (05:51 +1000)] 
powerpc/cell: Cleanup sysreset_hack for IBM cell blades

This patch adds a config option for the sysreset_hack used for
IBM Cell blades. The code is moves from pervasive.c into ras.c and
gets it's own init method.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/cell/cpufreq: Add spu aware cpufreq governor
Christian Krafft [Tue, 15 Jul 2008 19:51:43 +0000 (05:51 +1000)] 
powerpc/cell/cpufreq: Add spu aware cpufreq governor

This patch adds a cpufreq governor that takes the number of running spus
into account. It's very similar to the ondemand governor, but not as complex.
Instead of hacking spu load into the ondemand governor it might be easier to
have cpufreq accepting multiple governors per cpu in future.
Don't know if this is the right way, but it would keep the governors simple.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/axonram: Enable partitioning of the Axons DDR2 DIMMs
Maxim Shchetynin [Tue, 15 Jul 2008 19:51:42 +0000 (05:51 +1000)] 
powerpc/axonram: Enable partitioning of the Axons DDR2 DIMMs

DDR2 memory DIMMs on the Axon could be accessed only as one partition
when using file system drivers which are using the direct_access() method.
This patch enables for such file system drivers to access Axon's DDR2 memory
even if it is splitted in several partitions.

Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agopowerpc/axonram: Use only one block device major number
Maxim Shchetynin [Tue, 15 Jul 2008 19:51:41 +0000 (05:51 +1000)] 
powerpc/axonram: Use only one block device major number

Axonram module registers one block device for each DDR2 DIMM found
on a system. This means that each DDR2 DIMM becomes its own block device
major number. This patch lets axonram module to register the only one
block device for all DDR2 DIMMs which also spares kernel resources.

Signed-off-by: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agoof_gpio: Should use new <linux/gpio.h> header
Wolfgang Grandegger [Fri, 30 May 2008 12:51:33 +0000 (22:51 +1000)] 
of_gpio: Should use new <linux/gpio.h> header

Since commit 7560fa60fcdcdb0da662f6a9fad9064b554ef46c (gpio: <linux/gpio.h>
and "no GPIO support here" stubs) drivers can use GPIOs if they're available,
but don't require them.

This patch actually enables this feature.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
16 years agoide: merge <asm-sparc/ide_64.h> with <asm-sparc/ide_32.h>
Bartlomiej Zolnierkiewicz [Mon, 21 Jul 2008 23:55:11 +0000 (16:55 -0700)] 
ide: merge <asm-sparc/ide_64.h> with <asm-sparc/ide_32.h>

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoide: <asm-sparc/ide_64.h>: use __raw_{read,write}w()
Bartlomiej Zolnierkiewicz [Mon, 21 Jul 2008 23:51:43 +0000 (16:51 -0700)] 
ide: <asm-sparc/ide_64.h>: use __raw_{read,write}w()

Use __raw_{read,write}w() in __ide_{in,out}sw()
and remove no longer needed {in,out}w_be().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoide: <asm-sparc/ide_32.h>: use __raw_{read,write}w()
Bartlomiej Zolnierkiewicz [Mon, 21 Jul 2008 23:50:56 +0000 (16:50 -0700)] 
ide: <asm-sparc/ide_32.h>: use __raw_{read,write}w()

Use __raw_{read,write}w() in __ide_{in,out}sw().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoide: <asm-sparc/ide_64.h>: use %r0 for outw_be()
Bartlomiej Zolnierkiewicz [Mon, 21 Jul 2008 23:49:34 +0000 (16:49 -0700)] 
ide: <asm-sparc/ide_64.h>: use %r0 for outw_be()

Use %r0 for outw_be() to make it match __raw_writew().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Mon, 21 Jul 2008 22:42:20 +0000 (15:42 -0700)] 
Merge git://git./linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (100 commits)
  usb-storage: revert DMA-alignment change for Wireless USB
  USB: use reset_resume when normal resume fails
  usb_gadget: composite cdc gadget fault handling
  usb gadget: minor USBCV fix for composite framework
  USB: Fix bug with byte order in isp116x-hcd.c fio write/read
  USB: fix double kfree in ipaq in error case
  USB: fix build error in cdc-acm for CONFIG_PM=n
  USB: remove board-specific UP2OCR configuration from pxa27x-udc
  USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
  USB: Fix pointer/int cast in USB devio code
  usb gadget: g_cdc dependso on NET
  USB: Au1xxx-usb: suspend/resume support.
  USB: Au1xxx-usb: clean up ohci/ehci bus glue sources.
  usbfs: don't store bad pointers in registration
  usbfs: fix race between open and unregister
  usbfs: simplify the lookup-by-minor routines
  usbfs: send disconnect signals when device is unregistered
  USB: Force unbinding of drivers lacking reset_resume or other methods
  USB: ohci-pnx4008: I2C cleanups and fixes
  USB: debug port converter does not accept more than 8 byte packets
  ...

16 years agousb-storage: revert DMA-alignment change for Wireless USB
Alan Stern [Mon, 30 Jun 2008 17:39:59 +0000 (13:39 -0400)] 
usb-storage: revert DMA-alignment change for Wireless USB

This patch (as1110) reverts an earlier patch meant to help with
Wireless USB host controllers.  These controllers can have bulk
maxpacket values larger than 512, which puts unusual constraints on
the sizes of scatter-gather list elements.  However it turns out that
the block layer does not provide the support we need to enforce these
constraints; merely changing the DMA alignment mask doesn't help.
Hence there's no reason to keep the original patch.  The Wireless USB
problem will have to be solved a different way.

In addition, there is a reason to get rid of the earlier patch.  By
dereferencing a pointer stored in the ep_in array of struct
usb_device, the current code risks an invalid memory access when it
runs concurrently with device removal.  The members of that array are
cleared before the driver's disconnect method is called, so it should
not try to use them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: use reset_resume when normal resume fails
Alan Stern [Mon, 30 Jun 2008 15:14:43 +0000 (11:14 -0400)] 
USB: use reset_resume when normal resume fails

This patch (as1109b) makes USB-Persist more resilient to errors.  With
the current code, if a normal resume fails, it's an unrecoverable
error.  With the patch, if a normal resume fails (and if the device is
enabled for USB-Persist) then a reset-resume is tried.

This fixes the problem reported in Bugzilla #10977.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb_gadget: composite cdc gadget fault handling
David Brownell [Tue, 1 Jul 2008 20:18:20 +0000 (13:18 -0700)] 
usb_gadget: composite cdc gadget fault handling

These two fixes ensure the new "CDC Composite Device" gadget
fails cleanly when it's loaded on hardware that can't support
this particular gadget driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agousb gadget: minor USBCV fix for composite framework
David Lopo [Tue, 1 Jul 2008 20:14:17 +0000 (13:14 -0700)] 
usb gadget: minor USBCV fix for composite framework

Fill in a reserved/unused device qualifier field to ensure that
the USBCV tests will always pass.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: Fix bug with byte order in isp116x-hcd.c fio write/read
Julien May [Fri, 27 Jun 2008 13:01:18 +0000 (15:01 +0200)] 
USB: Fix bug with byte order in isp116x-hcd.c fio write/read

URB payload data are transfered in wrong byte order on a big endinan
architecture (AVR32).

Signed-off-by: Julien May <mailinglist@miromico.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix double kfree in ipaq in error case
Oliver Neukum [Mon, 30 Jun 2008 12:33:57 +0000 (14:33 +0200)] 
USB: fix double kfree in ipaq in error case

in the error case the ipaq driver leaves a dangling pointer to already
freed memory that will be freed again.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: fix build error in cdc-acm for CONFIG_PM=n
Oliver Neukum [Tue, 1 Jul 2008 17:10:08 +0000 (19:10 +0200)] 
USB: fix build error in cdc-acm for CONFIG_PM=n

Here's the fix. cdc-wdm has the same problem. The fix is the same.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: remove board-specific UP2OCR configuration from pxa27x-udc
Daniel Ribeiro [Wed, 2 Jul 2008 02:09:27 +0000 (23:09 -0300)] 
USB: remove board-specific UP2OCR configuration from pxa27x-udc

Remove the board-specific UP2OCR configuration from the
pxa27x-udc driver.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years agoUSB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx
Srikanth Srinivasan [Wed, 2 Jul 2008 07:14:33 +0000 (02:14 -0500)] 
USB: EHCI: Reconciling USB register differences on MPC85xx vs MPC83xx

A couple of USB register initializations had to be changed on MPC85xx
platforms.  This is due to the internal SoC buses being different on
MPC83xx SoCs vs MPC85xx SoCs.

We currently handle this via an ifdef since 83xx and 85xx are mutually
exclusive kernel builds.

Signed-off-by: Srikanth Srinivasan <srikanth.srinivasan@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>