linux-2.6.git
16 years ago[SPARC64]: Fix cmsg length checks in Solaris emulation layer.
David S. Miller [Tue, 21 Jun 2005 22:39:22 +0000 (15:39 -0700)]
[SPARC64]: Fix cmsg length checks in Solaris emulation layer.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
Linus Torvalds [Mon, 20 Jun 2005 23:00:33 +0000 (16:00 -0700)]
Merge /pub/scm/linux/kernel/git/gregkh/driver-2.6

16 years agoMerge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 20 Jun 2005 22:58:58 +0000 (15:58 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

16 years ago[PATCH] PCI: fix show_modalias() function due to attribute change
Greg Kroah-Hartman [Sun, 19 Jun 2005 10:21:43 +0000 (12:21 +0200)]
[PATCH] PCI: fix show_modalias() function due to attribute change

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] USB: fix show_modalias() function due to attribute change
Greg Kroah-Hartman [Sun, 19 Jun 2005 10:21:43 +0000 (12:21 +0200)]
[PATCH] USB: fix show_modalias() function due to attribute change

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] SYSFS: fix PAGE_SIZE check
Jon Smirl [Tue, 14 Jun 2005 13:54:54 +0000 (09:54 -0400)]
[PATCH] SYSFS: fix PAGE_SIZE check

Without this change I can't set an attribute exactly PAGE_SIZE in
length. There is no need for zero termination because the interface
uses lengths.

From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver core: Don't "lose" devices on suspend on failure
Benjamin Herrenschmidt [Tue, 31 May 2005 07:08:49 +0000 (17:08 +1000)]
[PATCH] Driver core: Don't "lose" devices on suspend on failure

I think we need this patch or we might "lose" devices to the dpm_irq_off
list if a failure occurs during the suspend process.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sysfs-iattr: set inode attributes
Maneesh Soni [Tue, 31 May 2005 05:09:52 +0000 (10:39 +0530)]
[PATCH] sysfs-iattr: set inode attributes

o Following patch sets the attributes for newly allocated inodes for sysfs
  objects. If the object has non-default attributes, inode attributes are
  set as saved in sysfs_dirent->s_iattr, pointer to struct iattr.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sysfs-iattr: add sysfs_setattr
Maneesh Soni [Tue, 31 May 2005 05:09:14 +0000 (10:39 +0530)]
[PATCH] sysfs-iattr: add sysfs_setattr

o This adds ->i_op->setattr VFS method for sysfs inodes. The changed
  attribues are saved in the persistent sysfs_dirent structure as a pointer
  to struct iattr. The struct iattr is allocated only for those sysfs_dirent's
  for which default attributes are getting changed. Thanks to Jon Smirl for
  this suggestion.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sysfs-iattr: attach sysfs_dirent before new inode
Maneesh Soni [Tue, 31 May 2005 05:08:12 +0000 (10:38 +0530)]
[PATCH] sysfs-iattr: attach sysfs_dirent before new inode

o The following patch makes sure to attach sysfs_dirent to the dentry before
  allocation a new inode through sysfs_create(). This change is done as
  preparatory work for implementing ->i_op->setattr() functionality for
  sysfs objects.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] I2C: drivers/i2c/chips/adm1026.c: use dynamic sysfs callbacks
Yani Ioannou [Sun, 5 Jun 2005 08:51:46 +0000 (10:51 +0200)]
[PATCH] I2C: drivers/i2c/chips/adm1026.c: use dynamic sysfs callbacks

Finally (phew!) this patch demonstrates how to adapt the adm1026 to
take advantage of the new callbacks, and the i2c-sysfs.h defined
structure/macros. Most of the other sensor/hwmon drivers could be
updated in the same way. The odd few exceptions (bmcsensors for
example) however might be better off with their own custom attribute
structure.

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] I2C: add i2c sensor_device_attribute and macros
Yani Ioannou [Wed, 18 May 2005 02:59:05 +0000 (22:59 -0400)]
[PATCH] I2C: add i2c sensor_device_attribute and macros

This patch creates a new header with a potential standard i2c sensor
attribute type (which simply includes an int representing the sensor
number/index) and the associated macros, SENSOR_DEVICE_ATTR to define
a static attribute and to_sensor_dev_attr to get a
sensor_device_attribute reference from an embedded device_attribute
reference.

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
16 years ago[PATCH] Driver Core: include: update device attribute callbacks
Yani Ioannou [Tue, 17 May 2005 10:44:59 +0000 (06:44 -0400)]
[PATCH] Driver Core: include: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: drivers/usb/input/aiptek.c - drivers/zorro/zorro-sysfs.c: update...
Yani Ioannou [Tue, 17 May 2005 10:44:04 +0000 (06:44 -0400)]
[PATCH] Driver Core: drivers/usb/input/aiptek.c - drivers/zorro/zorro-sysfs.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc...
Yani Ioannou [Tue, 17 May 2005 10:43:37 +0000 (06:43 -0400)]
[PATCH] Driver Core: drivers/s390/net/qeth_sys.c - drivers/usb/gadget/pxa2xx_udc.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: drivers/char/raw3270.c - drivers/net/netiucv.c: update device...
Yani Ioannou [Tue, 17 May 2005 10:43:27 +0000 (06:43 -0400)]
[PATCH] Driver Core: drivers/char/raw3270.c - drivers/net/netiucv.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: drivers/i2c/chips/w83781d.c - drivers/s390/block/dcssblk.c:...
Yani Ioannou [Tue, 17 May 2005 10:42:58 +0000 (06:42 -0400)]
[PATCH] Driver Core: drivers/i2c/chips/w83781d.c - drivers/s390/block/dcssblk.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: drivers/i2c/chips/pc87360.c - w83627hf.c: update device attribut...
Yani Ioannou [Tue, 17 May 2005 10:42:25 +0000 (06:42 -0400)]
[PATCH] Driver Core: drivers/i2c/chips/pc87360.c - w83627hf.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: drivers/i2c/chips/lm77.c - max1619.c: update device attribute...
Yani Ioannou [Tue, 17 May 2005 10:42:03 +0000 (06:42 -0400)]
[PATCH] Driver Core: drivers/i2c/chips/lm77.c - max1619.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: drivers/i2c/chips/adm1031.c - lm75.c: update device attribute...
Yani Ioannou [Tue, 17 May 2005 10:41:35 +0000 (06:41 -0400)]
[PATCH] Driver Core: drivers/i2c/chips/adm1031.c - lm75.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attrib...
Yani Ioannou [Tue, 17 May 2005 10:41:12 +0000 (06:41 -0400)]
[PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: arch: update device attribute callbacks
Yani Ioannou [Tue, 17 May 2005 10:40:51 +0000 (06:40 -0400)]
[PATCH] Driver Core: arch: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver core: Documentation: update device attribute callbacks
Yani Ioannou [Tue, 17 May 2005 10:40:28 +0000 (06:40 -0400)]
[PATCH] Driver core: Documentation: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver core: change device_attribute callbacks
Yani Ioannou [Tue, 17 May 2005 10:39:34 +0000 (06:39 -0400)]
[PATCH] Driver core: change device_attribute callbacks

This patch adds the device_attribute paramerter to the
device_attribute store and show sysfs callback functions, and passes a
reference to the attribute when the callbacks are called.

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] driver core: fix error handling in bus_add_device
Hannes Reinecke [Wed, 18 May 2005 08:42:23 +0000 (10:42 +0200)]
[PATCH] driver core: fix error handling in bus_add_device

The error handling in bus_add_device() and device_attach() is simply
non-existing. This patch propagates any error from device_attach to
the upper layers to allow for a proper recovery.

From: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] libfs: add simple attribute files
Arnd Bergmann [Wed, 18 May 2005 12:40:59 +0000 (14:40 +0200)]
[PATCH] libfs: add simple attribute files

Based on the discussion about spufs attributes, this is my suggestion
for a more generic attribute file support that can be used by both
debugfs and spufs.

Simple attribute files behave similarly to sequential files from
a kernel programmers perspective in that a standard set of file
operations is provided and only an open operation needs to
be written that registers file specific get() and set() functions.

These operations are defined as

void foo_set(void *data, u64 val); and
u64 foo_get(void *data);

where data is the inode->u.generic_ip pointer of the file and the
operations just need to make send of that pointer. The infrastructure
makes sure this works correctly with concurrent access and partial
read calls.

A macro named DEFINE_SIMPLE_ATTRIBUTE is provided to further simplify
using the attributes.

This patch already contains the changes for debugfs to use attributes
for its internal file operations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: driver model doc update
David Brownell [Tue, 17 May 2005 00:19:55 +0000 (17:19 -0700)]
[PATCH] Driver Core: driver model doc update

This updates some driver data documentation:

 - removes references to some fields that haven't been there for a
   long time now, e.g. pre-kobject or even older;

 - giving more information about the probe() method;

 - adding an example of how platform_data is used

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver core: unregister_node() for hotplug use
Keiichiro Tokunaga [Sun, 8 May 2005 12:28:53 +0000 (21:28 +0900)]
[PATCH] Driver core: unregister_node() for hotplug use

This adds a generic function 'unregister_node()'.
It is used to remove objects of a node going away
for hotplug.  All the devices on the node must be
unregistered before calling this function.

Signed-off-by: Keiichiro Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -puN drivers/base/node.c~numa_hp_base drivers/base/node.c

16 years ago[PATCH] usbcore: Don't call device_release_driver recursively
Alan Stern [Fri, 6 May 2005 19:41:08 +0000 (15:41 -0400)]
[PATCH] usbcore: Don't call device_release_driver recursively

This patch fixes usb_driver_release_interface() to make it avoid calling
device_release_driver() recursively, i.e., when invoked from within the
disconnect routine for the same device.  The patch applies to your
"driver" tree.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] driver core: Fix races in driver_detach()
Alan Stern [Fri, 6 May 2005 19:38:33 +0000 (15:38 -0400)]
[PATCH] driver core: Fix races in driver_detach()

This patch is intended for your "driver" tree.  It fixes several subtle
races in driver_detach() and device_release_driver() in the driver-model
core.

The major change is to use klist_remove() rather than klist_del() when
taking a device off its driver's list.  There's no other way to guarantee
that the list pointers will be updated before some other driver binds to
the device.  For this to work driver_detach() can't use a klist iterator,
so the loop over the devices must be written out in full.  In addition the
patch protects against the possibility that, when a driver and a device
are unregistered at the same time, one may be unloaded from memory before
the other is finished using it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sn: fixes due to driver core changes
Patrick Mochel [Fri, 29 Apr 2005 00:11:52 +0000 (17:11 -0700)]
[PATCH] sn: fixes due to driver core changes

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] usb: klist_node_attached() fix
Patrick Mochel [Mon, 20 Jun 2005 22:15:28 +0000 (15:15 -0700)]
[PATCH] usb: klist_node_attached() fix

The original code looks like this:

        /* if interface was already added, bind now; else let
         * the future device_add() bind it, bypassing probe()
         */
        if (!list_empty (&dev->bus_list))
                device_bind_driver(dev);

IOW, it's checking to see if the device is attached to the bus or not
and binding the driver if it is. It's checking the device's bus list,
which will only appear empty when the device has been initialized, but
not added. It depends way too much on the driver model internals, but it
seems to be the only way to do the weird crap they want to do with
interfaces.

When I converted it to use klists, I accidentally inverted the logic,
which led to bad things happening. This patch returns the check to its
orginal value.

From: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: gregkh-2.6/drivers/usb/core/usb.c
===================================================================

16 years ago[PATCH] Fix typo in scdrv_init()
Jason Uhlenkott [Wed, 30 Mar 2005 21:19:54 +0000 (13:19 -0800)]
[PATCH] Fix typo in scdrv_init()

Fix a typo in scdrv_init() which was breaking the build for SGI sn2.

Signed-off-by: Jason Uhlenkott <jasonuhl@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Driver Core: fix bk-driver-core kills ppc64
Patrick Mochel [Wed, 6 Apr 2005 06:46:33 +0000 (23:46 -0700)]
[PATCH] Driver Core: fix bk-driver-core kills ppc64

There's no check to see if the device is already bound to a driver, which
could do bad things.  The first thing to go wrong is that it will try to match
a driver with a device already bound to one.  In some cases (it appears with
USB with drivers/usb/core/usb.c::usb_match_id()), some drivers will match a
device based on the class type, so it would be common (especially for HID
devices) to match a device that is already bound.

The fun comes when ->probe() is called, it fails, then
driver_probe_device() does this:

dev->driver = NULL;

Later on, that pointer could be be dereferenced without checking and cause
hell to break loose.

This problem could be nasty. It's very hardware dependent, since some
devices could have a different set of matching qualifiers than others.

Now, I don't quite see exactly where/how you were getting that crash.
You're dereferencing bad memory, but I'm not sure which pointer was bad
and where it came from, but it could have come from a couple of different
places.

The patch below will hopefully fix it all up for you. It's against
2.6.12-rc2-mm1, and does the following:

- Move logic to driver_probe_device() and comments uncommon returns:
  1 - If device is bound
  0 - If device not bound, and no error
  error - If there was an error.

- Move locking to caller of that function, since we want to lock a
  device for the entire time we're trying to bind it to a driver (to
  prevent against a driver being loaded at the same time).

- Update __device_attach() and __driver_attach() to do that locking.

- Check if device is already bound in __driver_attach()

- Update the converse device_release_driver() so it locks the device
  around all of the operations.

- Mark driver_probe_device() as static and remove export. It's an
  internal function, it should stay that way, and there are no other
  callers. If there is ever a need to export it, we can audit it as
  necessary.

Signed-off-by: Andrew Morton <akpm@osdl.org>
16 years ago[PATCH] Driver core: Fix up the driver and device iterators to be quieter
gregkh@suse.de [Thu, 31 Mar 2005 20:53:00 +0000 (12:53 -0800)]
[PATCH] Driver core: Fix up the driver and device iterators to be quieter

Also stops looping over the lists when a match is found.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de
16 years ago[PATCH] use device_for_each_child() to properly access child devices.
long [Tue, 29 Mar 2005 21:36:43 +0000 (13:36 -0800)]
[PATCH] use device_for_each_child() to properly access child devices.

On Friday, March 25, 2005 8:47 PM Greg KH wrote:
>Here's a fix for pci express.  For some reason I don't think they are
>using the driver model properly here, but I could be wrong...

Thanks for making the changes. However, changes in functions:
void pcie_port_device_remove(struct pci_dev *dev) and
static int remove_iter(struct device *dev, void *data)
are not correct. Please use the patch, which is based on kernel
2.6.12-rc1, below for a fix for these.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Use device_for_each_child() to unregister devices in nodemgr_remove_host_dev()
gregkh@suse.de [Fri, 25 Mar 2005 19:45:31 +0000 (11:45 -0800)]
[PATCH] Use device_for_each_child() to unregister devices in nodemgr_remove_host_dev()

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -Nru a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c

16 years ago[PATCH] USB: fix build warning in usb core as pointed out by Andrew.
gregkh@suse.de [Thu, 24 Mar 2005 08:44:28 +0000 (00:44 -0800)]
[PATCH] USB: fix build warning in usb core as pointed out by Andrew.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: gregkh-2.6/drivers/usb/core/usb.c
===================================================================

16 years ago[PATCH] driver core: change export symbol for driver_for_each_device()
gregkh@suse.de [Tue, 22 Mar 2005 20:17:13 +0000 (12:17 -0800)]
[PATCH] driver core: change export symbol for driver_for_each_device()

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: linux-2.6.12-rc2/drivers/base/driver.c
===================================================================

16 years ago[PATCH] Fix up bogus comment.
mochel@digitalimplant.org [Fri, 25 Mar 2005 04:08:04 +0000 (20:08 -0800)]
[PATCH] Fix up bogus comment.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -Nru a/drivers/base/driver.c b/drivers/base/driver.c

16 years ago[PATCH] Use a klist for device child lists.
mochel@digitalimplant.org [Fri, 25 Mar 2005 03:08:30 +0000 (19:08 -0800)]
[PATCH] Use a klist for device child lists.

- Use klist iterator in device_for_each_child(), making it safe to use for
  removing devices.
- Remove unused list_to_dev() function.
- Kills all usage of devices_subsys.rwsem.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] use device_for_each_child() to properly access child devices.
gregkh@suse.de [Fri, 25 Mar 2005 23:52:00 +0000 (15:52 -0800)]
[PATCH] use device_for_each_child() to properly access child devices.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Use device_for_each_child() to unregister devices in scsi_remove_target().
mochel@digitalimplant.org [Fri, 25 Mar 2005 03:03:59 +0000 (19:03 -0800)]
[PATCH] Use device_for_each_child() to unregister devices in scsi_remove_target().

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: gregkh-2.6/drivers/scsi/scsi_sysfs.c
===================================================================

16 years ago[PATCH] Don't reference NULL klist pointer in klist_remove().
mochel@digitalimplant.org [Fri, 25 Mar 2005 02:59:59 +0000 (18:59 -0800)]
[PATCH] Don't reference NULL klist pointer in klist_remove().

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -Nru a/lib/klist.c b/lib/klist.c

16 years ago[PATCH] Call klist_del() instead of klist_remove().
mochel@digitalimplant.org [Fri, 25 Mar 2005 02:58:45 +0000 (18:58 -0800)]
[PATCH] Call klist_del() instead of klist_remove().

- Can't wait on removing the current item in the list (the positive refcount *because*
  we are using it causes it to deadlock).

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Remove struct device::driver_list.
mochel@digitalimplant.org [Thu, 24 Mar 2005 21:08:05 +0000 (13:08 -0800)]
[PATCH] Remove struct device::driver_list.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Remove struct device::bus_list.
mochel@digitalimplant.org [Thu, 24 Mar 2005 21:03:35 +0000 (13:03 -0800)]
[PATCH] Remove struct device::bus_list.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Fix up bus code and remove use of rwsem.
mochel@digitalimplant.org [Thu, 24 Mar 2005 21:02:28 +0000 (13:02 -0800)]
[PATCH] Fix up bus code and remove use of rwsem.

- Don't add devices to bus's embedded kset, since it's not used by anyone anymore.
- Don't need to take the bus rwsem when calling {device,driver}_attach(), since
  those functions use the klists and the klists' spinlocks.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Fix up USB to use klist_node_attached() instead of list_empty() on lists...
mochel@digitalimplant.org [Thu, 24 Mar 2005 21:00:16 +0000 (13:00 -0800)]
[PATCH] Fix up USB to use klist_node_attached() instead of list_empty() on lists that will go away.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: gregkh-2.6/drivers/usb/core/usb.c
===================================================================

16 years ago[PATCH] add klist_node_attached() to determine if a node is on a list or not.
mochel@digitalimplant.org [Thu, 24 Mar 2005 20:58:57 +0000 (12:58 -0800)]
[PATCH] add klist_node_attached() to determine if a node is on a list or not.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -Nru a/include/linux/klist.h b/include/linux/klist.h

16 years ago[PATCH] Use bus_for_each_{dev,drv} for driver binding.
mochel@digitalimplant.org [Thu, 24 Mar 2005 18:50:24 +0000 (10:50 -0800)]
[PATCH] Use bus_for_each_{dev,drv} for driver binding.

- Now possible, since the lists are locked using the klist lock and not the
  global rwsem.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Remove the unused device_find().
mochel@digitalimplant.org [Thu, 24 Mar 2005 18:48:35 +0000 (10:48 -0800)]
[PATCH] Remove the unused device_find().

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Add a klist to struct device_driver for the devices bound to it.
mochel@digitalimplant.org [Mon, 21 Mar 2005 20:25:36 +0000 (12:25 -0800)]
[PATCH] Add a klist to struct device_driver for the devices bound to it.

- Use it in driver_for_each_device() instead of the regular list_head and stop using
  the bus's rwsem for protection.
- Use driver_for_each_device() in driver_detach() so we don't deadlock on the
  bus's rwsem.
- Remove ->devices.
- Move klist access and sysfs link access out from under device's semaphore, since
  they're synchronized through other means.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Add a klist to struct bus_type for its drivers.
mochel@digitalimplant.org [Mon, 21 Mar 2005 20:00:18 +0000 (12:00 -0800)]
[PATCH] Add a klist to struct bus_type for its drivers.

- Use it in bus_for_each_drv().
- Use the klist spinlock instead of the bus rwsem.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Add a klist to struct bus_type for its devices.
mochel@digitalimplant.org [Mon, 21 Mar 2005 19:49:14 +0000 (11:49 -0800)]
[PATCH] Add a klist to struct bus_type for its devices.

- Use it for bus_for_each_dev().
- Use the klist spinlock instead of the bus rwsem.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Add initial implementation of klist helpers.
mochel@digitalimplant.org [Mon, 21 Mar 2005 19:45:16 +0000 (11:45 -0800)]
[PATCH] Add initial implementation of klist helpers.

This klist interface provides a couple of structures that wrap around
struct list_head to provide explicit list "head" (struct klist) and
list "node" (struct klist_node) objects. For struct klist, a spinlock
is included that protects access to the actual list itself. struct
klist_node provides a pointer to the klist that owns it and a kref
reference count that indicates the number of current users of that node
in the list.

The entire point is to provide an interface for iterating over a list
that is safe and allows for modification of the list during the
iteration (e.g. insertion and removal), including modification of the
current node on the list.

It works using a 3rd object type - struct klist_iter - that is declared
and initialized before an iteration. klist_next() is used to acquire the
next element in the list. It returns NULL if there are no more items.
This klist interface provides a couple of structures that wrap around
struct list_head to provide explicit list "head" (struct klist) and
list "node" (struct klist_node) objects. For struct klist, a spinlock
is included that protects access to the actual list itself. struct
klist_node provides a pointer to the klist that owns it and a kref
reference count that indicates the number of current users of that node
in the list.

The entire point is to provide an interface for iterating over a list
that is safe and allows for modification of the list during the
iteration (e.g. insertion and removal), including modification of the
current node on the list.

It works using a 3rd object type - struct klist_iter - that is declared
and initialized before an iteration. klist_next() is used to acquire the
next element in the list. It returns NULL if there are no more items.
Internally, that routine takes the klist's lock, decrements the reference
count of the previous klist_node and increments the count of the next
klist_node. It then drops the lock and returns.

There are primitives for adding and removing nodes to/from a klist.
When deleting, klist_del() will simply decrement the reference count.
Only when the count goes to 0 is the node removed from the list.
klist_remove() will try to delete the node from the list and block
until it is actually removed. This is useful for objects (like devices)
that have been removed from the system and must be freed (but must wait
until all accessors have finished).

Internally, that routine takes the klist's lock, decrements the reference
count of the previous klist_node and increments the count of the next
klist_node. It then drops the lock and returns.

There are primitives for adding and removing nodes to/from a klist.
When deleting, klist_del() will simply decrement the reference count.
Only when the count goes to 0 is the node removed from the list.
klist_remove() will try to delete the node from the list and block
until it is actually removed. This is useful for objects (like devices)
that have been removed from the system and must be freed (but must wait
until all accessors have finished).

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -Nru a/include/linux/klist.h b/include/linux/klist.h

16 years ago[PATCH] Use driver_for_each_device() instead of manually walking list.
mochel@digitalimplant.org [Mon, 21 Mar 2005 19:09:40 +0000 (11:09 -0800)]
[PATCH] Use driver_for_each_device() instead of manually walking list.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: gregkh-2.6/drivers/usb/core/usb.c
===================================================================

16 years ago[PATCH] Use driver_for_each_device() in drivers/pnp/driver.c instead of manually...
mochel@digitalimplant.org [Mon, 21 Mar 2005 19:07:54 +0000 (11:07 -0800)]
[PATCH] Use driver_for_each_device() in drivers/pnp/driver.c instead of manually walking list.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff -Nru a/drivers/pnp/driver.c b/drivers/pnp/driver.c

16 years ago[PATCH] Add driver_for_each_device().
mochel@digitalimplant.org [Mon, 21 Mar 2005 18:59:56 +0000 (10:59 -0800)]
[PATCH] Add driver_for_each_device().

Now there's an iterator for accessing each device bound to a driver.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Index: linux-2.6.12-rc2/drivers/base/driver.c
===================================================================

16 years ago[PATCH] Move device/driver code to drivers/base/dd.c
mochel@digitalimplant.org [Mon, 21 Mar 2005 18:52:54 +0000 (10:52 -0800)]
[PATCH] Move device/driver code to drivers/base/dd.c

This relocates the driver binding/unbinding code to drivers/base/dd.c. This is done
for two reasons: One, it's not code related to the bus_type itself; it uses some from
that, some from devices, and some from drivers. And Two, it will make it easier to do
some of the upcoming lock removal on that code..

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Add a semaphore to struct device to synchronize calls to its driver.
mochel@digitalimplant.org [Mon, 21 Mar 2005 18:41:04 +0000 (10:41 -0800)]
[PATCH] Add a semaphore to struct device to synchronize calls to its driver.

This adds a per-device semaphore that is taken before every call from the core to a
driver method. This prevents e.g. simultaneous calls to the ->suspend() or ->resume()
and ->probe() or ->release(), potentially saving a whole lot of headaches.

It also moves us a step closer to removing the bus rwsem, since it protects the fields
in struct device that are modified by the core.

Signed-off-by: Patrick Mochel <mochel@digitalimplant.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] fix up ipmi code after class_simple.c removal
Andrew Morton [Thu, 5 May 2005 22:06:38 +0000 (15:06 -0700)]
[PATCH] fix up ipmi code after class_simple.c removal

Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] fix "make mandocs" after class_simple.c removal
Adrian Bunk [Thu, 5 May 2005 22:06:38 +0000 (15:06 -0700)]
[PATCH] fix "make mandocs" after class_simple.c removal

Due to the removal of class_simple.c, "make mandocs" no longer works.

This patch fixes this issue.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: remove class_simple code, as no one in the tree is using it anymore.
gregkh@suse.de [Wed, 23 Mar 2005 19:12:38 +0000 (11:12 -0800)]
[PATCH] class: remove class_simple code, as no one in the tree is using it anymore.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: add kerneldoc for the new class functions.
gregkh@suse.de [Wed, 23 Mar 2005 18:02:56 +0000 (10:02 -0800)]
[PATCH] class: add kerneldoc for the new class functions.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: convert the remaining class_simple users in the kernel to usee the...
gregkh@suse.de [Wed, 23 Mar 2005 18:02:26 +0000 (10:02 -0800)]
[PATCH] class: convert the remaining class_simple users in the kernel to usee the new class api

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] USB: trivial error path fix
Mark M. Hoffman [Tue, 3 May 2005 03:35:45 +0000 (23:35 -0400)]
[PATCH] USB: trivial error path fix

Trivial fix to USB class-creation error path; please apply.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: convert drivers/* to use the new class api instead of class_simple
gregkh@suse.de [Wed, 23 Mar 2005 18:01:41 +0000 (10:01 -0800)]
[PATCH] class: convert drivers/* to use the new class api instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: convert arch/* to use the new class api instead of class_simple
gregkh@suse.de [Wed, 23 Mar 2005 17:56:34 +0000 (09:56 -0800)]
[PATCH] class: convert arch/* to use the new class api instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: convert drivers/scsi/* to use the new class api instead of class_simple
gregkh@suse.de [Wed, 23 Mar 2005 17:55:22 +0000 (09:55 -0800)]
[PATCH] class: convert drivers/scsi/* to use the new class api instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: convert drivers/ieee1394/* to use the new class api instead of class_s...
gregkh@suse.de [Wed, 23 Mar 2005 17:53:36 +0000 (09:53 -0800)]
[PATCH] class: convert drivers/ieee1394/* to use the new class api instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: convert drivers/char/* to use the new class api instead of class_simple
gregkh@suse.de [Wed, 23 Mar 2005 17:53:09 +0000 (09:53 -0800)]
[PATCH] class: convert drivers/char/* to use the new class api instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: convert drivers/block/* to use the new class api instead of class_simple
gregkh@suse.de [Wed, 23 Mar 2005 17:52:10 +0000 (09:52 -0800)]
[PATCH] class: convert drivers/block/* to use the new class api instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] class: convert sound/* to use the new class api instead of class_simple
gregkh@suse.de [Wed, 23 Mar 2005 17:51:41 +0000 (09:51 -0800)]
[PATCH] class: convert sound/* to use the new class api instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] USB: move the usb hcd code to use the new class code.
gregkh@suse.de [Tue, 15 Mar 2005 23:10:13 +0000 (15:10 -0800)]
[PATCH] USB: move the usb hcd code to use the new class code.

This moves a kref into the main hcd structure, which detaches it from
the class device structure.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] INPUT: move to use the new class code, instead of class_simple
gregkh@suse.de [Tue, 15 Mar 2005 22:26:30 +0000 (14:26 -0800)]
[PATCH] INPUT: move to use the new class code, instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] tty: move to use the new class code, instead of class_simple
gregkh@suse.de [Tue, 15 Mar 2005 22:23:15 +0000 (14:23 -0800)]
[PATCH] tty: move to use the new class code, instead of class_simple

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] CLASS: move a "simple" class logic into the class core.
gregkh@suse.de [Tue, 15 Mar 2005 19:54:21 +0000 (11:54 -0800)]
[PATCH] CLASS: move a "simple" class logic into the class core.

One step on improving the class api so that it can not be used incorrectly.
This also fixes the module owner issue with the dev files that happened when
the devt logic moved to the class core.

Based on a patch originally written by Kay Sievers <kay.sievers@vrfy.org>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sysfs: (rest) if show/store is missing return -EIO
Dmitry Torokhov [Fri, 29 Apr 2005 06:27:34 +0000 (01:27 -0500)]
[PATCH] sysfs: (rest) if show/store is missing return -EIO

sysfs: fix the rest of the kernel so if an attribute doesn't
       implement show or store method read/write will return
       -EIO instead of 0 or -EINVAL or -EPERM.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sysfs: (driver/block) if show/store is missing return -EIO
Dmitry Torokhov [Fri, 29 Apr 2005 06:26:06 +0000 (01:26 -0500)]
[PATCH] sysfs: (driver/block) if show/store is missing return -EIO

sysfs: fix drivers/block so if an attribute doesn't implement
       show or store method read/write will return -EIO
       instead of 0 or -EINVAL.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sysfs: (driver/pci) if show/store is missing return -EIO
Dmitry Torokhov [Fri, 29 Apr 2005 06:26:27 +0000 (01:26 -0500)]
[PATCH] sysfs: (driver/pci) if show/store is missing return -EIO

sysfs: fix drivers/pci so if an attribute does not implement
       show or store method read/write will return -EIO
       instead of 0.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sysfs: (driver/base) if show/store is missing return -EIO
Dmitry Torokhov [Fri, 29 Apr 2005 06:23:47 +0000 (01:23 -0500)]
[PATCH] sysfs: (driver/base) if show/store is missing return -EIO

sysfs: fix drivers/base so if an attribute doesn't implement
       show or store method read/write will return -EIO
       instead of 0.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sysfs: if show/store is missing return -EIO
Dmitry Torokhov [Fri, 29 Apr 2005 06:22:00 +0000 (01:22 -0500)]
[PATCH] sysfs: if show/store is missing return -EIO

sysfs: if attribute does not implement show or store method
       read/write should return -EIO instead of 0 or -EINVAL.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Make attributes names const char *
Dmitry Torokhov [Fri, 29 Apr 2005 05:58:46 +0000 (00:58 -0500)]
[PATCH] Make attributes names const char *

sysfs: make attributes and attribute_group's names const char *

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] make driver's name be const char *
Dmitry Torokhov [Tue, 26 Apr 2005 07:34:05 +0000 (02:34 -0500)]
[PATCH] make driver's name be const char *

Driver core:
  change driver's, bus's, class's and platform device's names
  to be const char * so one can use
            const char *drv_name = "asdfg";
  when initializing structures.
  Also kill couple of whitespaces.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] kset_hotplug_ops->name shoudl return const char *
Dmitry Torokhov [Tue, 26 Apr 2005 07:32:54 +0000 (02:32 -0500)]
[PATCH] kset_hotplug_ops->name shoudl return const char *

kobject: change name() method in kset_hotplug_ops return const char *
 since users shoudl not try to modify returned data.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] Make kobject's name be const char *
Dmitry Torokhov [Tue, 26 Apr 2005 07:32:00 +0000 (02:32 -0500)]
[PATCH] Make kobject's name be const char *

kobject: make kobject's name const char * since users should not
 attempt to change it (except by calling kobject_rename).

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] sysfs_{create|remove}_link should take const char *
Dmitry Torokhov [Tue, 26 Apr 2005 07:31:08 +0000 (02:31 -0500)]
[PATCH] sysfs_{create|remove}_link should take const char *

sysfs: make sysfs_{create|remove}_link to take const char * name.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[PATCH] kobject_hotplug() should use kobject_name()
Dmitry Torokhov [Tue, 26 Apr 2005 07:29:58 +0000 (02:29 -0500)]
[PATCH] kobject_hotplug() should use kobject_name()

kobject: kobject_hotplug should use kobject_name() instead of
         accessing kobj->name directly since for objects with
         long names it can contain garbage.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[NETLINK]: fib_lookup() via netlink
Robert Olsson [Mon, 20 Jun 2005 20:36:39 +0000 (13:36 -0700)]
[NETLINK]: fib_lookup() via netlink

Below is a more generic patch to do fib_lookup via netlink. For others
we should say that we discussed this as a way to verify route selection.
It's also possible there are others uses for this.

In short the fist half of struct fib_result_nl is filled in by caller
and netlink call fills in the other half and returns it.

In case anyone is interested there is a corresponding user app to compare
the full routing table this was used to test implementation of the LC-trie.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ATALK]: endian annotations
Alexey Dobriyan [Mon, 20 Jun 2005 20:32:05 +0000 (13:32 -0700)]
[ATALK]: endian annotations

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25]: endian-annotate ax25_type_trans()
Alexey Dobriyan [Mon, 20 Jun 2005 20:31:11 +0000 (13:31 -0700)]
[AX25]: endian-annotate ax25_type_trans()

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Add XFRM_STATE_NOPMTUDISC flag
Herbert Xu [Mon, 20 Jun 2005 20:21:43 +0000 (13:21 -0700)]
[IPSEC]: Add XFRM_STATE_NOPMTUDISC flag

This patch adds the flag XFRM_STATE_NOPMTUDISC for xfrm states.  It is
similar to the nopmtudisc on IPIP/GRE tunnels.  It only has an effect
on IPv4 tunnel mode states.  For these states, it will ensure that the
DF flag is always cleared.

This is primarily useful to work around ICMP blackholes.

In future this flag could also allow a larger MTU to be set within the
tunnel just like IPIP/GRE tunnels.  This could be useful for short haul
tunnels where temporary fragmentation outside the tunnel is desired over
smaller fragments inside the tunnel.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: James Morris <jmorris@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Add xfrm_state_afinfo->init_flags
Herbert Xu [Mon, 20 Jun 2005 20:19:41 +0000 (13:19 -0700)]
[IPSEC]: Add xfrm_state_afinfo->init_flags

This patch adds the xfrm_state_afinfo->init_flags hook which allows
each address family to perform any common initialisation that does
not require a corresponding destructor call.

It will be used subsequently to set the XFRM_STATE_NOPMTUDISC flag
in IPv4.

It also fixes up the error codes returned by xfrm_init_state.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: James Morris <jmorris@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPSEC]: Add xfrm_init_state
Herbert Xu [Mon, 20 Jun 2005 20:18:08 +0000 (13:18 -0700)]
[IPSEC]: Add xfrm_init_state

This patch adds xfrm_init_state which is simply a wrapper that calls
xfrm_get_type and subsequently x->type->init_state.  It also gets rid
of the unused args argument.

Abstracting it out allows us to add common initialisation code, e.g.,
to set family-specific flags.

The add_time setting in xfrm_user.c was deleted because it's already
set by xfrm_state_alloc.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: James Morris <jmorris@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP] sctp_connectx() API support
Frank Filz [Mon, 20 Jun 2005 20:14:57 +0000 (13:14 -0700)]
[SCTP] sctp_connectx() API support

Implements sctp_connectx() as defined in the SCTP sockets API draft by
tunneling the request through a setsockopt().

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 20 Jun 2005 18:37:49 +0000 (11:37 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

16 years ago[PATCH] ARM: 2719/1: enable module support in ixp2000 defconfigs by default
Lennert Buytenhek [Mon, 20 Jun 2005 17:51:08 +0000 (18:51 +0100)]
[PATCH] ARM: 2719/1: enable module support in ixp2000 defconfigs by default

Patch from Lennert Buytenhek

The ixp2000 defconfigs are among the few that do not enable module
support by default.  I keep enabling module support by hand for every
new kernel version, so let's just make this change upstream.

Signed-off-by: Lennert Buytenhek
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[PATCH] ARM: 2716/1: SharpSL Param: Fix typo
Richard Purdie [Mon, 20 Jun 2005 17:51:07 +0000 (18:51 +0100)]
[PATCH] ARM: 2716/1: SharpSL Param: Fix typo

Patch from Richard Purdie

Fix typo in sharpsl_param.c so it works correctly on collie.

Signed-off-by: Richard Purdie
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
16 years ago[PATCH] ARM: 2701/1: free up ixp2000 timer 4 for the watchdog
Lennert Buytenhek [Mon, 20 Jun 2005 17:51:07 +0000 (18:51 +0100)]
[PATCH] ARM: 2701/1: free up ixp2000 timer 4 for the watchdog

Patch from Lennert Buytenhek

The IXP2000 has four timers, but if we're on an A-step IXP2800, timer
2 and 3 don't work.  We need two timers for timekeeping (one for the
timer interrupt and one for tracking missed jiffies), so on early
IXP2800s we have no other choice but to use timer 1 and 4 for that,
but on all other IXP2000s we'd rather leave timer 4 free since that's
the only timer we can use for the watchdog.
So, on buggy IXP2000s (i.e. the A-step IXP2800) we use timer 4 for
tracking missed jiffies, and on all all non-buggy IXP2000s (i.e.
everything but the A-step IXP2800) we use timer 2.
On a pre-production IXP2800, this patch should print these messages
on boot:
Enabling IXP2800 erratum #25 workaround
Unable to use IXP2000 watchdog due to IXP2800 erratum #25
On any non-buggy IXP2800 (as well as on IXP2400s) you shouldn't see
anything at all, and the watchdog should be usable again.

Signed-off-by: Lennert Buytenhek
Signed-off-by: Deepak Saxena
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>