| Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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.
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Heh, "global_drivers" as a static...
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
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>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
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>
|
|
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>
|
|
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
|
|
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>
|
|
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>
|
|
into ppc970.osdl.org:/home/torvalds/v2.6/linux
|
|
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>
|
|
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>
|
|
into ppc970.osdl.org:/home/torvalds/v2.6/linux
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
into kroah.com:/home/greg/linux/BK/usb-2.6
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
|
|
> 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>
|
|
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>
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|