Commit Graph

744 Commits

Author SHA1 Message Date
Marcelo Tosatti 9ddf61bd09 [ARM SMP] mpcore_wdt bogus fpos check
drivers/char/watchdog/mpcore_wdt.c write function contains a check for
(ppos != &file->f_pos). Such check used to make sense when a pointer to
file->f_pos was handed by vfs_write(), not a copy of it as it stands
now.

Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-05 10:15:06 +00:00
Egbert Eich c801147c5a [PATCH] SiS DRM: Fix possible NULL dereference
This fixes a NULL pointer reference in DRM.  The SiS driver tries to
allocate a big chunk of memory, but the return value is never checked.

Reported in Novell bugzilla #132271:
  https://bugzilla.novell.com/show_bug.cgi?id=132271

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-30 08:45:40 -08:00
Linus Torvalds 6aab341e0a mm: re-architect the VM_UNPAGED logic
This replaces the (in my opinion horrible) VM_UNMAPPED logic with very
explicit support for a "remapped page range" aka VM_PFNMAP.  It allows a
VM area to contain an arbitrary range of page table entries that the VM
never touches, and never considers to be normal pages.

Any user of "remap_pfn_range()" automatically gets this new
functionality, and doesn't even have to mark the pages reserved or
indeed mark them any other way.  It just works.  As a side effect, doing
mmap() on /dev/mem works for arbitrary ranges.

Sparc update from David in the next commit.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28 14:34:23 -08:00
Dave Airlie cf65f1623d drm: fix quiescent locking
A fix for a locking bug which is triggered when a client tries to lock with
flag DMA_QUIESCENT (typically the X server), but gets interrupted by a signal.
The locking IOCTL should then return an error, but if DMA_QUIESCENT succeeds
it returns 0, and the client falsely thinks it has the lock. In addition
The client waits for DMA_QUISCENT and possibly DMA_READY without having the lock.

From: Thomas Hellstrom
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-24 21:41:14 +11:00
Dave Airlie 7655f493b7 drm: move is_pci to the end of the structure
We memset the structure across opens except for the flags. The correct
fix is more intrusive but this should fix a problem with bad iounmaps
seen on AGP radeons acting like PCI ones.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-23 22:12:59 +11:00
Dave Airlie c41f47121d drm: add __GFP_COMP to the drm_alloc_pages
The DRM only uses drm_alloc_pages for non-SG PCI cards using DRM.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-23 22:09:13 +11:00
Dave Airlie bd07ed2b4d I think that if a PCI bus is a root bus, attached to a host bridge not a
PCI->PCI bridge, then bus->self is allowed to be NULL. Certainly that's
the case on my Pegasos, and it makes the MGA DRM driver oops...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-23 21:45:43 +11:00
Hugh Dickins f57e88a8d8 [PATCH] unpaged: ZERO_PAGE in VM_UNPAGED
It's strange enough to be looking out for anonymous pages in VM_UNPAGED areas,
let's not insert the ZERO_PAGE there - though whether it would matter will
depend on what we decide about ZERO_PAGE refcounting.

But whereas do_anonymous_page may (exceptionally) be called on a VM_UNPAGED
area, do_no_page should never be: just BUG_ON.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:42 -08:00
Dave Jones e7e37ee9c5 Merge ../linus/ 2005-11-21 06:56:52 -08:00
Dave Jones c243f1f1f6 [AGPGART] Support VIA P4M800CE bridge.
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-21 06:53:16 -08:00
Kylene Jo Hall c4b32b8b01 [PATCH] tpm: remove PCI kconfig dependency
The driver dependencies on PCI have been removed.  This patch clears that
up in the Kconfig file

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-18 07:49:46 -08:00
Kylene Jo Hall 90612b308f [PATCH] tpm: use ioread8 and iowrite8
Use ioread8 and iowrite8 as suggested.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-18 07:49:45 -08:00
Kylene Jo Hall ba3961152e [PATCH] tpm: use flush_scheduled_work()
Add the necessary flush_schedule_work calls when canceling the timer.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-18 07:49:45 -08:00
Matt Domsch 44f080c46e [PATCH] ipmi: missing NULL test for kthread
On IPMI systems with BT interfaces, we don't start the kernel thread, so
smi_info->thread is NULL.  Test for NULL when stopping the thread, because
kthread_stop() doesn't, and an oops ensues otherwise.

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-18 07:49:45 -08:00
Dave Jones a42ab7f234 [AGPGART] Mark AMD64 aperture size structs as const
Neither of them are ever written to.

Noted by Arjan van de Ven
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-16 16:07:02 -08:00
Dave Jones 5e9ad06ad9 [AGPGART] Mark maxes_table as const
It's never written to.

Noted by Arjan van de Ven
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-16 16:05:49 -08:00
Corey Minyard 3225e1d3d1 [PATCH] ipmi: bump-driver-version
Lots of good changes to the driver lately that userspace will care about
the version of the driver.  Bump the version from 36.0 to 38.0 to be higher
than 37 that the 2.4 driver came out with a few weeks ago which doesn't
have all the same changes.

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-15 08:59:19 -08:00
Linus Torvalds 4060994c3e Merge x86-64 update from Andi 2005-11-14 19:56:02 -08:00
Andi Kleen 1d2e6bd861 [PATCH] AGP: Make gart iterator in K8 AGP driver SMP safe
Ugh!

Cc: davej@redhat.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:16 -08:00
Andi Kleen 172efbb403 [PATCH] AGP: Try unsupported AGP chipsets on x86-64 by default
So far all new ones have worked and there isn't much variation because
the CPU does all the interesting bits.

So enable try unsupported by default.

Can be still disabled with try_unsupported=0 (module) or
amd64.try_unsupported=0   (boot option)

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:15 -08:00
Andi Kleen 870b7681cd [PATCH] AGP: Support ULI/ALI 1689 bridge on AMD64
(no name because I'm not sure of the correct name)

Cc: davej@redhat.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-14 19:55:15 -08:00
Benjamin Herrenschmidt 3136254ca5 [PATCH] powerpc: kill ppc64 rtc.c, use genrtc instead
This moves the rtas RTC callbacks to rtas-rtc.c in arch/powerpc/kernel,
and kills the rest of arch/ppc64/kernel/rtc.c which was just a duplicate
of the genrtc functionality. Also enable build of genrtc for
CONFIG_PPC64 (it just works are we already have the required callbacks)
and enable it in all defconfigs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-14 16:36:08 +11:00
Kylene Jo Hall 09e12f9f6b [PATCH] tpm: locking fix
Use schedule_work() to avoid down()-in-timer-handler problem.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:17 -08:00
Kylene Jo Hall f6a2382cec [PATCH] tpm: dev_mask handling fix
- Use ~, not !

- Remove unneeded cast

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:17 -08:00
Kylene Jo Hall ad5ea3cc5f [PATCH] tpm: updates for new hardware
This is the patch to support TPMs on power ppc hardware.  It has been
reworked as requested to remove the need for messing with the io page mask
by just using ioremap.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:17 -08:00
Paul Fulghum 0ff1b2c8ce [PATCH] synclink: update to use DMA mapping API
Update synclink to use DMA mapping API.  This removes warning about
isa_virt_to_bus() usage on architectures other than i386

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:15 -08:00
Olof Johansson 7fce260a6b [PATCH] ppc: add support for new powerbooks
Enablement patch for the new PowerBooks (late 2005 edition).

This enables the ATA controller, Gigabit ethernet and basic AGP setup.
Bluetooth works out-of-the box after running hid2hci.

Still remaining is to get the touchpad to work, the simple change of just
adding the new USB ids isn't enough.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:13 -08:00
Kumar Gala 4c8d3d997e [PATCH] Update email address for Kumar
Changed jobs and the Freescale address is no longer valid.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:10 -08:00
Harald Welte c1986ee9be [PATCH] New Omnikey Cardman 4000 driver
Add new Omnikey Cardman 4000 smartcard reader driver

Signed-off-by: Harald Welte <laforge@gnumonks.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:10 -08:00
Harald Welte 77c44ab1d8 [PATCH] New Omnikey Cardman 4040 driver
Add new Omnikey Cardman 4040 smartcard reader driver

Signed-off-by: Harald Welte <laforge@gnumonks.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13 18:14:10 -08:00
Dmitry Torokhov 4f005551a8 [PATCH] I8K: fix /proc reporting of blank service tags
Make /proc/i8k display '?' when service tag is blank in BIOS.
This fixes segfault in i8k gkrellm plugin.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-12 11:42:32 -08:00
Dave Airlie 925142431b drm: update VIA driver to 2.7.2
Add PCI DMA blitengine to VIA DRM
Add portability code for porting VIA to FreeBSD.
Sync via_drm.h with 3d driver

From: Thomas Hellstrom <unichrome@shipmail.org>, Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-12 21:52:46 +11:00
Linus Torvalds 63f45b8094 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2005-11-11 16:29:22 -08:00
Linus Torvalds 5643f000c1 Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel 2005-11-11 09:24:26 -08:00
Hironobu Ishii 177294d191 [PATCH] ipmi: fix inconsistent spinlock usage
Part of a patch was accidentally reverted, this corrects an
inconsistent spinlock use in the IPMI message handler.

Signed-off-by: Hironobu Ishii <hishii@soft.fujitsu.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-11 09:23:31 -08:00
Dave Airlie 792d2b9a12 drm: drop mtrr from i915
Alan Hourihane wants to set MTRR in the DDX only as otherwise
we get problems with the shared memory chipset.

From: Alan Hourihane <alanh@fairlite.demon.co.uk>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 23:30:27 +11:00
Dave Airlie 7ccf800e94 drm: update mga driver for new bootstrap code
The MGA driver needs to use the full AGP interface.

From: Ian Romanick <idr@us.ibm.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 23:11:34 +11:00
Dave Airlie c0be4d2404 drm: remove exports that modules shouldn't use.
Modules should go via the new drm_agp_ functions.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 23:10:18 +11:00
Dave Airlie efa58395be drm: add in-kernel entry points for rest of AGP ioctls
Allow DRM modules to call AGP internally in the kernel.

From: Ian Romanick <idr@us.ibm.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 22:33:39 +11:00
Dave Airlie 732052ed3e drm: simplify sysfs code for drm
This simplifies the sysfs code for the drm and add a dri_library_name
attribute which can be used by a userspace app to figure out which
library to load.

From: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 22:07:35 +11:00
Dave Airlie e96e33eeb8 drm: fixup drm_proc.c struct table
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 20:27:35 +11:00
Dave Airlie 61d04160ff drm: remove old backwards compatibilty stuff
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 19:52:22 +11:00
Dave Airlie 8f5f39f77f drm: remove drm_flush
drm_flush is no longer needed remove.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 19:40:52 +11:00
Dave Airlie 7052cff984 drm: cleanup via_ds.c includes
Remove the linux includes from via_ds.c

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 19:34:47 +11:00
Dave Airlie 9d6160137a drm: remove remnamt of old DRM code from tdfx
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-11 19:34:10 +11:00
Greg Kroah-Hartman 249bb070f5 [PATCH] PCI: removed unneeded .owner field from struct pci_driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-10 16:09:17 -08:00
Dave Airlie 3f9df54d63 drm: remove drm_init.c it is no longer needed
Move drm_cpu_valid into drm_fops.c

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-10 22:28:56 +11:00
Dave Airlie 22eae947bf drm: rename driver hooks more understandably
Rename the driver hooks in the DRM to something a little more understandable:
preinit         ->      load
postinit        ->      (removed)
presetup        ->      firstopen
postsetup       ->      (removed)
open_helper     ->      open
prerelease      ->      preclose
free_filp_priv  ->      postclose
pretakedown     ->      lastclose
postcleanup     ->      unload
release         ->      reclaim_buffers_locked
version         ->      (removed)

postinit and version were replaced with generic code in the Linux DRM (drivers
now set their version numbers and description in the driver structure, like on
BSD).  postsetup wasn't used at all.  Fixes the savage hooks for
initializing and tearing down mappings at the right times.  Testing involved at
least starting X, running glxgears, killing glxgears, exiting X, and repeating.

Tested on:      FreeBSD (g200, g400, r200, r128)
                Linux (r200, savage4)

From: Eric Anholt <anholt@freebsd.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-11-10 22:16:34 +11:00
Linus Torvalds 6730c3c144 Fix AGP compile on non-x86 architectures
AGP shouldn't use "global_flush_tlb()" to flush the AGP mappings, that i
spurely an x86'ism.  The proper AGP mapping flusher that should be used
is "flush_agp_mappings()", which on x86 obviously happens to do a global
TLB flush.

This makes AGP (or at least the config _I_ happen to use) compile again
on ppc64.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09 14:56:00 -08:00
Russell King 3ae5eaec1d [DRIVER MODEL] Convert platform drivers to use struct platform_driver
This allows us to eliminate the casts in the drivers, and eventually
remove the use of the device_driver function pointer methods for
platform device drivers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-09 22:32:44 +00:00
Linus Torvalds a5ee363463 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart 2005-11-09 11:45:00 -08:00
Adrian Bunk cf62ddce2e [PATCH] drivers/char/sysrq.c: make two functions static
This patch makes two needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09 07:56:40 -08:00
Olaf Hering 733482e445 [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason
This patch removes almost all inclusions of linux/version.h.  The 3
#defines are unused in most of the touched files.

A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
unfortunatly in linux/version.h.

There are also lots of #ifdef for long obsolete kernels, this was not
touched.  In a few places, the linux/version.h include was move to where
the LINUX_VERSION_CODE was used.

quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`

search pattern:
/UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09 07:55:57 -08:00
Dave Airlie d34d7ae266 [PATCH] drm fixup pci gart settings
Fix the PCIGART increment and add a cpu_to_le32 for ppc (untested)

Paulus was unsure if we need to cpu_to_le32 but the old code was definitely
wrong, so make it consistent and let the PPC guys figure it out later.

Signed-off-by: Dave Airlie <airlied@linux.ie>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09 07:55:51 -08:00
Andrew Morton 49ebd7c6bb [PATCH] i460-agp warning fixes
drivers/char/agp/i460-agp.c: In function `i460_fetch_size':
drivers/char/agp/i460-agp.c:115: warning: size_t format, long unsigned int arg (arg 2)
drivers/char/agp/i460-agp.c:115: warning: size_t format, long unsigned int arg (arg 3)
drivers/char/agp/i460-agp.c: In function `i460_mask_memory':
drivers/char/agp/i460-agp.c:542: warning: integer constant is too large for "long" type

Note that the i460_mask_memory() change is a guess.  But a good one, I suspect.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-11-08 13:43:54 -08:00
Alan Hourihane 88d51967f5 [PATCH] AGP performance fixes
AGP allocation/deallocation is suffering major performance issues due to
the nature of global_flush_tlb() being called on every change_page_attr()
call.

For small allocations this isn't really seen, but when you start allocating
50000 pages of AGP space, for say, texture memory, then things can take
seconds to complete.

In some cases the situation is doubled or even quadrupled in the time due
to SMP, or a deallocation, then a new reallocation.  I've had a case of
upto 20 seconds wait time to deallocate and reallocate AGP space.

This patch fixes the problem by making it the caller's responsibility to
call global_flush_tlb(), and so removes it from every instance of mapping a
page into AGP space until the time that all change_page_attr() changes are
done.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-11-08 13:43:54 -08:00
Adrian Bunk 848d538249 drivers/char/ftape/lowlevel/ftape-buffer.c should #include "../lowlevel/ftape-buffer.h"
Every file should #include the headers containing the prototypes for
it's global functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
2005-11-08 16:50:38 +01:00
Linus Torvalds 7079060f3e Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart 2005-11-07 13:26:58 -08:00
Linus Torvalds 8f0cb147b2 Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa 2005-11-07 08:09:02 -08:00
Jesper Juhl 735d5661d5 [PATCH] kfree cleanup: drivers/char
This is the drivers/char/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in drivers/char/.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:54:02 -08:00
Corey Minyard b385676b35 [PATCH] ipmi: fix watchdog timeout panic handling
If a panic came from the IPMI watchdog pretimeout and that was reported via
an NMI, it would also be reported via the standard IPMI flags, which would
get picked up when reporting panic events and cause another panic.  This
adds an atomic to avoid calling panic twice.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:45 -08:00
Corey Minyard e61fb5b651 [PATCH] ipmi: use rcu lock for using command receivers
Use rcu_read_lock for the cmd_rcvrs list, since that was what what
intended, anyway.  This means that all the users of the cmd_rcvrs_lock are
tasks, so the irq disables are no longer required for that lock and it can
become a semaphore.

Signed-off-by: Corey Minyard <minyard@acm.org>
Acked-by: "Paul E. McKenney" <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:45 -08:00
Matt Domsch e9a705a0a0 [PATCH] ipmi: use kthread API
Convert ipmi driver thread to kthread API, only sleep when interface is
idle.

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:45 -08:00
Corey Minyard a9a2c44ff0 [PATCH] ipmi: add timer thread
We must poll for responses to commands when interrupts aren't in use.  The
default poll interval is based on using a kernel timer, which varies with HZ.
For character-based interfaces like KCS and SMIC though, that can be way too
slow (>15 minutes to flash a new firmware with KCS, >20 seconds to retrieve
the sensor list).

This creates a low-priority kernel thread to poll more often.  If the state
machine is idle, so is the kernel thread.  But if there's an active command,
it polls quite rapidly.  This decrease a firmware flash time from 15 minutes
to 1.5 minutes, and the sensor list time to 4.5 seconds, on a Dell PowerEdge
x8x system.

The timer-based polling remains, to ensure some amount of responsiveness even
under high user process CPU load.

Checking for a stopped timer at rmmod now uses atomics and del_timer_sync() to
ensure safe stoppage.

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:44 -08:00
Corey Minyard c3e7e7916e [PATCH] ipmi: kcs error0 delay
BMCs can get into ERROR0 state while flashing new firmware, particularly while
the BMC is erasing the next flash block, which may take a just under 2 seconds
on a Dell PowerEdge 2800 (1.75 seconds typical), during which time the
single-threaded firmware may not be able to process new commands.  In
particular, clearing OBF may not take effect immediately.

We want it to delay in ERROR0 after clearing OBF a bit waiting for OBF to
actually be clear before proceeding.

This introduces a new return value from the LLDD's event loop,
SI_SM_CALL_WITH_TICK_DELAY.  This means the calling thread/timer should
schedule_timeout() at least 1 tick, rather than busy-wait.  This is a longer
delay than SI_SM_CALL_WITH_DELAY, which is typically a 250us busy-wait.

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:44 -08:00
Corey Minyard 21dcd300b1 [PATCH] ipmi: bt restart reset fixes
The current BT retry/reset mechanism fails to succeed on a PowerEdge 1650,
when the controller is wedged with B2H_ATN asserted at XACTION_START.  If this
occurs, no further commands will ever succeed unless the state of the
controller is first cleared out.

Furthermore, the soft reset would only occur if the first command after insmod
was the one that timed out, not if a later command timed out.

This patch changes the retry/reset mechanism to be as follows:

Before retrying a command, clear the state of the BT controller such that the
flags represent ready for a new transaction.  This increases the chance of
success of the restarted transaction.

After 2 retries, issue a soft reset and retry one more time before giving up
and reporting back a failure.

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Acked-by: Rocky Craig <rocky.craig@hp.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:44 -08:00
Corey Minyard ea94027b92 [PATCH] ipmi: si start transaction hook
Some commands, on some system BMCs, don't respond at at all.  This is seen on
Dell PowerEdge x6xx and x7xx systems with IPMI 1.0 BT controllers when a "Get
SDR" command is issued, with a length field of 0x3A, which happens to be the
length of about SDR entries.  If another length is passed, this command
succeeds.

This patch adds general infrastructure for receiving commands before they're
passed down to the low-level drivers, such that they can be completed
immediately, or modified, prior to being sent to ->start_transaction().

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:44 -08:00
Corey Minyard d5a2b89a49 [PATCH] ipmi: more dell fixes
Make SMIC driver ignore EVT_AVAIL and SMS_ATN bits in flags register, as
they're used by systems management interrupts, not the host OS.

Make the OEM0 Data Available handler work for pre-IPMI 1.5 systems from Dell
too.

Without these two fixes, PowerEdge 2650 and other similar systems with SMIC
may hang a process (modprobe or anything using /dev/ipmi0).

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:44 -08:00
Corey Minyard 21d6c54215 [PATCH] ipmi: poweroff cleanups
Make module_param and MODULE_PARAM_DESC agree on poweroff_powercycle name.

There was an extraneous ifdef in the IPMI poweroff code that prevented it from
working if PROC_FS was disabled.

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:44 -08:00
Corey Minyard cc4673eecd [PATCH] ipmi: watchdog parms in sysfs
Modify the IPMI watchdog parameters (the ones that make sense) to be exported
from sysfs.  This is somewhat complicated because these parameters have
side-effects that must be handled.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:44 -08:00
Corey Minyard c4edff1c19 [PATCH] ipmi: various si cleanup
A number of small changes for the various system interface drivers,
consolidated from a number of patches from Matt Domsch.

Clear B2H_ATN and drain the BMC message buffer on command timeout.  This
prevents further commands from failing after a timeout.

Add bt_debug and smic_debug module parameters, expose them in sysfs.  This
lets you enable and disable debugging messages at runtime.

Unsigned jiffies math in ipmi_si_intf.c causes a too-large value to be passed
to ->event() after jiffies wrap-around.  The BT driver had caught this, but
didn't know how to fix it.  Now all calls to ->event() use a sane value for
time.

Increase timeout for commands handed to the BT driver from 2 seconds to 5
seconds.  This is necessary particularly when the previous command was a
"Clear SEL", as that command completes, yet the BMC isn't really ready to
handle another command yet.

Silence BT debugging messages which were being printed on the console.

Increase SMIC timeout form 1/10s to 2s.  This is needed on Dell PowerEdge 2650
and PowerEdge 750 with ERA/O cards to allow commands to complete without
timing out.

Adds kcs_debug module param, to match behavior of BT and SMIC.  This also
prevents messages from being sent to the console unless explicitly requested.

Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:44 -08:00
Corey Minyard 393d2cc354 [PATCH] ipmi: use refcount in message handler
This patch is rather large, but it really can't be done in smaller chunks
easily and I believe it is an important change.  This has been out and tested
for a while in the latest IPMI driver release.  There are no functional
changes, just changes as necessary to convert the locking over (and a few
minor style updates).

The IPMI driver uses read/write locks to ensure that things exist while they
are in use.  This is bad from a number of points of view.  This patch removes
the rwlocks and uses refcounts and RCU lists to manage what the locks did.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:43 -08:00
Tim Schmielau 8c65b4a604 [PATCH] fix remaining missing includes
Fix more include file problems that surfaced since I submitted the previous
fix-missing-includes.patch.  This should now allow not to include sched.h
from module.h, which is done by a followup patch.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:41 -08:00
Marcelo Tosatti e3f17f0f6e [PATCH] Only disallow _setting_ of function key string
Mikael Pettersson <mikpe@csd.uu.se> noted that the current 2.6-git (and 2.4)
patch to disallow KDSKBSENT for unpriviledged users should be less restrictive
allowing reading of current function key string entry, but not writing.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:39 -08:00
Kylene Jo Hall e2a8f7a129 [PATCH] tpm: Fix lack of driver_unregister in init failcases
driver_unregister is not being properly called when the init function
returns an error case.  Restructured the return logic such that this and
the other cleanups all happen in one place.  Preformed many of the cleanups
that Andrew Morton's patch on Thursday made in tpm_atmel.c.  Fixed
Matthieu's concern about writing before discovery.

(akpm: rmk said:

This driver is buggy.  You must not provide your own release function - it
doesn't solve the problem which the warning (which you get when you don't
provide one) is telling you about.

You should convert your device driver over to the replacement dynamic platform
support, once it is merged.  IOW, something like:

	pdev = platform_device_alloc("mydev", id);
	if (pdev) {
		err = platform_device_add_resources(pdev, &resources,
						ARRAY_SIZE(resources));
		if (err == 0)
			err = platform_device_add_data(pdev, &platform_data,
						sizeof(platform_data));
		if (err == 0)
			err = platform_device_add(pdev);
		} else {
			err = -ENOMEM;
		}
		if (err)
			platform_device_put(pdev);
)

Signed-off-by: Kylene Jo Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:36 -08:00
Kirill Smelkov 6f08b72cdd [PATCH] serial moxa: fix wrong BUG
There is a wrong BUG in mxser_close.

The BUG is triggered when tty->driver_data == NULL, But in fact this is not
a bug, because tty->driver->close is called even when tty->driver->open
fails.

LDD3 tells us to do nothing in such cases.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:36 -08:00
Kirill Smelkov 64698b694d [PATCH] serial moxa: fix leaks of struct tty_driver
Fix leak of struct tty_driver in mxser_init & mxser_module_exit

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:36 -08:00
Kirill Smelkov 57432345b6 [PATCH] serial moxa: cleanup mxser_init
Remove explicit tty_driver ops initialisation, because this is already done
by tty_set_operations.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:36 -08:00
Takashi Iwai c3348760aa [PATCH] Fix wrong irq enable via rtc_control()
rtc_control() may be called in the interrupt context in ALSA rtc-timer
driver.  The patch fixes the wrong irq enable in rtc.c, and also fixes
the possible race of bit flags.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-07 11:14:57 +01:00
Dave Jones 0a1cc0b6a4 [AGPGART] Fix up warning in efficeon driver.
efficeon-agp.c:222: warning: passing arg 1 of `virt_to_phys' makes pointer from integer without a cast

Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-05 20:32:26 -08:00
Linus Torvalds 602d4a7e2f Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-04 16:27:50 -08:00
Dave Jones 146a209967 [AGPGART] Fix up sgi-agp bug with no devices on bus.
Signed-off-by: Eric Kunze <ekunze@sgi.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-04 15:32:08 -08:00
Dave Jones c4dd45823f [AGPGART] When we encounter reserved mode bits, print them out.
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-04 15:18:56 -08:00
Russell King 866237eafc [PATCH] ARM: Reverted 2921/1: Support for the RTC / nvram on the Comdial MP1000
No longer maintained
2005-11-04 17:26:57 +00:00
Stephen Rothwell 2be7a90675 Merge Paulus' tree 2005-11-02 18:15:43 +11:00
Al Viro bbc5b21284 [PATCH] missing platform_device.h includes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-01 21:50:01 -08:00
Linus Torvalds d8762748ca Merge master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6
Manual fixups for some clashes due to re-indenting.
2005-11-01 21:49:07 -08:00
Andrew Morton ce46337040 [PATCH] tlclk build fix
drivers/char/tlclk.c: In function `tlclk_init':
drivers/char/tlclk.c:775: warning: implicit declaration of function `platform_device_register_simple'

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-01 21:44:46 -08:00
Chris Wright faba278fb0 [PATCH] TPM compile fix
CC      drivers/char/tpm/tpm_nsc.o
drivers/char/tpm/tpm_nsc.c:277: error: `platform_bus_type' undeclared here (not in a function)
...
  CC      drivers/char/tpm/tpm_atmel.o
drivers/char/tpm/tpm_atmel.c:175: error: `platform_bus_type' undeclared here (not in a function)

Make sure to include proper headers.

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-01 21:44:45 -08:00
Kelly Daly b420677870 merge filename and modify references to iseries/vio.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 15:13:57 +11:00
Kelly Daly e45423eac2 merge filename and modify references to iseries/hv_lp_event.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 12:08:31 +11:00
Kelly Daly 15b1718948 merge filename and modify reference to iseries/hv_lp_config.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 11:55:28 +11:00
Kelly Daly c0a8d05c8a merge filename and modify references to iseries/hv_call_event.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-02 11:11:11 +11:00
Wim Van Sebroeck de4ae58fc9 [WATCHDOG] adds device_driver .owner field
Initialise the .owner field of the device driver
with the module that owns it, for easier tracking
of device driver ownership. (probably also better
for sysfs...)

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-11-01 19:31:59 +01:00
Wim Van Sebroeck b3faed6373 [WATCHDOG] pcwd_pci.c update comments
update copyright + update bells and whistles driver for v2.6

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-11-01 19:31:48 +01:00
Pozsar Balazs d05101738a [WATCHDOG] w83627hf_wdt trivial typo
The most trivial typo fix in the world.

Signed-off-by: Pozsar Balazs <pozsy@uhulinux.hu>
Signed-off-by: Pdraig Brady <P@draigBrady.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-11-01 19:31:37 +01:00
Ben Dooks 30da9404bc [WATCHDOG] s3c2410 wdt - add .owner field
Initialise the .owner field of the device driver
with the module that owns it, for easier tracking
of device driver ownership.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-11-01 19:31:19 +01:00
Kelly Daly 1da4403788 merge filename and modify references to iseries/hv_call.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
2005-11-01 16:59:20 +11:00
Linus Torvalds 4fd5f8267d Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Manual #include fixups for clashes - there may be some unnecessary
2005-10-31 07:32:56 -08:00
Paul Mackerras 23fd07750a Merge ../linux-2.6 by hand 2005-10-31 13:37:12 +11:00
Tim Schmielau 4e57b68178 [PATCH] fix missing includes
I recently picked up my older work to remove unnecessary #includes of
sched.h, starting from a patch by Dave Jones to not include sched.h
from module.h. This reduces the number of indirect includes of sched.h
by ~300. Another ~400 pointless direct includes can be removed after
this disentangling (patch to follow later).
However, quite a few indirect includes need to be fixed up for this.

In order to feed the patches through -mm with as little disturbance as
possible, I've split out the fixes I accumulated up to now (complete for
i386 and x86_64, more archs to follow later) and post them before the real
patch.  This way this large part of the patch is kept simple with only
adding #includes, and all hunks are independent of each other.  So if any
hunk rejects or gets in the way of other patches, just drop it.  My scripts
will pick it up again in the next round.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:32 -08:00
Randy Dunlap 3e6716e748 [PATCH] hpet: hpet driver cleanups
- Use kzalloc() instead of kmalloc + memset.
- Clean/fix some printk's.
- Use NULL for pointers instead of 0.
- Combine hpet busy searching locations into a function call.

Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:31 -08:00
Randy Dunlap b6ab126211 [PATCH] hpet: use HPET physical addresses for dup. detection
- Use HPET physical address to detect duplicates, not logical addresses.
  Using logical (mapped) addresses fails to detect duplicates
  because ioremap() returns a new mapped address each time.

- iounmap() regions when duplicate/busy areas are found.

Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:31 -08:00
Randy Dunlap 757c472409 [PATCH] hpet: allow HPET FIXED_MEM32 resource type
Allow the ACPI HPET description table to use a resource type of FIXED_MEM32
for the HPET reource.  Use the fixed resoure size of 1 KB for the HPET
resource as per the HPET spec.

Signed-off-by: Randy Dunlap <randy_d_dunlap@linux.intel.com>
Acked-by: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:31 -08:00
Clemens Ladisch 318db8f03b [PATCH] hpet: simplify initialization message
When booting, display the timer frequency in Hertz instead of as tick length
in nanoseconds.  Apart from saving a local variable, this makes the message
more easily comprehensible.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:31 -08:00
Clemens Ladisch c860ed9fb5 [PATCH] hpet: remove superfluous indirections
In the hpet_ioctl_common() function, devp->hd_hpets is already cached in the
hpetp variable, so we can use just that.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:30 -08:00
Clemens Ladisch 3d5640d1c7 [PATCH] hpet: fix access to multiple HPET devices
Fix two instances where a function would access the first HPET device instead
of the current one.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:30 -08:00
Clemens Ladisch 7522e4ecdf [PATCH] hpet: fix uninitialized variable in hpet_register()
Clear the ht_opaque field in the hpet_register() function before searching for
a free timer to prevent the function from incorrectly assuming that the search
succeeded afterwards.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:30 -08:00
Clemens Ladisch af95eade68 [PATCH] hpet: fix division by zero in HPET_INFO
Fix a division by zero that happened when the HPET_INFO ioctl was called
before a timer frequency had been set.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:30 -08:00
Clemens Ladisch 8e8505be9c [PATCH] hpet: fix HPET_INFO calls from kernel space
Fix a wrong memory access in hpet_ioctl_common().  It was not possible to use
the HPET_INFO ioctl from kernel space because it always called copy_to_user().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:30 -08:00
Clemens Ladisch 0d29086177 [PATCH] hpet: allow shared interrupts
This patch adds support for shared HPET interrupts.

The driver previously acknowledged interrupts for both edge and level
interrupts, but didn't actually allow a shared interrupt in the latter case.

We use a new per-timer flag to save whether the timer's interrupt might be
shared, and use it to do the processing required for level interrupts only if
necessary.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Acked-by: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:29 -08:00
Clemens Ladisch 189e2dd137 [PATCH] hpet: allow non-power-of-two frequencies
It was only the RTC hardware that restricted interrupt frequencies to a power
of two.  There is no reason to take over this restriction into the HPET
driver, so remove the offending check.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Acked-by: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:29 -08:00
Clemens Ladisch 3f992e1bb7 [PATCH] hpet: remove superfluous register reads
This patch removes several reads of a timer's config register that serve no
purpose whatsoever.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Acked-by: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:29 -08:00
Clemens Ladisch 642d30bbc7 [PATCH] hpet: remove unused variable
The variable hpet_ntimer is never read, so remove it.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Acked-by: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:29 -08:00
Clemens Ladisch ba3f213f8a [PATCH] HPET: make frequency calculations 32 bit safe
On 32-bit architectures, the multiplication in the argument for
hpet_time_div() often overflows.  In the typical case of a 14.32 MHz timer,
this happens when the desired frequency exceeds 61 Hz.

To avoid this multiplication, we can precompute and store the hardware
timer frequency, instead of the period, in the device structure, which
leaves us with a simple division when computing the number of timer ticks.

As a side effect, this also removes a theoretical bug where the timer
interpolator's frequency would be computed as a 32-bit value even if the
HPET frequency is greater than 2^32 Hz (the HPET spec allows up to 10 GHz).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:29 -08:00
Clemens Ladisch 9090e6db87 [PATCH] hpet: disallow zero interrupt frequency
Disallow setting an interrupt frequency of zero (which would result in a
division by zero), and disallow enabling the interrupt when the frequency
hasn't yet been set (which would use an interrupt period of zero).

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:29 -08:00
Randy Dunlap 874ec33ff9 [PATCH] sparse cleanups: NULL pointers, C99 struct init.
Convert most of the remaining "Using plain integer as NULL pointer" sparse
warnings to use NULL.  (Not duplicating patches that are already in -mm,
-bird, or -kj.)

Convert isdn driver struct initializer to use C99 syntax.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:29 -08:00
Andrew Morton b888c87b74 [PATCH] tpm-tidies
- Various whitespace fixes

- Use kzalloc()

Acked-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:29 -08:00
Marcel Selhorst 1b8333b02a [PATCH] Infineon TPM: move infineon driver off pci_dev
Move the Infineon TPM driver off pci device and makes it a pure pnp-driver.
It includes pnp-port validation and region requesting.

Signed-off-by: Marcel Selhorst <selhorst@crypto.rub.de>
Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:28 -08:00
Kylene Jo Hall 570302a311 [PATCH] tpm: move nsc driver off pci_dev
This patch changes the nsc driver from a pci driver to a platform driver.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:28 -08:00
Kylene Jo Hall 682e97acea [PATCH] tpm: move atmel driver off pci_dev
This patch changes the atmel driver from a pci driver to a platform driver.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:28 -08:00
Kylene Jo Hall ce2c87d4f7 [PATCH] tpm: change from pci_dev to dev power management functions
This patch is in support of moving away from the lpc bus pci_dev.  The power
management prototypes used by platform drivers is different but the
functionality remains the same.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:28 -08:00
Kylene Jo Hall e659a3fe20 [PATCH] tpm: remove pci dependency
Since the tpm does not have it's own pci id we have been consuming the lpc
bus.  This is not correct and causes problems to support non lpc bus chips.
This patch removes the dependency on pci_dev from tpm.c The subsequent patches
will stop the supported chips from registering as pci drivers.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:28 -08:00
Kylene Jo Hall b4ed3e3cbb [PATCH] tpm: add status function to allow non-lpc bus chips
This patch is in preparation of supporting chips that are not necessarily on
the lpc bus and thus are not accessed with inb's and outb's.  The patch
replaces the call to get the chip's status in the tpm.c file with a vendor
specific status function.  The patch also defines the function for each of the
current supported devices.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:28 -08:00
Bjorn Helgaas d269cdd0e2 [PATCH] rocketport: make it work when statically linked into kernel
The driver had incorrectly wrapped module_init(rp_init) in #ifdef MODULE,
so it worked only when compiled as a module.

Tested by Wolfgang Denk with this device:

    00:0e.0 Communication controller: Comtrol Corporation RocketPort 8 port w/RJ11 connectors (rev 04)
        Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Interrupt: pin A routed to IRQ 11
        Region 0: I/O ports at 7000 [size=64]

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:27 -08:00
Laurent Riffard ed8b39d0aa [PATCH] watchdog: update .owner field of struct pci_driver
This updates .owner field of struct pci_driver.

This allows SYSFS to create the symlink from the driver to the module which
provides it.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:26 -08:00
Laurent Riffard 413a42e2ea [PATCH] SyncLink adapters: updates .owner field of struct pci_driver
This updates .owner field of struct pci_driver.

This allows SYSFS to create the symlink from the driver to the module which
provides it.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:26 -08:00
Laurent Riffard 8f04dd0792 [PATCH] epca: update .owner field of struct pci_driver
This updates .owner field of struct pci_driver.

This allows SYSFS to create the symlink from the driver to the module which
provides it.

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:26 -08:00
Andrew Morton 0b360adbdb [PATCH] setkeys needs root
Because people can play games reprogramming keys and leaving traps for the
next user of the console.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:25 -08:00
Mark Gross 1a80ba8827 [PATCH] Telecom Clock Driver for MPCBL0010 ATCA computer blade
Signed-off-by: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:25 -08:00
Jean Delvare 3fa63c7d82 [PATCH] Typo fix: dot after newline in printk strings
Typo fix: dots appearing after a newline in printk strings.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:20 -08:00
Jean Delvare 33430dc593 [PATCH] Typo fix: explictly -> explicitly
(akpm: I don't do typo patches, but one of these is in a printk string)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:20 -08:00
Eric Dumazet 2f51201662 [PATCH] reduce sizeof(struct file)
Now that RCU applied on 'struct file' seems stable, we can place f_rcuhead
in a memory location that is not anymore used at call_rcu(&f->f_rcuhead,
file_free_rcu) time, to reduce the size of this critical kernel object.

The trick I used is to move f_rcuhead and f_list in an union called f_u

The callers are changed so that f_rcuhead becomes f_u.fu_rcuhead and f_list
becomes f_u.f_list

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:19 -08:00
Jeff Garzik d61780c0d3 [PATCH] remove some more check_region stuff
Removed some more references to check_region().

I checked these changes into the 'checkreg' branch of
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6.git

The only valid references remaining are in:
drivers/scsi/advansys.c
drivers/scsi/BusLogic.c
drivers/cdrom/sbpcd.c
sound/oss/pss.c

  Remove last vestiges of ide_check_region()
  drivers/char/specialix: trim trailing whitespace
  drivers/char/specialix: eliminate use of check_region()
  Remove outdated and unused references to check_region()
  [sound oss] remove check_region() usage from cs4232, wavfront
  [netdrvr eepro] trim trailing whitespace
  [netdrvr eepro] remove check_region() usage

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:18 -08:00
Brian Gerst 0d078f6f96 [PATCH] CONFIG_IA32
Add CONFIG_X86_32 for i386.  This allows selecting options that only apply
to 32-bit systems.

(X86 && !X86_64) becomes X86_32
(X86 ||  X86_64) becomes X86

Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-30 17:37:10 -08:00
Ralf Baechle 96ed748d9d qtronix.c: Handle kmalloc failure.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:55 +01:00
Ralf Baechle c4ed38a0c6 Resurrect Cobalt support for 2.6.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-10-29 19:30:42 +01:00
Russell King d052d1beff Create platform_device.h to contain all the platform device details.
Convert everyone who uses platform_bus_type to include
linux/platform_device.h.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-29 19:07:23 +01:00
Roland Dreier 8b150478ae [PATCH] ppc: make phys_mem_access_prot() work with pfns instead of addresses
Change the phys_mem_access_prot() function to take a pfn instead of an
address.  This allows mmap64() to work on /dev/mem for addresses above 4G
on 32-bit architectures.  We start with a pfn in mmap_mem(), so there's no
need to convert to an address; in fact, it's actively bad, since the
conversion can overflow when the address is above 4G.

Similarly fix the ppc32 page_is_ram() function to avoid a conversion to an
address by directly comparing to max_pfn.  Working with max_pfn instead of
high_memory fixes page_is_ram() to give the right answer for highmem pages.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-29 14:25:49 +10:00
Linus Torvalds 8a212ab6b8 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-10-28 21:09:26 -07:00
Tony Luck a1e78db3f5 Pull define-node-cleanup into release branch 2005-10-28 13:24:06 -07:00
Tony Luck 0d9136fdbc Pull altix-mmr into release branch 2005-10-28 11:15:08 -07:00
Greg KH 6fbfddcb52 Merge ../bleed-2.6 2005-10-28 10:13:16 -07:00
Russell King 9480e307cd [PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level.  Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level.  However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.

Since this is obsolete infrastructure which is no longer necessary,
we can remove it.  Here's an (untested) patch to do exactly that.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 09:52:56 -07:00
Dmitry Torokhov b416f2e452 [PATCH] Input: convert sonypi to dynamic input_dev allocation
Input: convert sonypi to dynamic input_dev allocation

This is required for input_dev sysfs integration

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 09:52:53 -07:00
Greg Kroah-Hartman 53f4654272 [PATCH] Driver Core: fix up all callers of class_device_create()
The previous patch adding the ability to nest struct class_device
changed the paramaters to the call class_device_create().  This patch
fixes up all in-kernel users of the function.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28 09:52:52 -07:00
Linus Torvalds 83928e17b9 Merge master.kernel.org:/home/rmk/linux-2.6-arm
Minor manual fixups for gfp_t clashes.
2005-10-28 09:24:22 -07:00
Jon Ringle dd5b295ff8 [ARM] 2921/1: Support for the RTC / nvram on the Comdial MP1000
Patch from Jon Ringle

This adds support for the RTC and nvram on the Comdial MP1000

Signed-off-by: Jon Ringle
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-28 16:27:24 +01:00
Al Viro b4e3ca1ab1 [PATCH] gfp_t: remaining bits of drivers/*
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-28 08:16:51 -07:00
Paul Mackerras 4542437679 Merge in v2.6.14 by hand 2005-10-28 13:38:53 +10:00
Ivan Kokshaysky b0917bd912 [PATCH] fix radeon_cp_init_ring_buffer()
I've seen similar failure on alpha.

Obviously, someone forgot to convert sg->handle stuff for
PCI gart case.

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-26 10:46:19 -07:00
Dave Jones ea248bcaad [AGPGART] Set .owner field of struct pci_driver.
From: Laurent Riffard <laurent.riffard@free.fr>

This updates .owner field of struct pci_driver.

This allows SYSFS to create the symlink from the driver to the module which
provides it.

$ tree /sys/bus/pci/drivers/agpgart-via/
/sys/bus/pci/drivers/agpgart-via/
|-- 0000:00:00.0 -> ../../../../devices/pci0000:00/0000:00:00.0
|-- bind
|-- module -> ../../../../module/via_agp
|-- new_id
`-- unbind

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-10-24 20:20:11 -07:00
Dave Airlie a4e62fa031 drm: remove unused components of drm structures
These haven't been used in quite a long time, takes 1K buffer out of structures.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-10-24 18:45:11 +10:00
Dave Airlie 67e1a014fb drm: fix warning on 64-bit platforms..
This looks ugly, but it is the only thing that makes sense that doesn't
change the API.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-10-24 18:41:39 +10:00
Stephen Rothwell 915124d811 powerpc: set the driver.owner field for all vio drivers
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24 16:59:13 +10:00
Stephen Rothwell 6fdf5392ca powerpc: don't duplicate name between vio_driver and device_driver
Just set the name field directly in the device_driver structure
contained in the vio_driver struct.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-24 15:42:12 +10:00
Dave Airlie 5fb4dc9bf5 merge linus head to drm-mm branch 2005-10-22 15:25:01 +10:00
Dave Airlie 23bfc1a339 merge linus head to drm-mm branch 2005-10-22 15:24:35 +10:00
Dave Airlie e29971f9a4 [PATCH] drm: another mga bug
The wrong state emission routines were being called for G550, and
consistent maps weren't correctly mapped...

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-21 12:18:09 -07:00
Dave Jones 0ea27d9f2f [AGPGART] Replace kmalloc+memset's with kzalloc's
Signed-off-by: Dave Jones <davej@redhat.com>
2005-10-20 15:12:16 -07:00
Dave Airlie 312f572605 merge Linus head tree into my drm tree and fix up conflicts 2005-10-20 18:21:33 +10:00
Dave Airlie 11909d6438 [PATCH] fix MGA DRM regression before 2.6.14
I've gotten a report on lkml, of a possible regression in the MGA DRM in
2.6.14-rc4 (since -rc1), I haven't been able to reproduce it here, but I've
figured out some possible issues in the mga code that were definitely
wrong, some of these are from DRM CVS, the main fix is the agp enable bit
on the old code path still used by everyone.....

Signed-off-by: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-19 23:04:31 -07:00
Linus Torvalds 1e65174a33 Add some basic .gitignore files
This still leaves driver and architecture-specific subdirectories alone,
but gets rid of the bulk of the "generic" generated files that we should
ignore.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-18 08:26:15 -07:00
Stephan Brodkorb 9ac0b9c192 [PATCH] n_r3964 mod_timer() fix
Since Revision 1.10 was released the n_r3964 module wasn't able to receive any
data.  The reason for that behavior is because there were some wrong calls of
mod_timer(...) in the function receive_char (...).  This patch should fix this
problem and was successfully tested with talking to some kuka industrial
robots.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-17 17:03:57 -07:00
Tony Luck 74e52aa561 Pull mbcs-init-sn-check into release branch 2005-10-11 15:08:48 -07:00
Ben Dooks cdfc8f5079 [ARM] 2963/1: S3C2410 - add .owner field to device_driver
Patch from Ben Dooks

Add initialisation of .owner field so that
the device driver can be referenced to the
module that owns it.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-10-10 10:20:06 +01:00
Linus Torvalds 58a2c3221e Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog 2005-10-08 14:58:25 -07:00
Dave Jones c0758146ad [PATCH] Fix drm 'debug' sysfs permissions
Just enables some extra printk's, but still..  Only the sysadmin should
be able to do that.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-05 07:38:28 -07:00
Greg Edwards 96f339c6b9 [IA64] mbcs_init() should give up unless running on sn2
CONFIG_SGI_MBCS is enabled in generic kernels, but the driver may
oops some other platforms.  Check whether we are running on sn2
and bail out if we are not before doing anything dangerous.

Acked-by: Bruce Losure <blosure@americas.sgi.com>
Signed-off-by: Greg Edwards <edwardsg@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-10-04 09:39:18 -07:00
Dave Airlie 3d5efad953 drm: fix drm PCIGART
PCI Express support broke PCIGART

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-30 19:12:46 +10:00
Dave Airlie b3a8363989 drm: fix all sparse warning on 32-bit x86
Finally cleaned up the sparse warnings for the drm.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-30 18:37:36 +10:00
Dave Airlie 689b9d74b1 drm: add option to force writeback off.
In order to get some better debugging from people about certain hangs/crashes
we need to be able to turn AGP writeback off permanently...

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-30 17:09:07 +10:00
Al Viro b2846dfa4a [PATCH] mv64x60_wdt __user annotations and cleanups
- use nonseekable_open() instead of messing with

	if (*ppos != file->f_pos)
		return -EISPIPE

   in ->write() (->read is NULL).

 - trivial __user annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-29 08:46:27 -07:00
Alexey Dobriyan 87e0f3dbd3 [PATCH] n_r3964: drop bogus fmt casts
- print pointers with %p
 - casting pointer structure field to int and printing it with %d...

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-29 08:46:26 -07:00
Al Viro 666002218d [PATCH] proc_mkdir() should be used to create procfs directories
A bunch of create_proc_dir_entry() calls creating directories had crept
in since the last sweep; converted to proc_mkdir().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-29 08:46:26 -07:00
Wim Van Sebroeck 195331d7c9 [WATCHDOG] pcwd_pci.c add debug module_param
Add debugging code for the pcwd_pci driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-29 16:22:30 +02:00
Wim Van Sebroeck a0800f6da7 [WATCHDOG] pcwd_pci.c control status + boot-code clean-up
* Clean-up control status code (use control status defines +
  change pcipcwd_clear_status)
* Clean-up boot-code (move card info to pcipcwd_show_card_info() )

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-29 16:21:50 +02:00
Corey Minyard a9d014afc3 [PATCH] Add IPMI poweroff control to sysfs
Put the IPMI poweroff_powercycle parameter into sysfs.  This field is
dynamically settable and is valuable to have in sysfs.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-28 07:46:41 -07:00
Dave Airlie b6ce156c41 drm: fix some lindent damage
Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-25 15:07:24 +10:00
Dave Airlie 13e4a9c851 drm: cast handle to a pointer to avoid warning
Andrew reported a warning on this line, just case to void *.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-25 14:30:09 +10:00
Dave Airlie b5e89ed53e drm: lindent the drm directory.
I've been threatening this for a while, so no point hanging around.
This lindents the DRM code which was always really bad in tabbing department.
I've also fixed some misnamed files in comments and removed some trailing
whitespace.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-25 14:28:13 +10:00
Dave Airlie 99a2657a29 drm: use kernel macros
Make some of the DRM_ macros use the real kernel macros.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-25 13:25:41 +10:00
Dave Airlie 4e0c1159d8 update from upstream 2005-09-25 13:14:45 +10:00
Dave Jones 0ff541dafd [AGPGART] Fix serverworks TLB flush.
Go back to what 2.4 kernels used to do here, as if this hits,
the kernel just hangs indefinitly.

Actually an improvement over 2.4 - we now break; out of the loop
instead of just printing messages on timeouts.

Signed-off-by: Dave Jones <davej@redhat.com>
2005-09-23 15:59:37 -07:00
Hironobu Ishii e7c9650843 [PATCH] ipmi_msghandler: inconsistent spin_lock usage
I found an inconsistent spin_lock usage in ipmi_smi_msg_received.

Signed-off-by: Hironobu Ishii <hishii@soft.fujitsu.com>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-23 13:35:37 -07:00
Keir Fraser 609725f877 [PATCH] Fix mmap() of /dev/hpet
The address passed to io_remap_pfn_range() in hpet_mmap() does not need to
be converted using __pa(): it is already a physical address.  This bug was
found and the patch suggested by Clay Harris.

I introduced this particular bug when making io_remap_pfn_range changes a
few months ago.  In fact mmap()ing /dev/hpet has *never* previously worked:
before my changes __pa() was being executed on an ioremap()ed virtual
address, which is also invalid.

Signed-off-by: Keir Fraser <keir@xensource.com>
Cc: Robert Picco <Robert.Picco@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-22 22:17:34 -07:00
Len Brown eca008c813 [ACPI] handle ACPICA 20050916's acpi_resource.type rename
Signed-off-by: Len Brown <len.brown@intel.com>
2005-09-22 00:28:05 -04:00
Linus Torvalds 0d0fc3a2d6 Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-09-16 11:54:13 -07:00
Al Viro bc9a5154a2 [PATCH] epca iomem annotations + several missing readw()
[originally sent to Alan, he had no problems with it]

 - iomem pointers marked as such
 - several direct dereferencings of such pointers replaced with read[bw]().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-16 10:38:10 -07:00
Peter Chubb 24b8e0cc09 [IA64] Remove warnings for gcc 4.0 IA64 compilation.
This patch removes some compilation warnings, mostly
trivially. acpi.c fix also noted by Kenji Kaneshige.

Signed-off-by; Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-09-16 09:45:27 -07:00
Tony Luck 55642d36cd [IA64] Two more uses of cpuid_to_cnodeid() must go.
s/cpuid_to_cnodeid/cpu_to_node/

Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-09-15 17:00:10 -07:00
Jack Steiner 24ee0a6d7b [IA64] Cleanup use of various #defines related to nodes
Some of the SN code & #defines related to compact nodes & IO discovery
have gotten stale over the years. This patch attempts to clean them up.
Some of the various SN MAX_xxx #defines were also unclear & misused.

The primary changes are:

	- use MAX_NUMNODES. This is the generic linux #define for the number
	  of nodes that are known to the generic kernel. Arrays & loops
	  for constructs that are 1:1 with linux-defined nodes should
	  use the linux #define - not an SN equivalent.

	- use MAX_COMPACT_NODES for MAX_NUMNODES + NUM_TIOS. This is the
	  number of nodes in the SSI system. Compact nodes are a hack to
	  get around the IA64 architectural limit of 256 nodes. Large SGI
	  systems have more than 256 nodes. When we upgrade to ACPI3.0,
	  I _hope_ that all nodes will be real nodes that are known to
	  the generic kernel. That will allow us to delete the notion
	  of "compact nodes".

	- add MAX_NUMALINK_NODES for the total number of nodes that
	  are in the numalink domain - all partitions.

	- simplified (understandable) scan_for_ionodes()

	- small amount of cleanup related to cnodes

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-09-15 16:31:12 -07:00
Antonino A. Daplas 065d9cac98 [PATCH] vc: Use correct size on buffer copy in vc_resize
In the unlikely case of the new screen width much wider then the old,
use (old_row_size * new_rows) instead of new_screen_size to prevent a
buffer overrun during the copy.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-15 08:24:09 -07:00
Linus Torvalds b75cdf388e Merge master.kernel.org:/home/rmk/linux-2.6-arm-smp 2005-09-14 15:27:39 -07:00
Anton Blanchard ef4cbee0b0 [PATCH] hvc_console: start kernel thread before registering tty
Its possible that we can write to the hvc_console tty as soon it is
registered.  Recently this started happening due to (what looks like) a
change to the hotplug code.

Unfortunately at this stage we have not started the khvcd kernel thread and
oops.  The solution is to start the kernel thread before registering the
tty.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-14 14:34:17 -07:00
Russell King ad4162f371 [ARM SMP] Add timer/watchdog defines for MPCore
The timer/watchdog register definitions were missing from
the mpcore watchdog patch.  Add them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-14 09:56:38 +01:00
Linus Torvalds a8cd2e5045 Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog 2005-09-13 09:45:20 -07:00
Peter Osterlund fb911ee849 [PATCH] Remove unnecessary check_region references in comments
Remove check_region references from comments and printk statements so that
searching for real users of this deprecated function gets easier.

Signed-off-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-13 08:22:29 -07:00
Russell King b9d36b851a [ARM SMP] Add MPCore watchdog driver
Add platform independent parts of the ARM MPCore watchdog driver.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-09-12 22:56:56 +01:00
Wim Van Sebroeck c315b7e840 [WATCHDOG] pcwd_pci-include+WDIOC_SETOPTIONS-patch
Clean-up includes
Check results for start + stop in the WDIOC_SETOPTIONS ioctl call

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-12 09:38:26 +02:00
Wim Van Sebroeck 3908bb1867 [WATCHDOG] sbc8360+w83977f_wdt-consolidate_CONFIG_WATCHDOG_NOWAYOUT_handling
Attached patch removes #ifdef CONFIG_WATCHDOG_NOWAYOUT mess and
replaces it with common define in linux/watchdog.h.

Signed-Off-By: Wim Van Sebroeck <wim@iguana.be>
2005-09-12 09:37:41 +02:00
Jose Miguel Goncalves b4cc4aa24c [WATCHDOG] w83977f-watchdog-driver.patch
In a project for my company I've needed to use the watchdog device in a
PCM-5335 SBC from AAEON.  The watchdog timer is from a Winbond's SuperIO
chip, the W83977F.

I've made this driver based on two others already on the kernel tree,
the w83877f_wdt and the wdt977.

Signed-off-by: Jose Goncalves <jose.goncalves@inov.pt>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-12 09:34:39 +02:00
Ian E. Morgan 3809ad384a [WATCHDOG] New SBC8360 watchdog driver (revised)
New SBC8360 watchdog driver patch

From: Ian E. Morgan <imorgan@webcon.ca>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-09-11 22:14:27 +02:00
Wim Van Sebroeck 266aa1c4b3 [WATCHDOG] driver-for-ibm-automatic-server-restart-watchdog-fix2.patch
The device/watchdog has a fixed timeout/heartbeat.
So we don't support the WDIOC_SETTIMEOUT ioctl call
and we also may not set the WDIOF_SETTIMEOUT flag.

Cc: Andrey Panin <pazke@donpac.ru>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-11 22:11:40 +02:00
Andrew Morton cd7b80079b [WATCHDOG] driver-for-ibm-automatic-server-restart-watchdog-fix
Add fixed timeout comments

Cc: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-09-11 22:09:54 +02:00
Andrey Panin d532134d4c [WATCHDOG] driver-for-ibm-automatic-server-restart-watchdog.patch
This patch adds driver for IBM Automatic Server Restart watchdog hardware
found in some IBM eServer xSeries machines.  This driver is based on the ugly
driver provided by IBM.  Driver was tested on IBM eServer 226.

Signed-off-by: Andrey Panin <pazke@donpac.ru>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-09-11 22:07:34 +02:00
David Hardeman abda5c8bd2 [WATCHDOG] i6300.h-removal-patch
the attached patch moves the content of drivers/char/watchdog/i6300.h
into drivers/char/watchdog/i6300.c, since it is the only file using the
defines there is no real reason to have a separate header.

Also cleaned up the comments a bit and added myself to the copyright
holders.

Signed-off-by: David Hardeman <david@2gen.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-09-11 22:01:58 +02:00
Jiri Slaby bb5dc36644 [WATCHDOG] i6300esb.c-2-bugs-little-cleanup.patch
In i6300esb.c watchdog card driver were 2 bugs (misused pc_match_device and
pci_dev_put wasn't called in one error case) and one little cleanup was
done (long line was converted to a shorter one with using built-in macro).

Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-09-11 21:56:10 +02:00
Naveen Gupta 811f999160 [WATCHDOG] i6300esb.c-pci_dev_put+nowayout-patch
One pci_dev_put was misused (there was one case without putting
the device).
Changed nowayout according to other drivers.

Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Naveen Gupta <ngupta@google.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-09-11 21:53:32 +02:00
Naveen Gupta ce2f50b4ae [WATCHDOG] i6300esb-set_correct_reload_register_bit
This patch writes into bit 8 of the reload register to perform the
correct 'Reload Sequence' instead of writing into bit 4 of Watchdog for
Intel 6300ESB chipset.

Signed-off-by: Naveen Gupta <ngupta@google.com>
Signed-off-by: David Hardeman <david@2gen.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-09-11 21:51:18 +02:00
Naveen Gupta 28562af3d4 [WATCHDOG] i6300esb.c-WDT_ENABLE-bug
This patch sets the WDT_ENABLE bit of the Lock Register to enable the
watchdog and WDT_LOCK bit only if nowayout is set. The old code always
sets the WDT_LOCK bit of watchdog timer for Intel 6300ESB chipset. So, we
end up locking the watchdog instead of enabling it.

Signed-off-by: Naveen Gupta <ngupta@google.com>
Signed-off-by: David Hardeman <david@2gen.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-09-11 21:48:46 +02:00
Jiri Slaby c69af038ca [WATCHDOG] removes pci_find_device from i6300esb.c
This patch changes pci_find_device to pci_get_device
(encapsulated in for_each_pci_dev) in i6300esb watchdog
card with appropriate adding pci_dev_put.

Generated in 2.6.13-rc5-mm1 kernel version.

Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-11 21:43:02 +02:00
David Hardeman cc90ef0f9b [WATCHDOG] i6300esb.patch
I wrote earlier to the list[1] asking for a driver for the watchdog
included in the 6300ESB chipset.  I got a 2.4 driver via private email
from Ross Biro which I've changed into what I hope resembles a 2.6
driver (which was done by looking a lot at the watchdog drivers
already in the 2.6 tree).

I've attached the result, and I'm hoping to get some feedback on the
coding as a first step.  I can't actually test it on the hardware
right now as I won't have physical access until April. So my own tests
have been limited to "compiles-without-warnings" and
"can-be-insmodded-in-other-machine-without-oops".

[1] http://marc.theaimsgroup.com/?l=linux-kernel&m=110711079825794&w=2
[2] http://marc.theaimsgroup.com/?l=linux-kernel&m=110711973917746&w=2

Signed-off-by: David Hardeman <david@2gen.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-11 21:39:45 +02:00
Dave Airlie ea98a92ff1 drm: add radeon PCI express support
Add support for Radeon PCI Express cards (needs a new X.org DDX)
Also allows PCI GART table to be stored in VRAM for non PCIE cards

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-11 20:28:11 +10:00
Dave Airlie 9d17601c4e drm: update radeon driver to 1.18
Add support for GL_ATI_fragment_shader, new packets R200_EMIT_PP_AFS_0/1,
R200_EMIT_PP_TXCTLALL_0-5 (replaces R200_EMIT_PP_TXFILTER_0-5, 2 more regs)
and R200_EMIT_ATF_TFACTOR (replaces R200_EMIT_TFACTOR_0 (8 consts instead of 6)

From: Roland Scheidegger, David Airlie
Signed-off-by: David Airlie <airlied@linux.ie>
2005-09-11 19:55:53 +10:00
Dave Airlie 70dfcfea4b drm: missing drm_vm.c changes for consistent maps
This adds a missing change from CVS for consistent maps.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-09-11 19:37:29 +10:00
Linus Torvalds 7f93220b62 Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input 2005-09-10 15:54:41 -07:00
James Chapman 3be10211ab [WATCHDOG] mv64x60_wdt.patch
Add mv64x60 (Marvell Discovery) watchdog support.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-10 21:03:04 +02:00
Wim Van Sebroeck 180536f827 [WATCHDOG] Kconfig+Makefile-clean2
Clean the Kconfig+Makefile according to a sorted list
of the drivers of each architecture (and sub-architecture).

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-10 20:53:57 +02:00
Nishanth Aravamudan da4cd8dfe1 [PATCH] drivers/char: fix-up schedule_timeout() usage
Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:38 -07:00
Marcelo Feitoza Parisi 9675770133 [PATCH] drivers/char/lp.c : Use of the time_after() macro
Use of the time_after() macro, defined at linux/jiffies.h, which deals with
wrapping correctly and are nicer to read.

Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:31 -07:00
Jesper Juhl f9101210e7 [PATCH] vfree and kfree cleanup in drivers/
This patch does a full cleanup of 'NULL checks before vfree', and a partial
cleanup of calls to kfree for all of drivers/ - the kfree bit is partial in
that I only did the files that also had vfree calls in them.  The patch
also gets rid of some redundant (void *) casts of pointers being passed to
[vk]free, and a some tiny whitespace corrections also crept in.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:30 -07:00
Adrian Bunk 887c27f369 [PATCH] fix unusual placement of inline keyword in hpet
With gcc -W:

drivers/char/hpet.c:102: warning: `inline' is not at beginning of declaration
drivers/char/hpet.c:109: warning: `inline' is not at beginning of declaration

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:29 -07:00
Victor Fusco 621a4d1a82 [PATCH] char/n_tty: fix sparse warnings (__nocast type)
Fix the sparse warning "implicit cast to nocast type"

Signed-off-by: Victor Fusco <victor@cetuc.puc-rio.br>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:26 -07:00
Christophe Lucas cf85d5ca88 [PATCH] drivers/char/lcd.c: misc_register() can fail
Signed-off-by: Christophe Lucas <clucas@rotomalug.org>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:25 -07:00
Christophe Lucas 819a3eba42 [PATCH] applicom: fix error handling
misc_register() can fail.

Signed-off-by: Christophe Lucas <clucas@rotomalug.org>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:25 -07:00
Paul Fulghum a7482a2e77 [PATCH] synclink_cs add statistics clear
Add ability to clear statistics.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-10 10:06:22 -07:00
Dmitry Torokhov fe1e860498 Input: clean up whitespace and formatting in drivers/char/keyboard.c
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-09-10 12:03:38 -05:00
Arnaud Patard (Rtp) 7b4af95332 [WATCHDOG] s3c2410_wdt.c-state_warning.patch
I've noticed that the patch from Ben Dooks (commit
af4bb822bc on your git tree) is
introducing a warning. It's using 'u32 state' instead of 'pm_message_t
state'. I've attached a one liner to fix it.

Signed-Off-By: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2005-09-10 18:21:34 +02:00
Dmitry Torokhov d344c5e085 Manual merge with Linus 2005-09-09 20:14:47 -05:00
viro@ZenIV.linux.org.uk 18fb944257 [PATCH] trivial __user annotations (ipmi)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 14:05:54 -07:00
Ingo Molnar 8d06afab73 [PATCH] timer initialization cleanup: DEFINE_TIMER
Clean up timer initialization by introducing DEFINE_TIMER a'la
DEFINE_SPINLOCK.  Build and boot-tested on x86.  A similar patch has been
been in the -RT tree for some time.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 14:03:48 -07:00
Antonino A. Daplas 3b41dc1a3c [PATCH] console: Fix buffer copy on vc resize
On a vc resize, the contents of the old screen buffer are transferred to the
new screenbuffer.  If the new screenbuffer is smaller than the old one, only
the contents from the bottom are copied to new.  If the contents of the old
buffer are located at the top, then the contents will not be copied to the new
buffer resulting in a blank screen.

This bug will happen only if the vc in question is not in the foreground.
Doing an fbset -a or con2fbmap will trigger this bug.

To fix this problem, base the start of the copy from the location of the
current cursor.  If the cursor is near the top of the buffer, copy the
contents at the top, and if the cursor is near the bottom of the buffer, then
copy the contents at the bottom.  In the unlikely case where the new row size
is greater than 2x smaller than the old one, and the cursor is in the middle,
copy 1/2 screenful from the top and bottom of the cursor position.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:58:00 -07:00
Dipankar Sarma b835996f62 [PATCH] files: lock-free fd look-up
With the use of RCU in files structure, the look-up of files using fds can now
be lock-free.  The lookup is protected by rcu_read_lock()/rcu_read_unlock().
This patch changes the readers to use lock-free lookup.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Ravikiran Thirumalai <kiran_th@gmail.com>
Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:55 -07:00
Dipankar Sarma badf16621c [PATCH] files: break up files struct
In order for the RCU to work, the file table array, sets and their sizes must
be updated atomically.  Instead of ensuring this through too many memory
barriers, we put the arrays and their sizes in a separate structure.  This
patch takes the first step of putting the file table elements in a separate
structure fdtable that is embedded withing files_struct.  It also changes all
the users to refer to the file table using files_fdtable() macro.  Subsequent
applciation of RCU becomes easier after this.

Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:55 -07:00
Paul Fulghum 6e8dcee3e6 [PATCH] synclinkmp.c: fix async internal loopback
Fix async internal loopback by not using enable_loopback function which
reprograms clocking and should only be used for hdlc mode.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:35 -07:00
Paul Fulghum 166692e4a0 [PATCH] synclinkmp.c: add statistics clear
Add ability to clear statistics.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:34 -07:00
Paul Fulghum 761a444d8d [PATCH] synclinkmp.c: disable burst transfers
Disable burst transfers on adapter local bus.  Hardware feature does not work
on latest version of adapter.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:34 -07:00
Paul Fulghum 7f3edb9456 [PATCH] synclinkmp.c: fix double mapping of signals
Serial signals were incorrectly mapped twice to events.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:34 -07:00
Paul Fulghum 7c1fff58cf [PATCH] synclink.c: add loopback to async mode
Add internal loopback support for asynchronous mode operation.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:34 -07:00
Paul Fulghum 9661239f7f [PATCH] synclink.c: add clear stats
Add the ability to clear statistics.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:33 -07:00
Paul Fulghum 4a918bc233 [PATCH] synclink.c: compiler optimisation fix
Make some fields of DMA descriptor volatile to prevent compiler optimizations.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:33 -07:00
Jason Baron ff55fe2075 [PATCH] pty_chars_in_buffer oops fix
The idea of this patch is to lock both sides of a ptmx/pty pair during line
discipline changing.  This is needed to ensure that say a poll on one side of
the pty doesn't occur while the line discipline is actively being changed.
This resulted in an oops reported on lkml, see:

	http://marc.theaimsgroup.com/?l=linux-kernel&m=111342171410005&w=2

A 'hacky' approach was previously implmemented which served to eliminate the
poll vs.  line discipline changing race.  However, this patch takes a more
general approach to the issue.  The patch only adds locking on a less often
used path, the line-discipline changing path, as opposed to locking the
ptmx/pty pair on read/write/poll paths.

The patch below, takes both ldisc locks in either order b/c the locks are both
taken under the same spinlock().  I thought about locking the ptmx/pty
separately, such as master always first but that introduces a 3 way deadlock.
For example, process 1 does a blocking read on the slave side.  Then, process
2 does an ldisc change on the slave side, which acquires the master ldisc lock
but not the slave's.  Finally, process 3 does a write which blocks on the
process 2's ldisc reference.

This patch does introduce some changes in semantics.  For example, a line
discipline change on side 'a' of a ptmx/pty pair, will now wait for a
read/write to complete on the other side, or side 'b'.  The current behavior
is to simply wait for any read/writes on only side 'a', not both sides 'a' and
'b'.  I think this behavior makes sense, but I wanted to point it out.

I've tested the patch with a bunch of read/write/poll while changing the line
discipline out from underneath.

This patch obviates the need for the above "hide the problem" patch.

Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:31 -07:00
Tony Luck 1fa9295728 [IA64] Need to include <asm/sn/io.h> in a few more places.
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-09-09 11:41:12 -07:00
viro@ZenIV.linux.org.uk f91f4d923f [PATCH] gratuitous includes of asm/serial.h
Removed gratuitous includes of asm/serial.h in synklinkmp and ip2main.
Allows to remove the rest of "broken on sparc32" in drivers/char - this
stuff doesn't break the build anymore.  Since it got zero testing, it almost
certainly won't work there, though...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 10:31:58 -07:00
Linus Torvalds e3e3679cfc Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart 2005-09-08 17:22:53 -07:00
Adrian Bunk 982245f017 [PATCH] PCI: remove CONFIG_PCI_NAMES
This patch removes CONFIG_PCI_NAMES.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-08 14:57:23 -07:00
Len Brown 64e47488c9 Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
Linus Torvalds db400b3c4e Merge branch 'drm-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6 2005-09-07 17:29:07 -07:00
Corey Minyard 8c702e1620 [PATCH] ipmi poweroff: fix chassis control
The IPMI power control function proc_write_chassctrl was badly written, it
directly used userspace pointers, it assumed that strings were NULL
terminated, and it used the evil sscanf function.  This converts over to
using the sysctl interface for this data and changes the semantics to be a
little more logical.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:49 -07:00