summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] Driver Core: drivers/s390/net/qeth_sys.c - ↵Yani Ioannou2005-06-2017-122/+122
| | | | | | | 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>
* [PATCH] Driver Core: drivers/char/raw3270.c - drivers/net/netiucv.c: update ↵Yani Ioannou2005-06-2011-89/+89
| | | | | | | device attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Driver Core: drivers/i2c/chips/w83781d.c - ↵Yani Ioannou2005-06-2024-99/+100
| | | | | | | 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>
* [PATCH] Driver Core: drivers/i2c/chips/pc87360.c - w83627hf.c: update device ↵Yani Ioannou2005-06-208-115/+115
| | | | | | | attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Driver Core: drivers/i2c/chips/lm77.c - max1619.c: update device ↵Yani Ioannou2005-06-209-113/+113
| | | | | | | attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Driver Core: drivers/i2c/chips/adm1031.c - lm75.c: update device ↵Yani Ioannou2005-06-2010-109/+109
| | | | | | | attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Driver Core: drivers/base - drivers/i2c/chips/adm1026.c: update ↵Yani Ioannou2005-06-2012-90/+90
| | | | | | | device attribute callbacks Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Driver core: change device_attribute callbacksYani Ioannou2005-06-201-2/+2
| | | | | | | | | 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>
* [PATCH] driver core: fix error handling in bus_add_deviceHannes Reinecke2005-06-202-6/+10
| | | | | | | | | 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>
* [PATCH] Driver core: unregister_node() for hotplug useKeiichiro Tokunaga2005-06-201-2/+18
| | | | | | | | | | | | 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
* [PATCH] usbcore: Don't call device_release_driver recursivelyAlan Stern2005-06-201-2/+8
| | | | | | | | | | 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>
* [PATCH] driver core: Fix races in driver_detach()Alan Stern2005-06-201-13/+38
| | | | | | | | | | | | | | | | | | 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>
* [PATCH] usb: klist_node_attached() fixPatrick Mochel2005-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ===================================================================
* [PATCH] Fix typo in scdrv_init()Jason Uhlenkott2005-06-201-1/+1
| | | | | | | | 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>
* [PATCH] Driver Core: fix bk-driver-core kills ppc64Patrick Mochel2005-06-201-68/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* [PATCH] Driver core: Fix up the driver and device iterators to be quietergregkh@suse.de2005-06-201-13/+19
| | | | | | Also stops looping over the lists when a match is found. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de
* [PATCH] use device_for_each_child() to properly access child devices.long2005-06-201-74/+65
| | | | | | | | | | | | | | 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>
* [PATCH] Use device_for_each_child() to unregister devices in ↵gregkh@suse.de2005-06-201-5/+6
| | | | | | | | 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
* [PATCH] USB: fix build warning in usb core as pointed out by Andrew.gregkh@suse.de2005-06-201-1/+1
| | | | | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: gregkh-2.6/drivers/usb/core/usb.c ===================================================================
* [PATCH] driver core: change export symbol for driver_for_each_device()gregkh@suse.de2005-06-201-1/+1
| | | | | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Index: linux-2.6.12-rc2/drivers/base/driver.c ===================================================================
* [PATCH] Fix up bogus comment.mochel@digitalimplant.org2005-06-201-2/+1
| | | | | | | 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
* [PATCH] Use a klist for device child lists.mochel@digitalimplant.org2005-06-201-15/+15
| | | | | | | | | | - 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>
* [PATCH] use device_for_each_child() to properly access child devices.gregkh@suse.de2005-06-201-6/+10
| | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Use device_for_each_child() to unregister devices in ↵mochel@digitalimplant.org2005-06-201-5/+9
| | | | | | | | | | 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 ===================================================================
* [PATCH] Call klist_del() instead of klist_remove().mochel@digitalimplant.org2005-06-201-1/+1
| | | | | | | | - 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>
* [PATCH] Remove struct device::driver_list.mochel@digitalimplant.org2005-06-201-1/+0
| | | | | Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Remove struct device::bus_list.mochel@digitalimplant.org2005-06-201-1/+0
| | | | | Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Fix up bus code and remove use of rwsem.mochel@digitalimplant.org2005-06-201-12/+0
| | | | | | | | | - 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>
* [PATCH] Fix up USB to use klist_node_attached() instead of list_empty() on ↵mochel@digitalimplant.org2005-06-201-2/+2
| | | | | | | | | | 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 ===================================================================
* [PATCH] Use bus_for_each_{dev,drv} for driver binding.mochel@digitalimplant.org2005-06-201-33/+39
| | | | | | | | - 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>
* [PATCH] Remove the unused device_find().mochel@digitalimplant.org2005-06-201-19/+0
| | | | | Signed-off-by: Patrick Mochel <mochel@digitalimplant.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Add a klist to struct device_driver for the devices bound to it.mochel@digitalimplant.org2005-06-203-28/+35
| | | | | | | | | | | | | - 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>
* [PATCH] Add a klist to struct bus_type for its drivers.mochel@digitalimplant.org2005-06-201-29/+23
| | | | | | | | - 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>
* [PATCH] Add a klist to struct bus_type for its devices.mochel@digitalimplant.org2005-06-201-30/+24
| | | | | | | | - 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>
* [PATCH] Use driver_for_each_device() instead of manually walking list.mochel@digitalimplant.org2005-06-201-18/+23
| | | | | | | | 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 ===================================================================
* [PATCH] Use driver_for_each_device() in drivers/pnp/driver.c instead of ↵mochel@digitalimplant.org2005-06-201-4/+8
| | | | | | | | | 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
* [PATCH] Add driver_for_each_device().mochel@digitalimplant.org2005-06-201-0/+35
| | | | | | | | | | 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 ===================================================================
* [PATCH] Move device/driver code to drivers/base/dd.cmochel@digitalimplant.org2005-06-204-183/+203
| | | | | | | | | | 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>
* [PATCH] Add a semaphore to struct device to synchronize calls to its driver.mochel@digitalimplant.org2005-06-204-6/+20
| | | | | | | | | | | | 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>
* [PATCH] fix up ipmi code after class_simple.c removalAndrew Morton2005-06-201-7/+7
| | | | | | Cc: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] class: remove class_simple code, as no one in the tree is using it ↵gregkh@suse.de2005-06-202-200/+1
| | | | | | anymore. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] class: add kerneldoc for the new class functions.gregkh@suse.de2005-06-201-0/+43
| | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: trivial error path fixMark M. Hoffman2005-06-201-0/+1
| | | | | | | 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>
* [PATCH] class: convert drivers/* to use the new class api instead of ↵gregkh@suse.de2005-06-209-53/+51
| | | | | | class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] class: convert drivers/scsi/* to use the new class api instead of ↵gregkh@suse.de2005-06-203-25/+27
| | | | | | class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] class: convert drivers/ieee1394/* to use the new class api instead ↵gregkh@suse.de2005-06-205-15/+16
| | | | | | of class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] class: convert drivers/char/* to use the new class api instead of ↵gregkh@suse.de2005-06-2014-103/+103
| | | | | | class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] class: convert drivers/block/* to use the new class api instead of ↵gregkh@suse.de2005-06-203-22/+22
| | | | | | class_simple Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: move the usb hcd code to use the new class code.gregkh@suse.de2005-06-203-44/+37
| | | | | | | 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>
* [PATCH] INPUT: move to use the new class code, instead of class_simplegregkh@suse.de2005-06-205-24/+28
| | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>