]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
15 years agopowerpc: Fix output from show_regs
Kumar Gala [Thu, 18 Jun 2009 22:29:55 +0000 (22:29 +0000)]
powerpc: Fix output from show_regs

For some reason we've had an explicit KERN_INFO for GPR dumps.  With
recent changes we get output like:

<6>GPR00: 00000000 ef855eb0 ef858000 00000001 000000d0 f1000000 ffbc8000 ffffffff

The KERN_INFO is causing the <6>.  Don't see any reason to keep it
around.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agopowerpc/pmac: Fix issues with PowerMac "PowerSurge" SMP
Benjamin Herrenschmidt [Thu, 18 Jun 2009 23:30:07 +0000 (23:30 +0000)]
powerpc/pmac: Fix issues with PowerMac "PowerSurge" SMP

The old PowerSurge SMP (ie, dual or quad 604 machines) code has
numerous issues in modern world.

One is cpu_possible_map is set too late (the device-tree is bogus)
so we fail to allocate the interrupt stacks and crash. Another
problem is the fact the timebase is frozen by the bringup of the
second CPU so the delays in the generic code will hang, we need
to move some of the calling procedure to inside the powermac code.

This makes it boot again for me

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agopowerpc/amigaone: Limit ISA I/O range to 4k in the device tree
Gerhard Pircher [Fri, 19 Jun 2009 11:42:36 +0000 (11:42 +0000)]
powerpc/amigaone: Limit ISA I/O range to 4k in the device tree

The kernel reserves the I/O address space from 0x0 to 0xfff for legacy
ISA devices. Change the ranges property for the PCI2ISA bridge to match
the kernels behavior, even if the ranges property isn't used for now.

Signed-off-by: Gerhard Pircher <gerhard_pircher@gmx.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agopowerpc/warp: Platform fix for i2c change
Sean MacLennan [Fri, 19 Jun 2009 19:43:59 +0000 (19:43 +0000)]
powerpc/warp: Platform fix for i2c change

A change to the i2c subsystem breaks the warp platform code. The patch
is cleaner anyway, the old way was a bit crufty.

For those with keen eyes, the gratuitous change in the string from
PIKA to Warp is just so the logs look a bit nicer. The following two
lines tend to be printed one after another.

  Warp POST OK
  Warp DTM thread running.

Yeah, this will be the third patch to warp.c submitted in this
release....

Cheers,
   Sean

The i2c_client struct changed, breaking the code that looked for the ad7414
chip. Use the new of_find_i2c_device_by_node function added in 2.6.29.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agopowerpc: Have git ignore generated files from dtc compile
Jon Smirl [Sun, 21 Jun 2009 15:28:00 +0000 (15:28 +0000)]
powerpc: Have git ignore generated files from dtc compile

Have git ignore generated files from dtc compile

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agopowerpc/mpic: Fix mapping of "DCR" based MPIC variants
Benjamin Herrenschmidt [Mon, 22 Jun 2009 16:47:59 +0000 (16:47 +0000)]
powerpc/mpic: Fix mapping of "DCR" based MPIC variants

Commit 31207dab7d2e63795eb15823947bd2f7025b08e2
"Fix incorrect allocation of interrupt rev-map"
introduced a regression crashing on boot on machines using
a "DCR" based MPIC, such as the Cell blades.

The reason is that the irq host data structure is initialized
much later as a result of that patch, causing our calls to
mpic_map() do be done before we have a host setup.

Unfortunately, this breaks _mpic_map_dcr() which uses the
mpic->irqhost to get to the device node.

This fixes it by, instead, passing the device node explicitely
to mpic_map().

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Akira Tsukamoto <akirat@rd.scei.sony.co.jp>
15 years agopowerpc: Swiotlb breaks pseries
Michael Ellerman [Mon, 22 Jun 2009 23:13:48 +0000 (23:13 +0000)]
powerpc: Swiotlb breaks pseries

Turning on SWIOTLB selects or enables PPC_NEED_DMA_SYNC_OPS, which means
we get the non empty versions of dma_sync_* in asm/dma-mapping.h

On my pseries machine the dma_ops have no such routines and we die with
a null pointer - this patch gets it booting, is there a more elegant way
to do it?

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
15 years agoACPI: video: prevent NULL deref in acpi_get_pci_dev()
Troy Moure [Thu, 25 Jun 2009 23:05:35 +0000 (17:05 -0600)]
ACPI: video: prevent NULL deref in acpi_get_pci_dev()

ref: http://thread.gmane.org/gmane.linux.kernel/857228/focus=857468

When the ACPI video driver initializes, it does a namespace walk
looking for for supported devices. When we find an appropriate
handle, we walk up the ACPI tree looking for a PCI root bus, and
then walk back down the PCI bus, assuming that every device
inbetween is a P2P bridge.

This assumption is not correct, and is reported broken on at
least:

Dell Latitude E6400
ThinkPad X61
Dell XPS M1330

Add a NULL deref check to prevent boot panics.

Reported-by: Alessandro Suardi <alessandro.suardi@gmail.com>
Signed-off-by: Troy Moure <twmoure@szypr.net>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoeeepc-laptop: add rfkill support for the 3G modem in Eee PC 901 Go
Corentin Chary [Thu, 25 Jun 2009 11:25:42 +0000 (13:25 +0200)]
eeepc-laptop: add rfkill support for the 3G modem in Eee PC 901 Go

Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoeeepc-laptop: get the right value for CMSG
Corentin Chary [Thu, 25 Jun 2009 11:25:41 +0000 (13:25 +0200)]
eeepc-laptop: get the right value for CMSG

CMSG is an ACPI method used to find features available on
an Eee PC. But some features are never repported, even if present.

If the getter of a feature is present, this patch will set
the corresponding bit in cmsg.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoeeepc-laptop: makes get_acpi() returns -ENODEV
Corentin Chary [Thu, 25 Jun 2009 11:25:40 +0000 (13:25 +0200)]
eeepc-laptop: makes get_acpi() returns -ENODEV

If there is there is no getter defined, get_acpi()
will return -ENODEV.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoeeepc-laptop: right parent device
Corentin Chary [Thu, 25 Jun 2009 11:25:39 +0000 (13:25 +0200)]
eeepc-laptop: right parent device

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoeeepc-laptop: rfkill refactoring
Corentin Chary [Thu, 25 Jun 2009 11:25:38 +0000 (13:25 +0200)]
eeepc-laptop: rfkill refactoring

Refactor rfkill code, because we'll add another
rfkill for wwan3g later.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoeeepc-laptop.c: use pr_fmt and pr_<level>
Joe Perches [Thu, 25 Jun 2009 11:25:37 +0000 (13:25 +0200)]
eeepc-laptop.c: use pr_fmt and pr_<level>

Convert the unusual printk(EEEPC_<level> uses to
the more standard pr_fmt and pr_<level>(.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoeeepc-laptop: Register as a pci-hotplug device
Corentin Chary [Thu, 25 Jun 2009 11:25:36 +0000 (13:25 +0200)]
eeepc-laptop: Register as a pci-hotplug device

The eee contains a logically (but not physically) hotpluggable PCIe slot.
Currently this is handled by adding or removing the PCI device in response
to rfkill events, but if a user has forced pciehp to bind to it (with the
force=1 argument) then both drivers will try to handle the event and
hilarity (in the form of oopses) will ensue. This can be avoided by having
eee-laptop register the slot as a hotplug slot. Only one of pciehp and
eee-laptop will successfully register this, avoiding the problem.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Tested-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years ago[CIFS] remove unknown mount option warning message
Steve French [Fri, 26 Jun 2009 04:07:18 +0000 (04:07 +0000)]
[CIFS] remove unknown mount option warning message

Jeff's previous patch which removed the unneeded rw/ro
parsing can cause a minor warning in dmesg (about the
unknown rw or ro mount option) at mount time. This
patch makes cifs ignore them in kernel to remove the warning
(they are already handled in the mount helper and VFS).

Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] remove bkl usage from umount begin
Steve French [Fri, 26 Jun 2009 03:25:49 +0000 (03:25 +0000)]
[CIFS] remove bkl usage from umount begin

The lock_kernel call moved into the fs for umount_begin
is not needed.  This adds a check to make sure we don't
call umount_begin twice on the same fs.

umount_begin for cifs is probably not needed and
may eventually be able to be removed, but in
the meantime this smaller patch is safe and
gets rid of the bkl from this path which provides
some benefit.

Acked-by: Jeff Layton <redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agomdio add missing GPL flag
Nicolas Reinecke [Thu, 25 Jun 2009 02:55:31 +0000 (02:55 +0000)]
mdio add missing GPL flag

Add missing GPL flag and description.

mdio: module license 'unspecified' taints kernel.
Disabling lock debugging due to kernel taint

Signed-off-by: Nicolas Reinecke <nr <at> das-labor.org>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosh_eth: remove redundant test on unsigned
roel kluin [Mon, 22 Jun 2009 07:38:00 +0000 (07:38 +0000)]
sh_eth: remove redundant test on unsigned

Unsigned boguscnt cannot be less than 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agofsl_pq_mdio: Fix fsl_pq_mdio to work with modules
Ionut Nicu [Wed, 24 Jun 2009 22:23:39 +0000 (22:23 +0000)]
fsl_pq_mdio: Fix fsl_pq_mdio to work with modules

This patch fixes the case when ucc_geth or gianfar are compiled
as modules. Without this patch the call to phy_connect() fails.

Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: avoid wraparound for expired preferred lifetime
Jens Rosenboom [Thu, 25 Jun 2009 04:55:50 +0000 (04:55 +0000)]
ipv6: avoid wraparound for expired preferred lifetime

Avoid showing wrong high values when the preferred lifetime of an address
is expired.

Signed-off-by: Jens Rosenboom <me@jayr.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agotcp: missing check ACK flag of received segment in FIN-WAIT-2 state
Wei Yongjun [Wed, 24 Jun 2009 22:29:31 +0000 (22:29 +0000)]
tcp: missing check ACK flag of received segment in FIN-WAIT-2 state

RFC0793 defined that in FIN-WAIT-2 state if the ACK bit is off drop
the segment and return[Page 72]. But this check is missing in function
tcp_timewait_state_process(). This cause the segment with FIN flag but
no ACK has two diffent action:

Case 1:
    Node A                      Node B
              <-------------    FIN,ACK
                                (enter FIN-WAIT-1)
    ACK       ------------->
                                (enter FIN-WAIT-2)
    FIN       ------------->    discard
                                (move sk to tw list)

Case 2:
    Node A                      Node B
              <-------------    FIN,ACK
                                (enter FIN-WAIT-1)
    ACK       ------------->
                                (enter FIN-WAIT-2)
                                (move sk to tw list)
    FIN       ------------->

              <-------------    ACK

This patch fixed the problem.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Fix makefile not generating required files
Julian Calaby [Tue, 23 Jun 2009 01:45:46 +0000 (01:45 +0000)]
sparc32: Fix makefile not generating required files

The tftpboot build was failing with missing file errors.

It turns out that $(obj)/image wasn't being generated which was causing the a.out conversion to be skipped and hence piggyback to be called with nonexistent files.

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Fix tftpboot.img Makefile
Julian Calaby [Sun, 21 Jun 2009 16:45:01 +0000 (16:45 +0000)]
sparc32: Fix tftpboot.img Makefile

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: fix tftpboot.img build
Sam Ravnborg [Sun, 21 Jun 2009 16:46:10 +0000 (16:46 +0000)]
sparc: fix tftpboot.img build

Kjetil Oftedal mentioned that piggyback_32 was failing
when building a sparc image.

I tracked this down to the fact that the kernel no longer
provided an absolute symbol named "end".

Commit 86ed40bd6fe511d26bb8f3fa65a84cb65c235366 ("sparc: unify sections.h")
renamed end to _end but failed to update piggyback_32.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Kjetil Oftedal <oftedal@gmail.com>
Cc: Robert Reif <reif@earthlink.net>
Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc32: Fix obvious build issues for tftpboot.img build.
Robert Reif [Sun, 21 Jun 2009 16:45:44 +0000 (16:45 +0000)]
sparc32: Fix obvious build issues for tftpboot.img build.

Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Fix build warnings in piggyback_64.c
Julian Calaby [Sun, 21 Jun 2009 16:44:13 +0000 (16:44 +0000)]
sparc64: Fix build warnings in piggyback_64.c

This patch fixes the following build warnings:
arch/sparc/boot/piggyback_64.c: In function 'main':
arch/sparc/boot/piggyback_64.c:44: warning: 'end' may be used uninitialized in this function
arch/sparc/boot/piggyback_64.c:44: warning: 'start' may be used uninitialized in this function

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Don't use alloc_bootmem() in init_IRQ() code paths.
David S. Miller [Fri, 26 Jun 2009 02:00:47 +0000 (19:00 -0700)]
sparc64: Don't use alloc_bootmem() in init_IRQ() code paths.

The page allocator and SLAB are available at this point now,
and if we still try to use bootmem allocations here the kernel
spits out warnings.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Fri, 26 Jun 2009 00:04:37 +0000 (17:04 -0700)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (28 commits)
  drm: remove unused #include <linux/version.h>'s
  drm/radeon: fix driver initialization order so radeon kms can be builtin
  drm: Fix shifts which were miscalculated when converting from bitfields.
  drm/radeon: Clear surface registers at initialization time.
  drm/radeon: Don't initialize acceleration related fields of struct fb_info.
  drm/radeon: fix radeon kms framebuffer device
  drm/i915: initialize fence registers to zero when loading GEM
  drm/i915: Fix HDMI regression introduced in new chipset support
  drm/i915: fix LFP data fetch
  drm/i915: set TV detection mode when tv is already connected
  drm/i915: Catch up to obj_priv->page_list rename in disabled debug code.
  drm/i915: Fix size_t handling in off-by-default debug printfs
  drm/i915: Don't change the blank/sync width when calculating scaled modes
  drm/i915: Add support for changing LVDS panel fitting using an output property.
  drm/i915: correct suspend/resume ordering
  drm/i915: Add missing dependency on Intel AGP support.
  drm/i915: Generate 2MHz clock for display port aux channel I/O. Retry I/O.
  drm/i915: Clarify error returns from display port aux channel I/O
  drm/i915: Add CLKCFG register definition
  drm/i915: Split array of DAC limits into separate structures.
  ...

15 years agox86, delay: tsc based udelay should have rdtsc_barrier
Pallipadi, Venkatesh [Thu, 25 Jun 2009 23:44:31 +0000 (16:44 -0700)]
x86, delay: tsc based udelay should have rdtsc_barrier

delay_tsc needs rdtsc_barrier to provide proper delay.

Output from a test driver using hpet to cross check delay
provided by udelay().

Before:
[   86.794363] Expected delay 5us actual 4679ns
[   87.154362] Expected delay 5us actual 698ns
[   87.514162] Expected delay 5us actual 4539ns
[   88.653716] Expected delay 5us actual 4539ns
[   94.664106] Expected delay 10us actual 9638ns
[   95.049351] Expected delay 10us actual 10126ns
[   95.416110] Expected delay 10us actual 9568ns
[   95.799216] Expected delay 10us actual 9638ns
[  103.624104] Expected delay 10us actual 9707ns
[  104.020619] Expected delay 10us actual 768ns
[  104.419951] Expected delay 10us actual 9707ns

After:
[   50.983320] Expected delay 5us actual 5587ns
[   51.261807] Expected delay 5us actual 5587ns
[   51.565715] Expected delay 5us actual 5657ns
[   51.861171] Expected delay 5us actual 5587ns
[   52.164704] Expected delay 5us actual 5726ns
[   52.487457] Expected delay 5us actual 5657ns
[   52.789338] Expected delay 5us actual 5726ns
[   57.119680] Expected delay 10us actual 10755ns
[   57.893997] Expected delay 10us actual 10615ns
[   58.261287] Expected delay 10us actual 10755ns
[   58.620505] Expected delay 10us actual 10825ns
[   58.941035] Expected delay 10us actual 10755ns
[   59.320903] Expected delay 10us actual 10615ns
[   61.306311] Expected delay 10us actual 10755ns
[   61.520542] Expected delay 10us actual 10615ns

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, setup: correct include file in <asm/boot.h>
H. Peter Anvin [Thu, 25 Jun 2009 22:16:06 +0000 (15:16 -0700)]
x86, setup: correct include file in <asm/boot.h>

<asm/boot.h> needs <asm/pgtable_types.h>, not <asm/page_types.h> in
order to resolve PMD_SHIFT.  Also, correct a +1 which really should be
+ THREAD_ORDER.

This is a build error which was masked by a typoed #ifdef.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, setup: Fix typo "CONFIG_x86_64" in <asm/boot.h>
Robert P. J. Day [Thu, 25 Jun 2009 20:20:48 +0000 (16:20 -0400)]
x86, setup: Fix typo "CONFIG_x86_64" in <asm/boot.h>

CONFIG_X86_64 was misspelled (wrong case), which caused the x86-64
kernel to advertise itself as more relocatable than it really is.
This could in theory cause boot failures once bootloaders start
support the new relocation fields.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, mce: percpu mcheck_timer should be pinned
Hidetoshi Seto [Wed, 24 Jun 2009 00:21:10 +0000 (09:21 +0900)]
x86, mce: percpu mcheck_timer should be pinned

If CONFIG_NO_HZ + CONFIG_SMP, timer added via add_timer() might
be migrated on other cpu.  Use add_timer_on() instead.

Avoids the following failure:

Maciej Rutecki wrote:
> > After normal boot I try:
> >
> > echo 1 > /sys/devices/system/machinecheck/machinecheck0/check_interval
> >
> > I found this in dmesg:
> >
> > [  141.704025] ------------[ cut here ]------------
> > [  141.704039] WARNING: at arch/x86/kernel/cpu/mcheck/mce.c:1102
> > mcheck_timer+0xf5/0x100()

Reported-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86: Add sysctl to allow panic on IOCK NMI error
Kurt Garloff [Wed, 24 Jun 2009 21:32:11 +0000 (14:32 -0700)]
x86: Add sysctl to allow panic on IOCK NMI error

This patch introduces a new sysctl:

    /proc/sys/kernel/panic_on_io_nmi

which defaults to 0 (off).

When enabled, the kernel panics when the kernel receives an NMI
caused by an IO error.

The IO error triggered NMI indicates a serious system
condition, which could result in IO data corruption. Rather
than contiuing, panicing and dumping might be a better choice,
so one can figure out what's causing the IO error.

This could be especially important to companies running IO
intensive applications where corruption must be avoided, e.g. a
bank's databases.

[ SuSE has been shipping it for a while, it was done at the
  request of a large database vendor, for their users. ]

Signed-off-by: Kurt Garloff <garloff@suse.de>
Signed-off-by: Roberto Angelino <robertangelino@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
LKML-Reference: <20090624213211.GA11291@kroah.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agocifs: Fix incorrect return code being printed in cFYI messages
Suresh Jayaraman [Thu, 25 Jun 2009 12:42:34 +0000 (18:12 +0530)]
cifs: Fix incorrect return code being printed in cFYI messages

FreeXid() along with freeing Xid does add a cifsFYI debug message that
prints rc (return code) as well. In some code paths where we set/return
error code after calling FreeXid(), incorrect error code is being
printed when cifsFYI is enabled.

This could be misleading in few cases. For eg.
In cifs_open() if cifs_fill_filedata() returns a valid pointer to
cifsFileInfo, FreeXid() prints rc=-13 whereas 0 is actually being
returned. Fix this by setting rc before calling FreeXid().

Basically convert

FreeXid(xid); rc = -ERR;
return -ERR; => FreeXid(xid);
return rc;

[Note that Christoph would like to replace the GetXid/FreeXid
calls, which are primarily used for debugging.  This seems
like a good longer term goal, but although there is an
alternative tracing facility, there are no examples yet
available that I know of that we can use (yet) to
convert this cifs function entry/exit logging, and for
creating an identifier that we can use to correlate
all dmesg log entries for a particular vfs operation
(ie identify all log entries for a particular vfs
request to cifs: e.g. a particular close or read or write
or byte range lock call ... and just using the thread id
is harder).  Eventually when a replacement
for this is available (e.g. when NFS switches over and various
samples to look at in other file systems) we can remove the
GetXid/FreeXid macro but in the meantime multiple people
use this run time configurable logging all the time
for debugging, and Suresh's patch fixes a problem
which made it harder to notice some low
memory problems in the log so it is worthwhile
to fix this problem until a better logging
approach is able to be used]

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoMerge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 25 Jun 2009 18:25:00 +0000 (11:25 -0700)]
Merge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: request only one page from get_user_pages()

15 years agousb_serial: Fix oops when unexisting usb serial device is opened.
Thadeu Lima de Souza Cascardo [Thu, 25 Jun 2009 13:41:37 +0000 (14:41 +0100)]
usb_serial: Fix oops when unexisting usb serial device is opened.

This commit 335f8514f200e63d689113d29cb7253a5c282967 has stopped
properly checking if there is any usb serial associated with the tty in
the close function. It happens the close function is called by releasing
the terminal right after opening the device fails.

As an example, open fails with a non-existing device, when probe has
never been called, because the device has never been plugged. This is
common in systems with static modules and no udev.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoacm: Fix oops when closing ACM tty device right after open has failed.
Thadeu Lima de Souza Cascardo [Thu, 25 Jun 2009 13:41:30 +0000 (14:41 +0100)]
acm: Fix oops when closing ACM tty device right after open has failed.

This commit 10077d4a6674f535abdbe25cdecb1202af7948f1 has stopped
checking if there was a valid acm device associated to the tty, which is
not true right after open fails and tty subsystem tries to close the
device.

As an example, open fails with a non-existing device, when probe has
never been called, because the device has never been plugged. This is
common in systems with static modules and no udev.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoacm: Return ENODEV instead of EINVAL when trying to open ACM device.
Thadeu Lima de Souza Cascardo [Thu, 25 Jun 2009 13:41:24 +0000 (14:41 +0100)]
acm: Return ENODEV instead of EINVAL when trying to open ACM device.

This is required, otherwise a user will get a EINVAL while opening a
non-existing device, instead of ENODEV.

This is what I get with this patch applied now instead of an "Invalid
argument".

  cascardo@vespa:~$ cat /dev/ttyACM0
  cat: /dev/ttyACM0: No such device
  cascardo@vespa:~$

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Thu, 25 Jun 2009 18:23:37 +0000 (11:23 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide cs5520: Initialize second port's interrupt number.
  ide: improve handling of Power Management requests
  ide: add QUANTUM FIREBALLct20 30 with firmware APL.090 to ivb_list[]
  ide: relax DMA info validity checking
  ide-cd: Improve "weird block size" error message
  ide-cd: Don't warn on bogus block size unless it actually matters.
  ide: fix handling of unexpected IRQs vs request_irq()

15 years agoclarify get_user_pages() prototype
Peter Zijlstra [Thu, 25 Jun 2009 09:58:55 +0000 (11:58 +0200)]
clarify get_user_pages() prototype

Currently the 4th parameter of get_user_pages() is called len, but its
in pages, not bytes. Rename the thing to nr_pages to avoid future
confusion.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoUML: Fix some apparent bitrot
Paul Menage [Thu, 25 Jun 2009 07:17:15 +0000 (00:17 -0700)]
UML: Fix some apparent bitrot

UML: Fix some apparent bitrot

- migration of net_device methods into net_device_ops
- dma_sync_single() changes

Signed-off-by: Paul Menage <menage@google.com>
Acked-by: Amerigo Wang <xiyou.wangcong@gmail.com>
--

This version is split from my earlier patch, including just the
portions that ar required for Linus' tree.

Fixes the following compile errors:

include/linux/dma-mapping.h:113: error: redefinition of 'dma_sync_single'
arch/um/include/asm/dma-mapping.h:84: error: previous definition of 'dma_sync_single' was here
include/linux/dma-mapping.h: In function 'dma_sync_single':
include/linux/dma-mapping.h:117: error: implicit declaration of function 'dma_sync_single_for_cpu'
include/linux/dma-mapping.h: At top level:
include/linux/dma-mapping.h:120: error: redefinition of 'dma_sync_sg'
arch/um/include/asm/dma-mapping.h:91: error: previous definition of 'dma_sync_sg' was here
include/linux/dma-mapping.h: In function 'dma_sync_sg':
include/linux/dma-mapping.h:124: error: implicit declaration of function 'dma_sync_sg_for_cpu'

arch/um/drivers/slirp_kern.c: In function 'slirp_init':
arch/um/drivers/slirp_kern.c:35: error: 'struct net_device' has no member named 'init'
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoi2c: fix build bug in i2c-designware.c
Ingo Molnar [Thu, 25 Jun 2009 06:27:14 +0000 (08:27 +0200)]
i2c: fix build bug in i2c-designware.c

This build error triggers on x86:

 drivers/built-in.o: In function `i2c_dw_init':
 i2c-designware.c:(.text+0x4e37ca): undefined reference to `clk_get_rate'
 drivers/built-in.o: In function `dw_i2c_probe':
 i2c-designware.c:(.devinit.text+0x51f5e): undefined reference to `clk_get'
 i2c-designware.c:(.devinit.text+0x51f76): undefined reference to `clk_enable'
 i2c-designware.c:(.devinit.text+0x520ff): undefined reference to `clk_disable'
 i2c-designware.c:(.devinit.text+0x52108): undefined reference to `clk_put'

Because this new driver uses the clk_*() facilities which is an
ARM-only thing currently.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosound: oxygen: make mic volume control mono
Clemens Ladisch [Thu, 25 Jun 2009 12:28:49 +0000 (14:28 +0200)]
sound: oxygen: make mic volume control mono

The microphone input and its volume register have only one channel, so
we have to make the corresponding mixer control a mono control.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoMerge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Thu, 25 Jun 2009 13:28:14 +0000 (15:28 +0200)]
Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc

Conflicts:
MAINTAINERS

15 years ago[ARM] 5565/2: Use PAGE_SIZE and RO_DATA() in link script
Linus Walleij [Wed, 24 Jun 2009 22:38:56 +0000 (23:38 +0100)]
[ARM] 5565/2: Use PAGE_SIZE and RO_DATA() in link script

Update the link script for ARM to use PAGE_SIZE instead of hard-
coded 4096. Also the old RODATA macro is deprecated
for the RO_DATA(PAGE_SIZE) macro. As a consequence the PAGE_SIZE
was changed from (1UL << PAGE_SHIFT) to (_AC(1,UL) << PAGE_SHIFT)
because the linker does not understand the "UL" suffix to numeric
constants.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] 5560/1: Avoid buffer overrun in case of an invalid IRQ
Aaro Koskinen [Mon, 22 Jun 2009 08:23:36 +0000 (09:23 +0100)]
[ARM] 5560/1: Avoid buffer overrun in case of an invalid IRQ

handle_bad_irq() expects the IRQ number to be valid (used for statistics),
so it cannot be called with an illegal vector. The problem was reported
by a static analysis tool.

The change makes bad_irq_desc redundant, so delete it.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoMAINTAINERS: Add entry for twl4030 series soc codec driver
Peter Ujfalusi [Thu, 25 Jun 2009 10:26:09 +0000 (13:26 +0300)]
MAINTAINERS: Add entry for twl4030 series soc codec driver

New MAINTAINERS entry for twl4030 series soc codec driver
with Peter Ujfalusi as maintainer.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoMerge branch 's3c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux
Russell King [Thu, 25 Jun 2009 12:49:07 +0000 (13:49 +0100)]
Merge branch 's3c-fixes' of git://aeryn.fluff.org.uk/bjdooks/linux

15 years agoMerge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
Russell King [Thu, 25 Jun 2009 12:47:21 +0000 (13:47 +0100)]
Merge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

15 years agofutex: request only one page from get_user_pages()
Thomas Gleixner [Thu, 25 Jun 2009 12:27:58 +0000 (14:27 +0200)]
futex: request only one page from get_user_pages()

Yanmin noticed that fault_in_user_writeable() requests 4 pages instead
of one.

That's the result of blindly trusting Linus' proposal :) I even looked
up the prototype to verify the correctness: the argument in question
is confusingly enough named "len" while in reality it means number of
pages.

Pointed-out-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
15 years agoatl1*: add device_set_wakeup_enable to atl1*_set_wol
Brandon Philips [Wed, 24 Jun 2009 14:09:14 +0000 (14:09 +0000)]
atl1*: add device_set_wakeup_enable to atl1*_set_wol

Tell PCI core that atl1* device can wakeup the system when WOL is
enabled by calling device_set_wakeup_enable.

Joerg noted that his atl1e device WOL fine after enabling it with
ethtool and changing /sys/class/net/eth0/device/power/wakeup to enabled
Tested on atl1e: https://bugzilla.novell.com/show_bug.cgi?id=493214

Tested by: Joerg Reuter <jreuter@novell.com>
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoPhonet: generate Netlink RTM_DELADDR when destroying a device
Rémi Denis-Courmont [Wed, 24 Jun 2009 01:07:45 +0000 (01:07 +0000)]
Phonet: generate Netlink RTM_DELADDR when destroying a device

Netlink address deletion events were not sent when a network device
vanished neither when Phonet was unloaded.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoPhonet: publicize the Netlink notification function
Rémi Denis-Courmont [Wed, 24 Jun 2009 01:07:44 +0000 (01:07 +0000)]
Phonet: publicize the Netlink notification function

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoRevert "veth: prevent oops caused by netdev destructor"
David S. Miller [Thu, 25 Jun 2009 09:45:42 +0000 (02:45 -0700)]
Revert "veth: prevent oops caused by netdev destructor"

This reverts commit ae0e8e82205c903978a79ebf5e31c670b61fa5b4.

This change had two problems:

1) Since it frees the stats in the drivers' close method, we
   can OOPS in the transmit routine.

2) stats are no longer remembered across ifdown/ifup which
   disagrees with how every other device operates.

Thanks to analysis and test patch from Serge E. Hallyn
and initial OOPS report by Sachin Sant.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoring-buffer: Make it generally available
Paul Mundt [Thu, 25 Jun 2009 05:30:12 +0000 (14:30 +0900)]
ring-buffer: Make it generally available

In hunting down the cause for the hwlat_detector ring buffer spew in
my failed -next builds it became obvious that folks are now treating
ring_buffer as something that is generic independent of tracing and thus,
suitable for public driver consumption.

Given that there are only a few minor areas in ring_buffer that have any
reliance on CONFIG_TRACING or CONFIG_FUNCTION_TRACER, provide stubs for
those and make it generally available.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Jon Masters <jcm@jonmasters.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
LKML-Reference: <20090625053012.GB19944@linux-sh.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoftrace: Remove duplicate newline
Li Zefan [Thu, 25 Jun 2009 06:05:27 +0000 (14:05 +0800)]
ftrace: Remove duplicate newline

Before:
  # echo 'sys_open:traceon:' > set_ftrace_filter
  # echo 'sys_close:traceoff:5' > set_ftrace_filter
  # cat set_ftrace_filter
  #### all functions enabled ####
  sys_open:traceon:unlimited

  sys_close:traceoff:count=0

After:
  # cat set_ftrace_filter
  #### all functions enabled ####
  sys_open:traceon:unlimited
  sys_close:traceoff:count=0

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A4313A7.7030105@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoALSA: lx6464es - configure ethersound io channels
Tim Blechmann [Thu, 25 Jun 2009 07:41:46 +0000 (09:41 +0200)]
ALSA: lx6464es - configure ethersound io channels

as long as the io channel number is not set by the driver, the card
is not visible from the ethersound network

Signed-off-by: Tim Blechmann <tim@klingt.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agosound: Use PCI_VDEVICE for CREATIVE and ECTIVA
Joe Perches [Thu, 25 Jun 2009 06:18:02 +0000 (23:18 -0700)]
sound: Use PCI_VDEVICE for CREATIVE and ECTIVA

Here's a patch on top of the others to use CREATIVE and ECTIVA

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agosound: Use PCI_VDEVICE
Joe Perches [Thu, 25 Jun 2009 05:13:35 +0000 (22:13 -0700)]
sound: Use PCI_VDEVICE

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Use model=acer-aspire-6530g for Acer Aspire 6930G
Takashi Iwai [Thu, 25 Jun 2009 06:25:35 +0000 (08:25 +0200)]
ALSA: hda - Use model=acer-aspire-6530g for Acer Aspire 6930G

For Acer Aspire 6930G (1025:015e), acre-aspire-6530g model matches
obviously better.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Fix acer-aspire-6530g model quirk
Emilio López [Thu, 25 Jun 2009 06:18:44 +0000 (08:18 +0200)]
ALSA: hda - Fix acer-aspire-6530g model quirk

Fix the following bugs of acer-aspire-6530g model with ALC888:
- HP jack to mute all speaker outputs including LFE
- Make digital built-in mic working

Signed-off-by: Emilio López <buhitoescolar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years agoALSA: hda - Add pin-sense trigger when needed for Realtek codecs
Takashi Iwai [Thu, 25 Jun 2009 06:13:40 +0000 (08:13 +0200)]
ALSA: hda - Add pin-sense trigger when needed for Realtek codecs

Realtek codecs require the pin-sense trigger call before actually
reading the pin-sense.  Without this, the pin-detection might not be
done accurately.

This patch adds the pin-capability check and issues the trigger call
if required.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 years ago[CIFS] cleanup asn handling for ntlmssp
Steve French [Thu, 25 Jun 2009 03:04:20 +0000 (03:04 +0000)]
[CIFS] cleanup asn handling for ntlmssp

Also removes obsolete distinction between rawntlmssp and ntlmssp (in asn/SPNEGO)
since as jra noted we can always send raw ntlmssp in session setup now.

remove check for experimental runtime flag (/proc/fs/cifs/Experimental) in
ntlmssp path.

Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years ago[CIFS] Copy struct *after* setting the port, instead of before.
Simo Leone [Thu, 25 Jun 2009 02:44:43 +0000 (02:44 +0000)]
[CIFS] Copy struct *after* setting the port, instead of before.

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Simo Leone <simo@archlinux.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: remove rw/ro options
Jeff Layton [Thu, 25 Jun 2009 04:56:55 +0000 (00:56 -0400)]
cifs: remove rw/ro options

cifs: remove rw/ro options

These options are handled at the VFS layer. They only ever set the
option in the smb_vol struct. Nothing was ever done with them afterward
anyway.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: fix problems with earlier patches
Jeff Layton [Thu, 25 Jun 2009 04:56:54 +0000 (00:56 -0400)]
cifs: fix problems with earlier patches

cifs: fix problems with earlier patches

cifs_show_address hasn't been introduced yet, and fix a typo that was
silently fixed by a later patch in the series.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocifs: have cifs parse scope_id out of IPv6 addresses and use it
Jeff Layton [Thu, 11 Jun 2009 14:27:31 +0000 (10:27 -0400)]
cifs: have cifs parse scope_id out of IPv6 addresses and use it

This patch has CIFS look for a '%' in an IPv6 address. If one is
present then it will try to treat that value as a numeric interface
index suitable for stuffing into the sin6_scope_id field.

This should allow people to mount servers on IPv6 link-local addresses.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: David Holder <david@erion.co.uk>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agocpmac: fix compilation failure introduced with netdev_ops conversion
Florian Fainelli [Wed, 24 Jun 2009 23:32:33 +0000 (16:32 -0700)]
cpmac: fix compilation failure introduced with netdev_ops conversion

This patch fixes and obvious typo in the netdev_ops initialization:
ndo_so_ioctl should be ndo_do_ioctl.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipsec: Fix name of CAST algorithm
Herbert Xu [Wed, 24 Jun 2009 10:55:41 +0000 (03:55 -0700)]
ipsec: Fix name of CAST algorithm

Our CAST algorithm is called cast5, not cast128.  Clearly nobody
has ever used it :)

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago[CIFS] Do not send tree disconnect if session is already disconnected
Steve French [Thu, 25 Jun 2009 00:29:21 +0000 (00:29 +0000)]
[CIFS] Do not send tree disconnect if session is already disconnected

Noticed this when tree connect timed out (due to Samba server crash) -
we try to send a tree disconnect for a tid that does not exist
since we don't have a valid tree id yet. This checks that the
session is valid before sending the tree disconnect to handle
this case.

Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoLinux 2.6.31-rc1 v2.6.31-rc1
Linus Torvalds [Wed, 24 Jun 2009 23:25:37 +0000 (16:25 -0700)]
Linux 2.6.31-rc1

15 years agoRevert "PCI: use ACPI _CRS data by default"
Linus Torvalds [Wed, 24 Jun 2009 23:23:03 +0000 (16:23 -0700)]
Revert "PCI: use ACPI _CRS data by default"

This reverts commit 9e9f46c44e487af0a82eb61b624553e2f7118f5b.

Quoting from the commit message:

 "At this point, it seems to solve more problems than it causes, so let's
  try using it by default.  It's an easy revert if it ends up causing
  trouble."

And guess what? The _CRS code causes trouble.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Wed, 24 Jun 2009 21:35:57 +0000 (14:35 -0700)]
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
  da9030_battery: Fix race between event handler and monitor
  Add MAX17040 Fuel Gauge driver
  w1: ds2760_battery: add support for sleep mode feature
  w1: ds2760: add support for EEPROM read and write
  ds2760_battery: cleanups in ds2760_battery_probe()

15 years agoMerge branches 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro...
Linus Torvalds [Wed, 24 Jun 2009 21:17:14 +0000 (14:17 -0700)]
Merge branches 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/{vfs-2.6,audit-current}

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  another race fix in jfs_check_acl()
  Get "no acls for this inode" right, fix shmem breakage
  inline functions left without protection of ifdef (acl)

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  audit: inode watches depend on CONFIG_AUDIT not CONFIG_AUDIT_SYSCALL

15 years agoanother race fix in jfs_check_acl()
Al Viro [Wed, 24 Jun 2009 21:02:42 +0000 (17:02 -0400)]
another race fix in jfs_check_acl()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoGet "no acls for this inode" right, fix shmem breakage
Al Viro [Wed, 24 Jun 2009 20:58:48 +0000 (16:58 -0400)]
Get "no acls for this inode" right, fix shmem breakage

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoaudit: inode watches depend on CONFIG_AUDIT not CONFIG_AUDIT_SYSCALL
Eric Paris [Wed, 24 Jun 2009 20:09:01 +0000 (16:09 -0400)]
audit: inode watches depend on CONFIG_AUDIT not CONFIG_AUDIT_SYSCALL

Even though one cannot make use of the audit watch code without
CONFIG_AUDIT_SYSCALL the spaghetti nature of the audit code means that
the audit rule filtering requires that it at least be compiled.

Thus build the audit_watch code when we build auditfilter like it was
before cfcad62c74abfef83762dc05a556d21bdf3980a2

Clearly this is a point of potential future cleanup..

Reported-by: Frans Pop <elendil@planet.nl>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoinline functions left without protection of ifdef (acl)
Markus Trippelsdorf [Wed, 24 Jun 2009 20:28:52 +0000 (22:28 +0200)]
inline functions left without protection of ifdef (acl)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoMerge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 24 Jun 2009 20:33:19 +0000 (13:33 -0700)]
Merge branch 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: Fix the write access fault problem for real

15 years agofutex: Fix the write access fault problem for real
Thomas Gleixner [Thu, 11 Jun 2009 21:15:43 +0000 (23:15 +0200)]
futex: Fix the write access fault problem for real

commit 64d1304a64 (futex: setup writeable mapping for futex ops which
modify user space data) did address only half of the problem of write
access faults.

The patch was made on two wrong assumptions:

1) access_ok(VERIFY_WRITE,...) would actually check write access.

   On x86 it does _NOT_. It's a pure address range check.

2) a RW mapped region can not go away under us.

   That's wrong as well. Nobody can prevent another thread to call
   mprotect(PROT_READ) on that region where the futex resides. If that
   call hits between the get_user_pages_fast() verification and the
   actual write access in the atomic region we are toast again.

The solution is to not rely on access_ok and get_user() for any write
access related fault on private and shared futexes. Instead we need to
fault it in with verification of write access.

There is no generic non destructive write mechanism which would fault
the user page in trough a #PF, but as we already know that we will
fault we can as well call get_user_pages() directly and avoid the #PF
overhead.

If get_user_pages() returns -EFAULT we know that we can not fix it
anymore and need to bail out to user space.

Remove a bunch of confusing comments on this issue as well.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
15 years agoSLUB: Don't pass __GFP_FAIL for the initial allocation
Pekka Enberg [Wed, 24 Jun 2009 18:59:51 +0000 (21:59 +0300)]
SLUB: Don't pass __GFP_FAIL for the initial allocation

SLUB uses higher order allocations by default but falls back to small
orders under memory pressure. Make sure the GFP mask used in the initial
allocation doesn't include __GFP_NOFAIL.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDon't warn about order-1 allocations with __GFP_NOFAIL
Linus Torvalds [Wed, 24 Jun 2009 19:16:49 +0000 (12:16 -0700)]
Don't warn about order-1 allocations with __GFP_NOFAIL

Traditionally, we never failed small orders (even regardless of any
__GFP_NOFAIL flags), and slab will allocate order-1 allocations even for
small allocations that could fit in a single page (in order to avoid
excessive fragmentation).

Maybe we should remove this warning entirely, but before making that
judgement, at least limit it to bigger allocations.

Acked-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 24 Jun 2009 17:47:38 +0000 (10:47 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  Staging: octeon-ethernet: Fix race freeing transmit buffers.
  Staging: octeon-ethernet: Convert to use net_device_ops.
  MIPS: Cavium: Add CPU hotplugging code.
  MIPS: SMP: Allow suspend and hibernation if CPU hotplug is available
  MIPS: Add arch generic CPU hotplug
  DMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set
  MIPS: Sibyte: Fix build error if CONFIG_SERIAL_SB1250_DUART is undefined.
  MIPS: MIPSsim: Fix build error if MSC01E_INT_BASE is undefined.
  MIPS: Hibernation: Remove SMP TLB and cacheflushing code.
  MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users.
  MIPS: bug.h Build fix - include <linux/compiler.h>.

15 years agoStaging: octeon-ethernet: Fix race freeing transmit buffers.
David Daney [Tue, 23 Jun 2009 23:20:56 +0000 (16:20 -0700)]
Staging: octeon-ethernet: Fix race freeing transmit buffers.

The existing code had the following race:

Thread-1                       Thread-2

inc/read in_use
                               inc/read in_use
inc tx_free_list[qos].len
                               inc tx_free_list[qos].len

The actual in_use value was incremented twice, but thread-1 is going
to free memory based on its stale value, and will free one too many
times.  The result is that memory is freed back to the kernel while
its packet is still in the transmit buffer.  If the memory is
overwritten before it is transmitted, the hardware will put a valid
checksum on it and send it out (just like it does with good packets).
If by chance the TCP flags are clobbered but not the addresses or
ports, the result can be a broken TCP stream.

The fix is to track the number of freed packets in a single location
(a Fetch-and-Add Unit register).  That way it can never get out of sync
with itself.

We try to free up to MAX_SKB_TO_FREE (currently 10) buffers at a time.
If fewer are available we adjust the free count with the difference.
The action of claiming buffers to free is atomic so two threads cannot
claim the same buffers.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoStaging: octeon-ethernet: Convert to use net_device_ops.
David Daney [Tue, 23 Jun 2009 18:34:08 +0000 (11:34 -0700)]
Staging: octeon-ethernet: Convert to use net_device_ops.

Convert the driver to use net_device_ops as it is now mandatory.

Also compensate for the removal of struct sk_buff's dst field.

The changes are mostly mechanical, the content of ethernet-common.c
was moved to ethernet.c and ethernet-common.{c,h} are removed.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Cavium: Add CPU hotplugging code.
Ralf Baechle [Tue, 23 Jun 2009 09:36:38 +0000 (10:36 +0100)]
MIPS: Cavium: Add CPU hotplugging code.

Thanks to Cavium Inc. for the code contribution and help.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: SMP: Allow suspend and hibernation if CPU hotplug is available
Ralf Baechle [Tue, 23 Jun 2009 09:20:56 +0000 (10:20 +0100)]
MIPS: SMP: Allow suspend and hibernation if CPU hotplug is available

The SMP implementation of suspend and hibernate depends on CPU hotplugging.
In the past we didn't have CPU hotplug so suspend and hibernation were not
possible on SMP systems.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Add arch generic CPU hotplug
Ralf Baechle [Tue, 23 Jun 2009 09:00:31 +0000 (10:00 +0100)]
MIPS: Add arch generic CPU hotplug

Each platform has to add support for CPU hotplugging itself by providing
suitable definitions for the cpu_disable and cpu_die of the smp_ops
methods and setting SYS_SUPPORTS_HOTPLUG_CPU.  A platform should only set
SYS_SUPPORTS_HOTPLUG_CPU once all it's smp_ops definitions have the
necessary changes.  This patch contains the changes to the dummy smp_ops
definition for uni-processor systems.

Parts of the code contributed by Cavium Inc.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoDMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set
Atsushi Nemoto [Wed, 17 Jun 2009 20:08:31 +0000 (13:08 -0700)]
DMA: txx9dmac: use dma_unmap_single if DMA_COMPL_{SRC,DEST}_UNMAP_SINGLE set

This patch does not change actual behaviour since dma_unmap_page is just
an alias of dma_unmap_single on MIPS.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Sibyte: Fix build error if CONFIG_SERIAL_SB1250_DUART is undefined.
Ralf Baechle [Mon, 22 Jun 2009 15:17:52 +0000 (16:17 +0100)]
MIPS: Sibyte: Fix build error if CONFIG_SERIAL_SB1250_DUART is undefined.

This fixes kernel.org bugzilla 13596, see
http://bugzilla.kernel.org/show_bug.cgi?id=13596

Reported-by: dvice_null@yahoo.com
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: MIPSsim: Fix build error if MSC01E_INT_BASE is undefined.
Ralf Baechle [Mon, 22 Jun 2009 14:48:27 +0000 (15:48 +0100)]
MIPS: MIPSsim: Fix build error if MSC01E_INT_BASE is undefined.

This fixes kernel.org bugzilla 13595, see
http://bugzilla.kernel.org/show_bug.cgi?id=13595

Reported-by: dvice_null@yahoo.com
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Hibernation: Remove SMP TLB and cacheflushing code.
Ralf Baechle [Fri, 19 Jun 2009 14:01:44 +0000 (15:01 +0100)]
MIPS: Hibernation: Remove SMP TLB and cacheflushing code.

We can't perform any flushes on SMP from swsusp_arch_resume because
interrupts are disabled.  A cross-CPU flush is unnecessary anyway
because all but the local CPU have already been disabled.  A local
flush is not needed either because we didn't change any mappings.  So
just delete the code.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users.
Ralf Baechle [Fri, 19 Jun 2009 13:05:26 +0000 (14:05 +0100)]
MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users.

Some of the were relying into smp.h being dragged in by another header
which of course is fragile.  <asm/cpu-info.h> uses smp_processor_id()
only in macros and including smp.h there leads to an include loop, so
don't change cpu-info.h.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMIPS: bug.h Build fix - include <linux/compiler.h>.
Ralf Baechle [Fri, 19 Jun 2009 12:51:28 +0000 (13:51 +0100)]
MIPS: bug.h Build fix - include <linux/compiler.h>.

In the past this file somehow used to be dragged in.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
Linus Torvalds [Wed, 24 Jun 2009 17:26:54 +0000 (10:26 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm

* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm: (48 commits)
  dm mpath: change to be request based
  dm: disable interrupt when taking map_lock
  dm: do not set QUEUE_ORDERED_DRAIN if request based
  dm: enable request based option
  dm: prepare for request based option
  dm raid1: add userspace log
  dm: calculate queue limits during resume not load
  dm log: fix create_log_context to use logical_block_size of log device
  dm target:s introduce iterate devices fn
  dm table: establish queue limits by copying table limits
  dm table: replace struct io_restrictions with struct queue_limits
  dm table: validate device logical_block_size
  dm table: ensure targets are aligned to logical_block_size
  dm ioctl: support cookies for udev
  dm: sysfs add suspended attribute
  dm table: improve warning message when devices not freed before destruction
  dm mpath: add service time load balancer
  dm mpath: add queue length load balancer
  dm mpath: add start_io and nr_bytes to path selectors
  dm snapshot: use barrier when writing exception store
  ...

15 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
Linus Torvalds [Wed, 24 Jun 2009 17:26:24 +0000 (10:26 -0700)]
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb

* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb:
  uwb: allow WLP to be used with IPv6.
  uwb: event_size should be signed

15 years agoMerge branch 'audit.b63' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Wed, 24 Jun 2009 17:22:57 +0000 (10:22 -0700)]
Merge branch 'audit.b63' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current

* 'audit.b63' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  Fix rule eviction order for AUDIT_DIR
  Audit: clean up all op= output to include string quoting
  Audit: move audit_get_nd completely into audit_watch
  audit: seperate audit inode watches into a subfile
  Audit: clean up audit_receive_skb
  Audit: cleanup netlink mesg handling
  Audit: unify the printk of an skb when auditd not around
  Audit: dereferencing krule as if it were an audit_watch
  Audit: better estimation of execve record length
  Audit: fix audit watch use after free

15 years agoMAINTAINERS: Change mailing list info for CRIS
Jesper Nilsson [Wed, 24 Jun 2009 07:33:19 +0000 (09:33 +0200)]
MAINTAINERS: Change mailing list info for CRIS

Posting to the dev-etrax mailing list is only allowed for subscribers,
and the list is more geared toward user applications than kernel
developers.

Change to newly created mailing list for CRIS.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Wed, 24 Jun 2009 17:17:07 +0000 (10:17 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (72 commits)
  asus-laptop: remove EXPERIMENTAL dependency
  asus-laptop: use pr_fmt and pr_<level>
  eeepc-laptop: cpufv updates
  eeepc-laptop: sync eeepc-laptop with asus_acpi
  asus_acpi: Deprecate in favor of asus-laptop
  acpi4asus: update MAINTAINER and KConfig links
  asus-laptop: platform dev as parent for led and backlight
  eeepc-laptop: enable camera by default
  ACPI: Rename ACPI processor device bus ID
  acerhdf: Acer Aspire One fan control
  ACPI: video: DMI workaround broken Acer 7720 BIOS enabling display brightness
  ACPI: run ACPI device hot removal in kacpi_hotplug_wq
  ACPI: Add the reference count to avoid unloading ACPI video bus twice
  ACPI: DMI to disable Vista compatibility on some Sony laptops
  ACPI: fix a deadlock in hotplug case
  Show the physical device node of backlight class device.
  ACPI: pdc init related memory leak with physical CPU hotplug
  ACPI: pci_root: remove unused dev/fn information
  ACPI: pci_root: simplify list traversals
  ACPI: pci_root: use driver data rather than list lookup
  ...