aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base (follow)
AgeCommit message (Collapse)AuthorFilesLines
2005-03-29[PATCH] more pm_message_t fixesPavel Machek1-0/+2
While fixing usb, I stomped on a few more fixes. Print error when some device fails to power down, and 2 is no longer valid state to pass in pm_message_t. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-03-28Mark "gfp" masks as "unsigned int" and use __nocast to find violations.Linus Torvalds1-1/+1
This makes it hard(er) to mix argument orders by mistake for things like kmalloc() and friends, since silent integer promotion is now caught by sparse.
2005-03-14Merge by handJames Bottomley1-3/+21
pci_ids.h (removal of on ID next to addition of another) scsi_transport_iscsi.c: change of attribute_container_unregister to transport_container_unregister. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-03-14Add statistics to generic transport classJames Bottomley1-3/+21
These were lost from the SCSI transport classes in the transition to the generic classes. Ressurect it in the generic class, since it's probable that more than SCSI will want to use this. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-03-08[PATCH] class: add a semaphore to struct class, and use that instead of the ↵Greg Kroah-Hartman1-12/+11
subsystem rwsem. This moves us away from using the rwsem, although recursive adds and removes of class devices is not yet possible (nor is it really known if it even is needed.) So this simple change is done instead. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-03-08[PATCH] sysdev: remove the rwsem usage from this subsystem.Greg Kroah-Hartman1-10/+11
If further finer grained locking is needed, we can add a lock to the sysdev_class to lock the class drivers list. But if you do that, remember the global list also is still there and needs to be protected. That's why I went with a simple lock for everything. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-03-08[PATCH] sysdev: fix the name of the list of drivers to be a sane nameGreg Kroah-Hartman1-8/+8
Heh, "global_drivers" as a static... Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-03-08[PATCH] kmap: remove usage of rwsem from kobj_map.Greg Kroah-Hartman1-11/+10
This forces the caller to provide the lock, but as they all already had one, it's not a big change. It also removes the now-unneeded cdev_subsys. Thanks to Jon Corbet for reminding me about that. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-03-08[PATCH] sysdev: make system_subsys static as no one else needs access to it.Greg Kroah-Hartman1-1/+1
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-03-08[PATCH] Driver core: add "bus" symlink to class/block devicesKay Sievers2-31/+7
On Tue, Feb 15, 2005 at 09:53:44PM +0100, Kay Sievers wrote: > Add a "bus" symlink to the class and block devices, just like the "driver" > and "device" links. This may be a huge speed gain for e.g. udev to determine > the bus value of a device, as we currently need to do a brute-force scan in > /sys/bus/* to find this value. Hmm, while playing around with it, I think we should create the "bus" link on the physical device on not on the class device. Also the current "driver" link at the class device should be removed, cause class devices don't have a driver. Block devices never had this misleading symlink. From the class device we point with the "device" link to the physical device, and only the physical device should have the "driver" and the "bus" link, as it represents the real relationship. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-03-08[PATCH] driver core: clean driver unloadMike Waychison2-8/+7
Get rid of semaphore abuse by converting device_driver->unload_sem semaphore to device_driver->unloaded completion. This should get rid of any confusion as well as save a few bytes in the process. Signed-off-by: Mike Waychison <michael.waychison@sun.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-03-08[PATCH] class_simple: pass dev_t to the class coreKay Sievers1-19/+2
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2005-03-08[PATCH] class core: export MAJOR/MINOR to the hotplug envKay Sievers1-9/+28
Move the creation of the sysfs "dev" file of a class device into the driver core. The struct class_device contains a dev_t value now. If set, the driver core will create the "dev" file containing the major/minor numbers automatically. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2005-03-08[PATCH] driver core: Separate platform device name from platform device numberRussell King1-1/+1
Separate platform device name from platform device number such that names ending with numbers aren't confusing. Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2005-02-01Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6Linus Torvalds1-4/+0
into ppc970.osdl.org:/home/torvalds/v2.6/linux
2005-02-01[PATCH] unexport register_cpu and unregister_cpuNathan Lynch1-4/+0
We introduced exports for register_cpu and unregister_cpu right after 2.6.10. As far as I can tell these are not called from any code which can be built as a module, and I can't think of a good reason why any out of tree code would use them. Signed-off-by: Nathan Lynch <nathanl@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-31Fix missed class_remove_file in attribute_containerJames Bottomley2-23/+110
This moves attribute addition (and removal) to where it should have been in the first place, namely in the attribute_container class. Without this, the transport classes were leaving dangling attributes when the devices were removed. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-01-27Merge bk://linux-scsi.bkbits.net/scsi-for-linus-2.6Linus Torvalds4-2/+550
into ppc970.osdl.org:/home/torvalds/v2.6/linux
2005-01-20[PATCH] Lock initializer cleanup: Misc driversThomas Gleixner1-1/+1
Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-17add a generic device transport classJames Bottomley2-1/+273
Transport classes are a mechanism for providing transport specific services to drivers that the more generic command processing layers don't care about. A good example is the SCSI mid-layer not caring about parallel transfer characteristics or providing services for domain validation. Transport classes usually provide a transport specific API at one end and a class interface at the other (for the user to interrogate and set parameters). Originally, transport classes were SCSI specific. However, this code is generic to the device model. As long as you have a generic device representing a storage interface (or device) then you can attach a transport class to it. The new code also allows an arbitrary number of transport classes to be attached to a device, unlike SCSI which only allowed one. This is going to be important for things like SATA and SAS which share the PHY layer (and hence should be capable of sharing a PHY transport class). The generic transport class is designed to operate identically to the current SCSI transport classes, except that it uses generic devices rather than SCSI devices. We have five events: setup add ----- configure ----- remove destroy With callbacks for setup configure and remove. There's also an anonymous transport class which can only respond to configure events (and which has no attributes). Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-01-17Add attribute container to generic device modelJames Bottomley3-2/+278
Attribute containers allows a single device to belong to an arbitrary number of classes, each with an arbitrary number of attributes. This will be used as the basis for a generic transport class Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-01-10[PATCH] pm: introduce pm_message_tPavel Machek4-10/+10
This introduces pm_message_t. For now, it is only good for type-safety and sparse checking, but plan is to turn pm_message_t into structure soon. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-09Merge kroah.com:/home/greg/linux/BK/bleed-2.6Greg Kroah-Hartman4-8/+66
into kroah.com:/home/greg/linux/BK/usb-2.6
2005-01-07[PATCH] Replace 'numnodes' with 'node_online_map' - arch-independentMatthew Dobson1-1/+2
From: William Lee Irwin III <wli@holomorphy.com> Without passing this parameter by reference, the changes to used_node_mask are meaningless and do not affect the caller's copy. This leads to boot-time failure. This proposed fix passes it by reference. Signed-off-by: William Irwin <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-06mergeGreg Kroah-Hartman4-8/+66
2005-01-06[PATCH] Driver Core: handle bridged platform bus segmentsDavid Brownell1-5/+7
During setup to access platform bus segments through bridges, the current platform_device_register() ignores the resource parent specified by the bridge. That means it'll always detect a (false) resource conflict with the bridge, and fail the resource reservation step. This patch makes that code use the specified parent resource, defaulting to "iomem_resource" or "ioport_resource" only for a NULL parent (that is, for devices that aren't accessed through a bridge). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2005-01-03[PATCH] x86_64: Add x86_64 support for Jack Steiner's SLIT sysfs patchAndi Kleen1-2/+2
Add x86_64 support for Jack Steiner's SLIT sysfs patch Make Jack's code compile on x86-64 and add x86-64 low level support to save the SLIT pointer and a node_distance() implementation. Requires the previous SRAT patch. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-03[PATCH] x86_64: Add SLIT (inter node distance) information to sysfs.Andi Kleen1-0/+19
Add SLIT (inter node distance) information to sysfs. [This is Jack's patch that he submitted on l-k. I'm submitting it for him because I need it for my x86-64 followon SLIT patch. Hope I don't stomp onto his toes with that one. If you already merged it please ignore] From: Jack Steiner Here is an update patch to externalize the SLIT information. I think I have encorporated all the comments that were posted previously) For example: # cd /sys/devices/system # find . ./node ./node/node5 ./node/node5/distance ./node/node5/numastat ./node/node5/meminfo ./node/node5/cpumap # cat ./node/node0/distance 10 20 64 42 42 22 # cat node/*/distance 10 20 64 42 42 22 20 10 42 22 64 84 64 42 10 20 22 42 42 22 20 10 42 62 42 64 22 42 10 20 22 84 42 62 20 10 Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-12-21[PATCH] driver core: Fix up vesafb failure probing.Dave Jones1-1/+1
bus.c file invokes a probe callback for most devices in a list, then checks for -ENODEV return ("no such device"), if so it remains silent. However, some drivers (including vesafb.c) may return -ENXIO ("no such device or address"), which is indeed error -6. I shut up the warning with the attached patch, that basically ignores both -ENODEV and -ENXIO. >From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=125890 original patch by: Alessandro Suardi <alessandro.suardi@oracle.com> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-12-21[PATCH] driver core: allow struct bin_attributes in class devicesJesse Barnes1-0/+18
This small patch adds routines to create and remove bin_attribute files for class devices. One intended use is for binary files corresponding to PCI busses, like bus legacy I/O ports or ISA memory. Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
2004-12-16[PATCH] Driver Core: Add platform_get_resource_byname & ↵Kumar Gala1-1/+39
platform_get_resource_byirq Adds the ability to find a resource or irq on a platform device by its resource name. This patch also tweaks how resource names get set. Before, resources names were set to pdev->dev.bus_id, now that only happens if the resource name has not been previous set. All of this allows us to find a resource without assuming what order the resources are in. Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-12-14[PATCH] select HOTPLUGAdrian Bunk1-1/+1
The patch below changes all dependencies on HOTPLUG to selects. The help text of HOTPLUG is adjusted in a way, that manually selecting it is only required for external modules. If an option already depends on PCMCIA or selects FW_LOADER an explicit select of HOTPLUG is not required. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-12-06mergeLen Brown2-2/+2
2004-12-02[PATCH] Driver Core: restore comment in kobject_uevent.cGreg Kroah-Hartman1-1/+1
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-11-30mergeLen Brown3-1/+28
2004-11-28[PATCH] fix unnecessary increment in firmware_class_hotplug() and USB coreMarcel Holtmann1-1/+1
> This patch is to fix unnecessary increment of 'i' used to > specify an element of an arry 'envp[]' in firmware_class_hotplug(). > The 'i' is already incremented in add_hotplug_env_var(), actually. you are right. The incrementation is wrong, but it doesn't have any negative effect. However the same applies for the usb_hotplug() function in drivers/usb/core/usb.c. Signed-off-by: Keiichiro Tokunaga <tokunaga.keiich@jp.fujitsu.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-11-11[PATCH] add the bus name to the hotplug environmentKay Sievers2-1/+22
Add the name of the bus and the driver to the hotplug event for /sys/devices/*. With this addition, userspace knows what it can expect from sysfs to show up, instead of waiting for a timeout for devices without a bus. ACTION=add DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-1 SUBSYSTEM=usb SEQNUM=978 PHYSDEVBUS=usb PHYSDEVDRIVER=usb Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-11-11[PATCH] add the driver name to the hotplug environmentKay Sievers1-0/+6
Add the name of the device's driver to the hotplug environment of class and block devices. ACTION=add DEVPATH=/block/sda SUBSYSTEM=block SEQNUM=986 PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host0/target0:0:0/0:0:0:0 PHYSDEVBUS=scsi PHYSDEVDRIVER=sd Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-11-10mergeLen Brown8-107/+178
2004-11-07[PATCH] Use add_hotplug_env_var() in firmware loaderMarcel Holtmann1-7/+5
The add_hotplug_env_var() function is available and so use it in the firmware class code. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-11-03[PATCH] driver-model: device_add() error path reference counting fixTejun Heo1-3/+3
df_05_device_add_ref_fix.patch In device_add(), @dev wan't put'd properly when it has zero length bus_id (error path). Fixed. Signed-off-by: Tejun Heo <tj@home-tj.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-11-03[PATCH] driver-model: bus_recan_devices() locking fixTejun Heo1-37/+56
df_02_bus_rescan_devcies_fix.patch bus_rescan_devices() eventually calls device_attach() and thus requires write locking the corresponding bus. The original code just called bus_for_each_dev() which only read locks the bus. This patch separates __bus_for_each_dev() and __bus_for_each_drv(), which don't do locking themselves, out from the original functions and call them with read lock in the original functions and with write lock in bus_rescan_devices(). Signed-off-by: Tejun Heo <tj@home-tj.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-11-03[PATCH] driver-model: comment fix in bus.cTejun Heo1-4/+4
df_01_driver_attach_comment_fix.patch bus_match() was renamed to driver_probe_device() but the comment for device_attach() wasn't updated. This patch updates it. Signed-off-by: Tejun Heo <tj@home-tj.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-11-03[PATCH] add the physical device and the bus to the hotplug environmentKay Sievers1-0/+26
Add the sysfs path of the physical device to the hotplug event of class and block devices. This should solve the userspace issue not to know if the device is a virtual one and the "device" symlink will never be created, but we sit there and wait for it to show up not knowing when we should give up. Also the bus name is added to the hotplug event, so we don't need to reverse lookup in the /sys/bus/* directory which bus our physical device belongs to. This is e.g. the value matched against the BUS= key, that may be used in an udev rule. This is a PCI network card: ACTION=add SUBSYSTEM=net DEVPATH=/class/net/eth0 PHYSDEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:02:01.0 PHYSDEVBUS=pci INTERFACE=eth0 SEQNUM=827 PATH=/sbin:/bin:/usr/sbin:/usr/bin HOME=/ This is a IDE CDROM: ACTION=add SUBSYSTEM=block DEVPATH=/block/hdc PHYSDEVPATH=/devices/pci0000:00/0000:00:1f.1/ide1/1.0 PHYSDEVBUS=ide SEQNUM=1017 PATH=/sbin:/bin:/usr/sbin:/usr/bin HOME=/ This is an USB-stick partition: ACTION=add SUBSYSTEM=block DEVPATH=/block/sda/sda1 PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host1/target1:0:0/1:0:0:0 PHYSDEVBUS=scsi SEQNUM=1032 PATH=/sbin:/bin:/usr/sbin:/usr/bin HOME=/ Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-10-31[PATCH] Driver core: add driver symlink to deviceDmitry Torokhov1-0/+2
Driver core: when binding device to a driver create "driver" symlink in device's directory. Rename serio's "driver" attribute to "drvctl" (write-only) Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-10-31[PATCH] Driver core: add driver_probe_deviceDmitry Torokhov1-27/+30
Driver core: rename bus_match into driver_probe_device and export it so subsystems can bind an individual device to a specific driver without getting involved with driver core internals. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-10-31[PATCH] Driver core: export device_attachDmitry Torokhov1-1/+3
Driver core: make device_attach() global and export it and driver_attach() so subsystems can have finer control over binding process. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-10-31[PATCH] Fix deadlocks on dpm_semAndrew Morton4-27/+49
From: Paul Mackerras <paulus@samba.org> Currently the device_pm_foo() functions are rather prone to deadlocks during suspend/resume. This is because the dpm_sem is held for the duration of device_suspend() and device_resume() as well as device_pm_add() and device_pm_remove(). If for any reason you get a device addition or removal triggered by a device's suspend or resume code, you get a deadlock. (The classic example is a USB host adaptor resuming and discovering that the mouse you used to have plugged in has gone away.) This patch fixes the problem by using a separate semaphore, called dpm_list_sem, to cover the places where we need the device pm lists to be stable, and by being careful about how we traverse the lists on suspend and resume. I have analysed the various cases that can occur and I am confident that I have handled them all correctly. I posted this patch together with a detailed analysis 10 days ago. Signed-off-by Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2004-10-27[PATCH] unexport firmware_classChristoph Hellwig1-1/+0
it's marked static already, and there's no point in exporting it Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-27IA64 CPU hotplug topologyLen Brown1-2/+18
Extend support for dynamic registration and unregistration of the cpu, by implementing and exporting arch_register_cpu()/arch_unregister_cpu(). Also combine multiple implementation of topology_init() functions to single topology_init() in case of ia64 architecture. Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>