dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

1696 Commits

Author SHA1 Message Date
=?utf-8?q?Michel_D=C3=A4nzer?= a0b136bb69 drm: i915: fix up irqflags arg
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 21fa60ed4e drm: i915: Only return EBUSY after we've established we need to schedule a new swap.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 2dbb232c4d drm: i915: Fix 'sequence has passed' condition in i915_vblank_swap().
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 376642cf2e drm: i915: Add SAREA fileds for determining which pipe to sync window buffer swaps to.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 5b51694aff drm: Make handling of dev_priv->vblank_pipe more robust.
Initialize it to default value if it hasn't been set by the X server yet.

In i915_vblank_pipe_set(), only update dev_priv->vblank_pipe and call
i915_enable_interrupt() if the argument passed from userspace is valid to avoid
corrupting dev_priv->vblank_pipe on invalid arguments.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 541f29aad7 drm: DRM_I915_VBLANK_SWAP ioctl: Take drm_vblank_seq_type_t instead
of pipe number.

Handle relative as well as absolute target sequence numbers.

Return error if target sequence has already passed, so userspace can deal with
this situation as it sees fit.

On success, return the sequence number of the vertical blank when the buffer
swap is expected to take place.

Also add DRM_IOCTL_I915_VBLANK_SWAP definition for userspace code that may want
to use ioctl() instead of drmCommandWriteRead().

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:30 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= a6b54f3f50 drm: i915: Add ioctl for scheduling buffer swaps at vertical blanks.
This uses the core facility to schedule a driver callback that will be called
ASAP after the given vertical blank interrupt with the HW lock held.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 049b323321 drm: Core vsync: Don't clobber target sequence number when scheduling signal.
It looks like this would have caused signals to always get sent on the next
vertical blank, regardless of the sequence number.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= ab285d74e6 drm: Core vsync: Add flag DRM_VBLANK_NEXTONMISS.
When this flag is set and the target sequence is missed, wait for the next
vertical blank instead of returning immediately.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 8163e418f7 drm: Make locked tasklet handling more robust.
Initialize the spinlock unconditionally when struct drm_device is filled in,
and return early in drm_locked_tasklet() if the driver doesn't support IRQs.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Felix_K=C3=BChling?= 507c0185a7 drm: drm_rmdraw: Declare id and idx as signed so testing for < 0 works as intended.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= cdec2f82b1 drm: Change first valid DRM drawable ID to be 1 instead of 0.
This makes it easier for userspace to know when it needs to allocate an ID.

Also free drawable information memory when it's no longer needed.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= b03ed6f2fc drm: drawable locking + memory management fixes + copyright
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:29 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 2e54a00762 drm: Add support for interrupt triggered driver callback with lock held to DRM core.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:28 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= bea5679f9c drm: Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do
something useful, and add another ioctl for the X server to update drawable
information. The only kind of drawable information tracked so far is cliprects.

Only reallocate cliprect memory if the number of cliprects changes.
Also improve diagnostic output.

hook up drm ioctl update draw
export drm_get_drawable_info symbol

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:28 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 68815bad72 drm: add support for secondary vertical blank interrupt to i915
When the vertical blank interrupt is enabled for both pipes, pipe A is
considered primary and pipe B secondary. When it's only enabled for one pipe,
it's always considered primary for backwards compatibility.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:28 +11:00
=?utf-8?q?Michel_D=C3=A4nzer?= 776c9443e2 drm: add support for secondary vertical blank interrupt to DRM core
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-12-07 15:53:28 +11:00
Al Viro 3e577a80ea [PATCH] drivers/{char|isdn}: work_struct-induced breakage
part 1 of fsck-knows-how-many

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-06 11:09:08 -08:00
David Howells 4796b71fbb Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/pcmcia/ds.c

Fix up merge failures with Linus's head and fix new compile failures.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-06 15:01:18 +00:00
David Howells 9db7372445 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/ata/libata-scsi.c
	include/linux/libata.h

Futher merge of Linus's head and compilation fixups.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 17:01:28 +00:00
David Howells 4c1ac1b491 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/infiniband/core/iwcm.c
	drivers/net/chelsio/cxgb2.c
	drivers/net/wireless/bcm43xx/bcm43xx_main.c
	drivers/net/wireless/prism54/islpci_eth.c
	drivers/usb/core/hub.h
	drivers/usb/input/hid-core.c
	net/core/netpoll.c

Fix up merge failures with Linus's head and fix new compilation failures.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 14:37:56 +00:00
Dominik Brodowski af2b3b503a [PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation
struct pcmcia_device *p_dev->conf.ConfigBase and .Present are set in almost
all PCMICA driver right at the beginning, using the same calls but slightly
different implementations. Unfiy this in the PCMCIA core.

Includes a small bugfix ("drivers/net/pcmcia/xirc2ps_cs.c: remove unused
label") from and Signed-off-by Adrian Bunk <bunk@stusta.de>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-12-04 20:12:02 -05:00
Akinobu Mita 5eb5fc97d8 [PATCH] cm4000_cs: fix return value check
The return value of class_create() need to be checked with IS_ERR().
And register_chrdev() returns errno on failure.
This patch includes these fixes for cm4000_cs and cm4040_cs.

Signed-off-by: Akinbou Mita <akinobu.mita@gmail.com>
Signed-off-by: Harald Welte <laforge@gnumonks.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-12-04 20:09:13 -05:00
Linus Torvalds 9b8ab9f6c3 Merge branch 'for-linus4' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird
* 'for-linus4' of master.kernel.org:/pub/scm/linux/kernel/git/viro/bird:
  [PATCH] severing poll.h -> mm.h
  [PATCH] severing skbuff.h -> mm.h
  [PATCH] severing skbuff.h -> poll.h
  [PATCH] severing skbuff.h -> highmem.h
  [PATCH] severing uaccess.h -> sched.h
  [PATCH] severing fs.h, radix-tree.h -> sched.h
  [PATCH] severing module.h->sched.h
2006-12-04 10:37:06 -08:00
Al Viro f23f6e08c4 [PATCH] severing poll.h -> mm.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 02:00:36 -05:00
Al Viro 914e26379d [PATCH] severing fs.h, radix-tree.h -> sched.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-12-04 02:00:24 -05:00
Jeff Garzik d916faace3 Remove long-unmaintained ftape driver subsystem.
It's bitrotten, long unmaintained, long hidden under BROKEN_ON_SMP,
etc.  As scheduled in feature-removal-schedule.txt, and ack'd several
times on lkml.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-03 22:22:41 -05:00
Al Viro b09b845ca6 [RANDOM]: Annotate random.h IP helpers.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-02 21:22:51 -08:00
Linus Torvalds b6ef977b60 Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 4
  [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 3
  [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 2
  [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 1
  [WATCHDOG] MIPS RM9000 on-chip watchdog device
  [WATCHDOG] Add iTCO vendor specific support
  [WATCHDOG] sc1200wdt.c pnp unregister fix.
  [WATCHDOG] config.h removal
  [WATCHDOG] NS pc87413-wdt Watchdog driver - fixes
  [WATCHDOG] NS pc87413-wdt Watchdog driver v1.1
  [WATCHDOG] NS pc87413-wdt Watchdog driver
2006-12-01 16:47:26 -08:00
Linus Torvalds 9641219825 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (103 commits)
  usbcore: remove unused argument in autosuspend
  USB: keep count of unsuspended children
  USB hub: simplify remote-wakeup handling
  USB: struct usb_device: change flag to bitflag
  OHCI: make autostop conditional on CONFIG_PM
  USB: Add autosuspend support to the hub driver
  EHCI: Fix root-hub and port suspend/resume problems
  USB: create a new thread for every USB device found during the probe sequence
  USB: add driver for the USB debug devices
  USB: added dynamic major number for USB endpoints
  USB: pegasus error path not resetting task's state
  USB: endianness fix for asix.c
  USB: build the appledisplay driver
  USB serial: replace kmalloc+memset with kzalloc
  USB: hid-core: canonical defines for Apple USB device IDs
  USB: idmouse cleanup
  USB: make drivers/usb/core/driver.c:usb_device_match() static
  USB: lh7a40x_udc remove double declaration
  USB: pxa2xx_udc recognizes ixp425 rev b0 chip
  usbtouchscreen: add support for DMC TSC-10/25 devices
  ...
2006-12-01 16:41:58 -08:00
Linus Torvalds 4549df891a Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
  Driver core: show drivers in /sys/module/
  Documentation/driver-model/platform.txt update/rewrite
  Driver core: platform_driver_probe(), can save codespace
  driver core: Use klist_remove() in device_move()
  driver core: Introduce device_move(): move a device to a new parent.
  Driver core: make drivers/base/core.c:setup_parent() static
  driver core: Introduce device_find_child().
  sysfs: sysfs_write_file() writes zero terminated data
  cpu topology: consider sysfs_create_group return value
  Driver core: Call platform_notify_remove later
  ACPI: Change ACPI to use dev_archdata instead of firmware_data
  Driver core: add dev_archdata to struct device
  Driver core: convert sound core to use struct device
  Driver core: change mem class_devices to be real devices
  Driver core: convert fb code to use struct device
  Driver core: convert firmware code to use struct device
  Driver core: convert mmc code to use struct device
  Driver core: convert ppdev code to use struct device
  Driver core: convert PPP code to use struct device
  Driver core: convert cpuid code to use struct device
  ...
2006-12-01 16:41:07 -08:00
Greg Kroah-Hartman ebf644c462 Driver core: change mem class_devices to be real devices
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:52:00 -08:00
Greg Kroah-Hartman 04880edae5 Driver core: convert ppdev code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:52:00 -08:00
Greg Kroah-Hartman 38ca6c34d3 Driver core: convert raw device code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Greg Kroah-Hartman 01107d3430 Driver core: convert tty core to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Also fixes up the isdn drivers that were putting something in the class
device's directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Greg Kroah-Hartman 94fbcded4e Driver core: change misc class_devices to be real devices
This also ment that some of the misc drivers had to also be fixed
up as they were assuming the device was a class_device.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Greg Kroah-Hartman cd15422b9f Driver core: convert vc code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Greg Kroah-Hartman 805952a889 Driver core: convert vt code to use struct device
Converts from using struct "class_device" to "struct device" making
everything show up properly in /sys/devices/ with symlinks from the
/sys/class directory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:51:59 -08:00
Mariusz Kozlowski 6265d62f31 usb: pcwd_usb free urb cleanup
- usb_free_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:23:32 -08:00
Andrew Victor 55d8baee4a [ARM] 3954/1: AT91: Update drivers for new headers
This patch updates the drivers (and other files) which include the
hardware headers.  This fixes the breakage introduced in patches 3950/1
and 3951/1 (those patches were getting big).

The AVR32 architecture uses the same serial driver and had its own copy
of at91rm9200_pdc.h.  Renamed it to at91_pdc.h

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-11-30 22:51:40 +00:00
Wim Van Sebroeck bdbf77d670 Merge ../linux-2.6-watchdog-mm 2006-11-30 20:22:09 +01:00
Matt LaPlante 0779bf2d2e Fix misc .c/.h comment typos
Fix various .c/.h typos in comments (no code changes).

Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-11-30 05:24:39 +01:00
Matt LaPlante 3cb2fccc5f Fix misc Kconfig typos
Fix various Kconfig typos.

Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-11-30 05:22:59 +01:00
Akinobu Mita 5e66b0b5f1 [PATCH] tlclk: fix platform_device_register_simple() error check
The return value of platform_device_register_simple() should be checked by
IS_ERR().

This patch also fix misc_register() error case.  Because misc_register()
returns error code.

Cc: Sebastien Bouchard <sebastien.bouchard@ca.kontron.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-25 13:28:34 -08:00
Linus Torvalds 66c669baa7 [AGP] Allocate AGP pages with GFP_DMA32 by default
Not all graphic page remappers support physical addresses over the 4GB
mark for remapping, so while some do (the AMD64 GART always did, and I
just fixed the i965 to do so properly), we're safest off just forcing
GFP_DMA32 allocations to make sure graphics pages get allocated in the
low 32-bit address space by default.

AGP sub-drivers that really care, and can do better, could just choose
to implement their own allocator (or we could add another "64-bit safe"
default allocator for their use), but quite frankly, you're not likely
to care in practice.

So for now, this trivial change means that we won't be allocating pages
that we can't map correctly by mistake on x86-64.

[ On traditional 32-bit x86, this could never happen, because GFP_KERNEL
  would never allocate any highmem memory anyway ]

Acked-by: Andi Kleen <ak@suse.de>
Acked-by: Dave Jones <davej@redhat.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-22 14:55:29 -08:00
Linus Torvalds 7d915a3898 [AGP] Fix intel 965 AGP memory mapping function
This introduces a i965-specific "mask_memory()" function that knows
about the extended physical addresses that the i965 supports.  This
allows us to correctly map in physical memory in the >4GB range into the
GTT.

Also simplify/clean-up the i965 case for the aperture sizing by just
returning the fixed 512kB size from "fetch_size()".  We don't really
care that not all of the aperture may be visible - the only thing that
cares about the aperture size is the Intel "stolen memory" calculation,
which depends on the fixed size.

Cc: Keith Packard <keithp@keithp.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-22 09:37:54 -08:00
David Howells c4028958b6 WorkStruct: make allyesconfig
Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:57:56 +00:00
David Howells 65f27f3844 WorkStruct: Pass the work_struct pointer instead of context data
Pass the work_struct pointer to the work function rather than context data.
The work function can use container_of() to work out the data.

For the cases where the container of the work_struct may go away the moment the
pending bit is cleared, it is made possible to defer the release of the
structure by deferring the clearing of the pending bit.

To make this work, an extra flag is introduced into the management side of the
work_struct.  This governs auto-release of the structure upon execution.

Ordinarily, the work queue executor would release the work_struct for further
scheduling or deallocation by clearing the pending bit prior to jumping to the
work function.  This means that, unless the driver makes some guarantee itself
that the work_struct won't go away, the work function may not access anything
else in the work_struct or its container lest they be deallocated..  This is a
problem if the auxiliary data is taken away (as done by the last patch).

However, if the pending bit is *not* cleared before jumping to the work
function, then the work function *may* access the work_struct and its container
with no problems.  But then the work function must itself release the
work_struct by calling work_release().

In most cases, automatic release is fine, so this is the default.  Special
initiators exist for the non-auto-release case (ending in _NAR).


Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:55:48 +00:00
David Howells 52bad64d95 WorkStruct: Separate delayable and non-delayable events.
Separate delayable work items from non-delayable work items be splitting them
into a separate structure (delayed_work), which incorporates a work_struct and
the timer_list removed from work_struct.

The work_struct struct is huge, and this limits it's usefulness.  On a 64-bit
architecture it's nearly 100 bytes in size.  This reduces that by half for the
non-delayable type of event.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:54:01 +00:00
Randy Dunlap f0c69c4ee7 [PATCH] ftape: fix printk format warnings
Fix printk format warnings:
drivers/char/ftape/zftape/zftape-buffers.c:87: warning: format '%d' expects type
'int', but argument 3 has type 'size_t'
drivers/char/ftape/zftape/zftape-buffers.c:104: warning: format '%d' expects type
 'int', but argument 3 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-20 09:42:05 -08:00
Wim Van Sebroeck d5d06ff7f1 [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 4
a number of small patches:
- include notifier.h include file
- re-arrange prototype functions
- remove =0 initializations
- change printk logging levels to what's used in other drivers
- /dev/watchdog is a VFS so use nonseekable_open
- Style: Instead of "if (constant op function_or_variable)"
  we prefer "if (function_or_variable op constant)"
- arg is a __user pointer
- use MAX_TIMEOUT_SECONDS instead of 32 in WDIOC_SETTIMEOUT

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 23:50:06 +01:00
Wim Van Sebroeck 414a675964 [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 3
Move start and stop code into seperate functions

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 23:36:08 +01:00
Wim Van Sebroeck 97846e3ccb [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 2
Reorganize source code so that it is structured as follows:
- Function prototypes
- Local variables
- Module arguments
- Interrupt handler
- Watchdog functions
- /dev/watchdog operations
- Shutdown notifier
- Kernel interfaces
- Init & exit procedures
- Device driver init & exit

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 23:15:48 +01:00
Wim Van Sebroeck cd57eeab7c [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 1
Locate parameter descriptions close to parameter definition -
not in bottom of file.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 21:51:35 +01:00
Thomas Koeller 825d3748c1 [WATCHDOG] MIPS RM9000 on-chip watchdog device
This is a driver for the on-chip watchdog device found on some
MIPS RM9000 processors.

Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-17 20:45:24 +01:00
Zhang, Yanmin b48f5457b4 [PATCH] ipmi: use platform_device_add() instead of platform_device_register() to register device allocated dynamically
I got below warning when running 2.6.19-rc5-mm1 on my ia64 machine.

WARNING at lib/kobject.c:172 kobject_init()

Call Trace:
 [<a0000001000137c0>] show_stack+0x40/0xa0
                                sp=e0000002ff9f7bc0 bsp=e0000002ff9f0d10
 [<a000000100013850>] dump_stack+0x30/0x60
                                sp=e0000002ff9f7d90 bsp=e0000002ff9f0cf8
 [<a000000100407bb0>] kobject_init+0x90/0x160
                                sp=e0000002ff9f7d90 bsp=e0000002ff9f0cd0
 [<a0000001005ae080>] device_initialize+0x40/0x1c0
                                sp=e0000002ff9f7da0 bsp=e0000002ff9f0cb0
 [<a0000001005b88c0>] platform_device_register+0x20/0x60
                                sp=e0000002ff9f7dd0 bsp=e0000002ff9f0c90
 [<a000000100592560>] try_smi_init+0xbc0/0x11e0
                                sp=e0000002ff9f7dd0 bsp=e0000002ff9f0c50
 [<a000000100594900>] init_ipmi_si+0xaa0/0x12e0
                                sp=e0000002ff9f7de0 bsp=e0000002ff9f0bd8
 [<a000000100009910>] init+0x350/0x780
                                sp=e0000002ff9f7e00 bsp=e0000002ff9f0ba8
 [<a000000100011d30>] kernel_thread_helper+0x30/0x60
                                sp=e0000002ff9f7e30 bsp=e0000002ff9f0b80
 [<a0000001000090c0>] start_kernel_thread+0x20/0x40
                                sp=e0000002ff9f7e30 bsp=e0000002ff9f0b80
WARNING at lib/kobject.c:172 kobject_init()

Call Trace:
 [<a0000001000137c0>] show_stack+0x40/0xa0
                                sp=e0000002ff9f7b40 bsp=e0000002ff9f0db0
 [<a000000100013850>] dump_stack+0x30/0x60
                                sp=e0000002ff9f7d10 bsp=e0000002ff9f0d98
 [<a000000100407bb0>] kobject_init+0x90/0x160
                                sp=e0000002ff9f7d10 bsp=e0000002ff9f0d70
 [<a0000001005ae080>] device_initialize+0x40/0x1c0
                                sp=e0000002ff9f7d20 bsp=e0000002ff9f0d50
 [<a0000001005b88c0>] platform_device_register+0x20/0x60
                                sp=e0000002ff9f7d50 bsp=e0000002ff9f0d30
 [<a00000010058ac00>] ipmi_register_smi+0xcc0/0x18e0
                                sp=e0000002ff9f7d50 bsp=e0000002ff9f0c90
 [<a000000100592600>] try_smi_init+0xc60/0x11e0
                                sp=e0000002ff9f7dd0 bsp=e0000002ff9f0c50
 [<a000000100594900>] init_ipmi_si+0xaa0/0x12e0
                                sp=e0000002ff9f7de0 bsp=e0000002ff9f0bd8
 [<a000000100009910>] init+0x350/0x780
                                sp=e0000002ff9f7e00 bsp=e0000002ff9f0ba8
 [<a000000100011d30>] kernel_thread_helper+0x30/0x60
                                sp=e0000002ff9f7e30 bsp=e0000002ff9f0b80
 [<a0000001000090c0>] start_kernel_thread+0x20/0x40
                                sp=e0000002ff9f7e30 bsp=e0000002ff9f0b80

The root cause is the device struct is initialized twice.

If the device is allocated dynamically by platform_device_alloc,
platform_device_alloc will initialize struct device, then,
platform_device_add should be used to register the device.

The difference between platform_device_register and platform_device_add is
platform_device_register will initiate the device while platform_device_add
won't.

Signed-off-by: Zhang Yanmin <yanmin.zhang@intel.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-16 11:43:37 -08:00
Jiri Slaby c387fd85f8 [PATCH] Char: isicom, fix close bug
port is dereferenced even if it is NULL.  Dereference it _after_ the
check if (!port)...  Thanks Eric <ef87@yahoo.com> for reporting this.

This fixes

	http://bugzilla.kernel.org/show_bug.cgi?id=7527

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-14 16:02:02 -08:00
Corey Minyard 7947d2cc2c [PATCH] IPMI: Fix more && typos
Fix improper use of "&&" when "&" was intended.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-13 07:40:42 -08:00
Jes Sorensen 1a4b0fc503 [PATCH] mspec driver build fix
Fix MSPEC driver to build for non SN2 enabled configs as the driver should
work in cached and uncached modes (no fetchop) on these systems.  In
addition make MSPEC select IA64_UNCACHED_ALLOCATOR, which is required for
it and move it to arch/ia64/Kconfig to avoid warnings on non ia64
architectures running allmodconfig.  Once the Kconfig code is fixed, we can
move it back.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Cc: Fernando Luis Vzquez Cao <fernando@oss.ntt.co.jp>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-13 07:40:42 -08:00
Wim Van Sebroeck e033351d53 [WATCHDOG] Add iTCO vendor specific support
Add vendor specific support to the intel TCO timer based watchdog
devices. At this moment we only have additional support for some
SuperMicro Inc. motherboards.

Signed-off-by: Robert Seretny <lkpatches@paypc.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-11-12 18:05:09 +01:00
Alexey Dobriyan 64d9fe6973 [PATCH] ipmi_si_intf.c: fix "&& 0xff" typos
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-08 18:29:24 -08:00
Corey Minyard 46d52b09fa [PATCH] IPMI: retry messages on certain error returns
Some more errors from the IPMI send message command are retryable, but are not
being retried by the IPMI code.  Make sure they get retried.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Frederic Lelievre <Frederic.Lelievre@ca.kontron.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-08 18:29:24 -08:00
Corey Minyard f3ce6a0ead [PATCH] IPMI: Clean up the waiting message queue properly on unload
A wrong function was being used to free a list; this fixes the problem.
Otherwise, an oops at unload time was possible.  But not likely, since you
can't have any users when you unload the modules and it is very hard to get
messages into this queue without users.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: Patrick Schoeller <Patrick.Schoeller@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-08 18:29:24 -08:00
Dmitry Torokhov 752c58a471 Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-11-04 22:42:39 -05:00
Brandon Philips e52b29c2a6 Input: drivers/char/keyboard.c - small cleanup in k_cur()
To save a char pointer in the final assembly change to alternate string
form.

Signed-off-by: Brandon Philips <brandon@ifup.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-11-04 22:09:08 -05:00
Yvan Seth d13adb6046 [PATCH] ipmi_si_intf.c sets bad class_mask with PCI_DEVICE_CLASS
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7439

It looks like device registration in drivers/char/ipmi/ipmi_si_intf.c was
cleaned up and a small error was made when setting the class_mask.  The fix
is simple as the correct mask value is defined in the code but is not used.

Acked-by: Corey Minyard <minyard@acm.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-11-03 12:27:57 -08:00
Dave Jones 28af24bb84 [AGPGART] Fix up misprogrammed bridges with incorrect AGPv2 rates.
Some dumb bridges are programmed to disobey the AGP2 spec.
This is likely a BIOS misprogramming rather than poweron default, or
it would be a lot more common.

AGPv2 spec 6.1.9 states:

 "The RATE field indicates the data transfer rates supported by this
  device. A.G.P. devices must report all that apply."

Fix them up as best we can.

This will prevent errors like..

agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0.
agpgart: req mode 1f000201 bridge_agpstat 1f000a14 vga_agpstat 2f000217.
agpgart: Device is in legacy mode, falling back to 2.x
agpgart: Putting AGP V2 device at 0000:00:00.0 into 0x mode
agpgart: Putting AGP V2 device at 0000:01:00.0 into 0x mode
agpgart: Putting AGP V2 device at 0000:01:00.1 into 0x mode

https://bugs.freedesktop.org/show_bug.cgi?id=8816

Signed-off-by: Dave Jones <davej@redhat.com>
2006-11-03 15:13:27 -05:00
Akinobu Mita 150ed8ed63 [WATCHDOG] sc1200wdt.c pnp unregister fix.
If no devices found or invalid parameter is specified,
scl200wdt_pnp_driver is left unregistered.
It breaks global list of pnp drivers.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-29 22:09:32 +01:00
Akinobu Mita 58c6570add [WATCHDOG] sc1200wdt.c pnp unregister fix.
If no devices found or invalid parameter is specified,
scl200wdt_pnp_driver is left unregistered.
It breaks global list of pnp drivers.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-29 10:27:43 +01:00
Andrew Morton fd0c5eca44 [WATCHDOG] config.h removal
config.h got removed

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-28 22:19:07 +02:00
Amol Lad 85abb3f950 drm: ioremap balanced with iounmap for drivers/char/drm
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.

Tested (compilation only) to make sure the files are compiling without
any warning/error due to new changes

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-25 09:55:34 -07:00
Jeff Garzik 24f73c92a9 drm: fix error returns, sysfs error handling
- callers of drm_sysfs_create() and drm_sysfs_device_add() looked for
  errors using IS_ERR(), but the functions themselves only ever returned
  NULL on error.  Fixed.

- unwind from, and propagate sysfs errors

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-25 09:40:40 -07:00
Dave Jones 0d960d26c4 fix return code in error case.
The other failure returns in this function are negative, so make
this one do the same.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-25 09:40:40 -07:00
Tilman Sauerbeck 958de71b1a drm: mga: set dev_priv_size
fd.o bug 1746

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-24 21:52:23 +10:00
Michael Karcher 10eee0fe91 drm: savage: dev->agp_buffer_map is not initialized for AGP DMA on savages
fd.o bug 8662

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-24 21:46:55 +10:00
Roland Scheidegger a1aa289703 drm: radeon: only allow specific type-3 packetss through verifier
only allow specific type-3 packets to pass the verifier instead of all for r100/r200 as others might be unsafe (r300 already does this), and add checking for these we need but aren't safe. Check the RADEON_CP_INDX_BUFFER packet on both r200 and r300 as it isn't safe neither.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-10-24 21:45:00 +10:00
Linus Torvalds 6d03a68e6d Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: (33 commits)
  [WATCHDOG] remove experimental on iTCO_wdt.c
  [WATCHDOG] Atmel AT91RM9200 rename.
  [WATCHDOG] includes for sample watchdog program.
  [WATCHDOG] watchdog/iTCO_wdt: fix bug related to gcc uninit warning
  [WATCHDOG] add ich8 support to iTCO_wdt.c (patch 2)
  [WATCHDOG] add ich8 support to iTCO_wdt.c
  [WATCHDOG] ioremap balanced with iounmap for drivers/char/watchdog/s3c2410_wdt.c
  [WATCHDOG] w83697hf/hg WDT driver - Kconfig patch
  [WATCHDOG] w83697hf/hg WDT driver - autodetect patch
  [WATCHDOG] w83697hf/hg WDT driver - patch 16
  [WATCHDOG] w83697hf/hg WDT driver - patch 15
  [WATCHDOG] w83697hf/hg WDT driver - patch 14
  [WATCHDOG] w83697hf/hg WDT driver - patch 13
  [WATCHDOG] w83697hf/hg WDT driver - patch 12
  [WATCHDOG] w83697hf/hg WDT driver - patch 11
  [WATCHDOG] w83697hf/hg WDT driver - patch 10
  [WATCHDOG] w83697hf/hg WDT driver - patch 9
  [WATCHDOG] w83697hf/hg WDT driver - patch 8
  [WATCHDOG] w83697hf/hg WDT driver - patch 7
  [WATCHDOG] w83697hf/hg WDT driver - patch 6
  ...
2006-10-23 15:56:26 -07:00
Wim Van Sebroeck 0835caa2bf [WATCHDOG] NS pc87413-wdt Watchdog driver - fixes
Some small fixes:
* the status should return 0 and not 1 (1 means:
* wdt_io is not a module-param, io is.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-23 18:21:52 +02:00
Sven Anders & Marcus Junker 00b3b3e660 [WATCHDOG] NS pc87413-wdt Watchdog driver v1.1
Change the driver for proper spin_locking,
remove the TEMP_MINOR stuff,
make sure the device works as a Virtual File System
that is non_seekable,
...

Signed-off-by: Sven Anders <anders@anduras.de>
Signed-off-by: Marcus Junker <junker@anduras.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-23 09:35:53 +02:00
Linus Torvalds 946b92437e Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] uninorth: Add module param 'aperture' for aperture size
2006-10-21 13:39:44 -07:00
Jiri Slaby 86fbf1486a [PATCH] Char: correct pci_get_device changes
Commits 881a8c120a and
efe1ec2783 corrects pci device matching in
only one way; it no longer oopses/crashes, despite hotplug is not solved
in these changes.

Whenever pci_find_device -> pci_get_device change is performed, also
pci_dev_get and pci_dev_put should be in most cases called to properly
handle hotplug.  This patch does exactly this thing -- increase refcount
to let kernel know, that we are using this piece of HW just now.

It affects moxa and rio char drivers.

Cc: <R.E.Wolff@BitWizard.nl>
Acked-by: Amit Gud <gud@eth.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-21 13:35:05 -07:00
Dave Jones 1cd441f998 [PATCH] ipmi: fix return codes in failure case
These returns should be negative, like the others in this function.

Signed-off-by: Dave Jones <davej@redhat.com>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-20 10:26:44 -07:00
Ben Collins 5cacb9f8bc [alim7101] Add pci dev table for auto module loading.
Also fixes comment for nowayout module param.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
2006-10-18 08:24:30 -04:00
Linus Torvalds 43f82216f0 Merge git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: fm801-gp - handle errors from pci_enable_device()
  Input: gameport core - handle errors returned by device_bind_driver()
  Input: serio core - handle errors returned by device_bind_driver()
  Lockdep: fix compile error in drivers/input/serio/serio.c
  Input: serio - add lockdep annotations
  Lockdep: add lockdep_set_class_and_subclass() and lockdep_set_subclass()
  Input: atkbd - supress "too many keys" error message
  Input: i8042 - supress ACK/NAKs when blinking during panic
  Input: add missing exports to fix modular build
2006-10-17 08:56:43 -07:00
Akinobu Mita dabad0568a [PATCH] epca: prevent panic on tty_register_driver() failure
Make epca fail on initialization failure instead of panic.

Cc: "Digi International, Inc" <Eng.Linux@digi.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Acked-by: Scott Kilau <scottk@digi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:48 -07:00
Alexey Dobriyan 48d1a7ea63 [PATCH] sx: fix user-visible typo (devic)
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:45 -07:00
Adrian Bunk a4bb2cf1c3 [PATCH] drivers/char/specialix.c: fix the baud conversion
Correct the following bugs introduced by commit
67cc0161ecc9ebee6eba4af6cbfdba028090b1b9:

- remove one remaining and now incorrect baud_table[] usage
- "baud +=" is no longer correct

The former bug was spotted by the Coverity checker.

Rolf Eike Beer spotted a bug in the initial version of my patch.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:44 -07:00
Paul Fulghum 623a43952a [PATCH] synclink: remove PAGE_SIZE reference
Remove reference to PAGE_SIZE that causes errors if PAGE_SIZE != 4096

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:42 -07:00
Geert Uytterhoeven 4d99bfac9d [PATCH] CONFIG_TELCLOCK depends on X86
The telecom clock driver for MPBL0010 ATCA SBC depends on X86

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Mark Gross <mark.gross@intel.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-16 12:19:03 -07:00
Alan Cox 9d90dafdb1 [PATCH] rio: fix array checking
Found by an analysis tool and reported to the list. Fix is simple enough

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-16 08:27:54 -07:00
Michel Dnzer 18088748d2 [AGPGART] uninorth: Add module param 'aperture' for aperture size
In contrast to most if not all PC BIOSes, OpenFirmware (OF) on PowerMacs with
UniNorth bridges does not allow changing the aperture size. The size set up by
OF is usually 16 MB, which is too low for graphics intensive environments.
Hence, add a module parameter that allows changing the aperture size at driver
initialization time. When the parameter is not specified, the default is 32 MB.

Signed-off-by: Michel Dänzer <michel@tungstengraphics.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-15 19:49:59 -04:00
Sven Anders & Marcus Junker 789fc0adba [WATCHDOG] NS pc87413-wdt Watchdog driver
New watchdog driver for the NS pc87413-wdt Watchdog Timer.
 
Signed-off-by: Sven Anders <anders@anduras.de>
Signed-off-by: Marcus Junker <junker@anduras.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-15 20:04:59 +02:00
Al Viro e5a301ee02 [PATCH] serial167 __user annotations, NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-15 11:00:58 -07:00
Wim Van Sebroeck cbf40d3f04 [WATCHDOG] remove experimental on iTCO_wdt.c
The iTCO_wdt.c driver has been tested enough. So we can
remove the experimental classification.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-14 20:18:47 +02:00
Andrew Victor bdcff3458f [WATCHDOG] Atmel AT91RM9200 rename.
The new Atmel AT91SAM9261 and AT91SAM9260 processors use a different
internal watchdog peripheral.  This watchdog driver is therefore
AT91RM9200-specific.

This patch renames at91_wdt.c to at91rm9200_wdt.c, and changes the name
of the configuration option.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-13 23:10:39 +02:00
Linus Torvalds b8a3ad5b53 Include proper header file for PFN_DOWN()
The recent commit (99a10a60ba) to fix up
mmap_kmem() broke compiles because it used PFN_DOWN() without including
<linux/pfn.h>.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-13 08:42:10 -07:00
Franck Bui-Huu 99a10a60ba [PATCH] Fix up mmap_kmem
vma->vm_pgoff is an pfn _offset_ relatif to the begining
of the memory start. The previous code was doing at first:

	vma->vm_pgoff << PAGE_SHIFT

which results into a wrong physical address since some
platforms have a physical mem start that can be different
from 0. After that the previous call __pa() on this
wrong physical address, however __pa() is used to convert
a _virtual_ address into a physical one.

This patch rewrites this convertion. It calculates the
pfn of PAGE_OFFSET which is the pfn of the mem start
then it adds the vma->vm_pgoff to it.

It also uses virt_to_phys() instead of __pa() since the
latter shouldn't be used by drivers.

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-13 08:35:38 -07:00
Jeff Garzik 80060362aa [WATCHDOG] watchdog/iTCO_wdt: fix bug related to gcc uninit warning
gcc emits the following warning:

drivers/char/watchdog/iTCO_wdt.c: In function ‘iTCO_wdt_ioctl’:
drivers/char/watchdog/iTCO_wdt.c:429: warning: ‘time_left’ may be used uninitialized in this function

This indicates a condition near enough to a bug, to want to fix.
iTCO_wdt_get_timeleft() stores a value in 'time_left' iff
iTCO_version==(1 or 2).  This driver only supports versions
1 or 2, so this is ok.  However, since (a) the return value of
iTCO_wdt_get_timeleft() is handled anyway, (b) it fixes the warning,
and (c) it future-proofs the driver, we go ahead and add the obvious
return value.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-11 23:12:31 +02:00
Al Viro f061c5847b [PATCH] i2Output always takes kernel data now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-11 11:17:07 -07:00
Jeff Garzik 5e59393ec2 [PATCH] ipmi: handle sysfs errors
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Corey Minyard <cminyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-11 11:14:25 -07:00
Jeff Garzik f33d9bd504 [PATCH] tpm: fix error handling
- handle sysfs error
- handle driver model errors
- de-obfuscate platform_device_register_simple() call, which included an
  assignment in between two function calls, in the same C statement.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-11 11:14:22 -07:00
Dmitry Torokhov 80fc9f532d Input: add missing exports to fix modular build
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-10-11 01:43:58 -04:00
Al Viro 29756fa328 [PATCH] trivial iomem annotations: istallion
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 15:37:22 -07:00
Ralf Baechle 12a0a703b3 [RTC] Consistently use of tabs for formatting. 2006-10-09 23:20:47 +01:00
Ralf Baechle 18965513fd [MIPS] qtronix: remove driver.
Another leftover of removing support for the ITE8172.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-10-09 23:20:46 +01:00
Geert Uytterhoeven 81e859ac1e [PATCH] m68k/MVME167: SERIAL167 tty flip buffer updates
Compile fixes related to changed tty flip buffer handling.

Signed-off-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-09 14:54:46 -07:00
Geert Uytterhoeven ea62aa1b6f [PATCH] m68k/MVME167: SERIAL167 is no longer broken
- SERIAL167 is no longer broken
- Removed some unused variables from the driver to fix compiler warnings

Signed-off-by: Kars de Jong <jongk@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-09 14:54:46 -07:00
Linus Torvalds 5a43c09d1b Merge branch 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'irqclean-submit1' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  drivers/isdn/act2000: kill irq2card_map
  drivers/net/eepro: kill dead code
  Various drivers' irq handlers: kill dead code, needless casts
  drivers/net: eliminate irq handler impossible checks, needless casts
  arch/i386/kernel/time: don't shadow 'irq' function arg
2006-10-09 14:21:45 -07:00
Wim Van Sebroeck a8edd74e44 [WATCHDOG] add ich8 support to iTCO_wdt.c (patch 2)
Add ICH8 support to the iTCO_wdt driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-08 21:05:21 +02:00
Arnaud Patard (Rtp) bcbf25bd0d [WATCHDOG] add ich8 support to iTCO_wdt.c
Add ICH8 support to the iTCO_wdt driver.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-08 20:44:04 +02:00
Amol Lad e34477e990 [WATCHDOG] ioremap balanced with iounmap for drivers/char/watchdog/s3c2410_wdt.c
ioremap must be balanced by an iounmap and failing to do so can result
in a memory leak.

Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-07 22:43:56 +02:00
Linus Torvalds ba00003aa8 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] PReP fixup after irq changes
  [POWERPC] SPU fixup after irq changes
  [POWERPC] Fix up after irq changes
  [POWERPC] Fix iseries/smp.c for irq breakage
  [POWERPC] Fix viocons for irq breakage
  [POWERPC] Update iseries_defconfig
  [POWERPC] Fix fsl_soc build breaks
  [POWERPC] Minor fix for bootargs property
  [POWERPC] Update MTFSF_L() comment
  [POWERPC] Update pSeries defconfig for SATA
  [POWERPC] Don't get PCI IRQ from OF for devices with no IRQ
  [POWERPC] Fix zImage decompress location
  [POWERPC] linux,tce-size property is 32 bits
  [POWERPC] Add DTS for MPC8349E-mITX board
  [POWERPC] Fix harmless typo
  [PPC] Fix some irq breakage with ARCH=ppc
2006-10-07 10:52:00 -07:00
Al Viro 2850bc2737 [PATCH] m68k pt_regs fixes
m68k_handle_int() split in two functions: __m68k_handle_int() takes
pt_regs * and does set_irq_regs(); m68k_handle_int() doesn't get pt_regs
*.

Places where we used to call m68k_handle_int() recursively with the same
pt_regs have simply lost the second argument, the rest is switched to
__m68k_handle_int().

The rest of patch is just dropping pt_regs * where needed.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-07 10:51:14 -07:00
Stephen Rothwell 27db2d0cb9 [POWERPC] Fix viocons for irq breakage
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-10-07 10:10:27 +10:00
Jeff Garzik 5d347c8aba Merge branch 'submit1' of viper:/spare/repo/irq-remove-2.6 into irqcleanups 2006-10-06 15:27:31 -04:00
Jeff Garzik c7bec5aba5 Various drivers' irq handlers: kill dead code, needless casts
- Eliminate casts to/from void*

- Eliminate checks for conditions that never occur.  These typically
  fall into two classes:

	1) Checking for 'dev_id == NULL', then it is never called with
	NULL as an argument.

	2) Checking for invalid irq number, when the only caller (the
	system) guarantees the irq handler is called with the proper
	'irq' number argument.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-10-06 15:00:58 -04:00
Heiko Carstens 2033b0c330 [PATCH] sysrq: irq change build fix.
drivers/char/sysrq.c: In function `sysrq_handle_crashdump':
drivers/char/sysrq.c:98: warning: implicit declaration of function `get_irq_regs'

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2006-10-06 16:38:42 +02:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Samuel Tardieu ff02cfc76a [WATCHDOG] w83697hf/hg WDT driver - Kconfig patch
Update Kconfig for the w83697hf/hg watchdog driver.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:54:26 +02:00
Wim Van Sebroeck e223f01a82 [WATCHDOG] w83697hf/hg WDT driver - autodetect patch
Change the autodetect code so that it is more generic.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:46:35 +02:00
Samuel Tardieu 3fdee8db01 [WATCHDOG] w83697hf/hg WDT driver - patch 16
This is patch 16 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Add copyright notice for Samuel Tardieu also.

This is the last patch in this series. 

The original description for Samuel's driver was:
driver for the Winbond W83697HF/W83697HG watchdog timer

The Winbond SuperIO W83697HF/HG includes a watchdog that can count from
1 to 255 seconds (or minutes). This drivers allows the seconds mode to
be used. It exposes a standard /dev/watchdog interface. This chip is
currently being used on some motherboards designed by VIA.

By default, the module looks for a chip at I/O port 0x2e. The chip can
be configured to be at 0x4e on some motherboards, the address can be
chosen using the wdt_io module parameter. Using 0 will try to autodetect
the address.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:46:22 +02:00
Samuel Tardieu b7b9868ba6 [WATCHDOG] w83697hf/hg WDT driver - patch 15
This is patch 15 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Clean-up initialization code - part 2: 
   * the line reading "set second mode & disable keyboard ..."
     is plain wrong, the register being manipulated (CRF4) is
     the counter itself, not the control byte (CRF3) -- looks
     like it has been copied from another driver.
   * I think garbage is being written in CRF3 (the control word)
     as the timeout value is being stored in this register (such
     as 60 for 60 seconds).
   * We only want to set pin 119 to WDTO# mode and leave the rest
     of CR29 like it is.
   * Set count mode to seconds and not minutes.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:46:11 +02:00
Samuel Tardieu fa69afd3c2 [WATCHDOG] w83697hf/hg WDT driver - patch 14
This is patch 14 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Clean-up initialization code (part 1: remove
   w83697hf_select_wd_register() and
   w83697hf_unselect_wd_register() functions).
 - Make sure that the watchdog device is stopped
   as soon as we found it.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:46:00 +02:00
Samuel Tardieu 089d8139f4 [WATCHDOG] w83697hf/hg WDT driver - patch 13
This is patch 13 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Remove wdt_ctrl (it has been replaced with the
   w83697hf_write_timeout() function) and redo/clean-up
   the start/stop/ping code.
 - Make sure that the watchdog is enabled or disabled
   When starting or stoping the device (with a call
   to w83697hf_set_reg(0x30, ?); ).

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:45:42 +02:00
Samuel Tardieu d46ab596e2 [WATCHDOG] w83697hf/hg WDT driver - patch 12
This is patch 12 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Add w83697hf_write_timeout() to set the
   watchdog's timeout value.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:45:30 +02:00
Samuel Tardieu a7933e05d4 [WATCHDOG] w83697hf/hg WDT driver - patch 11
This is patch 11 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Add w83697hf_select_wdt() and w83697hf_deselect_wdt()
   so that the start/stop/ping code can directly talk to
   the watchdog.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:45:21 +02:00
Samuel Tardieu c81b299625 [WATCHDOG] w83697hf/hg WDT driver - patch 10
This is patch 10 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - check whether the device is really present
   (we *can* probe for the device now).

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:45:11 +02:00
Samuel Tardieu 0cd544763b [WATCHDOG] w83697hf/hg WDT driver - patch 9
This is patch 9 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - add w83697hf_get_reg() and w83697hf_set_reg()
   functions.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:59 +02:00
Samuel Tardieu fe851ebade [WATCHDOG] w83697hf/hg WDT driver - patch 8
This is patch 8 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - add w83697hf_lock function to leave the
   chipsets extended function mode.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:47 +02:00
Samuel Tardieu f7be3328b6 [WATCHDOG] w83697hf/hg WDT driver - patch 7
This is patch 7 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - add w83697hf_unlock function to enter the
   chipsets extended function mode.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:33 +02:00
Samuel Tardieu de710d6871 [WATCHDOG] w83697hf/hg WDT driver - patch 6
This is patch 6 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - The driver works for both the w83697hf
   and the w83697hg chipset's.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:21 +02:00
Samuel Tardieu 44d7d3282b [WATCHDOG] w83697hf/hg WDT driver - patch 5
This is patch 5 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Rename the Extended Function Registers to the names
   used in the data-sheet.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:44:08 +02:00
Samuel Tardieu eb64419e39 [WATCHDOG] w83697hf/hg WDT driver - patch 4
This is patch 4 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - limits the watchdog timeout to 1-63 while this
   device accepts 1-255.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:43:39 +02:00
Samuel Tardieu db16525e63 [WATCHDOG] w83697hf/hg WDT driver - patch 3
This is patch 3 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - Fix identation.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:43:23 +02:00
Samuel Tardieu b41a9f59d1 [WATCHDOG] w83697hf/hg WDT driver - patch 2
This is patch 2 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - wdt_io is 2 bytes long. We should do a
   request_region for 2 bytes instead of 1.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:43:13 +02:00
Samuel Tardieu 8de6fc1e20 [WATCHDOG] w83697hf/hg WDT driver - patch 1
This is patch 1 in the series of patches that converts
Marcus Junker's w83697hf watchdog driver to Samuel Tardieau's
w83697hf/hg watchdog driver.

This patch contains following changes:
 - the note concerning tyan motherboards has been copied from
   another driver, This doesn't apply here.
 - the comments concerning CRF6 are wrong as CRF3 is manipulated
   and CRF6 is never read nor written.
 - the comments concerning CRF5 are wrong as CRF4 is manipulated
   and CRF5 is never read nor written.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:43:03 +02:00
Wim Van Sebroeck 196f29c8e8 [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()
Return ENOTTY instead of ENOIOCTLCMD in user-visible ioctl() results

The watchdog drivers used to return ENOIOCTLCMD for bad ioctl() commands.
ENOIOCTLCMD should not be visible by the user, so use ENOTTY instead.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-04 22:42:19 +02:00
Wim Van Sebroeck c310e2b950 [WATCHDOG] Kconfig clean up
fixed some more trailing spaces.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:42:07 +02:00
Wim Van Sebroeck ab9d441425 [WATCHDOG] w836?7hf_wdt spinlock fixes.
Add io spinlocks to prevent possible race
conditions between start and stop operations
that are issued from different child processes
where the master process opened /dev/watchdog.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:41:48 +02:00
Wim Van Sebroeck e0845bf4e1 [WATCHDOG] Kconfig clean-up
* fix typo's according to spellings checker
* Fix some leading and trailing spaces

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:41:37 +02:00
Marcus Junker f9a8c8913a [WATCHDOG] w83697hf WDT driver
New watchdog driver for the Winbond W83697HF chipset.
 
Signed-off-by: Marcus Junker <junker@anduras.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:41:07 +02:00
Wim Van Sebroeck aa1fd4d7c3 [WATCHDOG] Winbond SMsC37B787 watchdog fixes
* Added io spinlocking
* Deleted WATCHDOG_MINOR (it's in the miscdevice include
* Changed timer_enabled to use set_bit functions
* WDIOC_GETSUPPORT should return -EFAULT or 0
* timeout should be correct before we initialize the watchdog
* we should initialize the watchdog before we give access
  to userspace
* Third parameter of module_param is not the default or
  initial value

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:36:42 +02:00
Wim Van Sebroeck 8386c8cfb2 [WATCHDOG] Winbond SMsC37B787 - remove trailing whitespace
Remove trailing whitespace.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:36:30 +02:00
Sven Anders 485ae77dc7 [WATCHDOG] Winbond SMsC37B787 watchdog driver
New watchdog driver for the Winbond SMsC37B787 chipset.
 
Signed-off-by: Sven Anders <anders@anduras.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-04 22:36:02 +02:00
Linus Torvalds fefd26b3b8 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/configh
* master.kernel.org:/pub/scm/linux/kernel/git/davej/configh:
  Remove all inclusions of <linux/config.h>

Manually resolved trivial path conflicts due to removed files in
the sound/oss/ subdirectory.
2006-10-04 09:59:57 -07:00
Linus Torvalds 5a96c5d0c5 Merge master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/willy/parisc-2.6: (41 commits)
  [PARISC] Kill wall_jiffies use
  [PARISC] Honour "panic_on_oops" sysctl
  [PARISC] Fix fs/binfmt_som.c
  [PARISC] Export clear_user_page to modules
  [PARISC] Make DMA routines more stubby
  [PARISC] Define pci_get_legacy_ide_irq
  [PARISC] Fix CONFIG_DEBUG_SPINLOCK
  [PARISC] Fix HPUX compat compile with current GCC
  [PARISC] Fix iounmap compile warning
  [PARISC] Add support for Quicksilver AGPGART
  [PARISC] Move LBA and SBA register defines to the common ropes.h
  [PARISC] Create shared <asm/ropes.h> header
  [PARISC] Stash the lba_device in its struct device drvdata
  [PARISC] Generalize IS_ASTRO et al to take a parisc_device like
  [PARISC] Pretty print the name of the lba type on kernel boot
  [PARISC] Remove some obsolete comments and I checked that Reo is similar to Ike
  [PARISC] Add hardware found in the rp8400
  [PARISC] Allow nested interrupts
  [PARISC] Further updates to timer_interrupt()
  [PARISC] remove halftick and copy clocktick to local var (gcc can optimize usage)
  ...
2006-10-04 08:18:34 -07:00
Linus Torvalds 13bbd8d906 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (25 commits)
  [POWERPC] Add support for the mpc832x mds board
  [POWERPC] Add initial support for the e300c2 core
  [POWERPC] Add MPC8360EMDS default dts file
  [POWERPC] Add MPC8360EMDS board support
  [POWERPC] Add QUICC Engine (QE) infrastructure
  [POWERPC] Add QE device tree node definition
  [POWERPC] Don't try to just continue if xmon has no input device
  [POWERPC] Fix a printk in pseries_mpic_init_IRQ
  [POWERPC] Get default baud rate in udbg_scc
  [POWERPC] Fix zImage.coff on oldworld PowerMac
  [POWERPC] Fix xmon=off and cleanup xmon initialisation
  [POWERPC] Cleanup include/asm-powerpc/xmon.h
  [POWERPC] Update swim3 printk after blkdev.h change
  [POWERPC] Cell interrupt rework
  POWERPC: mpc82xx merge: board-specific/platform stuff(resend)
  POWERPC: 8272ads merge to powerpc: common stuff
  POWERPC: Added devicetree for mpc8272ads board
  [POWERPC] iSeries has no legacy I/O
  [POWERPC] implement BEGIN/END_FW_FTR_SECTION
  [POWERPC] iSeries does not need pcibios_fixup_resources
  ...
2006-10-04 08:16:37 -07:00
Jiri Slaby d321765f7c [PATCH] Char: serial167, remove useless tty check
serial167, remove useless tty check

tty is dereferenced before it is checked to be non-NULL.  Remove such
check.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 07:55:13 -07:00
Jiri Slaby b3218a79aa [PATCH] char: kill unneeded memsets
char, another tmp_buf cleanup

No need to allocate one page as a side buffer.  It's no more used.  Clean this
(de)allocs of this useless memory pages in char subtree.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-04 07:55:13 -07:00
Kyle McMartin 08a6436816 [PARISC] Add support for Quicksilver AGPGART
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-10-04 06:50:16 -06:00
Dave Jones 038b0a6d8d Remove all inclusions of <linux/config.h>
kbuild explicitly includes this at build time.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-10-04 03:38:54 -04:00
Paul Mackerras c730f5b621 Merge branch 'master' of git://oak/home/sfr/kernels/iseries/work 2006-10-04 15:02:27 +10:00
Linus Torvalds 708e16892e Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (39 commits)
  Add missing maintainer countries in CREDITS
  Fix bytes <-> kilobytes  typo in Kconfig for ramdisk
  fix a typo in Documentation/pi-futex.txt
  BUG_ON conversion for fs/xfs/
  BUG_ON() conversion in fs/nfsd/
  BUG_ON conversion for fs/reiserfs
  BUG_ON cleanups in arch/i386
  BUG_ON cleanup in drivers/net/tokenring/
  BUG_ON cleanup for drivers/md/
  kerneldoc-typo in led-class.c
  debugfs: spelling fix
  rcutorture: Fix incorrect description of default for nreaders parameter
  parport: Remove space in function calls
  Michal Wronski: update contact info
  Spelling fix: "control" instead of "cotrol"
  reboot parameter in Documentation/kernel-parameters.txt
  Fix copy&waste bug in comment in scripts/kernel-doc
  remove duplicate "until" from kernel/workqueue.c
  ite_gpio fix tabbage
  fix file specification in comments
  ...

Fixed trivial path conflicts due to removed files:
   arch/mips/dec/boot/decstation.c, drivers/char/ite_gpio.c
2006-10-03 16:35:11 -07:00
Linus Torvalds f3c87a8999 Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()
2006-10-03 14:32:06 -07:00
Jim Cromie c98acc5865 ite_gpio fix tabbage
caught some leading spaces in passing.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 23:04:37 +02:00
Uwe Zeisberger f30c226954 fix file specification in comments
Many files include the filename at the beginning, serveral used a wrong one.

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 23:01:26 +02:00
Wim Van Sebroeck f311896a99 [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()
Return ENOTTY instead of ENOIOCTLCMD in user-visible ioctl() results

The watchdog drivers used to return ENOIOCTLCMD for bad ioctl() commands.
ENOIOCTLCMD should not be visible by the user, so use ENOTTY instead.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-03 22:51:18 +02:00
Linus Torvalds 2fee7b1845 Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  [WATCHDOG] iTCO_wdt.c shutdown patch
  [WATCHDOG] iTCO_wdt.c - pci_dev_put fix
  [WATCHDOG] iTCO_wdt (Intel TCO Timer) driver
  [WATCHDOG] iTCO_wdt (Intel TCO Timer) driver
2006-10-03 13:48:44 -07:00
Adrian Bunk bf6ee0ae49 remove mentionings of devfs in documentation
Now that devfs is removed, there's no longer any need to document how to
do this or that with devfs.

This patch includes some improvements by Joe Perches.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-10-03 22:17:48 +02:00
Wim Van Sebroeck 1bef84bea2 [WATCHDOG] iTCO_wdt.c shutdown patch
Since we are using the device driver model,
we don't need to arrange the shutdown via a
reboot_notifier.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-03 21:35:09 +02:00
Wim Van Sebroeck 4802c6533a [WATCHDOG] iTCO_wdt.c - pci_dev_put fix
for_each_pci_dev calls pci_get_device (and thus
it calls pci_dev_get). So we need to do a pci_dev_put
to keep the refcounting correct.
(Thanks to Jiri Slaby <jirislaby@gmail.com>)

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-03 21:34:56 +02:00
Wim Van Sebroeck 3836cc0ff8 [WATCHDOG] iTCO_wdt (Intel TCO Timer) driver
Convert the iTCO_wdt driver to a platform device
driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-03 21:34:46 +02:00
Wim Van Sebroeck 9e0ea345ff [WATCHDOG] iTCO_wdt (Intel TCO Timer) driver
Hardware driver for the intel TCO timer based watchdog devices.
These drivers are included in the Intel 82801 I/O Controller
Hub family (from ICH0 up to ICH7) and in the Intel 6300ESB
controller hub.

This driver will replace the i8xx_tco.c driver.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-03 21:34:29 +02:00
Yoichi Yuasa af8b128719 [MIPS] Remove IT8172-based platforms, ITE 8172G and Globespan IVR support.
As per feature-removal-schedule.txt.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2006-10-03 17:59:17 +01:00
Linus Torvalds 6f3a28f7d1 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-serial: (21 commits)
  [SERIAL] add PNP IDs for FPI based touchscreens
  [SERIAL] Magic SysRq SAK does nothing on serial consoles
  [SERIAL] tickle NMI watchdog on serial output.
  [SERIAL] Fix oops when removing suspended serial port
  [SERIAL] Fix resume handling bug
  [SERIAL] Remove wrong asm/serial.h inclusions
  [SERIAL] CONFIG_PM=n slim: drivers/serial/8250_pci.c
  [SERIAL] OMAP1510 serial fix for 115200 baud
  [SERIAL] returning proper error from serial core driver
  [SERIAL] Make uart_line_info() correctly tell MMIO from I/O port
  [SERIAL] suspend/resume handlers don't have level arg anymore
  [SERIAL] 8250 resourse management fixes
  [SERIAL] serial_cs: Add quirk for brainboxes 2-port RS232 card
  [SERIAL] serial_cs: handle Nokia multi->single port bodge via config quirk
  [SERIAL] serial_cs: add configuration quirk
  [SERIAL] serial_cs: Convert Oxford 950 / Possio GCC wakeup quirk
  [SERIAL] serial_cs: convert IBM post-init handling to a quirk
  [SERIAL] serial_cs: allow wildcarded quirks
  [SERIAL] serial_cs: convert multi-port table to quirk table
  [SERIAL] serial_cs: Use clean up multiport card detection
  ...
2006-10-03 09:13:29 -07:00
Linus Torvalds ccaa36f735 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits)
  [POWERPC] Fix rheap alignment problem
  [POWERPC] Use check_legacy_ioport() for ISAPnP
  [POWERPC] Avoid NULL pointer in gpio1_interrupt
  [POWERPC] Enable generic rtc hook for the MPC8349 mITX
  [POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class
  [POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot
  [POWERPC] fix spin lock nesting in hvc_iseries
  [POWERPC] EEH failure to mark pci slot as frozen.
  [POWERPC] update powerpc defconfig files after libata kconfig breakage
  [POWERPC] enable sysrq in pmac32_defconfig
  [POWERPC] UPIO_TSI cleanup
  [POWERPC] rewrite mkprep and mkbugboot in sane C
  [POWERPC] maple/pci iomem annotations
  [POWERPC] powerpc oprofile __user annotations
  [POWERPC] cell spufs iomem annotations
  [POWERPC] NULL noise removal: spufs
  [POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c
  [POWERPC] update mpc8349_itx_defconfig and remove some debug settings
  [POWERPC] Always call cede in pseries dedicated idle loop
  [POWERPC] Fix loop logic in irq_alloc_virt()
  ...
2006-10-03 08:52:26 -07:00
Zach Brown 5df0a29d9c [PATCH] pr_debug: tipar: repair nonexistant pr_debug argument use
tipar: repair nonexistant pr_debug argument use

I guessed what the pr_debug meant by 'data'.
Signed-off-by: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03 08:04:19 -07:00
Adrian Bunk 3cb340ecbb [PATCH] vt: proper prototypes for some console functions
This patch adds proper prototypes to header files for three console init
functions used on drivers/char/vt.c

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03 08:04:12 -07:00
Antonino A. Daplas 928e964f26 [PATCH] vt: Honor the return value of device_create_file
Check the return value of device_create_file().  If return is 'fail', remove
attributes by calling device_remove_file().

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03 08:04:10 -07:00
Corey Minyard a51f4a81e7 [PATCH] IPMI: allow user to override the kernel IPMI daemon enable
After the previous patch to disable the kernel IPMI daemon if interrupts
were available, the issue of broken hardware was raised, and a reasonable
request to add an override was mode.  So here it is.

Allow the user to force the kernel ipmi daemon on or off.  This way,
hardware with broken interrupts or users that are not concerned with
performance can turn it on or off to their liking.

[akpm@osdl.org: save 4 bytes in vmlinux]
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03 08:03:42 -07:00
Jeff Garzik fcc7a8c463 [PATCH] drivers/char/ip2: kill unused code, label
Kill warning:

drivers/char/ip2/ip2main.c: In function ‘ip2_loadmain’:
drivers/char/ip2/ip2main.c:782: warning: label ‘out_class’ defined but not used

This driver's initialization (and cleanup of errors during init) is
extremely convoluted, and could stand to be transformed into the standard
unwinding-goto style of error cleanup.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Michael H. Warfield <mhw@wittsend.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03 08:03:41 -07:00
Jeff Garzik 397f4ebf4f [PATCH] ipmi: fix uninitialized data bug
gcc issues the following warning:

drivers/char/ipmi/ipmi_si_intf.c: In function ‘init_ipmi_si’:
drivers/char/ipmi/ipmi_si_intf.c:1729: warning: ‘data.irq’ may be used uninitialized in this function

This is indeed a bug.  data.irq is completely uninitialized in some code
paths.  Worse than that, data from a previous decode_dmi() run can easily
leak through successive calls.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03 08:03:41 -07:00
Dave Jones 11dc10195a [WATCHDOG] improve machzwd detection
On a machine with no machzwd, loading the module prints out..

machzwd: MachZ ZF-Logic Watchdog driver initializing.
0xffff
machzwd: Watchdog using action = RESET

- the 0xffff printk is unnecessary
- 0xffff seems to be 'hardware not present'
- fix CodingStyle. (This driver could use some more work here)

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-02 23:14:38 +02:00
Samuel Tardieu 795b89d207 [WATCHDOG] use ENOTTY instead of ENOIOCTLCMD in ioctl()
Return ENOTTY instead of ENOIOCTLCMD in user-visible ioctl() results

The watchdog drivers used to return ENOIOCTLCMD for bad ioctl() commands.
ENOIOCTLCMD should not be visible by the user, so use ENOTTY instead.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-02 23:08:34 +02:00
Ben Dooks 25ff3780d4 [WATCHDOG] s3c24XX nowayout
If the driver is not configured for `no way out`,
then the open method should not automatically allow
the setting of allow_close to CLOSE_STATE_ALLOW.

The setting of allow_close nullifies the use of
the magic close via the write path. It means that
in the default state, the watchdog will shut-down
even if the magic close has not been issued.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2006-10-02 23:07:18 +02:00
Vitaly Wool 65a64ec3b4 [WATCHDOG] pnx4008: add cpu_relax()
Added cpu_relax as suggested by Alan Cox.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-02 23:05:38 +02:00
Wim Van Sebroeck 99d2853ac9 [WATCHDOG] pnx4008_wdt.c - spinlock fixes.
Add io spinlocks to prevent possible race
conditions between start and stop operations
that are issued from different child processes
where the master process opened /dev/watchdog.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-02 23:05:28 +02:00
Wim Van Sebroeck f676449785 [WATCHDOG] pnx4008_wdt.c - remove patch
Change remove code so that we first detach
the driver from userspace, then clean up the
clock and then clean up the memory we allocated.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-02 23:05:16 +02:00
Wim Van Sebroeck 2898172708 [WATCHDOG] pnx4008_wdt.c - nowayout patch
Change nowayout to: WATCHDOG_NOWAYOUT as defined
in include/linux/watchdog.h .

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-02 23:05:06 +02:00
Vitaly Wool 9325fa3615 [WATCHDOG] pnx4008: add watchdog support
Add watchdog support for Philips PNX4008 ARM board inlined.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
2006-10-02 23:02:37 +02:00
Jiri Slaby 92dd9994c3 [WATCHDOG] i8xx_tco remove pci_find_device.
Use refcounting for pci device obtaining.
Use PCI_DEVICE macro.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Cc: Andrew Morton <akpm@osdl.org>
2006-10-02 22:56:20 +02:00
Jiri Slaby 02be2ee9e0 [WATCHDOG] alim remove pci_find_device
Convert pci_find_device to pci_get_device + pci_dev_put
in alim watchdog cards' drivers (refcounting).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-02 22:55:51 +02:00
Linus Torvalds a12f66fccf Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits)
  Input: wistron - add support for Acer TravelMate 2424NWXCi
  Input: wistron - fix setting up special buttons
  Input: add KEY_BLUETOOTH and KEY_WLAN definitions
  Input: add new BUS_VIRTUAL bus type
  Input: add driver for stowaway serial keyboards
  Input: make input_register_handler() return error codes
  Input: remove cruft that was needed for transition to sysfs
  Input: fix input module refcounting
  Input: constify input core
  Input: libps2 - rearrange exports
  Input: atkbd - support Microsoft Natural Elite Pro keyboards
  Input: i8042 - disable MUX mode on Toshiba Equium A110
  Input: i8042 - get rid of polling timer
  Input: send key up events at disconnect
  Input: constify psmouse driver
  Input: i8042 - add Amoi to the MUX blacklist
  Input: logips2pp - add sugnature 56 (Cordless MouseMan Wheel), cleanup
  Input: add driver for Touchwin serial touchscreens
  Input: add driver for Touchright serial touchscreens
  Input: add driver for Penmount serial touchscreens
  ...
2006-10-02 08:20:33 -07:00
Cedric Le Goater 9ec52099e4 [PATCH] replace cad_pid by a struct pid
There are a few places in the kernel where the init task is signaled.  The
ctrl+alt+del sequence is one them.  It kills a task, usually init, using a
cached pid (cad_pid).

This patch replaces the pid_t by a struct pid to avoid pid wrap around
problem.  The struct pid is initialized at boot time in init() and can be
modified through systctl with

	/proc/sys/kernel/cad_pid

[ I haven't found any distro using it ? ]

It also introduces a small helper routine kill_cad_pid() which is used
where it seemed ok to use cad_pid instead of pid 1.

[akpm@osdl.org: cleanups, build fix]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:25 -07:00
Serge E. Hallyn e9ff3990f0 [PATCH] namespaces: utsname: switch to using uts namespaces
Replace references to system_utsname to the per-process uts namespace
where appropriate.  This includes things like uname.

Changes: Per Eric Biederman's comments, use the per-process uts namespace
	for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c

[jdike@addtoit.com: UML fix]
[clg@fr.ibm.com: cleanup]
[akpm@osdl.org: build fix]
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Andrey Savochkin <saw@sw.ru>
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:21 -07:00
Jeff Dike b68e31d0eb [PATCH] const struct tty_operations
As part of an SMP cleanliness pass over UML, I consted a bunch of
structures in order to not have to document their locking.  One of these
structures was a struct tty_operations.  In order to const it in UML
without introducing compiler complaints, the declaration of
tty_set_operations needs to be changed, and then all of its callers need to
be fixed.

This patch declares all struct tty_operations in the tree as const.  In all
cases, they are static and used only as input to tty_set_operations.  As an
extra check, I ran an i386 allyesconfig build which produced no extra
warnings.

53 drivers are affected.  I checked the history of a bunch of them, and in
most cases, there have been only a handful of maintenance changes in the
last six months.  serial_core.c was the busiest one that I looked at.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:14 -07:00
Eric W. Biederman bde0d2c98b [PATCH] vt: Make vt_pid a struct pid (making it pid wrap around safe).
I took a good hard look at the locking and it appears the locking on vt_pid
is the console semaphore.  Every modified path is called under the console
semaphore except reset_vc when it is called from fn_SAK or do_SAK both of
which appear to be in interrupt context.  In addition I need to be careful
because in the presence of an oops the console_sem may be arbitrarily
dropped.

Which leads me to conclude the current locking is inadequate for my needs.

Given the weird cases we could hit because of oops printing instead of
introducing an extra spin lock to protect the data and keep the pid to
signal and the signal to send in sync, I have opted to use xchg on just the
struct pid * pointer instead.

Due to console_sem we will stay in sync between vt_pid and vt_mode except
for a small window during a SAK, or oops handling.  SAK handling should
kill any user space process that care, and oops handling we are broken
anyway.  Besides the worst that can happen is that I try to send the wrong
signal.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:14 -07:00
Eric W. Biederman 81af8d67d4 [PATCH] vt: rework the console spawning variables
This is such a rare path it took me a while to figure out how to test
this after soring out the locking.

This patch does several things.
- The variables used are moved into a structure and declared in vt_kern.h
- A spinlock is added so we don't have SMP races updating the values.
- Instead of raw pid_t value a struct_pid is used to guard against
  pid wrap around issues, if the daemon to spawn a new console dies.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-02 07:57:13 -07:00
Russell King bcf5111a58 [SERIAL] Remove wrong asm/serial.h inclusions
asm/serial.h is supposed to contain the definitions for the architecture
specific 8250 ports for the 8250 driver.  It may also define BASE_BAUD,
but this is the base baud for the architecture specific ports _only_.

Therefore, nothing other than the 8250 driver should be including this
header file.  In order to move towards this goal, here is a patch which
removes some of the more obvious incorrect includes of the file.

Acked-by: Paul Fulghum <paulkf@microgate.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-10-01 17:09:16 +01:00
Linus Torvalds 82965addad Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] printk fixups.
  [AGPGART] Use pci_get_slot not pci_find_slot
2006-10-01 00:40:55 -07:00
Badari Pulavarty 543ade1fc9 [PATCH] Streamline generic_file_* interfaces and filemap cleanups
This patch cleans up generic_file_*_read/write() interfaces.  Christoph
Hellwig gave me the idea for this clean ups.

In a nutshell, all filesystems should set .aio_read/.aio_write methods and use
do_sync_read/ do_sync_write() as their .read/.write methods.  This allows us
to cleanup all variants of generic_file_* routines.

Final available interfaces:

generic_file_aio_read() - read handler
generic_file_aio_write() - write handler
generic_file_aio_write_nolock() - no lock write handler

__generic_file_aio_write_nolock() - internal worker routine

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:28 -07:00
Badari Pulavarty ee0b3e671b [PATCH] Remove readv/writev methods and use aio_read/aio_write instead
This patch removes readv() and writev() methods and replaces them with
aio_read()/aio_write() methods.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:28 -07:00
Badari Pulavarty 027445c372 [PATCH] Vectorize aio_read/aio_write fileop methods
This patch vectorizes aio_read() and aio_write() methods to prepare for
collapsing all aio & vectored operations into one interface - which is
aio_read()/aio_write().

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Michael Holzheu <HOLZHEU@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:28 -07:00
Corey Minyard df3fe8defe [PATCH] ipmi: don't start kipmid if the IPMI driver can use interrupts
If the driver has interrupts available to it, there is really no reason to
have a kernel daemon push the IPMI state machine.

Note that I have experienced machines where the interrupts do not work
correctly.  This was a long time ago and hopefully things are better now.
If some machines still have broken interrupts, a blacklist will need to be
added.

Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:26 -07:00
Jiri Slaby 365e02237b [PATCH] Char: specialix, kill unneeded page alloc
The driver is allocating a page but doesn't actually use it for anything.

(History from the old ->write method before Linus cleaned it up)

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:25 -07:00
Eric Sesterhenn 095d030cff [PATCH] Off-by-one in drivers/char/mwave/mwavedd.c
This fixes two off by ones in the mwave driver, found
via find -iname \*.[ch] | xargs grep "> ARRAY_SIZE("

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:24 -07:00
Peter Zijlstra b2e9c7d07f [PATCH] sysrq: disable lockdep on reboot
SysRq : Emergency Sync
Emergency Sync complete
SysRq : Emergency Remount R/O
Emergency Remount complete
SysRq : Resetting
BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)

Call Trace:
 [<ffffffff8026d56d>] show_trace+0xae/0x319
 [<ffffffff8026d7ed>] dump_stack+0x15/0x17
 [<ffffffff802a68d1>] trace_hardirqs_on+0xbc/0x13d
 [<ffffffff803a8eec>] sysrq_handle_reboot+0x9/0x11
 [<ffffffff803a8f8d>] __handle_sysrq+0x99/0x130
 [<ffffffff803a903b>] handle_sysrq+0x17/0x19
 [<ffffffff803a36ee>] kbd_event+0x32e/0x57d
 [<ffffffff80401e35>] input_event+0x42d/0x45b
 [<ffffffff804063eb>] atkbd_interrupt+0x44d/0x53d
 [<ffffffff803fe5c5>] serio_interrupt+0x49/0x86
 [<ffffffff803ff2a4>] i8042_interrupt+0x202/0x21a
 [<ffffffff80210cf0>] handle_IRQ_event+0x2c/0x64
 [<ffffffff802bfd8b>] __do_IRQ+0xaf/0x114
 [<ffffffff8026ea24>] do_IRQ+0xf8/0x107
 [<ffffffff8025f886>] ret_from_intr+0x0/0xf
DWARF2 unwinder stuck at ret_from_intr+0x0/0xf
Leftover inexact backtrace:
 <IRQ> <EOI> [<ffffffff80258e36>] mwait_idle+0x3f/0x54
 [<ffffffff8024a33a>] cpu_idle+0xa2/0xc5
 [<ffffffff8026c34e>] rest_init+0x2b/0x2d
 [<ffffffff809708bc>] start_kernel+0x24a/0x24c
 [<ffffffff8097028b>] _sinittext+0x28b/0x292

Since we're shutting down anyway, don't bother being smart,
just turn the thing off.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:24 -07:00
Alan Cox 1aff0ecafb [PATCH] ip2: use newer pci_get functions
This is one of a series of patches I plan to gradually trickle into the
tree which eliminates almost all remaining use of pci_find_* and lets me
build a pci_find_* free kernel for all but some obscure ISDN and SCSI
drivers.  This is important as all pci_find_* users are not hotplug safe -
even if they are not the device being plugged.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:23 -07:00
Corey Minyard c69c31270c [PATCH] IPMI: per-channel command registration
This patch adds the ability to register for a command per-channel in the
IPMI driver.

If your BMC supports multiple channels, incoming messages can be useful to
have the ability to register to receive commands on a specific channel
instead the current behaviour of all channels.

Signed-off-by: David Barksdale <amatus@ocgnet.org>
Signed-off-by: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:23 -07:00
Jiri Slaby e4e040887b [PATCH] isicom: correct firmware loading
- loading of firmware didn't fail when something went wrong (returned 0).

- pointer to frame was incremented only by sizeof(frame) excluding its
  data contents -- bad idea.

- tell the card we're ready just after checking is complete, not before.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:22 -07:00
Paul Fulghum a077c1a075 [PATCH] synclink_gt: increase max devices
Increase maximum number of devices.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:22 -07:00
Paul Fulghum cb10dc9ac7 [PATCH] synclink_gt: add bisync and monosync modes
Add bisync and monosync serial protocol support to the synclink_gt driver.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:22 -07:00
Alexey Dobriyan c53421b18f [PATCH] proper flags type of spin_lock_irqsave()
Convert various spin_lock_irqsave() callers to correctly use `unsigned long'.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: "Luck, Tony" <tony.luck@intel.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:21 -07:00
Josef 'Jeff' Sipek 930ff81c59 [PATCH] MBCS: Use SEEK_{SET, CUR, END} instead of hardcoded values
MBCS: Use SEEK_{SET,CUR,END} instead of hardcoded values

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:21 -07:00
Alan Cox c7bce3097c [PATCH] serial: Fix up offenders peering at baud bits directly
Stop some other people peering into the baud bits on their own and make
them use the tty_get_baud_rate() helper as a preperation for the move to
the new termios.  Corrected dependancy previous one had on new termios
structs

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-01 00:39:20 -07:00
Linus Torvalds 56f29d7fe4 Merge branch 'block' of git://brick.kernel.dk/data/git/linux-2.6-block
* 'block' of git://brick.kernel.dk/data/git/linux-2.6-block: (67 commits)
  [PATCH] blk_queue_start_tag() shared map race fix
  [PATCH] Update axboe@suse.de email address
  [PATCH] fix creating zero sized bio mempools in low memory system
  [PATCH] CONFIG_BLOCK: blk_congestion_wait() fix
  [PATCH] CONFIG_BLOCK internal.h cleanups
  [PATCH] BLOCK: Make USB storage depend on SCSI rather than selecting it [try #6]
  [PATCH] BLOCK: Make it possible to disable the block layer [try #6]
  [PATCH] BLOCK: Remove no-longer necessary linux/buffer_head.h inclusions [try #6]
  [PATCH] BLOCK: Remove no-longer necessary linux/mpage.h inclusions [try #6]
  [PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6]
  [PATCH] BLOCK: Move the Ext3 device ioctl compat stuff to the Ext3 driver [try #6]
  [PATCH] BLOCK: Move the Ext2 device ioctl compat stuff to the Ext2 driver [try #6]
  [PATCH] BLOCK: Move the ReiserFS device ioctl compat stuff to the ReiserFS driver [try #6]
  [PATCH] BLOCK: Move common FS-specific ioctls to linux/fs.h [try #6]
  [PATCH] BLOCK: Move the loop device ioctl compat stuff to the loop driver [try #6]
  [PATCH] BLOCK: Move __invalidate_device() to block_dev.c [try #6]
  [PATCH] BLOCK: Dissociate generic_writepages() from mpage stuff [try #6]
  [PATCH] BLOCK: Remove dependence on existence of blockdev_superblock [try #6]
  [PATCH] BLOCK: Move extern declarations out of fs/*.c into header files [try #6]
  [PATCH] BLOCK: Don't call block_sync_page() from AFS [try #6]
  ...
2006-09-30 12:07:01 -07:00
David Howells 9361401eb7 [PATCH] BLOCK: Make it possible to disable the block layer [try #6]
Make it possible to disable the block layer.  Not all embedded devices require
it, some can make do with just JFFS2, NFS, ramfs, etc - none of which require
the block layer to be present.

This patch does the following:

 (*) Introduces CONFIG_BLOCK to disable the block layer, buffering and blockdev
     support.

 (*) Adds dependencies on CONFIG_BLOCK to any configuration item that controls
     an item that uses the block layer.  This includes:

     (*) Block I/O tracing.

     (*) Disk partition code.

     (*) All filesystems that are block based, eg: Ext3, ReiserFS, ISOFS.

     (*) The SCSI layer.  As far as I can tell, even SCSI chardevs use the
     	 block layer to do scheduling.  Some drivers that use SCSI facilities -
     	 such as USB storage - end up disabled indirectly from this.

     (*) Various block-based device drivers, such as IDE and the old CDROM
     	 drivers.

     (*) MTD blockdev handling and FTL.

     (*) JFFS - which uses set_bdev_super(), something it could avoid doing by
     	 taking a leaf out of JFFS2's book.

 (*) Makes most of the contents of linux/blkdev.h, linux/buffer_head.h and
     linux/elevator.h contingent on CONFIG_BLOCK being set.  sector_div() is,
     however, still used in places, and so is still available.

 (*) Also made contingent are the contents of linux/mpage.h, linux/genhd.h and
     parts of linux/fs.h.

 (*) Makes a number of files in fs/ contingent on CONFIG_BLOCK.

 (*) Makes mm/bounce.c (bounce buffering) contingent on CONFIG_BLOCK.

 (*) set_page_dirty() doesn't call __set_page_dirty_buffers() if CONFIG_BLOCK
     is not enabled.

 (*) fs/no-block.c is created to hold out-of-line stubs and things that are
     required when CONFIG_BLOCK is not set:

     (*) Default blockdev file operations (to give error ENODEV on opening).

 (*) Makes some /proc changes:

     (*) /proc/devices does not list any blockdevs.

     (*) /proc/diskstats and /proc/partitions are contingent on CONFIG_BLOCK.

 (*) Makes some compat ioctl handling contingent on CONFIG_BLOCK.

 (*) If CONFIG_BLOCK is not defined, makes sys_quotactl() return -ENODEV if
     given command other than Q_SYNC or if a special device is specified.

 (*) In init/do_mounts.c, no reference is made to the blockdev routines if
     CONFIG_BLOCK is not defined.  This does not prohibit NFS roots or JFFS2.

 (*) The bdflush, ioprio_set and ioprio_get syscalls can now be absent (return
     error ENOSYS by way of cond_syscall if so).

 (*) The seclvl_bd_claim() and seclvl_bd_release() security calls do nothing if
     CONFIG_BLOCK is not set, since they can't then happen.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2006-09-30 20:52:31 +02:00
Linus Torvalds e823aff2d6 Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (36 commits)
  drm: Use register writes instead of BITBLT_MULTI packets for buffer swap blits
  drm: use radeon specific names for radeon flags
  drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers
  drm: allow multiple addMaps with the same 32-bit map offsset.
  drm: fd.o Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset().
  drm: Fix hashtab implementation leaking illegal error codes to user space.
  drm: domain changes broke ppc r200
  drm: fixup setversion return codes..
  drm: fixup i915 error codes
  drm: realign sosme radeon code with drm git tree
  drm: realign via driver with drm git tree
  drm: remove hash tables on drm exit
  drm: cleanups
  drm: i810_dma.c: fix pointer arithmetic for 64-bit target
  drm: avoid kernel oops in some error paths calling drm_lastclose
  drm: allow detection of new VIA chipsets
  drm: fix i965 build bug
  drm: remove FALSE/TRUE that snuck in with simple memory manager changes.
  drm: Add support for Intel i965G chipsets.
  drm: add better explanation for i830/i915
  ...
2006-09-30 11:29:54 -07:00
Alan Cox 5f412b2424 [PATCH] Fix locking for tty drivers when doing urgent characters
If you send a priority character (as is done for flow control) then the tty
driver can either have its own method for "jumping the queue" or the characrer
can be queued normally.  In the latter case we call the write method but
without the atomic_write_lock taken elsewhere.

Make this consistent.  Note that the send_xchar method if implemented remains
outside of the lock as it can jump ahead of a current write so must not be
locked out by it.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:24 -07:00
Alan Cox 67cc0161ec [PATCH] specialix - remove private speed decoding
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:24 -07:00
Alan Cox 1db27c11e9 [PATCH] istallion: Remove private baud rate decoding, which is also broken in this case on some platforms
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:24 -07:00
Alan Cox d720bc4b8f [PATCH] generic_serial: remove private decoding of baud rate bits
The driver has no business doing this work itself any more and hasn't for some
years.  When the new speed stuff goes in this will break entirely so fix it up
ready.

Also remove a #if 0 around a comment....

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:24 -07:00
Akinobu Mita 4050914f7c [PATCH] rate limiting for the ldisc open failure messages
This patch limits the messages when ldisc open faulures happen.  It happens
under memory pressure.

Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:23 -07:00
Geoff Levand 153dcc54df [PATCH] mem driver: fix conditional on isa i/o support
This change corrects the logic on the preprocessor conditionals that
include support for ISA port i/o (/dev/ioports) into the mem character
driver.

This fixes the following error when building for powerpc platforms with
CONFIG_PCI=n.

  drivers/built-in.o: undefined reference to `pci_io_base'

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Linas Vepstas <lins@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:22 -07:00
Alan Cox 28298232a1 [PATCH] tty: Fix bits and note more bits to fix
If your driver implements "break on" and "break off" this ensures you won't
get multiple overlapping requests or requests in parallel.  If your driver
has its own break handling then its still your problem as the driver
author.

Break is also now serialized against writes from user space properly but no
new guarantees are made driver level about writes from the line discipline
itself (eg flow control or echo)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:18 -07:00
Alan Cox de2a84f2be [PATCH] solaris emulation: incorrect tty locking
[akpm@osdl.org: build fix]
[akpm@osdl.org: warning fix]
Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:18 -07:00
Rolf Eike Beer 3e26a423e7 [PATCH] Return better error codes if drivers/char/raw.c module init fails
Currently this module just returns 1 if anything on module init fails. Store
the error code of the different function calls and return their error on
problems.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
[ Fixed to not unregister twice on error ]
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:16 -07:00
Arjan van de Ven 5785c95bae [PATCH] tty: make termios_sem a mutex
[akpm@osdl.org: fix]
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:16 -07:00
Alan Cox 808a0d389f [PATCH] tty: lock ticogwinsz
Now we lock the set ioctl its trivial to lock the get one so the data
copied is consistent.  At the moment we have the BKL here but this removes
the need for it and is a step in the right direction

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:16 -07:00
Alan Cox 1266b1e1ae [PATCH] tty: trivial kzalloc opportunity
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:16 -07:00
Catalin Marinas 254e948b29 [PATCH] Fix memory leak in vc_resize/vc_allocate
Memory leaks can happen in the vc_resize() function in drivers/char/vt.c
because of the vc->vc_screenbuf variable overriding in vc_allocate().  The
kmemleak reported trace is as follows:

  <__kmalloc>
  <vc_resize>
  <fbcon_init>
  <visual_init>
  <vc_allocate>
  <con_open>
  <tty_open>
  <chrdev_open>

This patch no longer allocates a screen buffer in vc_allocate() if it was
already allocated by vc_resize().

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:14 -07:00
Ben Dooks d202a6c088 [PATCH] Remove old drivers/char/s3c2410_rtc.c
This can now be removed, since there is now a drivers/rtc/rtc-s3c.c driver.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:13 -07:00
Sukadev Bhattiprolu f400e198b2 [PATCH] pidspace: is_init()
This is an updated version of Eric Biederman's is_init() patch.
(http://lkml.org/lkml/2006/2/6/280).  It applies cleanly to 2.6.18-rc3 and
replaces a few more instances of ->pid == 1 with is_init().

Further, is_init() checks pid and thus removes dependency on Eric's other
patches for now.

Eric's original description:

	There are a lot of places in the kernel where we test for init
	because we give it special properties.  Most  significantly init
	must not die.  This results in code all over the kernel test
	->pid == 1.

	Introduce is_init to capture this case.

	With multiple pid spaces for all of the cases affected we are
	looking for only the first process on the system, not some other
	process that has pid == 1.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: <lxc-devel@lists.sourceforge.net>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:12 -07:00
Alan Cox ca9bda00b4 [PATCH] tty locking on resize
The current kernel serializes console resizes but does not serialize the
resize against the tty structure updates.  This means that while two
parallel resizes cannot mess up the console you can get incorrect results
reported.

Secondly while doing this I added vc_lock_resize() to lock and resize the
console.  This leaves all knowledge of the console_sem in the vt/console
driver and kicks it out of the tty layer, which is good

Thirdly while doing this I decided I couldn't stand "disallocate" any
longer so I switched it to "deallocate".

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:12 -07:00
Adam Tlalka d4328b40af [PATCH] console utf-8 mode fixes
Fix utf-8 mode so alternate charset modes always work according to control
sequences interpreted in do_con_trol function preserving backward US-ASCII
and VT100 semigraphics compatibility.

Malformed utf-8 sequences are represented as sequences of replacement
glyphs,original codes or '?' as a last resort.

unicode-xterm, gnome-terminal, kconsole and other terminal emulators in
utf-8 mode respect acsc, enacs, rmacs sequences.  Also I found that some
important system programs (from Debian distro) uses acsc in utf-8 mode -
dselect, aptitude, w3m for example.

Signed-off-by: Adam Tlalka <atlka@pg.gda.pl>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:11 -07:00
Alexey Dobriyan 527063ba98 [PATCH] tty_io.c: keep davej sane
Just comment and next "while" look _very_ wrong.  Place { correctly to hint
unsuspecting ones that it's the end of the loop actually.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Dave Jones <davej@redhat.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:10 -07:00
Alan Cox d09d7ddf30 [PATCH] There is no devfs, there has never been a devfs, we have always been at war with...
Jon Smirl noted a couple of tty driver functions now are quite misleadingly
named with the death of devfs.  A quick grep found another case in the lp
driver.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:10 -07:00
Jan Beulich c24c95a085 [PATCH] fix Intel RNG detection
Previously, since determination whether there was an Intel random number
generator was based on a single bit, on systems with a matching bridge
device but without a firmware hub, there was a 50% chance that the code
would incorrectly decide that the system had an RNG.  This patch adds
detection of the firmware hub to better qualify the existence of an RNG.

There is one issue with the patch: I was unable to determine the LPC
equivalent for the PCI bridge 8086:2430 (since the old code didn't care
about which of the many devices provided by the ICH/ESB it was chose to use
the PCI bridge device, but the FWH settings live in the LPC device, so the
device list needed to be changed).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:09 -07:00
Komal Shah 7768a13c25 [PATCH] OMAP: Add Watchdog driver support
Add Texas Instruments (TI) OMAP1/2 (http://www.ti.com/omap) based
processors, like OMAP1610/1710/242x.

[akpm@osdl.org: cleanups]
Cc: <gdavis@mvista.com>
Cc: "Komal Shah" <komal_shah802003@yahoo.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:07 -07:00
Chris Boot 58012cd788 [PATCH] scx200_gpio export cleanups
Use EXPORT_SYMBOL_GPL for new symbols, and declare the struct in the header
file for access by other modules.

Signed-off-by: Chris Boot <bootc@bootc.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:06 -07:00
Adrian Bunk 6299a2dec8 [PATCH] drivers/char/pc8736x_gpio.c: remove unused static functions
drivers/char/pc8736x_gpio.c:192: warning: #pc8736x_gpio_set_high# defined but not used
drivers/char/pc8736x_gpio.c:197: warning: #pc8736x_gpio_set_low# defined but not used

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:05 -07:00
Jim Cromie c8ad9681fd [PATCH] drivers/char/scx200_gpio.c: make code static
This patch makes a needlessly global variable static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jim Cromie  <jim.cromie@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:05 -07:00
Steven Rostedt 358333a0cb [PATCH] remove unnecessary barrier in rtc_get_rtc_time
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-29 09:18:05 -07:00
Dave Jones 2cc1a4134f [AGPGART] printk fixups.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-28 19:50:07 -04:00
Linus Torvalds b98adfccdf Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (108 commits)
  sh: Fix occasional flush_cache_4096() stack corruption.
  sh: Calculate shm alignment at runtime.
  sh: dma-mapping compile fixes.
  sh: Initial vsyscall page support.
  sh: Clean up PAGE_SIZE definition for assembly use.
  sh: Selective flush_cache_mm() flushing.
  sh: More intelligent entry_mask/way_size calculation.
  sh: Support for L2 cache on newer SH-4A CPUs.
  sh: Update kexec support for API changes.
  sh: Optimized readsl()/writesl() support.
  sh: Report movli.l/movco.l capabilities.
  sh: CPU flags in AT_HWCAP in ELF auxvt.
  sh: Add support for 4K stacks.
  sh: Enable /proc/kcore support.
  sh: stack debugging support.
  sh: select CONFIG_EMBEDDED.
  sh: machvec rework.
  sh: Solution Engine SH7343 board support.
  sh: SH7710VoIPGW board support.
  sh: Enable verbose BUG() support.
  ...
2006-09-27 08:49:07 -07:00
David Howells 5da6185bca [PATCH] NOMMU: Set BDI capabilities for /dev/mem and /dev/kmem
Set the backing device info capabilities for /dev/mem and /dev/kmem to
permit direct sharing under no-MMU conditions and full mapping capabilities
under MMU conditions.  Make the BDI used by these available to all directly
mappable character devices.

Also comment the capabilities for /dev/zero.

[akpm@osdl.org: ifdef reductions]
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:14 -07:00
Jes Sorensen 17a3b05047 [PATCH] mspec driver
Implement the special memory driver (mspec) based on the do_no_pfn
approach.  The driver is currently used only on SN2 hardware with special
fetchop support but could be beneficial on other architectures using the
uncached mode.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-27 08:26:13 -07:00
Paul Mundt f118420be8 watchdog: Add a simple mmap() stub for shwdt.
In some applications people have expressed a need for an mmap() method,
so we implement a simple stub for this that maps back a page with the
counter in it.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-09-27 17:53:59 +09:00
Paul Mundt 91550f715b sh: Kill off the rest of the legacy rtc mess.
With the new RTC class driver, we can get rid of most of the
old left over cruft.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-09-27 17:45:01 +09:00
Paul Mundt e4c2cfee5d sh: Various cosmetic cleanups.
We had quite a bit of whitespace damage, clean most of it up..

Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2006-09-27 12:31:01 +09:00
Alan Cox 7357db1209 [AGPGART] Use pci_get_slot not pci_find_slot
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-26 23:05:55 -04:00
Andi Kleen 3034d11c93 [PATCH] Don't print virtual address in HPET initialization
virtual addresses don't belong into kernel logs for non debugging

Cc: clemens@ladisch.de
Signed-off-by: Andi Kleen <ak@suse.de>
2006-09-26 10:52:28 +02:00
Stephen Rothwell d86d9b8cab [POWERPC] fix spin lock nesting in hvc_iseries
We had nested spinlocks using the same flags variable, but it turns out
that we don't need the nested locks at all (the lock protects a static
buffer that we aren't using here), so just remove the extra locks.

Spotted by Alexey Dobriyan.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-09-26 15:41:03 +10:00
Peter Zijlstra 0b16f21f14 [PATCH] rtc: lockdep fix/workaround
BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)
 [<c04051ee>] show_trace_log_lvl+0x58/0x171
 [<c0405802>] show_trace+0xd/0x10
 [<c040591b>] dump_stack+0x19/0x1b
 [<c043abee>] trace_hardirqs_on+0xa2/0x11e
 [<c06143c3>] _spin_unlock_irq+0x22/0x26
 [<c0541540>] rtc_get_rtc_time+0x32/0x176
 [<c0419ba4>] hpet_rtc_interrupt+0x92/0x14d
 [<c0450f94>] handle_IRQ_event+0x20/0x4d
 [<c0451055>] __do_IRQ+0x94/0xef
 [<c040678d>] do_IRQ+0x9e/0xbd
 [<c0404a49>] common_interrupt+0x25/0x2c
DWARF2 unwinder stuck at common_interrupt+0x25/0x2c

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-25 17:38:35 -07:00
Stephen Rothwell de0138da0f [POWERPC] The two vio HVC backends clash
Make sure only one of them actually registers as a driver.

Also, remove cast from get_property().

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2006-09-25 13:30:51 +10:00
Al Viro 4ac493b1d5 [PATCH] briq_panel: read() and write() get __user pointers, damnit
annotated, fixed a roothole in ->write().  Dereferencing user-supplied pointer
is a Bad Idea(tm)...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-23 11:34:43 -07:00
Al Viro 13b5aeccc4 [PATCH] more fallout from get_property returning pointer to const
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-23 11:34:43 -07:00
Linus Torvalds 6585b57240 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] Rework AGPv3 modesetting fallback.
  [AGPGART] Add suspend callback for i965
  [AGPGART] Fix number of aperture sizes in 830 gart structs.
  [AGPGART] Intel 965 Express support.
  [AGPGART] agp.h: constify struct agp_bridge_data::version
  [AGPGART] const'ify VIA AGP PCI table.
  [AGPGART] CONFIG_PM=n slim: drivers/char/agp/intel-agp.c
  [AGPGART] CONFIG_PM=n slim: drivers/char/agp/efficeon-agp.c
  [AGPGART] Const'ify the agpgart driver version.
  [AGPGART] remove private page protection map
2006-09-22 17:50:50 -07:00
Al Viro 634965f5cf [PATCH] memcpy_fromio() missing in istallion
memcpy() from iomem is a bad thing...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-22 17:48:56 -07:00
Linus Torvalds 14d1adfc59 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (114 commits)
  [POWERPC] Fix ohare IDE irq workaround on old powermacs
  [POWERPC] EEH: Power4 systems sometimes need multiple resets.
  [POWERPC] Include <asm/mmu.h> in arch/powerpc/sysdev/fsl_soc.h for phys_addr_t.
  [POWERPC] Demacrofy arch/powerpc/platforms/maple/pci.c
  [POWERPC] Maple U3 HT - reject inappropriate config space access
  [POWERPC] Fix IPIC pending register assignments
  [POWERPC] powerpc: fix building gdb against asm/ptrace.h
  [POWERPC] Remove DISCONTIGMEM cruft from page.h
  [POWERPC] Merge iSeries i/o operations with the rest
  [POWERPC] 40x: Fix debug status register defines
  [POWERPC] Fix compile error in sbc8560
  [POWERPC] EEH: support MMIO enable recovery step
  [POWERPC] EEH: enable MMIO/DMA on frozen slot
  [POWERPC] EEH: code comment cleanup
  [POWERPC] EEH: balance pcidev_get/put calls
  [POWERPC] PPC: Fix xmon stack frame address in backtrace
  [POWERPC] Add AT_PLATFORM value for Xilinx Virtex-4 FX
  [POWERPC] Start arch/powerpc/boot code reorganization
  [POWERPC] Define of_read_ulong helper
  [POWERPC] iseries: eliminate a couple of warnings
  ...
2006-09-22 12:48:03 -07:00