pandora-kernel.git
15 years agoUSB: mos7840: test and propagate set_uart_reg return value
Roel Kluin [Thu, 17 Apr 2008 04:16:24 +0000 (06:16 +0200)]
USB: mos7840: test and propagate set_uart_reg return value

The test for an mos7840_set_uart_reg() error return value only works when
status is signed. propagate its error value.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: SL Baur <steve@xemacs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: usbtest displays diagnostics again
David Brownell [Sat, 26 Apr 2008 01:51:10 +0000 (18:51 -0700)]
USB: usbtest displays diagnostics again

Minor cleanup to the "usbtest" driver, mostly to resolve a regression:
all the important diagnostics were at KERN_DEBUG, so that when the
"#define DEBUG" was removed from the top of that file it stopped
providing diagnostics.  Fix by using KERN_ERROR.  Also:

 - Stop using the legacy dbg() calls
 - Simplify the internal debug macros
 - Correct some test descriptions:
* Test #10 subcase 7 should *always* stall
* Test #10 subcase 8 *may* stall
 - Diagnostic about control queue test failures is more informative
 - Fix some whitespace "bugs"

And add a warning about the rude interaction between usbfs ioctl()
and khubd during device disconnect ... don't unplug a device under
test, that will wedge.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoub: Cosmetics
Pete Zaitcev [Sat, 19 Apr 2008 21:45:24 +0000 (14:45 -0700)]
ub: Cosmetics

Fix a few comments and printk statements.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoub: Ignore bad residue
Pete Zaitcev [Sat, 19 Apr 2008 21:42:49 +0000 (14:42 -0700)]
ub: Ignore bad residue

I hoped to continue to ignore this problem or use libusual, but these
days it's simpler to work around than to deal with it. Let's attempt to
use bad residue devices and hope that upper level integrity checks catch
any problems (e.g. please use sha1sum on your backups).

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoub: Tune retries
Pete Zaitcev [Sat, 19 Apr 2008 21:35:30 +0000 (14:35 -0700)]
ub: Tune retries

Make ub to fail faster in hopeless cases.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoub: Fix timeouts
Pete Zaitcev [Sat, 19 Apr 2008 21:32:18 +0000 (14:32 -0700)]
ub: Fix timeouts

The wodim says:
"close track/session scsi sendcmd: cmd timeout after 5.000 (480) s"
This happened because we ignored the supplied timeout and used 5s.

It's not completely correct to apply a timeout meant for the complete
command to any single URB, but we don't have many URBs per command, so
this is simple and works.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: libusual kthread_run() called with wrong format.
Rusty Russell [Sun, 20 Apr 2008 20:38:34 +0000 (06:38 +1000)]
usb: libusual kthread_run() called with wrong format.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb-storage: add unusual_devs entry for Samsung YP-U3
Alan Stern [Mon, 28 Apr 2008 14:26:13 +0000 (10:26 -0400)]
usb-storage: add unusual_devs entry for Samsung YP-U3

This patch (as1088) adds an unusual_devs entry for Samsung's YP-U3.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage/onetouch.c: make a function static
Adrian Bunk [Mon, 28 Apr 2008 15:39:37 +0000 (18:39 +0300)]
USB: storage/onetouch.c: make a function static

This patch makes the needlessly global onetouch_release_input() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb-storage: fix build failure in OneTouch driver
Dmitry Torokhov [Mon, 28 Apr 2008 20:57:14 +0000 (16:57 -0400)]
usb-storage: fix build failure in OneTouch driver

If USB storage is built-in but input subsystem is made modular then
OneTouch button functionality can not be selected.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: ldusb: ld_usb semaphore to mutex
Daniel Walker [Mon, 28 Apr 2008 17:34:56 +0000 (10:34 -0700)]
usb: ldusb: ld_usb semaphore to mutex

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Acked-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ISP1760 HCD driver
Sebastian Siewior [Wed, 23 Apr 2008 22:37:04 +0000 (00:37 +0200)]
USB: ISP1760 HCD driver

This driver has been written from scratch and supports the ISP1760. ISP1761
might (should) work as well but the OTG isn't supported. Also ISO packets are
not. However, it works on my little PowerPC board.

Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodriver-core: add dev_name() to help transition away from using bus_id
Kay Sievers [Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)]
driver-core: add dev_name() to help transition away from using bus_id

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
16 years ago[SCSI] add support for variable length extended commands
Boaz Harrosh [Wed, 30 Apr 2008 08:27:26 +0000 (11:27 +0300)]
[SCSI] add support for variable length extended commands

Add support for variable-length, extended, and vendor specific
CDBs to scsi-ml. It is now possible for initiators and ULD's
to issue these types of commands. LLDs need not change much.
All they need is to raise the .max_cmd_len to the longest command
they support (see iscsi patch).

- clean-up some code paths that did not expect commands to be
  larger than 16, and change cmd_len members' type to short as
  char is not enough.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-genirq
Linus Torvalds [Fri, 2 May 2008 15:22:36 +0000 (08:22 -0700)]
Merge git://git./linux/kernel/git/tglx/linux-2.6-genirq

* git://git.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-genirq:
  genirq: reenable a nobody cared disabled irq when a new driver arrives

16 years agoMerge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
Linus Torvalds [Fri, 2 May 2008 15:20:43 +0000 (08:20 -0700)]
Merge branch 'for-linus' of git://linux-m32r.org/git/takata/linux-2.6_dev

* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
  m32r: cleanup: drop .data.idt section in vmlinux.lds script
  m32r: use KBUILD_DEFCONFIG

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Fri, 2 May 2008 15:20:04 +0000 (08:20 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  lguest: make Launcher see device status updates
  lguest: remove bogus NULL cpu check
  lguest: avoid using NR_CPUS as a bounds check.
  virtio: add virtio disk geometry feature
  virtio: explicit advertisement of driver features
  virtio: change config to guest endian.
  virtio: finer-grained features for virtio_net
  virtio: wean net driver off NETDEV_TX_BUSY
  virtio-blk: fix remove oops
  virtio: fix scatterlist sizing in net driver.
  virtio: de-structify virtio_block status byte
  virtio: export more headers to userspace
  virtio: fix sparse return void-valued expression warnings
  virtio: fix tx_ stats in virtio_net
  virtio: ignore corrupted virtqueues rather than spinning.

16 years ago[SCSI] Let scsi_cmnd->cmnd use request->cmd buffer
Boaz Harrosh [Wed, 30 Apr 2008 08:19:47 +0000 (11:19 +0300)]
[SCSI] Let scsi_cmnd->cmnd use request->cmd buffer

 - struct scsi_cmnd had a 16 bytes command buffer of its own.
   This is an unnecessary duplication and copy of request's
   cmd. It is probably left overs from the time that scsi_cmnd
   could function without a request attached. So clean that up.

 - Once above is done, few places, apart from scsi-ml, needed
   adjustments due to changing the data type of scsi_cmnd->cmnd.

 - Lots of drivers still use MAX_COMMAND_SIZE. So I have left
   that #define but equate it to BLK_MAX_CDB. The way I see it
   and is reflected in the patch below is.
   MAX_COMMAND_SIZE - means: The longest fixed-length (*) SCSI CDB
                      as per the SCSI standard and is not related
                      to the implementation.
   BLK_MAX_CDB.     - The allocated space at the request level

 - I have audit all ISA drivers and made sure none use ->cmnd in a DMA
   Operation. Same audit was done by Andi Kleen.

(*)fixed-length here means commands that their size can be determined
   by their opcode and the CDB does not carry a length specifier, (unlike
   the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly
   true and the SCSI standard also defines extended commands and
   vendor specific commands that can be bigger than 16 bytes. The kernel
   will support these using the same infrastructure used for VARLEN CDB's.
   So in effect MAX_COMMAND_SIZE means the maximum size command
   scsi-ml supports without specifying a cmd_len by ULD's

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 2 May 2008 15:17:58 +0000 (08:17 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] fix file and descriptor handling in perfmon
  [IA64] TS_RESTORE_SIGMASK
  [IA64] smp.c coding style fix
  [IA64] fix section mismatch in arch/ia64/kernel/topology.c
  [IA64] fix section mismatch in arch/ia64/kernel/palinfo.c
  [IA64] fix section mismatch in arch/ia64/kernel/irq.c
  [IA64] fix section mismatch in arch/ia64/kernel/acpi.c

16 years ago[SCSI] bsg: add large command support
FUJITA Tomonori [Wed, 30 Apr 2008 04:16:21 +0000 (13:16 +0900)]
[SCSI] bsg: add large command support

This enables bsg to handle the request length larger than BLK_MAX_CDB
(mainly for the variable length CDB format).

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] aacraid: Fix down_interruptible() to check the return value correctly
Mark Salyzyn [Wed, 23 Apr 2008 12:16:06 +0000 (08:16 -0400)]
[SCSI] aacraid: Fix down_interruptible() to check the return value correctly

On Apr 21, 2008, at 8:42 PM, Yinghai Lu wrote:
> bisected to:
>
> commit e6990c6448ca9359b6d4ad027c0a6efbf4379e64
> Author: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
> Date:   Mon Apr 14 14:20:16 2008 -0400
>
>    [SCSI] aacraid: Fix down_interruptible() to check the return value

The return value for down_interruptible was incorrectly checked!
updated patch enclosed.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years agosparc32: Delete prom_stdin and prom_stdout.
David S. Miller [Fri, 2 May 2008 05:33:04 +0000 (22:33 -0700)]
sparc32: Delete prom_stdin and prom_stdout.

They are written, but never used.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc32: More memory probing consolidation.
David S. Miller [Fri, 2 May 2008 05:28:17 +0000 (22:28 -0700)]
sparc32: More memory probing consolidation.

The PROM library function prom_meminit() builds a table,
prom_phys_avail[], just so that probe_memory() in
arch/sparc/mm/fault.c can copy it into sp_banks[].

Just have prom_meminit() fill in the sp_banks[] array directly, and
remove duplicated sort() function.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc32: Kill totally unused memory information tables.
David S. Miller [Fri, 2 May 2008 04:28:59 +0000 (21:28 -0700)]
sparc32: Kill totally unused memory information tables.

The code in arch/sparc/prom/memory.c computes three tables, the list
of total memory, the list of available memory (total minus what
firmware is using), and the list of firmware taken memory.

Only the available memory list is even used.

Therefore, kill those unused tables and make prom_meminfo() return
just the available memory list.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc64: Fix syscall restart, for real...
David S. Miller [Thu, 1 May 2008 10:30:22 +0000 (03:30 -0700)]
sparc64: Fix syscall restart, for real...

The change I put into copy_thread() just papered over the real
problem.

When we are looking to see if we should do a syscall restart, when
deliverying a signal, we should only interpret the syscall return
value as an error if the carry condition code(s) are set.

Otherwise it's a success return.

Also, sigreturn paths should do a pt_regs_clear_trap_type().

It turns out that doing a syscall restart when returning from a fork()
does and should happen, from time to time.  Even if copy_thread()
returns success, copy_process() can still unwind and signal
-ERESTARTNOINTR in the parent.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoserial: Fix sparc driver name strings.
David S. Miller [Thu, 1 May 2008 08:14:27 +0000 (01:14 -0700)]
serial: Fix sparc driver name strings.

They were all "serial" so if multiple of these drivers registered,
we'd trigger sysfs directory creation errors:

[    1.695793] proc_dir_entry 'serial' already registered
[    1.695839] Call Trace:
[    1.831891]  [00000000004f2534] create_proc_entry+0x7c/0x98
[    1.833608]  [00000000004f3a58] proc_tty_register_driver+0x40/0x70
[    1.833663]  [0000000000594700] tty_register_driver+0x1fc/0x208
[    1.835371]  [00000000005aade4] uart_register_driver+0x134/0x16c
[    1.841762]  [00000000005ac274] sunserial_register_minors+0x34/0x68
[    1.841818]  [00000000007db2a4] sunsu_init+0xf8/0x150
[    1.867697]  [00000000007c62a4] kernel_init+0x190/0x330
[    1.939147]  [0000000000426cf8] kernel_thread+0x38/0x48
[    1.939198]  [00000000006a0d90] rest_init+0x18/0x5c

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc64: Stop creating dummy root PCI host controller devices.
David S. Miller [Thu, 1 May 2008 08:12:40 +0000 (01:12 -0700)]
sparc64: Stop creating dummy root PCI host controller devices.

It just creates confusion, errors, and bugs.

For one thing, this can cause dup sysfs or procfs nodes to get
created:

[    1.198015] proc_dir_entry '00.0' already registered
[    1.198036] Call Trace:
[    1.198052]  [00000000004f2534] create_proc_entry+0x7c/0x98
[    1.198092]  [00000000005719e4] pci_proc_attach_device+0xa4/0xd4
[    1.198126]  [00000000007d991c] pci_proc_init+0x64/0x88
[    1.198158]  [00000000007c62a4] kernel_init+0x190/0x330
[    1.198183]  [0000000000426cf8] kernel_thread+0x38/0x48
[    1.198210]  [00000000006a0d90] rest_init+0x18/0x5c

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agolguest: make Launcher see device status updates
Rusty Russell [Sat, 3 May 2008 02:50:53 +0000 (21:50 -0500)]
lguest: make Launcher see device status updates

This brings us closer to Real Life, where we'd examine the device
features once it's set the DRIVER_OK status bit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: remove bogus NULL cpu check
Rusty Russell [Sat, 3 May 2008 02:50:51 +0000 (21:50 -0500)]
lguest: remove bogus NULL cpu check

If lg isn't NULL, and cpu_id is sane, &lg->cpus[cpu_id] can't be NULL.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agolguest: avoid using NR_CPUS as a bounds check.
Rusty Russell [Sat, 3 May 2008 02:50:51 +0000 (21:50 -0500)]
lguest: avoid using NR_CPUS as a bounds check.

NR_CPUS (being a host number) is an arbitrary limit for the Guest.
Using the array size directly (which currently happes to be NR_CPUS)
is more futureproof.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: add virtio disk geometry feature
Ryan Harper [Wed, 16 Apr 2008 18:56:37 +0000 (13:56 -0500)]
virtio: add virtio disk geometry feature

Rather than faking up some geometry, allow the backend to push the disk
geometry via virtio pci config option.  Keep the old geo code around for
compatibility.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified to single struct)
16 years agovirtio: explicit advertisement of driver features
Rusty Russell [Sat, 3 May 2008 02:50:50 +0000 (21:50 -0500)]
virtio: explicit advertisement of driver features

A recent proposed feature addition to the virtio block driver revealed
some flaws in the API: in particular, we assume that feature
negotiation is complete once a driver's probe function returns.

There is nothing in the API to require this, however, and even I
didn't notice when it was violated.

So instead, we require the driver to specify what features it supports
in a table, we can then move the feature negotiation into the virtio
core.  The intersection of device and driver features are presented in
a new 'features' bitmap in the struct virtio_device.

Note that this highlights the difference between Linux unsigned-long
bitmaps where each unsigned long is in native endian, and a
straight-forward little-endian array of bytes.

Drivers can still remove feature bits in their probe routine if they
really have to.

API changes:
- dev->config->feature() no longer gets and acks a feature.
- drivers should advertise their features in the 'feature_table' field
- use virtio_has_feature() for extra sanity when checking feature bits

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: change config to guest endian.
Rusty Russell [Sat, 3 May 2008 02:50:49 +0000 (21:50 -0500)]
virtio: change config to guest endian.

A recent proposed feature addition to the virtio block driver revealed
some flaws in the API, in particular how easy it is to break big
endian machines.

The virtio config space was originally chosen to be little-endian,
because we thought the config might be part of the PCI config space
for virtio_pci.  It's actually a separate mmio region, so that
argument holds little water; as only x86 is currently using the virtio
mechanism, we can change this (but must do so now, before the
impending s390 merge).

API changes:
- __virtio_config_val() just becomes a striaght vdev->config_get() call.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: finer-grained features for virtio_net
Rusty Russell [Sat, 3 May 2008 02:50:46 +0000 (21:50 -0500)]
virtio: finer-grained features for virtio_net

So, we previously had a 'VIRTIO_NET_F_GSO' bit which meant that 'the
host can handle csum offload, and any TSO (v4&v6 incl ECN) or UFO
packets you might want to send.  I thought this was good enough for
Linux, but it actually isn't, since we don't do UFO in software.

So, add separate feature bits for what the host can handle.  Add
equivalent ones for the guest to say what it can handle, because LRO
is coming too (thanks Herbert!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: wean net driver off NETDEV_TX_BUSY
Rusty Russell [Sat, 3 May 2008 02:50:46 +0000 (21:50 -0500)]
virtio: wean net driver off NETDEV_TX_BUSY

Herbert tells me that returning NETDEV_TX_BUSY from hard_start_xmit is
seen as a poor thing to do; we should cache the packet and stop the queue.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agovirtio-blk: fix remove oops
Marcelo Tosatti [Thu, 24 Apr 2008 18:49:53 +0000 (15:49 -0300)]
virtio-blk: fix remove oops

Do not unregister the major at device remove, since there might be
another device instances around.

(qemu) pci_del 0 11
(qemu) ACPI: PCI interrupt for device 0000:00:0b.0 disabled
(qemu) pci_del 0 10
(qemu) ------------[ cut here ]------------
WARNING: at block/genhd.c:126 unregister_blkdev+0x74/0x9e()
ACPI: PCI interrupt for device 0000:00:0a.0 disabled

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: fix scatterlist sizing in net driver.
Rusty Russell [Sat, 3 May 2008 02:50:45 +0000 (21:50 -0500)]
virtio: fix scatterlist sizing in net driver.

Herbert Xu points out (within another patch) that my scatterlists are
too short: one entry for the gso header, one for the skb->data, and
MAX_SKB_FRAGS for all the fragments.

Fix both xmit and recv sides (recv currently unused, coming in later
patch).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: de-structify virtio_block status byte
Rusty Russell [Sat, 3 May 2008 02:50:45 +0000 (21:50 -0500)]
virtio: de-structify virtio_block status byte

Ron Minnich points out that a struct containing a char is not always
sizeof(char); simplest to remove the structure to avoid confusion.

Cc: "ron minnich" <rminnich@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: export more headers to userspace
Christian Borntraeger [Wed, 23 Apr 2008 10:57:00 +0000 (12:57 +0200)]
virtio: export more headers to userspace

Rusty,

is there a reason why we dont export the virtio headers for
9p, balloon, console, pci, and virtio_ring? kvm uses make sync,
but I think it is still useful to heave these headers exported
as they might be useful for other userspace tools.

I dont export virtio.h, because it does not seem to have useful
information for userspace and it requires scatterlist.h which is
also not exported. See also my other mail about your "virtio:
change config to guest endian." patch.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: fix sparse return void-valued expression warnings
Harvey Harrison [Tue, 1 Apr 2008 00:53:55 +0000 (17:53 -0700)]
virtio: fix sparse return void-valued expression warnings

drivers/virtio/virtio_pci.c:148:2: warning: returning void-valued expression
drivers/virtio/virtio_pci.c:155:2: warning: returning void-valued expression

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: fix tx_ stats in virtio_net
Rusty Russell [Sat, 3 May 2008 02:50:43 +0000 (21:50 -0500)]
virtio: fix tx_ stats in virtio_net

get_buf() gives the length written by the other side, which will be
zero.  We want to add the skb length.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agovirtio: ignore corrupted virtqueues rather than spinning.
Rusty Russell [Sat, 3 May 2008 02:50:43 +0000 (21:50 -0500)]
virtio: ignore corrupted virtqueues rather than spinning.

A corrupt virtqueue (caused by the other end screwing up) can have
strange results such as a driver spinning: just bail when we try to
get a buffer from a known-broken queue.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
16 years agogenirq: reenable a nobody cared disabled irq when a new driver arrives
Thomas Gleixner [Mon, 28 Apr 2008 15:01:56 +0000 (17:01 +0200)]
genirq: reenable a nobody cared disabled irq when a new driver arrives

Uwe Kleine-Koenig has some strange hardware where one of the shared
interrupts can be asserted during boot before the appropriate driver
loads. Requesting the shared irq line from another driver result in a
spurious interrupt storm which finally disables the interrupt line.

I have seen similar behaviour on resume before (the hardware does not
work anymore so I can not verify).

Change the spurious disable logic to increment the disable depth and
mark the interrupt with an extra flag which allows us to reenable the
interrupt when a new driver arrives which requests the same irq
line. In the worst case this will disable the irq again via the
spurious trap, but there is a decent chance that the new driver is the
one which can handle the already asserted interrupt and makes the box
usable again.

Eric Biederman said further: This case also happens on a regular basis
in kdump kernels where we deliberately don't shutdown the hardware
before starting the new kernel.  This patch should reduce the need for
using irqpoll in that situation by a small amount.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-and-Acked-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
16 years agonetns: assign PDE->data before gluing entry into /proc tree
Denis V. Lunev [Fri, 2 May 2008 11:12:41 +0000 (04:12 -0700)]
netns: assign PDE->data before gluing entry into /proc tree

In this unfortunate case, proc_mkdir_mode wrapper can't be used anymore and
this is no way to reuse proc_create_data due to nlinks assignment. So,
copy the code from proc_mkdir and assign PDE->data at the appropriate
moment.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: assign PDE->data before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 11:11:52 +0000 (04:11 -0700)]
netfilter: assign PDE->data before gluing PDE into /proc tree

Replace proc_net_fops_create with proc_create_data.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: assign PDE->fops before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 11:10:57 +0000 (04:10 -0700)]
netfilter: assign PDE->fops before gluing PDE into /proc tree

Replace create_proc_entry with specially created for this purpose proc_create.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipv4: assign PDE->data before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 11:10:08 +0000 (04:10 -0700)]
ipv4: assign PDE->data before gluing PDE into /proc tree

The check for PDE->data != NULL becomes useless after the replacement
of proc_net_fops_create with proc_create_data.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovlan: assign PDE->data before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 11:09:11 +0000 (04:09 -0700)]
vlan: assign PDE->data before gluing PDE into /proc tree

Simply replace proc_create and further data assigned with proc_create_data.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoatm: assign PDE->data before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 11:08:30 +0000 (04:08 -0700)]
atm: assign PDE->data before gluing PDE into /proc tree

Simply replace proc_create and further data assigned with proc_create_data.
proc_atm_dev_ops holds proper referrence.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoipv6: assign PDE->data before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 09:46:55 +0000 (02:46 -0700)]
ipv6: assign PDE->data before gluing PDE into /proc tree

Simply replace proc_create and further data assigned with proc_create_data.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: assign PDE->data before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 09:46:22 +0000 (02:46 -0700)]
net: assign PDE->data before gluing PDE into /proc tree

Simply replace proc_create and further data assigned with proc_create_data.
Additionally, there is no need to assign NULL to PDE->data after creation,
/proc generic has already done this for us.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: assign PDE->data before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 09:45:42 +0000 (02:45 -0700)]
netfilter: assign PDE->data before gluing PDE into /proc tree

Simply replace proc_create and further data assigned with proc_create_data.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosunrpc: assign PDE->data before gluing PDE into /proc tree
Denis V. Lunev [Fri, 2 May 2008 09:44:36 +0000 (02:44 -0700)]
sunrpc: assign PDE->data before gluing PDE into /proc tree

Simply replace proc_create and further data assigned with proc_create_data.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[POWERPC] Bolt in SLB entry for kernel stack on secondary cpus
Paul Mackerras [Fri, 2 May 2008 04:29:12 +0000 (14:29 +1000)]
[POWERPC] Bolt in SLB entry for kernel stack on secondary cpus

This fixes a regression reported by Kamalesh Bulabel where a POWER4
machine would crash because of an SLB miss at a point where the SLB
miss exception was unrecoverable.  This regression is tracked at:

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

SLB misses at such points shouldn't happen because the kernel stack is
the only memory accessed other than things in the first segment of the
linear mapping (which is mapped at all times by entry 0 of the SLB).
The context switch code ensures that SLB entry 2 covers the kernel
stack, if it is not already covered by entry 0.  None of entries 0
to 2 are ever replaced by the SLB miss handler.

Where this went wrong is that the context switch code assumes it
doesn't have to write to SLB entry 2 if the new kernel stack is in the
same segment as the old kernel stack, since entry 2 should already be
correct.  However, when we start up a secondary cpu, it calls
slb_initialize, which doesn't set up entry 2.  This is correct for
the boot cpu, where we will be using a stack in the kernel BSS at this
point (i.e. init_thread_union), but not necessarily for secondary
cpus, whose initial stack can be allocated anywhere.  This doesn't
cause any immediate problem since the SLB miss handler will just
create an SLB entry somewhere else to cover the initial stack.

In fact it's possible for the cpu to go quite a long time without SLB
entry 2 being valid.  Eventually, though, the entry created by the SLB
miss handler will get overwritten by some other entry, and if the next
access to the stack is at an unrecoverable point, we get the crash.

This fixes the problem by making slb_initialize create a suitable
entry for the kernel stack, if we are on a secondary cpu and the stack
isn't covered by SLB entry 0.  This requires initializing the
get_paca()->kstack field earlier, so I do that in smp_create_idle
where the current field is initialized.  This also abstracts a bit of
the computation that mk_esid_data in slb.c does so that it can be used
in slb_initialize.

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] PS3: Update ps3_defconfig
Geoff Levand [Wed, 30 Apr 2008 22:25:36 +0000 (08:25 +1000)]
[POWERPC] PS3: Update ps3_defconfig

Update ps3_defconfig.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] PS3: Remove unsupported wakeup sources
Geoff Levand [Wed, 30 Apr 2008 22:25:30 +0000 (08:25 +1000)]
[POWERPC] PS3: Remove unsupported wakeup sources

Other OS wakeup is not supported from the IR controller,
the bluetooth controller nor the RTC.  Remove references
to these in the PS3 sys-manager source.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] PS3: Make ps3_virq_setup and ps3_virq_destroy static
Geert Uytterhoeven [Wed, 30 Apr 2008 22:25:18 +0000 (08:25 +1000)]
[POWERPC] PS3: Make ps3_virq_setup and ps3_virq_destroy static

The routines ps3_virq_setup() and ps3_virq_destroy() are used
in only one file, so make them static.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] PS3: Add time include to lpm
FUJITA Tomonori [Wed, 30 Apr 2008 22:25:09 +0000 (08:25 +1000)]
[POWERPC] PS3: Add time include to lpm

Add an include <asm/time.h> statement for get_tb().

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix slb.c compile warnings
Geoff Levand [Wed, 30 Apr 2008 22:24:58 +0000 (08:24 +1000)]
[POWERPC] Fix slb.c compile warnings

Arrange for a syntax check to always be done on the powerpc/mm/slb.c
DBG() macro by defining it to pr_debug() for non-debug builds.

Also, fix these related compile warnings:

  slb.c:273: warning: format '%04x' expects type 'unsigned int', but argument 2 has type 'long unsigned int
  slb.c:274: warning: format '%04x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoMerge branch 'powerpc-next' of master.kernel.org:/pub/scm/linux/kernel/git/galak...
Paul Mackerras [Fri, 2 May 2008 04:45:50 +0000 (14:45 +1000)]
Merge branch 'powerpc-next' of /linux/kernel/git/galak/powerpc

16 years ago[POWERPC] Xilinx: Fix compile warnings
Kumar Gala [Wed, 30 Apr 2008 15:24:44 +0000 (10:24 -0500)]
[POWERPC] Xilinx: Fix compile warnings

arch/powerpc/sysdev/xilinx_intc.c: In function 'xilinx_intc_init':
arch/powerpc/sysdev/xilinx_intc.c:111: warning: format '%08X' expects type 'unsigned int', but argument 2 has type 'resource_size_t'
drivers/char/xilinx_hwicap/xilinx_hwicap.c: In function 'hwicap_setup':
drivers/char/xilinx_hwicap/xilinx_hwicap.c:626: warning: cast to pointer from integer of different size
drivers/char/xilinx_hwicap/xilinx_hwicap.c:646: warning: format '%x' expects type 'unsigned int', but argument 6 has type 'resource_size_t'

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Squash build warning for print of resource_size_t in fsl_soc.c
Becky Bruce [Thu, 1 May 2008 23:15:45 +0000 (18:15 -0500)]
[POWERPC] Squash build warning for print of resource_size_t in fsl_soc.c

When resource_size_t is larger than an int, the current code
generates a build warning.  Kill it.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[RAPIDIO] fix current kernel-doc notation
Randy Dunlap [Wed, 30 Apr 2008 23:45:58 +0000 (16:45 -0700)]
[RAPIDIO] fix current kernel-doc notation

Fix current (-git16) missing docbook/kernel-doc notation in RapidIO files.

Warning(linux-2.6.25-git16//include/linux/rio.h:187): No description found for parameter 'sys_size'
Warning(linux-2.6.25-git16//include/linux/rio.h:187): No description found for parameter 'phy_type'

Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:188): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:224): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:245): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:270): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:311): No description found for parameter 'mport'
Warning(linux-2.6.25-git16//arch/powerpc/sysdev/fsl_rio.c:996): No description found for parameter 'dev'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 86xx: mpc8610_hpcd: add support for PCI Express x8 slot
Anton Vorontsov [Tue, 29 Apr 2008 16:41:12 +0000 (20:41 +0400)]
[POWERPC] 86xx: mpc8610_hpcd: add support for PCI Express x8 slot

This patch adds pcie node which is resposible for PCI-E x8 slot
functioning. Though, this was tested using only x1 SKY2 NIC.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Thu, 1 May 2008 23:04:59 +0000 (16:04 -0700)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6

16 years agort2x00: Fix quality/activity led handling
Ivo van Doorn [Mon, 21 Apr 2008 17:01:09 +0000 (19:01 +0200)]
rt2x00: Fix quality/activity led handling

There was an obvious typo in LED structure
initialization which caused the radio and quality/activity
leds to be incorrectly initialized which resulted in
the leds not being enabled.

Additionally add the rt2x00led_led_activity() handler
that will enable TX/RX activity leds when the radio
is being enabled.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Don't enable short preamble for 1MBs
Ivo van Doorn [Mon, 21 Apr 2008 17:00:17 +0000 (19:00 +0200)]
rt2x00: Don't enable short preamble for 1MBs

The timing settings for 1MBs should exclude
the short preamble bit since that only applies
to 2MBs, 5.5MBs and 11MBs.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoMake linux/wireless.h be able to compile
Kirill A. Shutemov [Tue, 22 Apr 2008 13:38:55 +0000 (16:38 +0300)]
Make linux/wireless.h be able to compile

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix debug messages during scanning
Bill Moss [Thu, 17 Apr 2008 23:03:40 +0000 (16:03 -0700)]
iwlwifi: fix debug messages during scanning

direct_mask will be set when we are not associated and requesting a
direct scan. The second debug print will be confusing as priv->essid
is not set at that time and it will thus print "<hidden>" while it is
known to which AP a direct scan is requested - as previous debug message
also indicates.

Now make all debugging consistent.

Signed-off-by: Bill Moss <bmoss@clemson.edu>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix current channel is not scanned
Guy Cohen [Mon, 21 Apr 2008 22:41:57 +0000 (15:41 -0700)]
iwlwifi: fix current channel is not scanned

All channels should be scanned, including the current channel
when the client is associated.

Removed also unused flag to scan only active channels.

Signed-off-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Fix some TX/RX locking issues
Michael Buesch [Fri, 25 Apr 2008 17:29:08 +0000 (19:29 +0200)]
b43: Fix some TX/RX locking issues

This fixes some TX/RX related locking issues.
With this patch applied, some of the PHY transmission errors are fixed.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[IA64] fix file and descriptor handling in perfmon
Al Viro [Thu, 1 May 2008 21:36:36 +0000 (14:36 -0700)]
[IA64] fix file and descriptor handling in perfmon

Races galore...  General rule: as soon as it's in descriptor table,
it's over; another thread might have started IO on it/dup2() it
elsewhere/dup2() something *over* it/etc.  fd_install() is the very
last step one should take - it's a point of no return.

Besides, the damn thing leaked on failure exits...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] TS_RESTORE_SIGMASK
Roland McGrath [Wed, 30 Apr 2008 21:40:14 +0000 (14:40 -0700)]
[IA64] TS_RESTORE_SIGMASK

Replace TIF_RESTORE_SIGMASK with TS_RESTORE_SIGMASK and define
our own set_restore_sigmask() function.  This saves the costly
SMP-safe set_bit operation, which we do not need for the sigmask
flag since TIF_SIGPENDING always has to be set too.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] smp.c coding style fix
Hidetoshi Seto [Wed, 30 Apr 2008 09:55:48 +0000 (18:55 +0900)]
[IA64] smp.c coding style fix

Fix indenting of switch statement to follow CodingStyle, and
pull out handling of call_data into an inlined function.

I confirmed that applying this fix doesn't affect assembled code.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoslub: #ifdef simplification
Christoph Lameter [Tue, 29 Apr 2008 23:16:06 +0000 (16:16 -0700)]
slub: #ifdef simplification

If we make SLUB_DEBUG depend on SYSFS then we can simplify some
#ifdefs and avoid others.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslabinfo: Support printout of the number of fallbacks
Christoph Lameter [Tue, 29 Apr 2008 23:14:46 +0000 (16:14 -0700)]
slabinfo: Support printout of the number of fallbacks

Add functionality to slabinfo to print out the number of fallbacks
that have occurred for each slab cache when the -D option is specified.
Also widen the allocation / free field since the numbers became
too big after a week.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoslub: Whitespace cleanup and use of strict_strtoul
Christoph Lameter [Tue, 29 Apr 2008 23:11:12 +0000 (16:11 -0700)]
slub: Whitespace cleanup and use of strict_strtoul

Fix some issues with wrapping and use strict_strtoul to make parameter
passing from sysfs safer.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Thu, 1 May 2008 18:31:38 +0000 (11:31 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: fw-sbp2: log scsi_target ID at release
  ieee1394: fix NULL pointer dereference in sysfs access

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-linus
Linus Torvalds [Thu, 1 May 2008 18:31:24 +0000 (11:31 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-linus:
  kbuild: fix vmlinux.o link
  kconfig: made check-lxdialog more portable

16 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Thu, 1 May 2008 18:15:28 +0000 (11:15 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6:
  [MTD][NOR] Add physical address to point() method
  [JFFS2] Track parent inode for directories (for NFS export)
  [JFFS2] Invert last argument of jffs2_gc_fetch_inode(), make it boolean.
  [JFFS2] Quiet lockdep false positive.
  [JFFS2] Clean up jffs2_alloc_inode() and jffs2_i_init_once()
  [MTD] Delete long-unused jedec.h header file.
  [MTD] [NAND] at91_nand: use at91_nand_{en,dis}able consistently.

16 years agoFix a potential issue in mpc52xx uart driver
Andrew Liu [Tue, 29 Apr 2008 07:36:25 +0000 (17:36 +1000)]
Fix a potential issue in mpc52xx uart driver

mpc52xx_uart_int and __uart_put_char both try to acquire the
port->lock. Therefore the function sequence of:

mpc52xx_uart_int--> ...-->flush_to_ldisc-->...-->__uart_put_char

can potentially trigger a deadlock. To avoid this deadlock a fix
similar to that found in the 8250.c serial driver is applied. The
deadlock is avoided by releasing the lock before pushing a buffer
and reacquiring it when completed.

Signed-off-by: Andrew Liu <shengping.liu@windriver.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
16 years ago[MTD][NOR] Add physical address to point() method
Jared Hulbert [Wed, 30 Apr 2008 06:26:49 +0000 (23:26 -0700)]
[MTD][NOR] Add physical address to point() method

Adding the ability to get a physical address from point() in addition
to virtual address.  This physical address is required for XIP of
userspace code from flash.

Signed-off-by: Jared Hulbert <jaredeh@gmail.com>
Reviewed-by: Jörn Engel <joern@logfs.org>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years agofirewire: fw-sbp2: log scsi_target ID at release
Stefan Richter [Thu, 24 Apr 2008 21:17:47 +0000 (23:17 +0200)]
firewire: fw-sbp2: log scsi_target ID at release

Makes the good-by message more informative.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Jarod Wilson <jwilson@redhat.com>
16 years agoieee1394: fix NULL pointer dereference in sysfs access
Stefan Richter [Thu, 1 May 2008 08:43:04 +0000 (10:43 +0200)]
ieee1394: fix NULL pointer dereference in sysfs access

Regression since "ieee1394: prevent device binding of raw1394,
video1394, dv1394", commit d2ace29fa44589da51fedc06a67b3f05301f3bfd:
$ cat /sys/bus/ieee1394/drivers/raw1394/device_ids
triggers a NULL pointer dereference in fw_show_drv_device_ids.
Reported by Miles Lane.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Tested-by: Miles Lane <miles.lane@gmail.com>
16 years ago[JFFS2] Track parent inode for directories (for NFS export)
David Woodhouse [Thu, 1 May 2008 17:47:17 +0000 (18:47 +0100)]
[JFFS2] Track parent inode for directories (for NFS export)

To support NFS export, we need to know the parent inode of directories.
Rather than growing the jffs2_inode_cache structure, share space with
the nlink field -- which was always set to 1 for directories anyway.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years agokbuild: fix vmlinux.o link
Sam Ravnborg [Thu, 1 May 2008 17:31:35 +0000 (19:31 +0200)]
kbuild: fix vmlinux.o link

We always linked vmliux.o.
Remove init/built-in.o dependency so we avoid this

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agokconfig: made check-lxdialog more portable
Sam Ravnborg [Thu, 1 May 2008 17:29:47 +0000 (19:29 +0200)]
kconfig: made check-lxdialog more portable

OS-X shell did not like 'echo -e' so implement
suggestion from Al Viro to use a more portable construct.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Acked-By: Timur Tabi <timur@freescale.com>
16 years agomake generic sys_ptrace unconditional
Christoph Hellwig [Thu, 1 May 2008 16:43:12 +0000 (18:43 +0200)]
make generic sys_ptrace unconditional

With s390 the last arch switched to the generic sys_ptrace yesterday so
we can now kill the ifdef around it to enforce every new port it using
it instead of introducing new weirdo versions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[PATCH] fix sysctl_nr_open bugs
Al Viro [Mon, 28 Apr 2008 00:04:15 +0000 (20:04 -0400)]
[PATCH] fix sysctl_nr_open bugs

* if luser with root sets it to something that is not a multiple of
  BITS_PER_LONG, the system is screwed.
* if it gets decreased at the wrong time, we can get expand_files()
  returning success and _not_ increasing the size of table as asked.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] sanitize anon_inode_getfd()
Al Viro [Sat, 23 Feb 2008 11:46:49 +0000 (06:46 -0500)]
[PATCH] sanitize anon_inode_getfd()

a) none of the callers even looks at inode or file returned by anon_inode_getfd()
b) any caller that would try to look at those would be racy, since by the time
it returns we might have raced with close() from another thread and that
file would be pining for fjords.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] split linux/file.h
Al Viro [Thu, 24 Apr 2008 11:44:08 +0000 (07:44 -0400)]
[PATCH] split linux/file.h

Initial splitoff of the low-level stuff; taken to fdtable.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] make osf_select() use core_sys_select()
Al Viro [Wed, 23 Apr 2008 18:05:15 +0000 (14:05 -0400)]
[PATCH] make osf_select() use core_sys_select()

... instead of open-coding it

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] remove horrors with irix tty ioctls handling
Al Viro [Wed, 23 Apr 2008 04:49:25 +0000 (00:49 -0400)]
[PATCH] remove horrors with irix tty ioctls handling

Existing code in there (get_tty(), etc.) is both severely
racy *and* pointless: ioctls in question have Linux equivalents
and there's no need to play silly buggers in irix_ioctl() -
just need to replace arguments and, in case of TIOCGSID,
deal with API differences - Linux one expects pid_t __user *
while Irix one does unsigned long __user *.  BFD...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] fix file and descriptor handling in perfmon
Al Viro [Tue, 22 Apr 2008 23:46:10 +0000 (19:46 -0400)]
[PATCH] fix file and descriptor handling in perfmon

Races galore...  General rule: as soon as it's in descriptor table,
it's over; another thread might have started IO on it/dup2() it
elsewhere/dup2() something *over* it/etc.  fd_install() is the very
last step one should take - it's a point of no return.

Besides, the damn thing leaked on failure exits...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[POWERPC] mpc5200: Allow for fixed speed MII configurations
Grant Likely [Thu, 1 May 2008 17:05:58 +0000 (11:05 -0600)]
[POWERPC] mpc5200: Allow for fixed speed MII configurations

Various improvements for configuring the MPC5200 MII link from the
device tree:
* Look for 'current-speed' property for fixed speed MII links
* Look for 'fsl,7-wire-mode' property for boards using the 7 wire mode
* move definition of private data structure out of the header file

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
16 years ago[JFFS2] Invert last argument of jffs2_gc_fetch_inode(), make it boolean.
David Woodhouse [Thu, 1 May 2008 15:59:24 +0000 (16:59 +0100)]
[JFFS2] Invert last argument of jffs2_gc_fetch_inode(), make it boolean.

We don't actually care about nlink; we only care whether the inode in
question is unlinked or not.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Thu, 1 May 2008 15:45:19 +0000 (08:45 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: fix early setup of hwif->host_flags

16 years agoMerge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Linus Torvalds [Thu, 1 May 2008 15:28:26 +0000 (08:28 -0700)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6

* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
  hwmon: (adt7473) minor cleanup / refactoring
  hwmon: (asb100) Remove some dead code
  hwmon: (lm75) Fix an incorrect comment
  hwmon: (w83793) VID and VRM handling cleanups
  hwmon: (w83l785ts) Don't ask the user to report failures
  hwmon: (smsc47b397) add a new chip id (0x8c)

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Thu, 1 May 2008 15:26:56 +0000 (08:26 -0700)]
Merge git://git./linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  module: add MODULE_STATE_GOING notifier call
  module: Enhance verify_export_symbols
  module: set unused_gpl_crcs instead of overwriting unused_crcs
  module: neaten __find_symbol, rename to find_symbol
  module: reduce module image and resident size
  module: make module_sect_attrs private to kernel/module.c

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Thu, 1 May 2008 15:15:36 +0000 (08:15 -0700)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] cryptd: Correct kzalloc error test
  [CRYPTO] eseqiv: Fix off-by-one encryption
  [CRYPTO] api: Fix scatterwalk_sg_chain
  [CRYPTO] authenc: Fix async crypto crash in crypto_authenc_genicv()