Commit Graph

1829 Commits

Author SHA1 Message Date
Jiri Slaby 5ff7205dd9 [PATCH] Char: mxser_new, lock count and flags
Both open count and INITIALIZED flag should be changed under lock.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <osv@javad.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 722d5e4ae8 [PATCH] Char: mxser_new, do not null driver_data
driver_data are initialzed to NULL from tty layer, no need to do it in the
driver.  In this case it cases oops, since driver_data may be NULL for a short
while for another closing process.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: <osv@javad.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby f64c84a166 [PATCH] Char: mxser_new, upgrade to 1.9.15
- allow special rates
- break when bad status

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 1a221026c3 [PATCH] Char: mxser_new, do not put pdev
We don't call pci_dev_get, so do not call pci_dev_put in the pci release
function.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 45257fa9a5 [PATCH] Char: mxser_new, fix twice resource releasing
Because brd->info is not NULLed, resources are released twice.  NULL it in
pci_remove function.  Also take care of retval and releasing in pci_probe --
mxser_initbrd alreasy releases resource, do not do it again in fail path in
probe function.

Cc: Sergei Organov <osv@javad.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby 18b95576bc [PATCH] Char: mxser_new, less loops in isr
Loop only 100^2 times, not 99999^2 times in isr (at most).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby ed79ba12e9 [PATCH] Char: mxser_new, header file cleanup
- Remove no longer used macros
- Move some macros from the header to the code
- Remove c++ comments
- Align backslashes to one column

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby f574874bc8 [PATCH] Char: mxser_new, alter locking in isr
Avoid oopsing when stress-testing open/close -- port->tty is NULL sometimes,
but is expected to be non-NULL, since dereferencing.  Receive/transmit chars
iff ASYNC_CLOSING is not set and ASYNC_INITIALIZED is set.  Thanks Sergei for
pointing this out and testing.

Cc: Sergei Organov <osv@javad.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:29 -08:00
Jiri Slaby c493edd13d [PATCH] Char: mxser_new, clean request_irq call
We always set ASYNC_SHARE_IRQ, so do not test against this flag and request
shared irq directly.  Also remove nonsense comment.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 47c85c0db1 [PATCH] Char: mxser_new, remove tty_wakeup bottomhalf
It's safe to call tty_wakeup from irq context. Do not schedule it for later
calling.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 98c47ea28a [PATCH] Char: mxser, obsolete old, nonexperimental new
Mark v 1.x as obsolete and v 2.x as non-experimental in Kconfig.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby a24f1405b0 [PATCH] Char: mxser_new, remove unused stuff
- nobody waits on close_wait
- ASYNC_SPLIT_TERMIOS is not set by anybody, so do not test this flag
- process session and pgrp are useless information

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 5e07e1ccb0 [PATCH] Char: n_r3964, cleanup
- Lindent the code
- allow semicolons after macros by 'do {} while (0)'
- eliminate C++ comments

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 44bafdf37b [PATCH] Char: serial167, cleanup
serial167, cleanup

- Lindent the code
- remove 3 pointers from paranoia_check

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby 30a063a900 [PATCH] Char: mxser_new, remove useless spinlock
gm_lock is useless, since ISA is configured at init time and there it's
serialized.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Jiri Slaby c76b09301e [PATCH] Char: mxser_new, mark init functions
Mark some funcions with __init and __devinit.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:28 -08:00
Adrian Bunk 1b135431ab [PATCH] drivers/char/vc_screen.c: proper prototypes
Add proper prototypes for two functions in drivers/char/vc_screen.c

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:27 -08:00
Jiri Slaby b963a8441c [PATCH] Char: tty_wakeup cleanup
tty_wakeup cleanup

- remove wake_up_interruptible(&tty->write_wait) surrounding
  tty_wakup(tty);
- substitute tty->ldisc.write_wakeup(tty) + wake_up() by tty_wakeup(tty);

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:26 -08:00
Jiri Slaby 1ed0c0b730 [PATCH] Char: isicom, correct probing/removing
Don't forget to decrease card_count in fail paths and in remove function.
Also null board->base in such cases to point out, that this structure is
unused and thus can be reassigned.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:26 -08:00
Jiri Slaby 7edc136ab6 [PATCH] Char: isicom, support higher rates
Add support for higher baud rates (coming from original isi driver).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:26 -08:00
Jiri Slaby cb4a10ccb0 [PATCH] Char: isicom, check card state in isr
Check if the card really interrupted us by reading its IO space and eventualy
return IRQ_NONE.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:26 -08:00
Jiri Slaby f0a0ba6d69 [PATCH] Char: isicom, augment card_reset
isicom, augment card_reset

- add 0xee to signatures
- change long delays to sleeps
- make one sleep shorter not to wait 3s
- portcount == 16 is also correct

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:25 -08:00
Jiri Slaby 174f130767 [PATCH] Char: isicom, fix locking in isr
2 spin_unlocks are omitted in the interrupt handler.  Put them there to fix up
deadlocking on UP.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:25 -08:00
Adrian Bunk 02d3fca092 [PATCH] make drivers/char/mxser_new.c:mxser_hangup() static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:25 -08:00
Andreas Jaggi a356995872 [PATCH] mxser: remove ambiguous redefinition of INIT_WORK
Removes an unused and ambiguous redefinition of INIT_WORK()

Signed-off-by: Andreas Jaggi <andreas.jaggi@waterwave.ch>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:25 -08:00
Jiri Slaby 0aa5de8590 [PATCH] Char: isicom, remove tty_{hang,wake}up bottomhalves
- tty_hangup() itself schedules work, so there is no need to schedule hangup
  in the driver

- tty_wakeup(): it's safe to call it while in atomic, so that its
  schedule_work might be also wiped out

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:25 -08:00
Jiri Slaby dd65aa6690 [PATCH] Char: tty, delete wake_up_interruptible after tty_wakeup
tty_wakeup calls wake_up_interruptible(&tty->write_wait) itself, it's not
needed to wake up again after tty_wakeup returns.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:25 -08:00
Eric W. Biederman 8b6312f4dc [PATCH] vt: refactor console SAK processing
This does several things.
- It moves looking up of the current foreground console into process
  context where we can safely take the semaphore that protects this
  operation.
- It uses the new flavor of work queue processing.
- This generates a factor of do_SAK, __do_SAK that runs immediately.
- This calls __do_SAK with the console semaphore held ensuring nothing
  else happens to the console while we process the SAK operation.
- With the console SAK processing moved into process context this
  patch removes the xchg operations that I used to attempt to attomically
  update struct pid, because of the strange locking used in the SAK processing.
  With SAK using the normal console semaphore nothing special is needed.

Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:24 -08:00
Andrew Morton 1c14cfbbe7 [AGPGART] allow drm populated agp memory types cleanups
Fix whitespace, braces, use kzalloc().

Cc: Dave Airlie <airlied@linux.ie>
Cc: Thomas Hellstrom <thomas@tungstengraphics.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-10 19:56:36 -05:00
Jiri Slaby 2a598df595 Input: remove scan_keyb driver
This driver is currently unused (unreferenced) besides the fact
that it's broken.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-02-10 01:30:18 -05:00
Wim Van Sebroeck 9af9fc45dd Merge ../linux-2.6-watchdog-mm 2007-02-09 21:35:36 +01:00
Linus Torvalds 2fd592e45b Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-apm
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-apm:
  [APM] SH: Convert to use shared APM emulation.
  [APM] MIPS: Convert to use shared APM emulation.
  [APM] ARM: Convert to use shared APM emulation.
  [APM] Add shared version of APM emulation
2007-02-09 09:44:28 -08:00
Al Viro 11718b4d6b [PATCH] misc NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:14:07 -08:00
Ralf Baechle 7726942fb1 [APM] Add shared version of APM emulation
Currently ARM and MIPS both have nearly identical copies of the APM
emulation code in their arch code.  Add yet another copy of it to
drivers char and make it selectable through SYS_SUPPORTS_APM_EMULATION.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-09 17:08:57 +00:00
Linus Torvalds 21eb4fa170 Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
* master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc: (116 commits)
  [POWERPC] Add export of vgacon_remap_base
  [POWERPC] Remove bogus comment about page_is_ram
  [POWERPC] windfarm: don't die on suspend thread signal
  [POWERPC] Fix comment in kernel/irq.c
  [POWERPC] ppc: Fix booke watchdog initialization
  [POWERPC] PPC: Use ARRAY_SIZE macro when appropriate
  [POWERPC] Use ARRAY_SIZE macro when appropriate
  [POWERPC] Fix ppc64's writing to struct file_operations
  [POWERPC] ppc: use syslog macro for the printk log level
  [POWERPC] ppc: cs4218_tdm remove extra brace
  [POWERPC] Add mpc52xx/lite5200 PCI support
  [POWERPC] Only use H_BULK_REMOVE if the firmware supports it
  [POWERPC] Fixup error handling when emulating a floating point instruction
  [POWERPC] Enable interrupts if we are doing fp math emulation
  [POWERPC] Added kprobes support to ppc32
  [POWERPC] Make pSeries use the H_BULK_REMOVE hypervisor call
  [POWERPC] Clear RI bit in MSR before restoring r13 when returning to userspace
  [POWERPC] Fix performance monitor exception
  [POWERPC] Compile fixes for arch/powerpc dcr code
  [POWERPC] Maple: use mmio nvram
  ...
2007-02-08 10:04:20 -08:00
Thomas Hellstrom 1545085a28 drm: Allow for 44 bit user-tokens (or drm_file offsets) 2007-02-08 16:14:05 +11:00
Stefan Roese f31909c003 [POWERPC] ppc: Fix booke watchdog initialization
Fix two problems in the book-e watchdog driver.

a) The 4xx default period was defined wrong
b) Clear status before enabling the watchdog exception

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-08 16:08:30 +11:00
Thomas Hellstrom 756db73df7 drm/via: Disable AGP DMA for chips with the new 3D engine. 2007-02-08 13:24:26 +11:00
Thomas Hellstrom 1d58420bad drm: update core memory manager from git drm tree
Remove the memory manager parameter from the put_block function, as this
makes the client code a lot cleaner. Prepare buffer manager for lock and
unlock calls.
Fix buggy aligned allocations.
Remove the stupid root_node field from the core memory manager.
Support multi-page buffer offset alignments
Add improved alignment functionality to the core memory manager.
This makes an allocated block actually align itself and returns any
wasted space to the manager.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:26 +11:00
Christoph Hellwig 004a772742 drm: remove drm_ioremap and drm_ioremapfree
hch originally submitted this for paravirt ops work, airlied took it
and cleaned up a lot of unused code caused by using this.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:26 +11:00
Dave Airlie b9094d3aaa i810/i830: use drm_core_ioremap instead of drm_ioremap
This makes the i810/i830 use the drm_core_ioremap functions.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:26 +11:00
Thomas Hellstrom f239b7b0ca drm: use vmalloc_user instead of vmalloc_32 for DRM_SHM
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:25 +11:00
Thomas Hellstrom 9b8d9d0e01 via: allow for npot texture pitch alignment
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:25 +11:00
Thomas Hellstrom 689692e73e via: add some new chipsets
Disable 3D functionality and AGP DMA for chipsets with the DX9 3D engine.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:25 +11:00
Thomas Hellstrom 76f625511e via: some PCI posting flushes
Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-02-08 13:24:25 +11:00
Paul Mackerras 8423200553 Merge branch 'linux-2.6' 2007-02-07 14:05:13 +11:00
Ishizaki Kou 3cdc20e517 [POWERPC] Celleb: hypervisor console driver
This patch adds hypervisor console driver for Celleb platform.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Ahmed S. Darwish 1eaf122cda [AGPGART] intel-agp: Use ARRAY_SIZE macro when appropriate
use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-06 11:45:57 -05:00
Thomas Hellstrom bf1e5989aa [AGPGART] Add agp-type-to-mask-type method missing from some drivers.
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-05 09:04:42 -05:00
Dave Jones e4ac5e4f55 [AGPGART] Don't try to remap i810 registers on resume.
We don't unmap them on the suspend path, so on resume
trying to remap will fail, and then result in an
oops the next time something tries to access them.

Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-04 17:37:42 -05:00
Thomas Hellstrom a030ce4477 [AGPGART] Allow drm-populated agp memory types
This patch allows drm to populate an agpgart structure with pages of its own.
It's needed for the new drm memory manager which dynamically flips pages in and out of AGP.

The patch modifies the generic functions as well as the intel agp driver. The intel drm driver is
currently the only one supporting the new memory manager.

Other agp drivers may need some minor fixing up once they have a corresponding memory manager enabled drm driver.

AGP memory types >= AGP_USER_TYPES are not populated by the agpgart driver, but the drm is expected
to do that, as well as taking care of cache- and tlb flushing when needed.

It's not possible to request these types from user space using agpgart ioctls.

The Intel driver also gets a new memory type for pages that can be bound cached to the intel GTT.

Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-03 17:16:24 -05:00
Zwane Mwaikambo 0316fe8319 [AGPGART] compat ioctl
The following video card requires the agpgart driver ioctl
interface in order to detect video memory.

00:02.0 VGA compatible controller: Intel Corporation Mobile
945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)

Tested on a Thinkpad Z61t, Xorg.0.log from a 32bit debian Xorg is at;

http://montezuma.homeunix.net/Xorg.0.log

Signed-off-by: Zwane Mwaikambo <zwane@infradead.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-03 17:16:24 -05:00
Alexey Starikovskiy 15a58ed121 ACPICA: Remove duplicate table definitions (non-conflicting), cont
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:29 -05:00
Randy Dunlap d346cce308 [PATCH] sysrq: showBlockedTasks is sysrq-W
Change SysRq showBlockedTasks from sysrq-X to sysrq-W and show that in the
Help message.

It was previously done via X, but X is already used for Xmon on ppc & powerpc
platforms and this collision needs to be avoided.

All callers of register_sysrq_key() are now marked in the sysrq op/key table.
I didn't mark 'h' as Help because Help is just printed for any unknown key,
such as '?'.

Added some omitted sysrq key entries in the sysrq.txt file.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-01 16:22:42 -08:00
David Barksdale 41c57a8718 [PATCH] IPMI: fix timeout list handling
Fix a dangling pointer bug in ipmi_timeout_handler.  A list of timedout
messages is not re-initialized before reuse, causing the head of the list
to point to freed memory.

Signed-off-by: David Barksdale <amatus@ocgnet.org>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-30 16:01:36 -08:00
Linus Torvalds 51e6ed23fc Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] Add new IDs to VIA AGP.
  [AGPGART] Remove pointless assignment.
  [AGPGART] Remove pointless typedef in ati-agp
  [AGPGART] Prevent (unlikely) memory leak in amd_create_gatt_pages()
  [AGPGART] intel_agp: restore graphics device's pci space early in resume
2007-01-30 08:43:26 -08:00
Dave Jones 43ed41f648 [AGPGART] Add new IDs to VIA AGP.
Culled from the VIA codedrop.
Also fixes up one ID used in amd64-agp to use the
VIA part number instead of the board name in its ID.

Signed-off-by: Dave Jones <davej@redhat.com>
2007-01-28 17:58:33 -05:00
Dave Jones 7707ea3b78 [AGPGART] Remove pointless assignment.
No point in clearing local pointers then returning.
Also fix up some CodingStyle nits.

Signed-off-by: Dave Jones <davej@redhat.com>
2007-01-28 17:50:17 -05:00
Dave Jones 87a17f31a3 [AGPGART] Remove pointless typedef in ati-agp
This seems to exist just to save people typing 'struct' a few times,
and doesn't provide any additional value.

Signed-off-by: Dave Jones <davej@redhat.com>
2007-01-28 17:41:37 -05:00
Dave Jones c30efbaeaa [AGPGART] Prevent (unlikely) memory leak in amd_create_gatt_pages()
If we fail an alloc, unwind the previous allocs that succeeded.

Spotted-by: Alan Grimes <agrimes@speakeasy.net>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-01-28 17:39:19 -05:00
Wim Van Sebroeck 35fcf53870 [WATCHDOG] ib700wdt.c - convert to platform_device part 2
Convert the reboot_notifier into the platform_device's shutdown
method

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-27 22:54:18 +01:00
Wim Van Sebroeck 745ac1ea6e [WATCHDOG] ib700wdt.c - convert to platform_device
Convert the ib700wdt watchdog into a platform_device

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-27 22:39:46 +01:00
Wim Van Sebroeck e42162a46d [WATCHDOG] ib700wdt.c spinlock/WDIOC_SETOPTIONS changes
Add the WDIOC_SETOPTIONS ioctl call. Because of this we
move the spinlocking to the different watchdog operations.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-27 22:12:54 +01:00
Wim Van Sebroeck c9d7710ea2 [WATCHDOG] ib700wdt.c small clean-up's
* Fix identation
* Add watchdog "mandatory" WDIOC_GETBOOTSTATUS ioctl
* On unexpected close -> since this is considered as
  a write to the watchdog device, make sure we ping a
  last time.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-27 22:07:03 +01:00
Wim Van Sebroeck f6e4803969 [WATCHDOG] ib700wdt.c clean-up init and exit routines
clean-up the init and exit routines so that they use
the same sequence.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-27 21:58:08 +01:00
Wim Van Sebroeck 35d55c9431 [WATCHDOG] ib700_wdt.c stop + set_heartbeat operations
move the code to stop the watchdog and the code to
set the heartbeat of the watchdog to seperate functions.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-27 21:50:53 +01:00
Wim Van Sebroeck bffda5c87c [WATCHDOG] show default value for nowayout in module parameter
change default=CONFIG_WATCHDOG_NOWAYOUT in the module parameter
for nowayout by it's real value (0 or 1) by using:
__MODULE_STRING(WATCHDOG_NOWAYOUT)

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-27 20:54:24 +01:00
Linus Torvalds d227e87e6c Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Vr41xx: Fix after GENERIC_HARDIRQS_NO__DO_IRQ change
  [MIPS] SMTC: Instant IPI replay.
2007-01-23 11:19:32 -08:00
Yoichi Yuasa 364ca8a897 [MIPS] Vr41xx: Fix after GENERIC_HARDIRQS_NO__DO_IRQ change
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-01-23 18:26:47 +00:00
Mark Gross 79603a3500 [PATCH] tlclk: bug fix + misc fixes
The following patch fixes a few problems with the tlclk driver.
* bug in the select_amcb1_transmit_clock
* racy read sys call
* racy open sys call
* use of add_timer where mod_timer would be better
* change to the timer data parameter use

Signed-off-by: Mark Gross <mark.gross@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-23 07:52:06 -08:00
Linus Torvalds 6d3154cc11 Revert "[PATCH] Fix up mmap_kmem"
This reverts commit 99a10a60ba.

As per Hugh Dickins:

  "Nadia Derbey has reported that mmap of /dev/kmem no longer works with
   the kernel virtual address as offset, and Franck has confirmed that
   his patch came from a misunderstanding of what an offset means to
   /dev/kmem - whereas his patch description seems to say that he was
   correcting the offset on a few plaforms, there was no such problem to
   correct, and his patch was in fact changing its API on all platforms."

Suggested-by: Hugh Dickins <hugh@veritas.com>
Cc: Franck Bui-Huu <fbuihuu@gmail.com>
Cc: Nadia Derbey <Nadia.Derbey@bull.net>
Cc: Andi Kleen <ak@suse.de>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-22 08:53:24 -08:00
Wang Zhenyu 4b95320fc4 [AGPGART] intel_agp: restore graphics device's pci space early in resume
Currently in resuming path graphics device's pci space restore is
behind host bridge, so resume function wrongly accesses graphics
device's space. This makes resuming failure which crashed X.
here's a patch to restore device's pci space early, which makes
resuming ok with X.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-01-17 00:26:30 -05:00
Linus Torvalds 5b94d54180 Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  i915: Fix a DRM_ERROR that should be DRM_DEBUG.
2007-01-11 18:25:20 -08:00
Michael Buesch 56fb5fe9f1 [PATCH] Fix HWRNG built-in initcalls priority
This changes all HWRNG driver initcalls to module_init().  We must probe
the RNGs after the major kernel subsystems are already up and running (like
PCI).

This fixes Bug 7730.
http://bugzilla.kernel.org/show_bug.cgi?id=7730

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:18:21 -08:00
Jan Beulich 9863be598e [PATCH] intel-rng workarounds
Add a load option to intel-rng to allow skipping the FWH detection,
necessary in case the BIOS has locked read-only the firmware hub space.
Also prevent any attempt to write to firmware space if it cannot be write
enabled (apparently caused hangs on some systems not having an FWH and thus
also not having a respective RNG).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:18:21 -08:00
Wim Van Sebroeck 2e9c9cf44b [WATCHDOG] advantechwdt.c - convert to platform_device part 2
Convert the reboot_notifier into the platform_device's shutdown
method

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-11 22:42:41 +01:00
Wim Van Sebroeck c2bd11c7cb [WATCHDOG] advantechwdt.c - convert to platform_device
Convert the advantechwdt watchdog into a platform_device

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-11 22:35:40 +01:00
Wim Van Sebroeck 0349a363e2 [WATCHDOG] advantechwdt.c - move set_heartbeat to a seperate function
Put the set_heartbeat/timeout code into a seperate function

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-11 22:27:51 +01:00
Wim Van Sebroeck 1d747be647 [WATCHDOG] advantechwdt.c - cleanup before platform_device patches
This cleanup consists of:
- make sure that the printk's use the module/driver-name
- do the exit of the module exactly the opposite of the init of the module

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-11 22:19:28 +01:00
Wim Van Sebroeck 98c08e98f8 [WATCHDOG] acquirewdt.c - convert to platform_device part 2
Convert the reboot_notifier into the platform_device's shutdown
method

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-10 23:38:56 +01:00
Wim Van Sebroeck ad5fe32318 [WATCHDOG] acquirewdt.c - convert to platform_device
Convert the acquirewdt watchdog into a platform_device

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-10 23:36:13 +01:00
Wim Van Sebroeck 76c11f0442 [WATCHDOG] acquirewdt.c - clean before platform_device patches
Clean the current code before we convert the driver to a platform_device.
This clean consists of:
- document the includes
- make sure that the printk's use the module/driver-name
- do the exit of the module exactly the opposite of the init of the module

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-10 23:23:44 +01:00
Wim Van Sebroeck f3dc07330c [WATCHDOG] pcwd_usb.c - get heartbeat from dip switches
The PCWD cards normally use the heartbeat that is set via
the dip-switches of the card. There are only 3 switches,
thus 8 combinations that each have a certain heartbeat.
The card can however be programmed with a heartbeat from
1 till 65535 seconds. This is what our driver does: it
programs the heartbeat on the card.

There are however a lot of people that don't know that
we set the heartbeat of the watchdog card to the value
provided by the heartbeat module parameter. Instead they
think that the heartbeat value is the same as set by the
dip-switches.

This patch changes the driver so that at startup you can
take the heartbeat from the dip-switches. You do this
by setting the heartbeat module parameter to 0. This
patch also makes this the default behaviour.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-09 22:43:49 +01:00
Wim Van Sebroeck f9146f26da [WATCHDOG] pcwd.c - e-mail adres update
update Simon Machell's e-mail adres

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-09 22:38:54 +01:00
Wim Van Sebroeck 2ef473de1e [WATCHDOG] pcwd_usb.c - get heartbeat from dip switches
The PCWD cards normally use the heartbeat that is set via
the dip-switches of the card. There are only 3 switches,
thus 8 combinations that each have a certain heartbeat.
The card can however be programmed with a heartbeat from
1 till 65535 seconds. This is what our driver does: it
programs the heartbeat on the card.

There are however a lot of people that don't know that
we set the heartbeat of the watchdog card to the value
provided by the heartbeat module parameter. Instead they
think that the heartbeat value is the same as set by the
dip-switches.

This patch changes the driver so that at startup you can
take the heartbeat from the dip-switches. You do this
by setting the heartbeat module parameter to 0. This
patch also makes this the default behaviour.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-08 22:45:30 +01:00
Wim Van Sebroeck d26d90967d [WATCHDOG] pcwd_usb.c - document includes
document and review the include files.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-08 22:40:33 +01:00
=?utf-8?q?Michel_D=C3=A4nzer?= eac681b3ae i915: Fix a DRM_ERROR that should be DRM_DEBUG.
It would clutter up the kernel output in a situation which is legitimate before
X.org 7.2 and handled correctly by the 3D driver.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2007-01-08 20:38:34 +11:00
Wim Van Sebroeck 045798b56f [WATCHDOG] pcwd_pci.c - spinlock fixes
the keepalive and get_temperature functions should
use spinlocks also.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-07 21:57:03 +01:00
Wim Van Sebroeck 39e3a0556a [WATCHDOG] pcwd_pci.c - get heartbeat from dip switches
The PCWD cards normally use the heartbeat that is set via
the dip-switches of the card. There are only 3 switches,
thus 8 combinations that each have a certain heartbeat.
The card can however be programmed with a heartbeat from
1 till 65535 seconds. This is what our driver does: it
programs the heartbeat on the card.

There are however a lot of people that don't know that
we set the heartbeat of the watchdog card to the value
provided by the heartbeat module parameter. Instead they
think that the heartbeat value is the same as set by the
dip-switches.

This patch changes the driver so that at startup you can
take the heartbeat from the dip-switches. You do this
by setting the heartbeat module parameter to 0. This
patch also makes this the default behaviour.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2007-01-07 21:49:11 +01:00
Andrew Morton 2723f9603a [PATCH] ip2 warning fix
Make this:

drivers/char/ip2/ip2main.c: In function 'ip2_loadmain':
drivers/char/ip2/ip2main.c:654: warning: control may reach end of non-void function 'iiSetAddress' being inlined
drivers/char/ip2/ip2main.c:808: warning: control may reach end of non-void function 'iiInitialize' being inlined

go away.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-05 23:55:23 -08:00
Linus Torvalds a7ec3f5289 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return value
  [AGPGART] Fix PCI-posting flush typo.
  [AGPGART] fix detection of aperture size versus GTT size on G965
  [AGPGART] Remove unnecessary flushes when inserting and removing pages.
  [AGPGART] K8M890 support for amd-k8.
2007-01-03 17:34:54 -08:00
akpm@osdl.org 7b37b064c2 [AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return value
drivers/char/agp/sgi-agp.c: check kmalloc() return value

Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2007-01-02 23:37:31 -05:00
Jiri Slaby cfe7c09ac2 [PATCH] Char: isicom, eliminate spinlock recursion
Many spinlock recursion was in the isicom driver.  Eliminate it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:55 -08:00
Jiri Slaby 31f87cf48d [PATCH] Char: mxser, fix oops when removing opened
tty_driver->owner is not set, so if somebody remove mxser_module, it might
oops (and doesn't tell the user: no way, it's in use). Set the .owner value.

Cc: <osv@javad.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:55 -08:00
Sebastien Dugué 43cdff92ad [PATCH] Fix IPMI watchdog set_param_str() using kstrdup
set_param_str() cannot use kstrdup() to duplicate the parameter.  That's
fine when the driver is compiled as a module but it sure is not when built
into the kernel as the kernel parameters are parsed before the kmalloc
slabs are setup.

Signed-off-by: Sebastien Dugué <sebastien.dugue@bull.net>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-30 10:55:54 -08:00
Thomas Hellstrom 7f02d687b4 [AGPGART] Fix PCI-posting flush typo.
Unfortunately there was a typo in one of the patches I sent,
(The one now committed to the agpgart tree).
It may cause a bus error on i810 type hardware.

Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-28 22:24:45 -05:00
Eric Anholt c41e0deb50 [AGPGART] fix detection of aperture size versus GTT size on G965
On the G965, the GTT size may be larger than is required to cover the
aperture.  (In fact, on all hardware we've seen, the GTT is 512KB to the
aperture's 256MB).  A previous commit forced the aperture size to 512MB on
G965 to match GTT, which would likely result in hangs at best if users
tried to rely on agpgart's aperture size information.  Instead, we use the
resource length for the aperture size and the system's reported GTT size
when available for the GTT size.

Because the MSAC registers which had been read for aperture size detection
on i9xx chips just cause a change in the resource size, we can use generic
code for aperture detection on all i9xx.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-22 23:12:22 -05:00
Thomas Hellstrom 5aa80c7226 [AGPGART] Remove unnecessary flushes when inserting and removing pages.
This patch is to speed up flipping of pages in and out of the AGP aperture as
needed by the new drm memory manager.

A number of global cache flushes are removed as well as some PCI posting flushes.
The following guidelines have been used:

1) Memory that is only mapped uncached and that has been subject to a global
cache flush after the mapping was changed to uncached does not need any more
cache flushes. Neither before binding to the aperture nor after unbinding.

2) Only do one PCI posting flush after a sequence of writes modifying page
entries in the GATT.

Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-22 22:44:09 -05:00
Akinobu Mita 5e40508e5f [PATCH] tlclk: delete unnecessary sysfs_remove_group
It is unnecessary and invalid to call sysfs_remove_group() after
sysfs_create_group() failure.

Cc: Sebastien Bouchard <sebastien.bouchard@ca.kontron.com>
Cc: Mark Gross <mark.gross@intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:50 -08:00
Andrew Morton 533ffc289d [PATCH] rtc warning fix
drivers/char/rtc.c:116: warning: 'hpet_rtc_interrupt' defined but not used

Cc: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-22 08:55:47 -08:00