Akinobu Mita [Fri, 8 Dec 2006 10:39:42 +0000 (02:39 -0800)]
[PATCH] fault injection: documentation and scripts
This patch set provides some fault-injection capabilities.
- kmalloc() failures
- alloc_pages() failures
- disk IO errors
We can see what really happens if those failures happen.
In order to enable these fault-injection capabilities:
1. Enable relevant config options (CONFIG_FAILSLAB, CONFIG_PAGE_ALLOC,
CONFIG_MAKE_REQUEST) and if you want to configure them via debugfs,
enable CONFIG_FAULT_INJECTION_DEBUG_FS.
2. Build and boot with this kernel
3. Configure fault-injection capabilities behavior by boot option or debugfs
Yan Burman [Fri, 8 Dec 2006 10:39:41 +0000 (02:39 -0800)]
[PATCH] nfsd: replace kmalloc+memset with kcalloc + simplify NULL check
Replace kmalloc+memset with kcalloc and simplify
Signed-off-by: Yan Burman <burman.yan@gmail.com> Cc: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jesper Juhl [Fri, 8 Dec 2006 10:39:40 +0000 (02:39 -0800)]
[PATCH] NFS3: Calculate 'w' a bit later in nfs3svc_encode_getaclres()
NFS3: Calculate 'w' a bit later in nfs3svc_encode_getaclres()
This is a small performance optimization since we can return before
needing 'w'. It also saves a few bytes of .text :
Before:
text data bss dec hex filename
1632 140 0 1772 6ec fs/nfsd/nfs3acl.o
After:
text data bss dec hex filename
1624 140 0 1764 6e4 fs/nfsd/nfs3acl.o
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jesper Juhl [Fri, 8 Dec 2006 10:39:39 +0000 (02:39 -0800)]
[PATCH] NFS2: Calculate 'w' a bit later in nfsaclsvc_encode_getaclres()
NFS2: Calculate 'w' a bit later in nfsaclsvc_encode_getaclres()
This is a small performance optimization since we can return before
needing 'w'. It also saves a few bytes of .text :
Before:
text data bss dec hex filename
2406 212 0 2618 a3a fs/nfsd/nfs2acl.o
After:
text data bss dec hex filename
2400 212 0 2612 a34 fs/nfsd/nfs2acl.o
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Some nesting annotation to the nfsd4 recovery code.
The vfs operations called will take dentry->d_inode->i_mutex.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Fri, 8 Dec 2006 10:39:37 +0000 (02:39 -0800)]
[PATCH] ISDN: fix warnings
* diva, sedlbauer: the 'ready' label is only used in certain configurations
* hfc_pci:
- cast 'arg' to proper size for testing and printing
- print out 'void __iomem *' variables with %p,
rather than using incorrect casts that throw warnings
Signed-off-by: Jeff Garzik <jeff@garzik.org> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jesper Juhl [Fri, 8 Dec 2006 10:39:34 +0000 (02:39 -0800)]
[PATCH] ISDN: Avoid a potential NULL ptr deref in ippp
There's a potential problem in isdn_ppp.c::isdn_ppp_decompress().
dev_alloc_skb() may fail and return NULL. If it does we will be passing a
NULL skb_out to ipc->decompress() and may also end up
dereferencing a NULL pointer at
*proto = isdn_ppp_strip_proto(skb_out);
Correct this by testing 'skb_out' against NULL early and bail out.
Jiri Slaby [Fri, 8 Dec 2006 10:39:30 +0000 (02:39 -0800)]
[PATCH] Char: cyclades, cleanup
- remove cvs rcsid and alter code that uses it.
- allow a semicolon after use of macro to not confuse parsers (e.g. indent)
by do {} while (0)
- JIFFIES_DIFF is simple subtraction, subtract directly
- returns cleanup -- do not put values in parenthesis and do not return nothing
at the end of void functions
- comments are /* */ in C (not //)
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:39:28 +0000 (02:39 -0800)]
[PATCH] Char: cyclades, save indent levels
Save 3 indent levels in interrupt routine by moving the code to a separate
function. This needs to be done to allow Lindent do its work, since only 4
columns are used for indenting now and hence Lindent makes a big mess in the
code, when moves it 4*5 columns to the right.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:39:25 +0000 (02:39 -0800)]
[PATCH] Char: istallion, change init sequence
Reorganizate module init and exit and implement logic, when something fails in
these functions. The former is needed for proper handling dynamic
tty_register_device.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:39:24 +0000 (02:39 -0800)]
[PATCH] Char: istallion, move init and exit code
Let's have these function at the end of the driver and expand stli_init
directly into module_init fucntion, since there is nothing other to have
there.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:39:18 +0000 (02:39 -0800)]
[PATCH] Char: istallion, remove the mess
- remove unneeded license text
- remove functions, that are implemented in kernel -- call them (strtoul,
min, tolower)
- do not cast NULL
- there is no static table, throw away code, which takes care of it --
find module param cards in that place instead.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:39:17 +0000 (02:39 -0800)]
[PATCH] Char: istallion, convert to pci probing
Use probing for pci devices. Change some __inits to __devinits to use these
functions in probe function. Create stli_cleanup_ports and move there cleanup
code from module_exit() code to not have duplicite cleanup code.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:39:13 +0000 (02:39 -0800)]
[PATCH] Char: stallion, fix fail paths
Release everything what was allocated and check return value of isa probing.
Release only ISA boards in module exit, since pci have their own
pci-probing-remove.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:39:11 +0000 (02:39 -0800)]
[PATCH] Char: stallion, correct __init macros
Some functions are now called from pci probing functiuon which is __devinit,
not __init, correct this to not free functions after init if hotplug enabled.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:39:09 +0000 (02:39 -0800)]
[PATCH] Char: stallion, prints cleanup
Too many information is printed out (they may be easily obtained through
sysfs), wipe them out in probe function. Convert rest of them to dev_
variants.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:38:57 +0000 (02:38 -0800)]
[PATCH] Char: isicom, fix tty index check
Since tty->index is signed and may be < 0, we should assign this to int not
uint. There is already a check to ensure if it is not negative, but gcc
complains with -W flag enabled and it is perfectly correct:
drivers/char/isicom.c:953: warning: comparison of unsigned expression < 0
is always false
Fix this issue by converting `line' variable from uint to int.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:38:49 +0000 (02:38 -0800)]
[PATCH] Char: isicom, expand function
Simple functions (those, that calls reuest_irq, request_region et al) may be
expanded directly in code. It makes probe function more readable and
transparent.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Fri, 8 Dec 2006 10:38:48 +0000 (02:38 -0800)]
[PATCH] termios: Enable new style termios ioctls on x86-64
This turns on the split input/output speed features and arbitary baud rate
handling for the x86-64 platform. Nothing should break if you use existing
standard speeds. If you use the new speed stuff then you may see some
drivers failing to report the speed changes properly in error cases. This
will be worked on further. For the working cases this all seems happy.
I'll post a test suite used to test the basic stuff as well.
Patches for i386 will follow when I get a moment but are basically the
same. If people could patch/test-suite other architectures and submit them
that would be great.
Signed-off-by: Alan Cox <alan@redhat.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Fri, 8 Dec 2006 10:38:47 +0000 (02:38 -0800)]
[PATCH] tty_ioctl: use termios for the old structure and termios2 for the new
Having split out the user and kernel structures it turns out that some non
glibc C libraries pull their termios struct from the kernel headers
directly or indirectly. This means we must keep "struct termios" as the
library sees it correct for the old ioctls. Not a big problem just shuffle
the names and ifdef around a bit
[akpm@osdl.org: build fix] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Fri, 8 Dec 2006 10:38:45 +0000 (02:38 -0800)]
[PATCH] tty: switch to ktermios
This is the grungy swap all the occurrences in the right places patch that
goes with the updates. At this point we have the same functionality as
before (except that sgttyb() returns speeds not zero) and are ready to
begin turning new stuff on providing nobody reports lots of bugs
If you are a tty driver author converting an out of tree driver the only
impact should be termios->ktermios name changes for the speed/property
setting functions from your upper layers.
If you are implementing your own TCGETS function before then your driver
was broken already and its about to get a whole lot more painful for you so
please fix it 8)
Also fill in c_ispeed/ospeed on init for most devices, although the current
code will do this for you anyway but I'd like eventually to lose that extra
paranoia
[akpm@osdl.org: bluetooth fix]
[mp3@de.ibm.com: sclp fix]
[mp3@de.ibm.com: warning fix for tty3270]
[hugh@veritas.com: fix tty_ioctl powerpc build]
[jdike@addtoit.com: uml: fix ->set_termios declaration] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Martin Peschke <mp3@de.ibm.com> Acked-by: Peter Oberparleiter <oberpar@de.ibm.com> Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Fri, 8 Dec 2006 10:38:44 +0000 (02:38 -0800)]
[PATCH] tty: switch to ktermios and new framework
This is the core of the switch to the new framework. I've split it from the
driver patches which are mostly search/replace and would encourage people to
give this one a good hard stare.
The references to BOTHER and ISHIFT are the termios values that must be
defined by a platform once it wants to turn on "new style" ioctl support. The
code patches here ensure that providing
1. The termios overlays the ktermios in memory
2. The only new kernel only fields are c_ispeed/c_ospeed (or none)
the existing behaviour is retained. This is true for the patches at this
point in time.
Future patches will define BOTHER, ISHIFT and enable newer termios structures
for each architecture, and once they are all done some of the ifdefs also
vanish.
[akpm@osdl.org: warning fix]
[akpm@osdl.org: IRDA fix] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Alan Cox [Fri, 8 Dec 2006 10:38:43 +0000 (02:38 -0800)]
[PATCH] tty: preparatory structures for termios revamp
In order to sort out our struct termios and add proper speed control we need
to separate the kernel and user termios structures. Glibc is fine but the
other libraries rely on the kernel exported struct termios and we need to
extend this without breaking the ABI/API
To do so we add a struct ktermios which is the kernel view of a termios
structure and overlaps the struct termios with extra fields on the end for
now. (That limitation will go away in later patches). Some platforms (eg
alpha) planned ahead and thus use the same struct for both, others did not.
This just adds the structures but does not use them, it seems a sensible
splitting point for bisect if there are compile failures (not that I expect
them)
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:38:42 +0000 (02:38 -0800)]
[PATCH] Char: stallion, remove many prototypes
Many prototypes are useless, since functions are declared before they are
called. Also some code was easy to move to resolve this dependency and delete
prototypes.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:38:40 +0000 (02:38 -0800)]
[PATCH] Char: stallion, move init/deinit
- Move code from stl_init into module init function, because calling it was the
only one thing, that it did.
- Move this code to the end of the driver (usual place for this) to resolve
dependencies simply -- without prototypes.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:38:33 +0000 (02:38 -0800)]
[PATCH] Char: mxser_new, pci probing
Finally, the intention of the patch serie: PCI probing for this driver. add
pci_driver structure, (un)register it and add some stuff, which this needs.
Remove pdev pointer from board structure, because it's no longer needed.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:38:31 +0000 (02:38 -0800)]
[PATCH] Char: mxser_new, comments cleanup
mxser_new, comments cleanup
- Remove commented code, since we have version control.
- Remove comments containing "following added by..." and "above added by,..".
It's useless.
- Align other comments.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:38:28 +0000 (02:38 -0800)]
[PATCH] Char: mxser_new, register tty devices on the fly
Register tty indexes only for real devices, udev then creates nodes for them
(and only for them). Move tty_register_driver before probing, to be correct
when calling tty_register_device. Also tell tty layer by tty_driver flags,
that we are registering devices.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:38:27 +0000 (02:38 -0800)]
[PATCH] Char: mxser_new, compress isa finding
ISA cards finding was too complex -- 2 (module params + predefined) absolutely
same routines, join them together with one for loop, one if and one indent
level.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Like other drivers silently unregister_tty_driver and put_tty_driver. It
shouldn't be busy when module release function is called, since we are not
bsd, no refs shouldn't be held.
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jiri Slaby [Fri, 8 Dec 2006 10:38:17 +0000 (02:38 -0800)]
[PATCH] Char: mxser_new, kill unneeded memsets
mxser_new, kill unneeded memsets
There is no need to re-zero static global variables' memory, hence memsets
doing this are useless. alloc_tty_struct also zeroes allocated memory:
another candidate for removing.
This fixes also a bug -- global structures are cleaned up after
initialization of some its parts.