We need to work on cleaning up the relationship between kobjects, ksets and
ktypes. The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.
Thanks to Kay for fixing the bugs in this patch.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Declaring an array of PAGE_SIZE does bad things for people running with
4k stacks...
Thanks to Tilman Schmidt for tracking this down.
Cc: Tilman Schmidt <[email protected]>
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
It isn't used at all by the driver core anymore, and the few usages of
it within the kernel have now all been fixed as most of them were using
it incorrectly. So remove it.
Now the whole struct subsys can be removed from the system, but that's
for a later patch...
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The subsystem rwsem is not used by the driver core at all, so the use of
it in the phy code doesn't make any sense. They might possibly
want to use a local lock, but I am unsure about that.
Cc: netdev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The subsystem rwsem is not used by the driver core at all, so the use of
it in the ieee1394 code doesn't make any sense. They might possibly
want to use a local lock, but as most of these operations are already
protected by a local lock, it really doesn't look like it would be
needed.
Cc: Ben Collins <[email protected]>
Cc: Stefan Richter <[email protected]>
Cc: linux1394-devel <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The subsystem rwsem is not used by the driver core at all, so the use of
it in the ide-proc code of it doesn't make any sense. Perhaps a local
lock might be needed, but I do not really think so.
Cc: Bartlomiej Zolnierkiewicz <[email protected]>
Cc: linux ide <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The rwsem is not used to protect anything, so the use of it by the PNP
subsystem isn't really useful, and it's doubtful if it really did anything or
not. So I've removed it.
Cc: Adam Belay <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The driver core stopped using the rwsem a long time ago, yet the USB
core still grabbed the lock, thinking it protected something. This
patch removes that useless use.
Cc: Alan Stern <[email protected]>
Cc: Oliver Neukum <[email protected]>
Cc: David Brownell <[email protected]>
Cc: linux-usb-devel <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
SCSI was using the incorrect lock to protect walking the list of all
devices in the class. This patch fixes this.
Cc: James Bottomley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This lock is never used by the rest of the driver core, so the fact that
we are grabbing it here means it isn't correct...
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The completion in the driver release path is due to ancient history in
the _very_ early 2.5 days when we were not tracking the module reference
count of attributes. It is not needed at all and can be removed.
Note, we now have an empty release function for the driver structure.
This is due to the fact that drivers are statically allocated in the
system at this point in time, something which I want to change in the
future. But remember, drivers are really code, which is reference
counted by the module, unlike devices, which are data and _must_ be
reference counted properly in order to work correctly.
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This moves all of the Novatel device ids to the option driver, where
they belong.
Thanks to Novatel for providing a list of all supported devices.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This moves the device symlink back to sysfs even if
CONFIG_SYSFS_DEPRECATED is enabled as too many userspace programs (well,
HAL), still rely on this link to be present.
I will rework the ability for sysfs to change layouts like this in the
future, but for now, this patch should fix people's network connections.
Cc: Kay Sievers <[email protected]>
Cc: Matt Mackall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This reverts commit 63ce18cfe6.
It was the incorrect fix and causes a reference counting bug whenever
any driver module is removed from the system. Mike Galbraith
<[email protected]> is looking for the real fix for his problem.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The ioctl is commented out for now, until we verify some userspace
application issues.
Cc: Christian Lucht <[email protected]>
Cc: Robert Marquardt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This adds all of the known Option device ids to the driver.
Many thanks to some Option engineers for getting me this list.
Cc: Matthias Urlichs <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There is no need to have two tables with the same device ids in it.
Cc: Matthias Urlichs <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This reverts commit c353c3fb07.
It turns out that we end up with a loop trying to load the unix
module and calling netfilter to do that. Will redo the patch
later to not have this loop.
Acked-by: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
No one uses it, and it wasn't exported to modules, so remove it. The
only other user of it was the network code, which is now converted to
use struct device instead.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
A simple driver to turn on the charging capability of a USB BlackBerry
device when it is plugged into the machine. It does not bind to the
device, so all userspace programs can still sync properly with it.
Note, if CONFIG_USB_SUSPEND is enabled, it can play havoc with this
device as the power to the port will be shut down. This device id will
have to be added to the global blacklist table when it is created.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This reverts commit 2943ecf2ed.
This should go through the SPI maintainer, it was my fault that it did
not. Especially as it conflicts with other patches he has pending.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This reverts commit b11056355e.
It was incorrect, the proper fix is coming through the SATA tree, sorry
about that.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Thanks to Johannes Hölzl <[email protected]> for fixing a few
things and getting it all working properly.
This adds support for dynamic usb ids to the usb serial core. The file
"new_id" will show up under the usb serial driver, not the usb driver
associated with the usb-serial driver (yeah, it can be a bit confusing
at first glance...)
This patch also modifies the USB core to allow the usb-serial core to
reuse much of the dynamic id logic.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Johannes Hölzl <[email protected]>
This moves the usb class devices that control the usbfs nodes to show up
in the proper place in the larger device tree.
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This adds the module name to all USB drivers, if they are built into the
kernel or not. It will show up in /sys/modules/MODULE_NAME/drivers/
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This adds the module name to all SERIO drivers, if they are built into
the kernel or not. It will show up in /sys/modules/MODULE_NAME/drivers/
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This adds the module name to all PCI drivers, if they are built into the
kernel or not. It will show up in /sys/modules/MODULE_NAME/drivers/
It also fixes up the IDE core, which was calling __pci_register_driver()
directly.
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This changes the module core to only create the drivers/ directory if we
are going to put something in it.
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This lets the network core have the ability to handle suspend/resume
issues, if it wants to.
Thanks to Frederik Deweerdt <[email protected]> for the arm
driver fixes.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Cc: <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Cc: <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
It should be ok to pass in NULL for some kobject functions, so add error
checking for all exported kobject functions to be more robust.
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch removes a duplicate device id from the IPR driver. Based on
the ipr.h file, I'm not so sure this was intended to be a duplicate, and
if so, the .h file should be modified to use the proper sub-device id
instead.
This was pointed out to me by Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Brian King <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
Disable the USB_MULTITHREAD_PROBE option because it causes crashes on
people's machines and they never remember to actually read the config
help files.
No one likes this, everyone hates it, I'm going to go eat worms...
The full logic will be ripped out later.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
It also makes the struct sound_card to show up as a "real" device
where all the different sound class devices are placed as childs
and different card attribute files can hang off of. /sys/class/sound is
still a flat directory, but the symlink targets of all devices belonging
to the same card, point the the /sys/devices tree below the new card
device object.
Thanks to Kay for the updates to this patch.
Signed-off-by: Kay Sievers <[email protected]>
Acked-by: Jaroslav Kysela <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Also fixes up the isdn drivers that were putting something in the class
device's directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This also ment that some of the misc drivers had to also be fixed
up as they were assuming the device was a class_device.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If CONFIG_SYSFS_DEPRECATED is enabled, old versions of udev will work
properly with devices that are associated with a class.
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
It's not really broken, but people keep running into other problems
caused by it. Re-enable it so that the drivers get stress tested.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Might speed up some systems. If nothing else, a bad driver should not
take the whole USB subsystem down with it.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Moved the attributes into a group, making the compiler be quiet about
ignoring the return value of the file create calls. This also also
fixed a bug when removing the files, which were not symlinks.
Cc: "Ed L. Cashin" <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This makes it possible to build pci hotplug drivers outside of the main
kernel tree, and Sam keeps telling me to move local header files to
their proper places...
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add support for Moschip 7720 USB dual port usb to serial device.
This driver is originally based on the drivers/usb/io_edgeport.c driver.
Cleaned up and forward ported by me.
Cc: VijayaKumar <[email protected]>
Cc: AjayKumar <[email protected]>
Cc: Gurudeva <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Deleted some unused code that could do bad things on non-x86 platforms.
Also fixed some minor formatting errors.
Thanks to Al Viro for pointing out the sparse errors.
Cc: Tony Olech <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Thanks to Andrew for the original patch for this.
I need to upgrade my version of gcc to catch these things...
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This provides a build and run-time option to turn on multhreaded probe
for all PCI drivers. It can cause bad problems on multi-processor
machines that take a while to find their root disks, and play havoc on
machines that don't use persistant device names for block or network
devices.
But it can cause speedups on some machines, my tiny laptop's boot goes
up by 0.4 seconds, and my desktop boots up several seconds faster.
Use at your own risk!!!
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This adds the infrastructure for drivers to do a threaded probe, and
waits at init time for all currently outstanding probes to complete.
A new kernel thread will be created when the probe() function for the
driver is called, if the multithread_probe bit is set in the driver
saying it can support this kind of operation.
I have tested this with USB and PCI, and it works, and shaves off a lot
of time in the boot process, but there are issues with finding root boot
disks, and some USB drivers assume that this can never happen, so it is
currently not enabled for any bus type. Individual drivers can enable
this right now if they wish, and bus authors can selectivly turn it on
as well, once they determine that their subsystem will work properly
with it.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Makes it easier for devices to create and remove binary attribute files
so they don't have to call directly into sysfs. This is needed to help
with the conversion from struct class_device to struct device.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
When moving class_device usage over to device, we need to handle
class_interfaces properly with devices. This patch adds that support.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This change creates a devices/virtual/CLASS_NAME tree for struct devices
that belong to a class, yet do not have a "real" struct device for a
parent. It automatically creates the directories on the fly as needed.
Cc: Kay Sievers <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This adds two new callbacks to the class structure:
int (*dev_uevent)(struct device *dev, char **envp, int num_envp,
char *buffer, int buffer_size);
void (*dev_release)(struct device *dev);
And one pointer:
struct device_attribute * dev_attrs;
which all corrispond with the same thing as the "normal" class devices
do, yet this is for when a struct device is bound to a class.
Someday soon, struct class_device will go away, and then the other
fields in this structure can be removed too. But this is necessary in
order to get the transition to work properly.
Tested out on a network core patch that converted it to use struct
device instead of struct class_device.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes an oops when a device is attached to a class, yet has no
"parent" device. An example of this would be the "lo" device in the
network core.
We should create a "virtual" subdirectory under /sys/devices/ for these,
but no one seems to agree on a proper name for it yet...
Oh, and update my copyright on the driver core.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This is needed for the network class devices in order to be able to
convert over to use struct device.
Signed-off-by: Greg Kroah-Hartman <[email protected]>