summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] ide: more conversion to pci_get APIsAlan Cox2006-12-084-12/+18
| | | | | | | | | This completes IDE except for one use which requires a new core PCI function and will be polished up at the end Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] sysctl: fix sys_sysctl interface of ipc sysctlsEric W. Biederman2006-12-081-0/+60
| | | | | | | | | | | | | Currently there is a regression and the ipc sysctls don't show up in the binary sysctl namespace. This patch adds sysctl_ipc_data to read data/write from the appropriate namespace and deliver it in the expected manner. [akpm@osdl.org: warning fix] Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] sysctl: simplify ipc ns specific sysctlsEric W. Biederman2006-12-081-57/+49Star
| | | | | | | | | | | | | | | Refactor the ipc sysctl support so that it is simpler, more readable, and prepares for fixing the bug with the wrong values being returned in the sys_sysctl interface. The function proc_do_ipc_string() was misnamed as it never handled strings. It's magic of when to work with strings and when to work with longs belonged in the sysctl table. I couldn't tell if the code would work if you disabled the ipc namespace but it certainly looked like it would have problems. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] sysctl: implement sysctl_uts_string()Eric W. Biederman2006-12-081-5/+32
| | | | | | | | | | | | The problem: When using sys_sysctl we don't read the proper values for the variables exported from the uts namespace, nor do we do the proper locking. This patch introduces sysctl_uts_string which properly fetches the values and does the proper locking. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] sysctl: simplify sysctl_uts_stringEric W. Biederman2006-12-081-102/+26Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The binary interface to the namespace sysctls was never implemented resulting in some really weird things if you attempted to use sys_sysctl to read your hostname for example. This patch series simples the code a little and implements the binary sysctl interface. In testing this patch series I discovered that our 32bit compatibility for the binary sysctl interface is imperfect. In particular KERN_SHMMAX and KERN_SMMALL are size_t sized quantities and are returned as 8 bytes on to 32bit binaries using a x86_64 kernel. However this has existing for a long time so it is not a new regression with the namespace work. Gads the whole sysctl thing needs work before it stops being easy to shoot yourself in the foot. Looking forward a little bit we need a better way to handle sysctls and namespaces as our current technique will not work for the network namespace. I think something based on the current overlapping sysctl trees will work but the proc side needs to be redone before we can use it. This patch: Introduce get_uts() and put_uts() (used later) and remove most of the special cases for when UTS namespace is compiled in. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection: defaults likely to please a new userDon Mullis2006-12-083-0/+4
| | | | | | | | | | | | | Assign defaults most likely to please a new user: 1) generate some logging output (verbose=2) 2) avoid injecting failures likely to lock up UI (ignore_gfp_wait=1, ignore_gfp_highmem=1) Signed-off-by: Don Mullis <dwm@meer.net> Cc: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection: optimize and simplify should_fail()Don Mullis2006-12-081-7/+4Star
| | | | | | | | | | | | Trivial optimization and simplification of should_fail(). Do cheaper disqualification tests first (performance gain not quantified). Simplify logic; eliminate goto. Signed-off-by: Don Mullis <dwm@meer.net> Cc: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection: Clamp debugfs stacktrace-depth to MAX_STACK_TRACE_DEPTHDon Mullis2006-12-081-4/+23
| | | | | | | | | | Clamp /debug/fail*/stacktrace-depth to MAX_STACK_TRACE_DEPTH. Ensures that a read of /debug/fail*/stacktrace-depth always returns a truthful answer. Signed-off-by: Don Mullis <dwm@meer.net> Cc: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection: Use bool-true-false throughoutDon Mullis2006-12-082-22/+20Star
| | | | | | | | | Use bool-true-false throughout. Signed-off-by: Don Mullis <dwm@meer.net> Cc: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection: Correct, disambiguate, and reformat documentationDon Mullis2006-12-082-37/+37
| | | | | | | | | Correct, disambiguate, and reformat documentation. Signed-off-by: Don Mullis <dwm@meer.net> Cc: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection: stacktrace filtering kconfig fixAndrew Morton2006-12-081-1/+1
| | | | | | | | | | | `select' doesn't work very well. With alpha `make allmodconfig' we end up with CONFIG_STACKTRACE enabled, so we end up with undefined save_stacktrace() at link time. Cc: Akinobu Mita <akinobu.mita@gmail.com> Cc: Don Mullis <dwm@meer.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection Kconfig cleanupAndrew Morton2006-12-081-16/+11Star
| | | | | | | | | | | | - Fix some spelling and grammatical errors - Make the Kconfig menu more conventional. First you select fault-injection, then under that you select particular clients of it. Cc: Akinobu Mita <akinobu.mita@gmail.com> Cc: Don Mullis <dwm@meer.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault injection: stacktrace filteringAkinobu Mita2006-12-084-5/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides stacktrace filtering feature. The stacktrace filter allows failing only for the caller you are interested in. For example someone may want to inject kmalloc() failures into only e100 module. they want to inject not only direct kmalloc() call, but also indirect allocation, too. - e100_poll --> netif_receive_skb --> packet_rcv_spkt --> skb_clone --> kmem_cache_alloc This patch enables to detect function calls like this by stacktrace and inject failures. The script Documentaion/fault-injection/failmodule.sh helps it. The range of text section of loaded e100 is expected to be [/sys/module/e100/sections/.text, /sys/module/e100/sections/.exit.text) So failmodule.sh stores these values into /debug/failslab/address-start and /debug/failslab/address-end. The maximum stacktrace depth is specified by /debug/failslab/stacktrace-depth. Please see the example that demonstrates how to inject slab allocation failures only for a specific module in Documentation/fault-injection/fault-injection.txt [dwm@meer.net: reject failure if any caller lies within specified range] Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Don Mullis <dwm@meer.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault injection: process filtering for fault-injection capabilitiesAkinobu Mita2006-12-084-1/+86
| | | | | | | | | | | | | | This patch provides process filtering feature. The process filter allows failing only permitted processes by /proc/<pid>/make-it-fail Please see the example that demostrates how to inject slab allocation failures into module init/cleanup code in Documentation/fault-injection/fault-injection.txt Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection capability for disk IOAkinobu Mita2006-12-085-0/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides fault-injection capability for disk IO. Boot option: fail_make_request=<probability>,<interval>,<space>,<times> <interval> -- specifies the interval of failures. <probability> -- specifies how often it should fail in percent. <space> -- specifies the size of free space where disk IO can be issued safely in bytes. <times> -- specifies how many times failures may happen at most. Debugfs: /debug/fail_make_request/interval /debug/fail_make_request/probability /debug/fail_make_request/specifies /debug/fail_make_request/times Example: fail_make_request=10,100,0,-1 echo 1 > /sys/blocks/hda/hda1/make-it-fail generic_make_request() on /dev/hda1 fails once per 10 times. Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection capability for alloc_pages()Akinobu Mita2006-12-082-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides fault-injection capability for alloc_pages() Boot option: fail_page_alloc=<interval>,<probability>,<space>,<times> <interval> -- specifies the interval of failures. <probability> -- specifies how often it should fail in percent. <space> -- specifies the size of free space where memory can be allocated safely in pages. <times> -- specifies how many times failures may happen at most. Debugfs: /debug/fail_page_alloc/interval /debug/fail_page_alloc/probability /debug/fail_page_alloc/specifies /debug/fail_page_alloc/times /debug/fail_page_alloc/ignore-gfp-highmem /debug/fail_page_alloc/ignore-gfp-wait Example: fail_page_alloc=10,100,0,-1 The page allocation (alloc_pages(), ...) fails once per 10 times. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection capability for kmallocAkinobu Mita2006-12-083-2/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides fault-injection capability for kmalloc. Boot option: failslab=<interval>,<probability>,<space>,<times> <interval> -- specifies the interval of failures. <probability> -- specifies how often it should fail in percent. <space> -- specifies the size of free space where memory can be allocated safely in bytes. <times> -- specifies how many times failures may happen at most. Debugfs: /debug/failslab/interval /debug/failslab/probability /debug/failslab/specifies /debug/failslab/times /debug/failslab/ignore-gfp-highmem /debug/failslab/ignore-gfp-wait Example: failslab=10,100,0,-1 slab allocation (kmalloc(), kmem_cache_alloc(),..) fails once per 10 times. Cc: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault-injection capabilities infrastructureAkinobu Mita2006-12-084-0/+265
| | | | | | | | | | | | | | | This patch provides base functions implement to fault-injection capabilities. - The function should_fail() is taken from failmalloc-1.0 (http://www.nongnu.org/failmalloc/) [akpm@osdl.org: cleanups, comments, add __init] Cc: <okuji@enbug.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Don Mullis <dwm@meer.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fault injection: documentation and scriptsAkinobu Mita2006-12-084-0/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 - Boot option failslab= fail_page_alloc= fail_make_request= - Debugfs /debug/failslab/* /debug/fail_page_alloc/* /debug/fail_make_request/* Please refer to the Documentation/fault-injection/fault-injection.txt for details. 4. See what really happens. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Don Mullis <dwm@meer.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] nfsd: replace kmalloc+memset with kcalloc + simplify NULL checkYan Burman2006-12-082-21/+19Star
| | | | | | | | | 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>
* [PATCH] NFS3: Calculate 'w' a bit later in nfs3svc_encode_getaclres()Jesper Juhl2006-12-081-4/+4
| | | | | | | | | | | | | | | | | 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>
* [PATCH] NFS2: Calculate 'w' a bit later in nfsaclsvc_encode_getaclres()Jesper Juhl2006-12-081-4/+4
| | | | | | | | | | | | | | | | | 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>
* [PATCH] lockdep: annotate nfsd4 recover codePeter Zijlstra2006-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > ============================================= > [ INFO: possible recursive locking detected ] > 2.6.18-1.2724.lockdepPAE #1 > --------------------------------------------- > nfsd/6884 is trying to acquire lock: > (&inode->i_mutex){--..}, at: [<c04811e5>] vfs_rmdir+0x73/0xf4 > > but task is already holding lock: > (&inode->i_mutex){--..}, at: [<f8dfa621>] > nfsd4_clear_clid_dir+0x1f/0x3d [nfsd] > > other info that might help us debug this: > 3 locks held by nfsd/6884: > #0: (hash_sem){----}, at: [<f8de05eb>] nfsd+0x181/0x2ea [nfsd] > #1: (client_mutex){--..}, at: [<f8df6d19>] > nfsd4_setclientid_confirm+0x3b/0x2cf [nfsd] > #2: (&inode->i_mutex){--..}, at: [<f8dfa621>] > nfsd4_clear_clid_dir+0x1f/0x3d [nfsd] > > stack backtrace: > [<c040524d>] dump_trace+0x69/0x1af > [<c04053ab>] show_trace_log_lvl+0x18/0x2c > [<c040595f>] show_trace+0xf/0x11 > [<c0405a53>] dump_stack+0x15/0x17 > [<c043ca7a>] __lock_acquire+0x110/0x9b6 > [<c043d91e>] lock_acquire+0x5c/0x7a > [<c061a41b>] __mutex_lock_slowpath+0xde/0x234 > [<c04811e5>] vfs_rmdir+0x73/0xf4 > [<f8dfa62b>] nfsd4_clear_clid_dir+0x29/0x3d [nfsd] > [<f8dfa733>] nfsd4_remove_clid_dir+0xb8/0xf8 [nfsd] > [<f8df6e90>] nfsd4_setclientid_confirm+0x1b2/0x2cf [nfsd] > [<f8def19a>] nfsd4_proc_compound+0x137a/0x166c [nfsd] > [<f8de00d5>] nfsd_dispatch+0xc5/0x180 [nfsd] > [<f8d09d83>] svc_process+0x3bd/0x631 [sunrpc] > [<f8de0604>] nfsd+0x19a/0x2ea [nfsd] > [<c0404e27>] kernel_thread_helper+0x7/0x10 > DWARF2 unwinder stuck at kernel_thread_helper+0x7/0x10 > Leftover inexact backtrace: > ======================= 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>
* [PATCH] ISDN: fix warningsJeff Garzik2006-12-083-5/+13
| | | | | | | | | | | | | * 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>
* [PATCH] i4l: remove the broken HISAX_AMD7930 optionAdrian Bunk2006-12-083-31/+0Star
| | | | | | | | | | HISAX_AMD7930 was never anywhere near to being working, and this doesn't seem to change in the forseeable future. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] isdn: replace kmalloc+memset with kzallocBurman Yan2006-12-0830-99/+46Star
| | | | | | Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] drivers/isdn/*: trivial vsnprintf() conversionAlexey Dobriyan2006-12-083-4/+4
| | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Alan Cox <alan@redhat.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] ISDN: Avoid a potential NULL ptr deref in ipppJesper Juhl2006-12-081-0/+5
| | | | | | | | | | | | | | | | 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. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] isdn: fix missing unregister_capi_driverAkinobu Mita2006-12-081-0/+1
| | | | | | | | | | | unregister_capi_driver() needs to be called in module cleanup. (It fixes data corruption by reloading t1isa driver) Cc: Kai Germaschewski <kai.germaschewski@gmx.de> Acked-by: Karsten Keil <kkeil@suse.de> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] drivers/isdn: Handcrafted MIN/MAX Macro removalAmol Lad2006-12-085-17/+9Star
| | | | | | | | | | | Cleanups done to use min/max macros from kernel.h. Handcrafted MIN/MAX macros are changed to use macros in kernel.h [akpm@osdl.org: warning fix] Signed-off-by: Amol Lad <amol@verismonetworks.com> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Char: cyclades, fix warningsJiri Slaby2006-12-081-2/+3
| | | | | | | | | fix gcc signed/unsigned warnings 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>
* [PATCH] Char: cyclades, cleanupJiri Slaby2006-12-081-83/+50Star
| | | | | | | | | | | | | | | - 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>
* [PATCH] Char: cyclades, Lindent the codeJiri Slaby2006-12-081-3808/+3942
| | | | | | | | | make the code indented by tabs. 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>
* [PATCH] Char: cyclades, save indent levelsJiri Slaby2006-12-081-335/+340
| | | | | | | | | | | | 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>
* [PATCH] Char: istallion, use mod_timerJiri Slaby2006-12-081-4/+2Star
| | | | | | | | | Do not set expires by hand, use kernel helper, which also calls add_timer. 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>
* [PATCH] Char: istallion, dynamic tty deviceJiri Slaby2006-12-081-1/+14
| | | | | | | | | register tty device dynamically according to the count of board ports. 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>
* [PATCH] Char: istallion, change init sequenceJiri Slaby2006-12-081-55/+75
| | | | | | | | | | | 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>
* [PATCH] Char: istallion, move init and exit codeJiri Slaby2006-12-081-61/+52Star
| | | | | | | | | | | 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>
* [PATCH] Char: istallion, fix enablingJiri Slaby2006-12-081-7/+11
| | | | | | | | | | Enable ISA cards before pci_register_driver and then, enable each PCI card in probe function. 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>
* [PATCH] Char: istallion, correct fail pathsJiri Slaby2006-12-081-61/+81
| | | | | | | | | Check more retvals and react somehow. 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>
* [PATCH] Char: istallion, free only isaJiri Slaby2006-12-081-1/+3
| | | | | | | | | | Only ISA cards should be freed in module exit. Pci probed are freed in pci_remove. Define a flag, where we store this info a what to check against. 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>
* [PATCH] Char: istallion, brdnr lockingJiri Slaby2006-12-081-4/+11
| | | | | | | | | Kill possible race when getting brdnr by locking. 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>
* [PATCH] Char: istallion, ifdef eisa codeJiri Slaby2006-12-081-2/+11
| | | | | | | | | Disable compiling eisa stuff if STLI_EISAPROBE == 0. 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>
* [PATCH] Char: istallion, variables cleanupJiri Slaby2006-12-082-57/+67
| | | | | | | | | | - wipe gcc -W warnings by int -> uint conversion - move 2 global variables into their local place 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>
* [PATCH] Char: istallion, eliminate typedefsJiri Slaby2006-12-082-214/+212Star
| | | | | | | | | Use only struct <name> instead of defining a new type <name_t>. 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>
* [PATCH] Char: istallion, remove the messJiri Slaby2006-12-081-170/+36Star
| | | | | | | | | | | | | | - 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>
* [PATCH] Char: istallion, convert to pci probingJiri Slaby2006-12-081-49/+67
| | | | | | | | | | | 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>
* [PATCH] Char: stallion, use dynamic devJiri Slaby2006-12-081-6/+27
| | | | | | | | | | Use dynamic tty device registering depending on board's port count. (i -> retval change is relevant, since gcc complains about signedness of i) 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>
* [PATCH] Char: stallion, variables cleanupJiri Slaby2006-12-082-50/+45Star
| | | | | | | | | | - fix `gcc -W' un/signed warnings by converting some ints -> uints. - move 3 global variables into functions, where are they used. 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>
* [PATCH] Char: stallion, remove syntactic sugarJiri Slaby2006-12-081-97/+81Star
| | | | | | | | | Remove useless parenthesis and brackets. 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>