pandora-kernel.git
15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Tue, 22 Jul 2008 20:16:01 +0000 (13:16 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (49 commits)
  powerpc: Fix build bug with binutils < 2.18 and GCC < 4.2
  powerpc/eeh: Don't panic when EEH_MAX_FAILS is exceeded
  fbdev: Teaches offb about palette on radeon r5xx/r6xx
  powerpc/cell/edac: Log a syndrome code in case of correctable error
  powerpc/cell: Add DMA_ATTR_WEAK_ORDERING dma attribute and use in Cell IOMMU code
  powerpc: Indicate which oprofile counters to use while in compat mode
  powerpc/boot: Change spaces to tabs
  powerpc: Remove duplicate 6xx option in Kconfig
  powerpc: Use PPC_LONG and PPC_LONG_ALIGN in lib/string.S
  powerpc: Use PPC_LONG_ALIGN in uaccess.h
  powerpc: Add a #define for aligning to a long-sized boundary
  powerpc: Fix OF parsing of 64 bits PCI addresses
  powerpc: Use WARN_ON(1) instead of __WARN()
  powerpc: Fix support for latencytop
  powerpc/ps3: Update ps3_defconfig
  powerpc/ps3: Add a sub-match id to ps3_system_bus
  powerpc: Add a 6xx defconfig
  powerpc/dma: Use the struct dma_attrs in iommu code
  powerpc/cell: Add support for power button of future IBM cell blades
  powerpc/cell: Cleanup sysreset_hack for IBM cell blades
  ...

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Tue, 22 Jul 2008 20:13:47 +0000 (13:13 -0700)]
Merge git://git./linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (79 commits)
  arm: bus_id -> dev_name() and dev_set_name() conversions
  sparc64: fix up bus_id changes in sparc core code
  3c59x: handle pci_name() being const
  MTD: handle pci_name() being const
  HP iLO driver
  sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute
  sysdev: Add utility functions for simple int/ulong variable sysdev attributes
  sysdev: Pass the attribute to the low level sysdev show/store function
  driver core: Suppress sysfs warnings for device_rename().
  kobject: Transmit return value of call_usermodehelper() to caller
  sysfs-rules.txt: reword API stability statement
  debugfs: Implement debugfs_remove_recursive()
  HOWTO: change email addresses of James in HOWTO
  always enable FW_LOADER unless EMBEDDED=y
  uio-howto.tmpl: use unique output names
  uio-howto.tmpl: use standard copyright/legal markings
  sysfs: don't call notify_change
  sysdev: fix debugging statements in registration code.
  kobject: should use kobject_put() in kset-example
  kobject: reorder kobject to save space on 64 bit builds
  ...

15 years agoport_fixups: Fix ups for tty port changes
Alan Cox [Tue, 22 Jul 2008 14:25:07 +0000 (15:25 +0100)]
port_fixups: Fix ups for tty port changes

I missed the cpm_uart one. Thanks to Kumar Gala for reporting it. A double
check found samsung also needed fixing up.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoistallion: Use helpers
Alan Cox [Tue, 22 Jul 2008 12:44:14 +0000 (13:44 +0100)]
istallion: Use helpers

The ldisc needs to be referenced properly when used. The tty layer has a
helper for this which should have been used but this driver got missed
originally.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosynclink_gt fix locking in error path of rx enable
Paul Fulghum [Tue, 22 Jul 2008 10:23:24 +0000 (11:23 +0100)]
synclink_gt fix locking in error path of rx enable

Fix locking in error path of rx_enable() introduced by
synclink_gt-add-rx-dma-buffer-fill-level-control patch.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosynclink_gt: add rx DMA buffer fill level control
Paul Fulghum [Tue, 22 Jul 2008 10:22:14 +0000 (11:22 +0100)]
synclink_gt: add rx DMA buffer fill level control

Add run time control for receive DMA buffer fill level to allow
application to control receive latency when using stream oriented serial
protocols that pass receive data to application only after a DMA buffer
fills.  This was previously a compile time option, but run time control is
needed when application changes data rate (and latency requirements) or
uses different data rates on different ports.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosynclink_gt: leave transmitter in reset state after configuration
Paul Fulghum [Tue, 22 Jul 2008 10:22:04 +0000 (11:22 +0100)]
synclink_gt: leave transmitter in reset state after configuration

Leave the transmitter in reset state after configuration so that transmit
signal is held at mark until transmitter is explicitly enabled by
application, otherwise transmitter sends idle pattern.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosynclink_gt: improve TIOCOUTQ accuracy
Paul Fulghum [Tue, 22 Jul 2008 10:21:55 +0000 (11:21 +0100)]
synclink_gt: improve TIOCOUTQ accuracy

Improve the accuracy of TIOCOUTQ value as implemented in chars_in_buffer()
method by walking and counting tx DMA buffers, reading controller tx FIFO
level and accounting for controller tx shift register.  The greatly
improves application control of transmit latency at lower data rates.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosynclink_gt: add serial bit order control
Paul Fulghum [Tue, 22 Jul 2008 10:21:39 +0000 (11:21 +0100)]
synclink_gt: add serial bit order control

Add control of hardware serial bit order between LSB first
(default/standard) and MSB first.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosynclink_gt: improve and simplify write method
Paul Fulghum [Tue, 22 Jul 2008 10:21:28 +0000 (11:21 +0100)]
synclink_gt: improve and simplify write method

Improve write method by allowing multiple HDLC frames to be loaded into tx
DMA buffer ring for continuous frame transmission.  This simplifies the
transmit code by using the common procedures for all serial protocols.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agon_hdlc: honor O_NONBLOCK on write
Paul Fulghum [Tue, 22 Jul 2008 10:21:19 +0000 (11:21 +0100)]
n_hdlc: honor O_NONBLOCK on write

Make n_hdlc line discipline honor the O_NONBLOCK file flag on write.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoserial: 8250: fix shared interrupts issues with SMP and RT kernels
Anton Vorontsov [Tue, 22 Jul 2008 10:21:07 +0000 (11:21 +0100)]
serial: 8250: fix shared interrupts issues with SMP and RT kernels

With SMP kernels _irqsave spinlock disables only local interrupts, while
the shared serial interrupt could be assigned to the CPU that is not
currently starting up the serial port.

This might cause issues because serial8250_startup() routine issues
IRQ-triggering operations before registering the port in the IRQ chain
(though, this is fine to do and done explicitly because we don't want to
process any interrupts on the port startup).

With RT kernels and preemptable hardirqs, _irqsave spinlock does not
disable local hardirqs, and the bug could be reproduced much easily:

$ cat /dev/ttyS0 &
$ cat /dev/ttyS1
irq 42: nobody cared (try booting with the "irqpoll" option)
Call Trace:
[C0475EB0] [C0008A98] show_stack+0x4c/0x1ac (unreliable)
[C0475EF0] [C004BBD4] __report_bad_irq+0x34/0xb8
[C0475F10] [C004BD38] note_interrupt+0xe0/0x308
[C0475F50] [C004B09C] thread_simple_irq+0xdc/0x104
[C0475F70] [C004B3FC] do_irqd+0x338/0x3c8
[C0475FC0] [C00398E0] kthread+0xf8/0x100
[C0475FF0] [C0011FE0] original_kernel_thread+0x44/0x60
handlers:
[<c02112c4>] (serial8250_interrupt+0x0/0x138)
Disabling IRQ #42

After this, all serial ports on the given IRQ are non-functional.

To fix the issue we should explicitly disable shared IRQ before
issuing any IRQ-triggering operations.

I also changed spin_lock_irqsave to the ordinary spin_lock, since it
seems to be safe: chain does not contain new port (yet), thus nobody
will interfere us from the ISRs.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix the epca driver to permit epca_setup() to be invoked from the kernel cmdline
David Howells [Tue, 22 Jul 2008 10:20:45 +0000 (11:20 +0100)]
Fix the epca driver to permit epca_setup() to be invoked from the kernel cmdline

Fix the epca driver to call epca_setup() if digiepca=xxx is included on the
command line and the epca driver is built in.

epca_setup() used to be called from init/main.c in 2.2 kernels, but somewhere
along the way that call was removed but not replaced.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoChar: mxser, add CP-102UF support
Jiri Slaby [Tue, 22 Jul 2008 10:20:34 +0000 (11:20 +0100)]
Char: mxser, add CP-102UF support

Add support for CP-102UF moxa card (update to 1.12 original driver) and
increment this driver version.

(Somewhat reworked by alan@redhat.com to merge in with other patches)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospecialix: restore driver using new break functionality
Alan Cox [Tue, 22 Jul 2008 10:19:05 +0000 (11:19 +0100)]
specialix: restore driver using new break functionality

Use the hardware break support on the specialix driver

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix the (i)Stallion driver's putchar() and break_ctl() ops
David Howells [Tue, 22 Jul 2008 10:18:43 +0000 (11:18 +0100)]
Fix the (i)Stallion driver's putchar() and break_ctl() ops

Fix the Stallion driver's putchar() and break_ctl() ops and iStallion's
putchar() to return values.

Is it actually possible for putchar() or break_ctl() to be called with tty ==
NULL or can the check be discarded?

Should stl_write() be returning 0 if tty->driver_data is NULL or tx.buf is
NULL?  Is this even possible?

I've made Stallion's functions return -EINVAL as stli_breakctl() if the checks
fail.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoriscom8: Restore driver using new break functionality
Alan Cox [Tue, 22 Jul 2008 10:18:30 +0000 (11:18 +0100)]
riscom8: Restore driver using new break functionality

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoisicom: restore using hardware break support
Alan Cox [Tue, 22 Jul 2008 10:18:21 +0000 (11:18 +0100)]
isicom: restore using hardware break support

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoepca: Restore driver
Alan Cox [Tue, 22 Jul 2008 10:18:12 +0000 (11:18 +0100)]
epca: Restore driver

Convert the driver to use the added hardware break support

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: rework break handling
Alan Cox [Tue, 22 Jul 2008 10:18:03 +0000 (11:18 +0100)]
tty: rework break handling

Some hardware needs to do break handling itself and may have partial
support only. Make break_ctl return an error code. Add a tty driver flag
so you can indicate driver hardware side break support.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Mark unconverted drivers as BROKEN
Alan Cox [Tue, 22 Jul 2008 10:17:53 +0000 (11:17 +0100)]
tty: Mark unconverted drivers as BROKEN

Nobody seems to use these drivers anyway so if they want them they can
fix them up. I don't have the needed info to add break_ctl support to them.
Send patches if you don't like it.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomxser: remove dead code
Alan Cox [Tue, 22 Jul 2008 10:17:43 +0000 (11:17 +0100)]
mxser: remove dead code

Old style ioctl break code can go

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoepca: Fix comments and move break
Alan Cox [Tue, 22 Jul 2008 10:17:32 +0000 (11:17 +0100)]
epca: Fix comments and move break

The ioctls it talks about are midlayer provided.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospecialix: Code cleanups
Alan Cox [Tue, 22 Jul 2008 10:17:16 +0000 (11:17 +0100)]
specialix: Code cleanups

Go through the inlines and other oddments that are iffy. Remove various bits
of dead code and bogus debug. Turn the crtsdts compile time option into a
runtime switch.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospecialix: Tidy up coding style
Alan Cox [Tue, 22 Jul 2008 10:17:05 +0000 (11:17 +0100)]
specialix: Tidy up coding style

Preparation for doing some real work on the driver. Do this first so we can
easily identify if the cleanups accidentally broke something

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Split ldisc code into its own file
Alan Cox [Tue, 22 Jul 2008 10:16:55 +0000 (11:16 +0100)]
tty: Split ldisc code into its own file

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoio_edgeport: Fix various bogus returns to the tty layer
Alan Cox [Tue, 22 Jul 2008 10:16:42 +0000 (11:16 +0100)]
io_edgeport: Fix various bogus returns to the tty layer

The edgeport reports negative error codes to functions that do not
expect them. This can cause ports to jam forever

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-io_edgeport: Coding style
Alan Cox [Tue, 22 Jul 2008 10:16:34 +0000 (11:16 +0100)]
tty-usb-io_edgeport: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-mos7720: Coding style
Alan Cox [Tue, 22 Jul 2008 10:16:21 +0000 (11:16 +0100)]
tty-usb-mos7720: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomos7840: remove loads of bogus assignments to status
Alan Cox [Tue, 22 Jul 2008 10:16:12 +0000 (11:16 +0100)]
mos7840: remove loads of bogus assignments to status

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoomninet: Use string flip functions
Alan Cox [Tue, 22 Jul 2008 10:16:03 +0000 (11:16 +0100)]
omninet: Use string flip functions

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-omninet: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:54 +0000 (11:15 +0100)]
tty-usb-omninet: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-option: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:45 +0000 (11:15 +0100)]
tty-usb-option: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-oti6858: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:36 +0000 (11:15 +0100)]
tty-usb-oti6858: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-safe-serial: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:26 +0000 (11:15 +0100)]
tty-usb-safe-serial: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-ti-usb: Coding style
Alan Cox [Tue, 22 Jul 2008 10:15:17 +0000 (11:15 +0100)]
tty-usb-ti-usb: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-spcp8x5: Minor coding style
Alan Cox [Tue, 22 Jul 2008 10:15:08 +0000 (11:15 +0100)]
tty-usb-spcp8x5: Minor coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-sierra: Coding style - minor
Alan Cox [Tue, 22 Jul 2008 10:14:59 +0000 (11:14 +0100)]
tty-usb-sierra: Coding style - minor

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-pl2303: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:49 +0000 (11:14 +0100)]
tty-usb-pl2303: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomct_u232: Use flip buffer functions
Alan Cox [Tue, 22 Jul 2008 10:14:40 +0000 (11:14 +0100)]
mct_u232: Use flip buffer functions

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-mct-u232: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:30 +0000 (11:14 +0100)]
tty-usb-mct-u232: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokobil_sct: Fix ioctls
Alan Cox [Tue, 22 Jul 2008 10:14:22 +0000 (11:14 +0100)]
kobil_sct: Fix ioctls

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-kobil-sct: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:10 +0000 (11:14 +0100)]
tty-usb-kobil-sct: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-kl5kusb105: Coding style
Alan Cox [Tue, 22 Jul 2008 10:14:00 +0000 (11:14 +0100)]
tty-usb-kl5kusb105: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokeyspan_pda: Use string flip functions
Alan Cox [Tue, 22 Jul 2008 10:13:51 +0000 (11:13 +0100)]
keyspan_pda: Use string flip functions

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-keyspan-pda: Coding style
Alan Cox [Tue, 22 Jul 2008 10:13:42 +0000 (11:13 +0100)]
tty-usb-keyspan-pda: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokeyspan: Use string flip functions when possible
Alan Cox [Tue, 22 Jul 2008 10:13:32 +0000 (11:13 +0100)]
keyspan: Use string flip functions when possible

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-keyspan: Coding style
Alan Cox [Tue, 22 Jul 2008 10:13:08 +0000 (11:13 +0100)]
tty-usb-keyspan: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-iuu-phoenix: Clean up to coding style
Alan Cox [Tue, 22 Jul 2008 10:12:59 +0000 (11:12 +0100)]
tty-usb-iuu-phoenix: Clean up to coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-ipw: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:51 +0000 (11:12 +0100)]
tty-usb-ipw: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoipaq: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:41 +0000 (11:12 +0100)]
ipaq: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoio_ti: Minor coding style
Alan Cox [Tue, 22 Jul 2008 10:12:33 +0000 (11:12 +0100)]
io_ti: Minor coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agousb-serial: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:24 +0000 (11:12 +0100)]
usb-serial: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-visor: Coding style
Alan Cox [Tue, 22 Jul 2008 10:12:15 +0000 (11:12 +0100)]
tty-usb-visor: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-hp4x: Fix overlong line
Alan Cox [Tue, 22 Jul 2008 10:12:05 +0000 (11:12 +0100)]
tty-usb-hp4x: Fix overlong line

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-generic: Code cleanup
Alan Cox [Tue, 22 Jul 2008 10:11:55 +0000 (11:11 +0100)]
tty-usb-generic: Code cleanup

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogarmin_gps: Coding style
Alan Cox [Tue, 22 Jul 2008 10:11:44 +0000 (11:11 +0100)]
garmin_gps: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofunsoft: Switch to linux/uaccess
Alan Cox [Tue, 22 Jul 2008 10:11:34 +0000 (11:11 +0100)]
funsoft: Switch to linux/uaccess

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoftdi_sio: Coding style
Alan Cox [Tue, 22 Jul 2008 10:11:23 +0000 (11:11 +0100)]
ftdi_sio: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoempeg: Coding style
Alan Cox [Tue, 22 Jul 2008 10:11:11 +0000 (11:11 +0100)]
empeg: Coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodigi_acceleport: coding style
Alan Cox [Tue, 22 Jul 2008 10:11:02 +0000 (11:11 +0100)]
digi_acceleport: coding style

Code tidy

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agousb-cypress: There is no 0 case to go with CS5/6/7/8 so remove the test
Alan Cox [Tue, 22 Jul 2008 10:10:53 +0000 (11:10 +0100)]
usb-cypress: There is no 0 case to go with CS5/6/7/8 so remove the test

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocypress_m8: coding style
Alan Cox [Tue, 22 Jul 2008 10:10:36 +0000 (11:10 +0100)]
cypress_m8: coding style

Coding style clean ups

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocyberjack: Coding style
Alan Cox [Tue, 22 Jul 2008 10:10:27 +0000 (11:10 +0100)]
cyberjack: Coding style

Coding style fixups

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocp2101: coding style
Alan Cox [Tue, 22 Jul 2008 10:10:17 +0000 (11:10 +0100)]
cp2101: coding style

Bring up to coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-console: Fix termios
Alan Cox [Tue, 22 Jul 2008 10:10:08 +0000 (11:10 +0100)]
tty-usb-console: Fix termios

Setting CFLAG bits is all well and good but you must sort out ispeed and
ospeed properly.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty-usb-console: tidy the USB console code
Alan Cox [Tue, 22 Jul 2008 10:09:57 +0000 (11:09 +0100)]
tty-usb-console: tidy the USB console code

Code tidy

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agousb-serial-bus: tidy coding style
Alan Cox [Tue, 22 Jul 2008 10:09:48 +0000 (11:09 +0100)]
usb-serial-bus: tidy coding style

Tidy up

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agobelkin_sa: clean up code
Alan Cox [Tue, 22 Jul 2008 10:09:39 +0000 (11:09 +0100)]
belkin_sa: clean up code

Coding style tidy up for belkin_sa

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agowhiteheat: fix bugs found in the tidy and audit
Alan Cox [Tue, 22 Jul 2008 10:09:29 +0000 (11:09 +0100)]
whiteheat: fix bugs found in the tidy and audit

Termios tidy up, plus fix break and DTR.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agowhiteheat: coding style
Alan Cox [Tue, 22 Jul 2008 10:09:16 +0000 (11:09 +0100)]
whiteheat: coding style

Bring ezusb and whiteheat into line with the coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agousb_serial: API all change
Alan Cox [Tue, 22 Jul 2008 10:09:07 +0000 (11:09 +0100)]
usb_serial: API all change

USB serial likes to use port->tty back pointers for the real work it does and
to do so without any actual locking. Unfortunately when you consider hangup
events, hangup/parallel reopen or even worse hangup followed by parallel close
events the tty->port and port->tty pointers are not guaranteed to be the same
as port->tty is the active tty while tty->port is the port the tty may or
may not still be attached to.

So rework the entire API to pass the tty struct. For console cases we need
to pass both for now. This shows up multiple drivers that immediately crash
with USB console some of which have been fixed in the process.

Longer term we need a proper tty as console abstraction

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agottydev: Fix up compile failures in the PPC build
Alan Cox [Tue, 22 Jul 2008 10:08:53 +0000 (11:08 +0100)]
ttydev: Fix up compile failures in the PPC build

Fix up a couple of reported merge problems

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomarkers: fix duplicate modpost entry
Mathieu Desnoyers [Mon, 21 Jul 2008 21:21:38 +0000 (14:21 -0700)]
markers: fix duplicate modpost entry

When a kernel was rebuilt, the previous Module.markers was not cleared.
It caused markers with different format strings to appear as duplicates
when a markers was changed.  This problem is present since
scripts/mod/modpost.c started to generate Module.markers, commit
b2e3e658b344c6bcfb8fb694100ab2f2b5b2edb0

It therefore applies to 2.6.25, 2.6.26 and linux-next.

I merely merged the patches from Roland, Wenji and Takashi here.

Credits to
Roland McGrath <roland@redhat.com>
Wenji Huang <wenji.huang@oracle.com>
and
Takashi Nishiie <t-nishiie@np.css.fujitsu.com>

for providing the individual fixes.

- Changelog :
  - Integrated Takashi's Makefile modification to clear Module.markers upon
    make clean.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Roland McGrath <roland@redhat.com>
Cc: Wenji Huang <wenji.huang@oracle.com>
Cc: Takashi Nishiie <t-nishiie@np.css.fujitsu.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix build on COMPAT platforms when CONFIG_EPOLL is disabled
Atsushi Nemoto [Mon, 21 Jul 2008 21:21:37 +0000 (14:21 -0700)]
Fix build on COMPAT platforms when CONFIG_EPOLL is disabled

Add missing cond_syscall() entry for compat_sys_epoll_pwait.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotpm: MAINTAINERS whitespace fix and email addresses addition
Rajiv Andrade [Mon, 21 Jul 2008 21:21:37 +0000 (14:21 -0700)]
tpm: MAINTAINERS whitespace fix and email addresses addition

Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoproc: fix /proc/*/pagemap some more
Alexey Dobriyan [Mon, 21 Jul 2008 21:21:36 +0000 (14:21 -0700)]
proc: fix /proc/*/pagemap some more

struct pagemap_walk was placed on stack, some hooks are initialized, the
rest (->pgd_entry, ->pud_entry, ->pte_entry) are valid but junk.

Reported-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Vegard Nossum" <vegard.nossum@gmail.com>
Cc: <stable@kernel.org> [2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpusets: fix wrong domain attr updates
Miao Xie [Mon, 21 Jul 2008 21:21:35 +0000 (14:21 -0700)]
cpusets: fix wrong domain attr updates

Fix wrong domain attr updates, or we will always update the first sched
domain attr.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogpio: pcf857x: add lock and handle more chips
David Brownell [Mon, 21 Jul 2008 21:21:34 +0000 (14:21 -0700)]
gpio: pcf857x: add lock and handle more chips

Two small updates to the pcf857x driver: (a) the max732[89] chips are
also second sources for the pcf8574/a, and (b) add a mutex to prevent
trashing the cached state.  Adding the lock is effectively a bugfix,
although it seems unlikely that anyone would have run into the issue it
protects against.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agogpio: gpio driver for max7301 SPI GPIO expander
Juergen Beisert [Mon, 21 Jul 2008 21:21:34 +0000 (14:21 -0700)]
gpio: gpio driver for max7301 SPI GPIO expander

Maxim's MAX7301 is an SPI GPIO expander with 28 GPIOs.  Note: MAX7301's
interrupt feature is not supported yet.

[akpm@linux-foundation.org: coding-style fixes]
[g.liakhovetski@pengutronix.de: Fix inaccuracies in comments, check spi_setup()
return code, mask off high byte in max7301_read()]
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoexecve filename: document and export via auxiliary vector
John Reiser [Mon, 21 Jul 2008 21:21:32 +0000 (14:21 -0700)]
execve filename: document and export via auxiliary vector

The Linux kernel puts the filename argument of execve() into the new
address space.  Many developers are surprised to learn this.  Those who
know and could use it, object "But it's not documented."

Those who want to use it dislike the expression
  (char *)(1+ strlen(env[-1+ n_env]) + env[-1+ n_env])
because it requires locating the last original environment variable,
and assumes that the filename follows the characters.

This patch documents the insertion of the filename, and makes it easier
to find by adding a new tag AT_EXECFN in the ElfXX_auxv_t; see <elf.h>.

In many cases readlink("/proc/self/exe",) gives the same answer.  But if
all the original pages get unmapped, then the kernel erases the symlink
for /proc/self/exe.  This can happen when a program decompressor does a
good job of cleaning up after uncompressing directly to memory, so that
the address space of the target program looks the same as if compression
had never happened.  One example is http://upx.sourceforge.net .

One notable use of the underlying concept (what path containED the
executable) is glibc expanding $ORIGIN in DT_RUNPATH.  In practice for
the near term, it may be a good idea for user-mode code to use both
/proc/self/exe and AT_EXECFN as fall-back methods for each other.
/proc/self/exe can fail due to unmapping, AT_EXECFN can fail because it
won't be present on non-new systems.  The auxvec or {AT_EXECFN}.d_val
also can get overwritten, although in nearly all cases this would be the
result of a bug.

The runtime cost is one NEW_AUX_ENT using two words of stack space.  The
underlying value is maintained already as bprm->exec; setup_arg_pages()
in fs/exec.c slides it for stack_shift, etc.

Signed-off-by: John Reiser <jreiser@BitWagon.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge commit 'origin/master'
Benjamin Herrenschmidt [Tue, 22 Jul 2008 07:12:37 +0000 (17:12 +1000)]
Merge commit 'origin/master'

Manually fixed up:

drivers/net/fs_enet/fs_enet-main.c

15 years agoarm: bus_id -> dev_name() and dev_set_name() conversions
Kay Sievers [Fri, 30 May 2008 15:42:11 +0000 (17:42 +0200)]
arm: bus_id -> dev_name() and dev_set_name() conversions

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosparc64: fix up bus_id changes in sparc core code
Greg Kroah-Hartman [Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)]
sparc64: fix up bus_id changes in sparc core code

This converts all instances of bus_id in the sparc core kernel to use
either dev_set_name(), or dev_name() depending on the need.

This is done in anticipation of removing the bus_id field from struct
driver.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years ago3c59x: handle pci_name() being const
Greg Kroah-Hartman [Wed, 2 Jul 2008 19:46:22 +0000 (12:46 -0700)]
3c59x: handle pci_name() being const

This changes vortex_prob1() to handle pci_name() now returning a
constant string.

Cc: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoMTD: handle pci_name() being const
Greg Kroah-Hartman [Wed, 2 Jul 2008 19:46:22 +0000 (12:46 -0700)]
MTD: handle pci_name() being const

This changes the MTD core to handle pci_name() now returning a constant
string.

Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoHP iLO driver
David Altobelli [Wed, 2 Jul 2008 15:38:53 +0000 (09:38 -0600)]
HP iLO driver

A driver for the HP iLO/iLO2 management processor, which allows userspace
programs to query the management processor.  Programs can open a channel
to the device (/dev/hpilo/dXccbN), and use this to send/receive queries.
The O_EXCL open flag is used to indicate that a particular channel cannot
be shared between processes.  This driver will replace various packages
HP has shipped, including hprsm and hp-ilo.

Signed-off-by: David Altobelli <david.altobelli@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute
Andi Kleen [Tue, 1 Jul 2008 16:48:43 +0000 (18:48 +0200)]
sysdev: Convert the x86 mce tolerant sysdev attribute to generic attribute

Use the new generic int attribute accessors for the x86 mce tolerant
attribute. Simple example to illustrate the new macros.

There are much more places all over the tree that could be converted
like this.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosysdev: Add utility functions for simple int/ulong variable sysdev attributes
Andi Kleen [Tue, 1 Jul 2008 16:48:42 +0000 (18:48 +0200)]
sysdev: Add utility functions for simple int/ulong variable sysdev attributes

This adds a new sysdev_ext_attribute that stores a pointer to the variable
it manages and some utility functions/macro to easily use them.

Previously all users wrote custom macros to generate show/store
functions for each variable, with this it is possible to avoid
that in many cases.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosysdev: Pass the attribute to the low level sysdev show/store function
Andi Kleen [Tue, 1 Jul 2008 16:48:41 +0000 (18:48 +0200)]
sysdev: Pass the attribute to the low level sysdev show/store function

This allow to dynamically generate attributes and share show/store
functions between attributes. Right now most attributes are generated
by special macros and lots of duplicated code. With the attribute
passed it's instead possible to attach some data to the attribute
and then use that in shared low level functions to do different things.

I need this for the dynamically generated bank attributes in the x86
machine check code, but it'll allow some further cleanups.

I converted all users in tree to the new show/store prototype. It's a single
huge patch to avoid unbisectable sections.

Runtime tested: x86-32, x86-64
Compiled only: ia64, powerpc
Not compile tested/only grep converted: sh, arm, avr32

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver core: Suppress sysfs warnings for device_rename().
Cornelia Huck [Tue, 10 Jun 2008 09:09:08 +0000 (11:09 +0200)]
driver core: Suppress sysfs warnings for device_rename().

driver core: Suppress sysfs warnings for device_rename().

Renaming network devices to an already existing name is not
something we want sysfs to print a scary warning for, since the
callers can deal with this correctly. So let's introduce
sysfs_create_link_nowarn() which gets rid of the common warning.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agokobject: Transmit return value of call_usermodehelper() to caller
Wang Chen [Tue, 24 Jun 2008 08:59:02 +0000 (16:59 +0800)]
kobject: Transmit return value of call_usermodehelper() to caller

kobject_uevent_env() drops the return value of call_usermodehelper().
It will make upper caller, such as dm_send_uevents(), to lose error
information.

BTW, Previously kobject_uevent_env() transmitted return of
call_usermodehelper() to callers, but
commit 5f123fbd80f4f788554636f02bf73e40f914e0d6
"[PATCH] merge kobject_uevent and kobject_hotplug" removed it.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Cc: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosysfs-rules.txt: reword API stability statement
Nathan Lynch [Wed, 2 Jul 2008 17:21:30 +0000 (10:21 -0700)]
sysfs-rules.txt: reword API stability statement

The first paragraph of this document implies that user space developers
shouldn't use sysfs at all, but then it goes on to describe rules that
developers should follow when accessing sysfs.  Not only is this somewhat
self-contradictory, it has been shown to discourage developers from using
established sysfs interfaces.

A note of caution is more appropriate than a blanket "sysfs will never
be stable" assertion.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodebugfs: Implement debugfs_remove_recursive()
Haavard Skinnemoen [Tue, 1 Jul 2008 13:14:51 +0000 (15:14 +0200)]
debugfs: Implement debugfs_remove_recursive()

debugfs_remove_recursive() will remove a dentry and all its children.
Drivers can use this to zap their whole debugfs tree so that they don't
need to keep track of every single debugfs dentry they created.

It may fail to remove the whole tree in certain cases:

sh-3.2# rmmod atmel-mci < /sys/kernel/debug/mmc0/ios/clock
mmc0: card b368 removed
atmel_mci atmel_mci.0: Lost dma0chan1, falling back to PIO
sh-3.2# ls /sys/kernel/debug/mmc0/
ios

But I'm not sure if that case can be handled in any sane manner.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Pierre Ossman <drzeus-list@drzeus.cx>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoHOWTO: change email addresses of James in HOWTO
Tsugikazu Shibata [Fri, 20 Jun 2008 01:59:52 +0000 (10:59 +0900)]
HOWTO: change email addresses of James in HOWTO

Signed-off-by: Tsugikazu Shibata <tshibata@ab.jp.nec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoalways enable FW_LOADER unless EMBEDDED=y
Adrian Bunk [Tue, 10 Jun 2008 16:04:08 +0000 (19:04 +0300)]
always enable FW_LOADER unless EMBEDDED=y

James Bottomley recently discovered that we have
{request,release}_firmware() dummies for the case of the actual
functions not being available and has a fix for the bug that was
actually causing build errors for built-in users with
CONFIG_FW_LOADER=m.

But now missing selects on FW_LOADER are no longer visible at
compile-time at all and can become runtime problems.

FW_LOADER is infrastructure with relatively small codesize we can safely
enable for everyone, and only for people who really need small kernels
(and can be expected to know what they are doing) it matters being able
to disable it.

This patch therefore always sets FW_LOADER=y and allows users only to
disable it with EMBEDDED=y.

As a bonus, we can then get rid of all "select FW_LOADER" plus the due
to it required "depends on HOTPLUG" which removes some complexity from
our Kconfig files.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agouio-howto.tmpl: use unique output names
Mike Frysinger [Tue, 24 Jun 2008 21:25:00 +0000 (14:25 -0700)]
uio-howto.tmpl: use unique output names

The Userspace I/O HOWTO template sets two different sections with the same
html output name (about.html).  This clearly won't work, so change the
first one to a unique "aboutthis.html" to prevent clobbering.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agouio-howto.tmpl: use standard copyright/legal markings
Mike Frysinger [Tue, 24 Jun 2008 21:24:57 +0000 (14:24 -0700)]
uio-howto.tmpl: use standard copyright/legal markings

The Userspace I/O HOWTO document uses straight <sect1> tags and plain text
to describe copyright/legal information.  It should instead use the
<copyright> and <legalnotice> tags like all other documents in the kernel.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosysfs: don't call notify_change
Miklos Szeredi [Mon, 16 Jun 2008 11:46:47 +0000 (13:46 +0200)]
sysfs: don't call notify_change

sysfs_chmod_file() calls notify_change() to change the permission bits
on a sysfs file.  Replace with explicit call to sysfs_setattr() and
fsnotify_change().

This is equivalent, except that security_inode_setattr() is not
called.  This function is called by drivers, so the security checks do
not make any sense.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agosysdev: fix debugging statements in registration code.
Ben Dooks [Thu, 12 Jun 2008 18:00:34 +0000 (19:00 +0100)]
sysdev: fix debugging statements in registration code.

The systdev_class_register() and sysdev_register() functions have
pr_debug() statements which are enabled when the user selects the
driver core debug. Both of these routines do not produce the
correct output, as they make assumptions about data which has not
been initialised.

In sysdev_class_register() the code uses the kobject_name(&cls->kset.kobj)
at the start of the function, but this is not setup until later in the
same call. Change this to use cls->name which is passed in from the caller.

The sysdev_register() function tries to get the name of the sysdev by
kobject_name(&sysdev->kobj), but that isn't setup until later in the same
function so change this message to use the name of the sysdev's class and
add another message once the name is initialised.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>