- 01 Nov, 2004 29 commits
-
-
Dmitry Torokhov authored
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>
-
Kay Sievers authored
On Sat, Oct 30, 2004 at 04:54:29AM +0200, Kay Sievers wrote: > On Sat, Oct 30, 2004 at 02:25:23AM +0200, Kay Sievers wrote: > > On Sat, Oct 30, 2004 at 02:00:45AM +0200, Kay Sievers wrote: > > > On Fri, Oct 29, 2004 at 06:13:19PM -0500, Greg KH wrote: > > > > On Fri, Oct 29, 2004 at 11:28:56PM +0200, Kay Sievers wrote: > > > > > > But there might still be a problem. With this change, the sequence > > > > > > number is not sent out the kevent message. Kay, do you think this is an > > > > > > issue? I don't think we can get netlink messages out of order, right? > > > > > > > > > > Right, especially not the events with the same DEVPATH, like "remove" > > > > > beating an "add". But I'm not sure if the number isn't useful. Whatever > > > > > we may do with the hotplug over netlink in the future, we will only have > > > > > /sbin/hotplug for the early boot and it may be nice to know, what events > > > > > we have already handled... > > > > > > > > > > > I'll hold off on applying this patch until we figure this out... > > > > > > > > > > How about just reserving 20 bytes for the number (u64 will never be > > > > > more than that), save the pointer to that field, and fill the number in > > > > > later? > > > > > > > > Ah, something like this instead? I like it, it's even smaller than the > > > > previous patch. Compile tested only... > > > > > > I like that. How about the following. It will keep the buffer clean from > > > random chars, cause the kevent does not have the vector and relies on > > > the '\0' to separate the strings from each other. > > > I've tested it. The netlink-hotplug message looks like this: > > > > > > recv(3, "remove@/class/input/mouse2\0ACTION=remove\0DEVPATH=/class/input/mouse2\0SUBSYSTEM=input\0SEQNUM=961 \0", 1024, 0) = 113 > > > > Hmm, these trailing spaces are just bad, sorry. I'll better pass the > > envp array over to send_uevent() and clean up the keys while copying > > the env values into the skb buffer. This will make the event payload > > more safe too. So your first version looks better. > > How about this? We copy over key by key into the skb buffer and the > netlink message can get the envp array without depending on a single > continuous buffer. > > The netlink message looks nice like this now: > > recv(3, " > add@/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0\0 > HOME=/\0 > PATH=/sbin:/bin:/usr/sbin:/usr/bin\0 > ACTION=add\0 > DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0\0 > SUBSYSTEM=usb\0 > SEQNUM=991\0 > DEVICE=/proc/bus/usb/003/008\0 > PRODUCT=46d/c03e/2000\0 > TYPE=0/0/0\0 > INTERFACE=3/1/2\0 > ", 1024, 0) = 268 Here is an improved version that uses skb_put() to fill the skb buffer, instead of trimming the buffer to the final size after we've copied over all keys. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Dmitry Torokhov authored
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>
-
Dmitry Torokhov authored
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>
-
Andrew Morton authored
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>
-
Andrew Morton authored
From: Simon Derr <Simon.Derr@bull.net> Add a `needs_read_fill' field in sysfs_buffer so that reading after a write in a sysfs file returns valid data. (instead of the data that have been written, that may be invalid or at the wrong offset) Signed-off-by: Simon Derr <simon.derr@bull.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Andrew Morton authored
From: Simon Derr <Simon.Derr@bull.net> - fixes the race between threads by adding a semaphore in sysfs_buffer - allocates the buffer upon call to pread(). We still call again fill_read_buffer() if the file is "rewinded" to offset zero. - fixes the comparison in flush_read_buffer(). Signed-off-by: Simon Derr <simon.derr@bull.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Andrew Morton authored
From: Maneesh Soni <maneesh@in.ibm.com> o This patch stops the pinning of non-directory or leaf dentries and inodes. The leaf dentries and inodes are created during lookup based on the entries on sysfs_dirent tree. These leaves are removed from the dcache through the VFS dentry ageing process during shrink dcache operations. Thus reducing about 80% of sysfs lowmem needs. o This implments the ->lookup() for sysfs directory inodes and allocates dentry and inode if the lookup is successful and avoids the need of allocating and pinning of dentry and inodes during the creation of corresponding sysfs leaf entry. As of now the implementation has not required negative dentry creation on failed lookup. As sysfs is still a RAM based filesystem, negative dentries are not of any use IMO. o The leaf dentry allocated after successful lookup is connected to the existing corresponding sysfs_dirent through the d_fsdata field. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Andrew Morton authored
From: Maneesh Soni <maneesh@in.ibm.com> o This patch implements the sysfs_dir_operations file_operations strucutre for sysfs directories. It uses the sysfs_dirent based tree for ->readdir() and ->lseek() methods instead of simple_dir_operations which use dentry based tree. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Andrew Morton authored
From: Maneesh Soni <maneesh@in.ibm.com> o This patch uses the sysfs_dirent based tree while removing sysfs files and directories. This avoids holding dcache_lock by not using dentry based vfs tree. Thus simplyfying the removal logic in sysfs. o It uses two helper routines sysfs_get_name(), to get the name for sysfs element and sysfs_drop_dentry() to delete the dentry given a sysfs_dirent. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Andrew Morton authored
From: Maneesh Soni <maneesh@in.ibm.com> o This patch introduces the new sysfs_dirent data structure. The sysfs_dirent is added to the dentry corresponding to each of the element which can be represented in sysfs like, kobject (directory), text or binary attributes (files), attribute groups (directory) and symlinks. o It uses dentry's d_fsdata field to attach the corresponding sysfs_dirent. o The sysfs_dirents are maintained in a tree of all the sysfs entries using the s_children and s_sibling list pointers. o This patch also changes how we access attributes and kobjects in file_operations from a given dentry, basically introducing one more level of indirection. o The sysfs_dirents are freed and the sysfs_dirent tree is updated accordingly upon the deletion of corresponding dentry. The sysfs dirents are kept alive as long as there is corresponding dentry around. The are freed when the dentry is finally out of dcache using the ->d_iput() method. o This also fixes the dentry leaks in case of error paths after sysfs has got a newly alocated (and hashed) dentry from sysfs_get_dentry() by d_drop()'ing the dentry. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Andrew Morton authored
From: Maneesh Soni <maneesh@in.ibm.com> My fault, a bad typo in fs/sysfs/bin.c. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Andrew Morton authored
From: Maneesh Soni <maneesh@in.ibm.com> o The following patch provides dumb helpers to access the corresponding kobject, attribute or binary attribute given a dentry and prepare the sysfs_file_operation methods for using sysfs_dirents. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
-
Matthew Wilcox authored
Add light-weight-syscall support to parisc. The first LWS is atomic CAS. Committed-by: Carlos O'Donell <carlos@parisc-linux.org>
-
Matthew Wilcox authored
Add user_space macro, to determine if we are in a user versus kernel space. Committed-by: Carlos O'Donell <carlos@parisc-linux.org>
-
Matthew Wilcox authored
Calling sys_restart_syscall without having taking a signal across a syscall leaves the restart_block uninitialized, allowing malicious user code to crash the kernel. FIX: Define INIT_THREAD_INFO such that restart_block.fn is set to the default do_not_restart_syscall. Committed-by: Carlos O'Donell <carlos@parisc-linux.org>
-
Matthew Wilcox authored
Enable SMP on A500 by default Committed-by: Paul Bame <bame@parisc-linux.org>
-
Matthew Wilcox authored
Fix N class SMP The main fixes are: - memory barriers to our space and control register moves - fix for the N class merced bus problem which can't have more than one PxTLB broadcast outstanding at once - make smp_call_function() wait until the function completes This now boots and runs on a 32MB N4000 in Fort Collins with 2 cpus and discontig mem support. Committed-by: James Bottomley <jejb@parisc-linux.org> Committed-by: Randolph Chung <tausq@parisc-linux.org>
-
Matthew Wilcox authored
Add a make install target Committed-by: Matthew Wilcox <willy@parisc-linux.org>
-
Matthew Wilcox authored
PA-RISC does have spinlock debugging and doesn't have the frame pointer option. USERMODE had been added twice to spinlock debugging, so remove that. Committed-by: Randolph Chung <tausq@parisc-linux.org> Committed-by: Matthew Wilcox <willy@parisc-linux.org>
-
Matthew Wilcox authored
add some more BL macros and b,l in appropriate places in entry.S to expand the range of our jumps and work around the 64 bit binutils problem where it will allow the jump ranges to go beyond their permitted limits without complaining. Committed-by: James Bottomley <jejb@parisc-linux.org>
-
Matthew Wilcox authored
add HP copyright Committed-by: Grant Grundler <grundler@parisc-linux.org>
-
Matthew Wilcox authored
small debug cleanup Committed-by: Randolph Chung <tausq@parisc-linux.org>
-
Matthew Wilcox authored
Merge head64.S and head.S Cleanup 64-bit sp manipulations Committed-by: Kyle McMartin <kyle@parisc-linux.org> Committed-by: Randolph Chung <tausq@parisc-linux.org>
-
-
Bartlomiej Zolnierkiewicz authored
CONFIG_IDEDMA_PCI_AUTO and CONFIG_IDEDMA_ICS_AUTO Host drivers should deal with broken hardware themselves. Warn if DMA support is enabled but "enable DMA by default" is not. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-
Bartlomiej Zolnierkiewicz authored
"hdx=autotune", "hdx=noautotune": * should be handled by host drivers needing them "idex=autotune", "idex=noautotune": * should die "idex=ata66": * should be handled by host drivers needing it "idex=dma": * works only for: cs5220.c, generic.c, hpt366.c, triflex.c * DMA should be used by default "idex=reset", "idex=serialize": * host drivers should set these settings when needed "idex=base[,ctl[,irq]]": * host drivers should auto-detect correct settings * ordering should be controlled by user-space "ide0=four": * should be handled by ide-generic driver Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-
Bartlomiej Zolnierkiewicz authored
Majority of these settings is also available through ioctls. We will deal with the rest during deprecation period. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-
Bartlomiej Zolnierkiewicz authored
From: Christoph Hellwig <hch@lst.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-
- 31 Oct, 2004 11 commits
-
-
Tero Roponen authored
Without this patch my HP CD-Writer doesn't work. With this applied everything is fine. Signed-off-by: Tero Roponen <teanropo@cc.jyu.fi> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
bk://kernel.bkbits.net/davem/sparc-2.6Linus Torvalds authored
into ppc970.osdl.org:/home/torvalds/v2.6/linux
-
Greg Ungerer authored
Need to include linux/in6.h in m68knommu checksum.h to get a clean compile. All other architectures to this too. Signed-off-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Greg Ungerer authored
Add build support for new CPU families and boards. Specifically for the 527x ColdFire family, and the generic 528x CPU family. Also made the switch to -O1, gives smaller code on m68k and ColdFire platforms. Signed-off-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Greg Ungerer authored
Completely rework m68knommu do_signal() signal handling code. Changed to use get_signal_to_deliver() properly, and remove un-neccessary local signal type checks. Signed-off-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Greg Ungerer authored
Add clock rate definitions for newly support ColdFire 527x family of CPU's. And switch to the generic 528x define for the 5280 and 5282 CPU's. Signed-off-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Greg Ungerer authored
Re-work the udelay() function. On fast ColdFire CPU's we are overflowing in the calculation and getting totally bogus results. On old 68k and ColdFire CPU's we have no 32*32->64 multiply instruction. So we resort to a mul/shift calculation similar to what ARM uses. Signed-off-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Greg Ungerer authored
Update the m68knommu system call definitions to match the modified syscall table. This will bring it into line with other architectures. Signed-off-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Greg Ungerer authored
A few updates to the m68knommu configuration: . Made the Morotola 5280 and 5282 support be a common 528x family . Add support for selecting the 527x ColdFire family (5270/5271/5274/5275) . Add support for selecting Freescale M5271EVB board . Add support for selecting Freescale M5275EVB board . Add support for selecting Sneha CPU16B board . Add support for selecting Feith SCALES and CANCAM boards . Fix some gramatical errors in help lines Signed-off-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Greg Ungerer authored
Create a real non-inlined function for m68knommu udelay(). We can save a little code space this way (and on most uClinux patforms this is a problem). Signed-off-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-
Greg Ungerer authored
Couple of updates for ther m68knommu linker script. . Add support for the Freescale M5271EVB and M5275EVB boards . Add support for the Sneha CPU16B board . Changes to use the generic 528x define to 5280 and 5282 base boards . Add the missing param section . Align the ramfs section on a 4k (pseudo page size) boundary Signed-off-by: Greg Ungerer <gerg@snapgear.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-