Jean Delvare [Mon, 16 May 2005 17:00:52 +0000 (19:00 +0200)]
[PATCH] I2C: Coding style cleanups to via686a
The via686a hardware monitoring driver has infamous coding style at the
moment. I'd like to clean up the mess before I start working on other
changes to this driver. Is the following patch acceptable? No code
change, only coding style (indentation, alignments, trailing white
space, a few parentheses and a typo).
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jean Delvare [Mon, 16 May 2005 16:52:38 +0000 (18:52 +0200)]
[PATCH] I2C: Kill common macro abuse in chip drivers
This patch kills a common macro abuse in i2c chip drivers: defining
ALARMS_FROM_REG returning its argument unchanged. Dropping the macro
makes the code somewhat more readable IMHO.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Grant Coady [Thu, 12 May 2005 03:41:51 +0000 (13:41 +1000)]
[PATCH] I2C: Setting w83627hf fan divisor 128 fails.
Jarkko Lavinen provided patch to fix: "couldn't set the divisor 128
through fan1_div sysfs entry even though the chip supports it and
setting divisors 1..64 worked. This was due to POWER_TO_REG() only
checking 2's powers 0 till 5 but not 6."
This patch applies that fix to w83627hf and w83781d drivers.
Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Grant Coady [Fri, 6 May 2005 07:40:51 +0000 (17:40 +1000)]
[PATCH] I2C: remove <linux/delay.h> from via686a
In my cross-reference checking of sysfs names, the via686a needs
special case treatment as it the only driver expands S_IWUSR to
00200 with gcc -E. (00200 is the correct value for S_IWUSR).
This is caused by the driver including <linux/delay.h>, it compiles
fine without that header but I am unable to test drive the change.
Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jean Delvare [Sat, 7 May 2005 20:58:46 +0000 (22:58 +0200)]
[PATCH] I2C: Remove redundancy from i2c-core.c
Call i2c_transfer() from i2c_master_send() and i2c_master_recv() to
avoid the redundant code that was in all three functions. It also
removes unnecessary debug statements as suggested by Jean Delvare.
This is important for the non-blocking interfaces because they will
have to handle a non-blocking interface in this area. Having it in
one place greatly simplifies the changes.
Kumar Gala [Tue, 3 May 2005 23:50:38 +0000 (18:50 -0500)]
[PATCH] I2C: Allow for sharing of the interrupt line for i2c-mpc.c
I2C-MPC: Allow for sharing of the interrupt line
On the MPC8548 devices we have multiple I2C-MPC buses however they are on the
same interrupt line. Made request_irq pass SA_SHIRQ now so the second bus can
register for the same IRQ.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jean Delvare [Tue, 26 Apr 2005 20:09:43 +0000 (22:09 +0200)]
[PATCH] I2C: Add support for the LPC47M15x and LPC47M192 chips to smsc47m1
This simple patch adds support for the SMSC LPC47M15x and LPC47M192
chips to the smsc47m1 hardware monitoring driver. These chips are
compatible with the other ones already supported by the driver, so I see
no reason not to support them, especially when the Linux 2.4 version of
the driver does already.
I also modified the info printks to name the chips by their real name.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jean Delvare [Mon, 25 Apr 2005 20:43:25 +0000 (22:43 +0200)]
[PATCH] I2C: New hardware monitoring driver: w83627ehf
This is a new hardware monitoring driver, w83627ehf, which supports the
Winbond W83627EHF Super-I/O chip. The driver is not complete, but
already usable. It only implements fan speed and temperature monitoring,
while the chip also supports voltage inputs with VID, PWM output and
temperature sensor selection. I have no more time to work on this, but
anyone with supported hardware could add the missing functionalities
later.
This driver is largely derived from the w83627hf driver.
Thanks to Leon Moonen and Steve Cliffe for tesing the preliminary
versions of my driver and reporting the problems they encountered.
Thanks to Grant Coady for noticing and fixing various corner cases in
the fan management. This third version of the driver hopefully addresses
all the issues the original version had.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Grant Coady [Sat, 30 Apr 2005 11:41:29 +0000 (21:41 +1000)]
[PATCH] I2C: add new hardware monitor driver: adm9240
Completion of Michiel Rook's port of adm9240 to 2.6 with addition
of auto fan clock divider based on Jean Delvare's algorithm, and
replaces scaling macros with static inlines.
Signed-off-by: Grant Coady <gcoady@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jean Delvare [Sat, 16 Apr 2005 16:49:22 +0000 (18:49 +0200)]
[PATCH] I2C: #include <linux/config.h> cleanup
Hi Alexey,
> Files that don't use CONFIG_* stuff shouldn't include config.h
> Files that use CONFIG_* stuff should include config.h
>
> It's that simple. ;-)
I agree. This won't change anything though, as all drivers include
either device.h or module.h, which in turn include config.h. But you are
still correct, so I approve your patch.
For completeness, I would propose the following on top of your own
patch:
i2c bus drivers do not need to define DEBUG themselves, as the Kconfig
system takes care of it.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ladislav Michl [Tue, 10 May 2005 12:08:04 +0000 (14:08 +0200)]
[PATCH] ds1337 driver works also with ds1339 chip
On Wed, May 04, 2005 at 12:07:11PM +0200, Jean Delvare wrote:
> Additionally, I would welcome an additional patch documenting the fact
> that the ds1337 driver will work fine with the Dallas DS1339 real-time
> clock chip.
Document the fact that ds1337 driver works also with DS1339 real-time
clock chip.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Ladislav Michl [Fri, 8 Apr 2005 13:06:39 +0000 (15:06 +0200)]
[PATCH] I2C: ds1337 3/4
dev_{dbg,err} functions should print client's device name. data->id can
be dropped from message, because device is determined by bus it hangs on
(it has fixed address).
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sebastian Witt [Wed, 13 Apr 2005 20:27:53 +0000 (22:27 +0200)]
[PATCH] I2C: add new atxp1 driver
Adds support for the Attansic ATXP1 I2C device, found on some x86
plattforms to change CPU and other voltages. Depends on the previous
i2c-vid.h patch.
Signed-off-by: Sebastian Witt <se.witt@gmx.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jean Delvare [Sat, 2 Apr 2005 18:04:41 +0000 (20:04 +0200)]
[PATCH] I2C: Merge unused address lists in some video drivers
On top of my previous patch which removes the use of address ranges in
video i2c drivers, this one can save an additional few bytes of memory.
Most of these drivers which do not use I2C_CLIENT_INSMOD initialize the
unused address lists in a less than optimal way. This patch simply
optimizes this, by using a single one-element list instead of 3
different lists with two elements each.
Jean Delvare [Sat, 2 Apr 2005 18:31:02 +0000 (20:31 +0200)]
[PATCH] I2C: Kill address ranges in non-sensors i2c chip drivers
Some months ago, you killed the address ranges mechanism from all
sensors i2c chip drivers (both the module parameters and the in-code
address lists). I think it was a very good move, as the ranges can
easily be replaced by individual addresses, and this allowed for
significant cleanups in the i2c core (let alone the impressive size
shrink for all these drivers).
Unfortunately you did not do the same for non-sensors i2c chip drivers.
These need the address ranges even less, so we could get rid of the
ranges here as well for another significant i2c core cleanup. Here comes
a patch which does just that. Since the process is exactly the same as
what you did for the other drivers set already, I did not split this one
in parts.
A documentation update is included.
The change saves 308 bytes in the i2c core, and an average 1382 bytes
for chip drivers which use I2C_CLIENT_INSMOD, 126 bytes for those which
do not.
This change is required if we want to merge the sensors and non-sensors
i2c code (and we want to do this).
Jesper Juhl [Wed, 22 Jun 2005 00:17:30 +0000 (17:17 -0700)]
[PATCH] md: remove unneeded NULL checks before kfree
This patch removes some unneeded checks of pointers being NULL before
calling kfree() on them. kfree() handles NULL pointers just fine, checking
first is pointless.
NeilBrown [Wed, 22 Jun 2005 00:17:28 +0000 (17:17 -0700)]
[PATCH] md: allow md to update multiple superblocks in parallel.
currently, md updates all superblocks (one on each device) in series. It
waits for one write to complete before starting the next. This isn't a big
problem as superblock updates don't happen that often.
However it is neater to do it in parallel, and if the drives in the array have
gone to "sleep" after a period of idleness, then waking them is parallel is
faster (and someone else should be worrying about power drain).
Futher, we will need parallel superblock updates for a future patch which
keeps the intent-logging bitmap near the superblock.
Also remove the silly code that retired superblock updates 100 times. This
simply never made sense.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:27 +0000 (17:17 -0700)]
[PATCH] md: allow md intent bitmap to be stored near the superblock.
This provides an alternate to storing the bitmap in a separate file. The
bitmap can be stored at a given offset from the superblock. Obviously the
creator of the array must make sure this doesn't intersect with data....
After is good for version-0.90 superblocks.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:25 +0000 (17:17 -0700)]
[PATCH] md: optimise reconstruction when re-adding a recently failed drive.
When an array is degraded, bit in the intent-bitmap are never cleared. So if
a recently failed drive is re-added, we only need to reconstruct the block
that are still reflected in the bitmap.
This patch adds support for this re-adding.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:24 +0000 (17:17 -0700)]
[PATCH] md: initialise sync_blocks in raid1 resync
Otherwise it could have a random value and might BUG. This fixes a BUG
during resync problem in raid1 introduced by the bitmap-based-intent-loggin
patches.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:22 +0000 (17:17 -0700)]
[PATCH] md: don't skip bitmap pages due to lack of bit that we just cleared.
When looking for pages that need cleaning we skip pages that don't have
BITMAP_PAGE_CLEAN set. But if it is the 'current' page we will have cleared
that bit ourselves, so skipping it is wrong. So: move the 'skip this page'
inside 'if page != lastpage'.
Also fold call of file_page_offset into the one place where the value (bit) is
used.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:18 +0000 (17:17 -0700)]
[PATCH] md: make sure md bitmap is cleared on a clean start.
As the array-wide clean bit (in the superblock) is set more agressively than
the bits in the bitmap are cleared, it is possible to have an array which is
clean despite there being bits set in the bitmap.
These bits will currently never get cleared, as they can only be cleared by a
resync pass, which never happens.
No, when reading bits from disk, be aware of whether the whole array is known
to be in sync, and act accordingly.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:16 +0000 (17:17 -0700)]
[PATCH] md: call bitmap_daemon_work regularly
bitmap_daemon_work clears bits in the bitmap for blocks that haven't been
written to for a while. It needs to be called regularly to make sure the
bitmap doesn't endup full of ones .... but it wasn't.
So call it from the increasingly-inaptly-named md_check_recovery
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:14 +0000 (17:17 -0700)]
[PATCH] md: optimised resync using Bitmap based intent logging
With this patch, the intent to write to some block in the array can be logged
to a bitmap file. Each bit represents some number of sectors and is set
before any update happens, and only cleared when all writes relating to all
sectors are complete.
After an unclean shutdown, information in this bitmap can be used to optimise
resync - only sectors which could be out-of-sync need to be updated.
Also if a drive is removed and then added back into an array, the recovery can
make use of the bitmap to optimise reconstruction. This is not implemented in
this patch.
Currently the bitmap is stored in a file which must (obviously) be stored on a
separate device.
The patch only provided infrastructure. It does not update any personalities
to bitmap intent logging.
Md arrays can still be used with no bitmap file. This patch has minimal
impact on such arrays.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:13 +0000 (17:17 -0700)]
[PATCH] md: improve the interface to sync_request
1/ change the return value (which is number-of-sectors synced)
from 'int' to 'sector_t'.
The number of sectors is usually easily small enough to fit
in an int, but if resync needs to abort, it may want to return
the total number of remaining sectors, which could be large.
Also errors cannot be returned as negative numbers now, so use
0 instead
2/ Add a 'skipped' return parameter to allow the array to report
that it skipped the sectors. This allows md to take this into account
in the speed calculations.
Currently there is no important skipping, but the bitmap-based-resync
that is coming will use this.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:12 +0000 (17:17 -0700)]
[PATCH] md: improve locking on 'safemode' and move superblock writes
When md marks the superblock dirty before a write, it calls
generic_make_request (to write the superblock) from within
generic_make_request (to write the first dirty block), which could cause
problems later.
With this patch, the superblock write is always done by the helper thread, and
write request are delayed until that write completes.
Also, the locking around marking the array dirty and writing the superblock is
improved to avoid possible races.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:11 +0000 (17:17 -0700)]
[PATCH] md: merge md_enter_safemode into md_check_recovery
md_enter_safemode checks if it is time to mark the md superblock as 'clean'.
i.e. if all writes have completed and a suitable delay has passed.
This is currently called from md_handle_safemode which in-turn is called
(almost) every time md_check_recovery is called, and from the end of
md_do_sync which causes the mddev->thread to run, which will always call
md_check_recovery as well.
So it doesn't need to be a separate function and fits quite well into
md_check_recovery.
The "almost" is because multipathd calls md_check_recovery but not
md_handle_safemode. This is OK because the code from md_enter_safemode is a
no-op if mddev->safemode == 0, which it always is for a multipathd (providing
we don't allow it to be set to 2 on a signal...)
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
NeilBrown [Wed, 22 Jun 2005 00:17:09 +0000 (17:17 -0700)]
[PATCH] md: cause md/raid1 to "repack" working devices when number of drives is changed
i.e. missing or failed drives are moved to the end of the list. The means
a 3 drive md array with the first drive missing can be shrunk to a two
drive array. Currently that isn't possible.
Also, the "last_used" device number might be out-of-range after the number
of devices is reduced, so we set it to 0.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jurriaan [Wed, 22 Jun 2005 00:17:06 +0000 (17:17 -0700)]
[PATCH] New framebuffer fonts + updated 12x22 font available
Improve the fonts for use with the framebuffer.
I've added all the characters marked 'FIXME' in the sun12x22 font and
created a 10x18 font (based on the sun12x22 font) and a 7x14 font (based
on the vga8x16 font).
This patch is non-intrusive, no options are enabled by default so most
users won't notice a thing.
I am placing my changes under the GPL, however, I've not seen any copyright
notices on the sun12x22 font and the vga8x16 font which I derived my new
fonts from so I don't know what the copyright status is.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jaya Kumar [Wed, 22 Jun 2005 00:17:04 +0000 (17:17 -0700)]
[PATCH] Framebuffer driver for Arc LCD board
Add support for the Arc monochrome LCD board.
The board uses KS108 controllers to drive individual 64x64 LCD matrices.
The board can be paneled in a variety of setups such as 2x1=128x64,
4x4=256x256 and so on. The board/host interface is through GPIO.
Signed-off-by: Jaya Kumar <jayalk@intworks.biz> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: <linux-fbdev-devel@lists.sourceforge.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Sylvain Meyer [Wed, 22 Jun 2005 00:17:02 +0000 (17:17 -0700)]
[PATCH] intelfb: fix accel detection when changing video modes
Changed the tests in intelfb_set_par to check also the parameter
var.accel_flags. If null, do nothing about ring buffers.
Now, the DirectFB i830 driver could nicely work even if intelfb is hw
accelerated. Just change the /etc/fb.modes file to disable console hw
acceleration when starting a DirectFB app.
James Simmons [Wed, 22 Jun 2005 00:17:00 +0000 (17:17 -0700)]
[PATCH] VGA to fbcon fix.
Currently when going from vgacon to fbcon the VT screenbuffer are often
different sizes. In the case when they are different sizes a new VT
screenbuffer is allocated and the contents are copied into the new buffer.
Currently the amount copied from VGA text memory to the new screenbuf is
the size of the framebuffer console. If the framebuffer console new VT
screen buffer is greater than the VGA text memory size then we get some of
the VGA BIOS contents as well.
This patch will only allow you to copy up to the size of VGA text memory
now. The rest is filled with erase characters.
Initial patch by Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: James Simmons <jsimmons@www.infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
James Simmons [Wed, 22 Jun 2005 00:16:58 +0000 (17:16 -0700)]
[PATCH] fbdev: iomove removal
Since no one is using the inbuf, outbuf of struct fb_pixmap I removed their
use in the framebuffer console. The idea is instead move the pixmap
functionality below the accelerated functions intead of on top as the way
it is now. If there is no objection please apply. This is against Linus
latestr GIT tree. Thank you.
Signed-off-by: James Simmons <jsimmons@www.infradead.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Gerd Knorr [Wed, 22 Jun 2005 00:16:56 +0000 (17:16 -0700)]
[PATCH] some vesafb fixes
Fix the size passed to release_mem_region in an error path.
Also adjust the message printed when vesafb cannot load; the comment there
already says this must not be fatal, so the message should also not mention
the word 'abort' otherwise indicating a problem to worry about in the log.
Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Gerd Knorr <kraxel@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 22 Jun 2005 00:16:55 +0000 (17:16 -0700)]
[PATCH] s1d13xxxfb linkage fix
s1d13xxxfb_remove() is referenced from s1d13xxxfb_probe(), which is marked
__devinit(). So s1d13xxxfb_remove() cannot be marked __devexit.
Does this all make sense? Clearly the __devexit section will still be in
core when the __devinit code is run, if the driver was loaded as a module.
But I suppose that if the driver is statically linked, the __devexit section
might be dropped early in boot. Still, we wouldn't drop __devexit prior to
initcall completion, at which point the __devinit code has all been run
anyway.
verdict: this code was legal and made sense. Is this a generic problem, or an
arm-specific problem?
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
`.exit.text' referenced in section `.init.text' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o
Cc: Russell King <rmk@arm.linux.org.uk> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeremy White [Wed, 22 Jun 2005 00:16:53 +0000 (17:16 -0700)]
[PATCH] isofs: show hidden files, add granularity for assoc/hidden files flags
The current isofs treatment of hidden files is flawed in two ways. First,
it does not provide sufficient granularity; it hides both 'hidden' files
and 'associated' files (resource fork for Mac files). Second, the default
behavior to completely strip hidden files, while an admirable
implementation of the spec, is a poor choice given the real world use of
hidden files as a poor mans copy protection scheme for MSDOS and Windows
based systems. A longer description of this is available here:
This patch was originally built after a few private conversations with Alan
Cox; I shamefully failed to persist in seeing it go forward, I hope to make
amends now.
This patch introduces granularity by allowing explicit control for both
hidden and associated files. It also reverses the default so that by
default, hidden files are treated as regular files on the iso9660 file
system.
This allow Wine to process Windows CDs, including those that are hybrid
Mac/Windows CDs properly and completely, without our having to go muck up
peoples fstabs as we do now. (I have tested this with such a hybrid +
hidden CD and have verified that this patch works as claimed).
Signed-off-by: Jeremy White <jwhite@codeweavers.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Wed, 22 Jun 2005 00:16:50 +0000 (17:16 -0700)]
[PATCH] rock.c: handle corrupted directories
The bug in rock.c is that it's totally trusting of the contents of the
directories. If the directory says there's a continuation 10000 bytes into
this 4k block then we cheerily poke around in memory we don't own and oops.
So change rock_continue() to apply various sanity checks, at least ensuring
that the offset+length remain within the bounds for the header part of a
struct rock_ridge directory entry.
Note that the kernel can still overindex the buffer due to the variable size
of the rock-ridge directory entries. We cannot check that in rock_continue()
unless we go parse the directory entry's signature and work out its size.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ian Kent [Wed, 22 Jun 2005 00:16:41 +0000 (17:16 -0700)]
[PATCH] autofs4: bad lookup fix
For browsable autofs maps, a mount request that arrives at the same time an
expire is happening can fail to perform the needed mount.
This happens becuase the directory exists and so the revalidate succeeds when
we need it to fail so that lookup is called on the same dentry to do the
mount. Instead lookup is called on the next path component which should be
whithin the mount, but the parent isn't mounted.
The solution is to allow the revalidate to continue and perform the mount as
no directory creation (at mount time) is needed for browsable mount entries.
Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ian Kent [Wed, 22 Jun 2005 00:16:39 +0000 (17:16 -0700)]
[PATCH] autofs4: post expire race fix
At the tail end of an expire it's possible for a process to enter
autofs4_wait, with a waitq type of NFY_NONE but find that the expire is
finished. In this cause autofs4_wait will try to create a new wait but not
notify the daemon leading to a hang. As the wait type is meant to delay mount
requests from revalidate or lookup during an expire and the expire is done all
we need to do is check if the dentry is a mountpoint. If it's not then we're
done.
Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Max Asbock [Wed, 22 Jun 2005 00:16:34 +0000 (17:16 -0700)]
[PATCH] ibmasm driver: redesign handling of remote control events
This patch rewrites the handling of remote control events. Rather than making
them available from a special file in the ibmasmfs, now the events from the
RSA card get translated into kernel input events and injected into the input
subsystem. The driver now will generate two /dev/input/eventX nodes -- one
for the keyboard and one for the mouse. The mouse node generates absolute
events more like a touch pad than a mouse.
Signed-off-by: Vernon Mauery <vernux@us.ibm.com> Signed-off-by: Max Asbock <masbock@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Max Asbock [Wed, 22 Jun 2005 00:16:33 +0000 (17:16 -0700)]
[PATCH] ibmasm driver: correctly wake up sleeping threads
Due to my incomplete understanding of the wait_event_interruptible() function
threads waiting for service processor events were not woken up. This patch
fixes that problem.
Signed-off-by: Max Asbock <masbock@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>