deliverable/linux.git
14 years agocgroups: remove duplicate include
Li Zefan [Tue, 23 Mar 2010 20:35:12 +0000 (13:35 -0700)] 
cgroups: remove duplicate include

commit e6a1105b ("cgroups: subsystem module loading interface") and commit
c50cc752 ("sched, cgroups: Fix module export") result in duplicate
including of module.h

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomemcg: disable move charge in no mmu case
Daisuke Nishimura [Tue, 23 Mar 2010 20:35:11 +0000 (13:35 -0700)] 
memcg: disable move charge in no mmu case

In commit 02491447 ("memcg: move charges of anonymous swap"), I tried to
disable move charge feature in no mmu case by enclosing all the related
functions with "#ifdef CONFIG_MMU", but the commit places these ifdefs in
wrong place.  (it seems that it's mangled while handling some fixes...)

This patch fixes it up.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofirewire: core: align driver match with modalias
Stefan Richter [Thu, 18 Mar 2010 23:39:07 +0000 (00:39 +0100)] 
firewire: core: align driver match with modalias

The driver match strategy was:
  - Match vendor/model/specifier/version of the unit directory.
  - If that was a miss, match vendor from the root directory and
    model/specifier/version of the unit directory.

This was inconsistent with how the modalias string was constructed
until recently (take vendor/model from root directory and specifier/
version from unit directory).  It was also inconsistent with how it is
done since the parent commit:
  - Use vendor/model/specifier/version of the unit directory if possible,
  - fall back to one or more of vendor/model/specifier/version from the
    root directory depending on which ones are not present at the unit
    directory.

Fix this inconsistency by sharing the ROM scanner function between
modalias printer function and driver match function.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
14 years agofirewire: core: fix Model_ID in modalias
Stefan Richter [Thu, 18 Mar 2010 23:38:29 +0000 (00:38 +0100)] 
firewire: core: fix Model_ID in modalias

The modalias string of devices that represent units on a FireWire node
did not show Module_ID entries within unit directories.  This was
because firewire-core searched only the root directory of the
configuration ROM for a Model_ID entry.

We now search first the root directory, then the unit directory.  IOW
honor a unit directory's Model_ID if present, otherwise fall back to the
root directory's model ID (if present).

Furthermore, apply the same change to Vendor_ID.  This had the same
issue but it was less apparent because most devices provide Vendor_ID
only in the root directory.

And finally, also use this strategy for the remaining two IDs in the
modalias, Specifier_ID and Version.  It does not actually make sense to
look for them elsewhere than in the unit directory because they are
mandatory there.  However, a uniform search order simplifies the
implementation and has no adverse affect in practice.

Side notes:
  - The older counterpart of this, nodemgr.c of ieee1394, looked for
    Vendor_ID first in the root directory, then in the unit directory,
    and for Model_ID only in the unit directory.
  - There is a single mainline driver which requires Vendor_ID and
    Model_ID --- the firedtv driver.  This one worked because FireDTVs
    provide Vendor_ID in the root directory and Model_ID identically in
    root directory and unit directory.
  - Apart from firedtv, there are currently no drivers known to me
    (including userspace drivers) that look at the Vendor_ID or Model_ID
    of the modalias.

Reported-by: Maciej Żenczykowski <zenczykowski@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
14 years agoaf_key: return error if pfkey_xfrm_policy2msg_prep() fails
Dan Carpenter [Wed, 24 Mar 2010 01:47:00 +0000 (01:47 +0000)] 
af_key: return error if pfkey_xfrm_policy2msg_prep() fails

The original code saved the error value but just returned 0 in the end.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jamal Hadi Salim <hadi@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPCI quirk: RS780/RS880: work around missing MSI initialization
Clemens Ladisch [Mon, 22 Mar 2010 08:52:16 +0000 (09:52 +0100)] 
PCI quirk: RS780/RS880: work around missing MSI initialization

AMD says in section 2.5.4 (GFX MSI Enable) of #43291 (AMD 780G Family
Register Programming Requirements):

  The SBIOS must enable internal graphics MSI capability in GCCFG by
  setting the following: NBCFG.NB_CNTL.STRAP_MSI_ENABLE='1'

Quite a few BIOS writers misinterpret this sentence and think that
enabling MSI is an optional feature.  However, clearing that bit just
prevents delivery of MSI messages but does not remove the MSI PCI
capabilities registers, and so leaves these devices unusable for any
driver that attempts to use MSI.

Setting that bit is not possible after the BIOS has locked down the
configuration registers, so we have to manually disable MSI for the
affected devices.

This fixes the codec communication errors in the HDA driver when
accessing the HDMI audio device, and allows us to get rid of the
overcautious quirk in radeon_irq_kms.c.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Alex Deucher <alexdeucher@gamil.com>
Cc: <stable@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI quirk: only apply CX700 PCI bus parking quirk if external VT6212L is present
Tim Yamin [Fri, 19 Mar 2010 21:22:58 +0000 (14:22 -0700)] 
PCI quirk: only apply CX700 PCI bus parking quirk if external VT6212L is present

Apply the CX700 quirk only when an external VT6212L is present (which
is the case for the errant hardware the quirk was written for), don't
touch the settings otherwise -- Hauppage PVR-500 tuners need PCI Bus
Parking in order to work and when that's turned on everything seems
to behave fine.

I guess the underlying problem is a combination of an external VT6212L
and the CX700 rather than the CX700's PCI being broken completely for
all cases...

Reported-by: Jeroen Roos <jeroen@roosnl.com>
Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI: complain about devices that seem to be broken
Bjorn Helgaas [Fri, 19 Mar 2010 20:56:27 +0000 (14:56 -0600)] 
PCI: complain about devices that seem to be broken

If we can tell that a device isn't working correctly, we should tell
the user to make debugging easier.  Otherwise, it can take a lot of
work to determine whether the problem is in the driver, PCMCIA, PCI,
hardware, etc., as in http://bugzilla.kernel.org/show_bug.cgi?id=12006

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI: print resources consistently with %pR
Bjorn Helgaas [Tue, 16 Mar 2010 21:53:08 +0000 (15:53 -0600)] 
PCI: print resources consistently with %pR

No functional change; just print resources in the conventional style.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI: make disabled window printk style match the enabled ones
Bjorn Helgaas [Tue, 16 Mar 2010 21:53:03 +0000 (15:53 -0600)] 
PCI: make disabled window printk style match the enabled ones

No functional change; this just tweaks the changes from 349e1823a405
so the new printks for disabled PCI-to-PCI bridge windows match the
ones for the enabled windows.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
CC: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI: break out primary/secondary/subordinate for readability
Bjorn Helgaas [Tue, 16 Mar 2010 21:52:58 +0000 (15:52 -0600)] 
PCI: break out primary/secondary/subordinate for readability

No functional change; just add names for the primary/secondary/subordinate
bus numbers read from config space rather than repeatedly masking/shifting.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoPCI: for address space collisions, show conflicting resource
Bjorn Helgaas [Fri, 12 Mar 2010 00:01:19 +0000 (17:01 -0700)] 
PCI: for address space collisions, show conflicting resource

With request_resource_conflict(), we can learn what the actual conflict is,
so print that info for debugging purposes.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agox86: Remove excessive early_res debug output
Jiri Kosina [Mon, 22 Mar 2010 08:32:26 +0000 (09:32 +0100)] 
x86: Remove excessive early_res debug output

Commit 08677214e318297 ("x86: Make 64 bit use early_res instead
of bootmem  before slab") introduced early_res replacement for
bootmem, but left code  in __free_pages_memory() which dumps all
the ranges that are beeing freed,  without any additional
information, causing some noise in dmesg during  bootup.

Just remove printing of the ranges, that doesn't provide
anything useful  anyway.

While at it, remove other commented-out KERN_DEBUG messages in
the NO_BOOTMEM code as well.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Found-OK-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <alpine.LNX.2.00.1003220931360.18642@pobox.suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoskbuff: remove unused dma_head & dma_maps fields
Alexander Duyck [Tue, 23 Mar 2010 20:40:50 +0000 (20:40 +0000)] 
skbuff: remove unused dma_head & dma_maps fields

The dma map fields in the skb_shared_info structure no longer has any users
and can be dropped since it is making the skb_shared_info unecessarily larger.

Running slabtop show that we were using 4K slabs for the skb->head on x86_64 w/
an allocation size of 1522.  It turns out that the dma_head and dma_maps array
made skb_shared large enough that we had crossed over the 2k boundary with
standard frames and as such we were using 4k blocks of memory for all skbs.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovlan: updates vlan real_num_tx_queues
Vasu Dev [Tue, 23 Mar 2010 14:42:05 +0000 (14:42 +0000)] 
vlan: updates vlan real_num_tx_queues

Updates real_num_tx_queues in case underlying real device
has changed real_num_tx_queues.

-v2
 As per Eric Dumazet<eric.dumazet@gmail.com> comment:-
   -- adds BUG_ON to catch case of real_num_tx_queues exceeding num_tx_queues.
   -- created this self contained patch to just update real_num_tx_queues.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovlan: adds vlan_dev_select_queue
Vasu Dev [Tue, 23 Mar 2010 14:41:45 +0000 (14:41 +0000)] 
vlan: adds vlan_dev_select_queue

This is required to correctly select vlan tx queue for a driver
supporting multi tx queue with ndo_select_queue implemented since
currently selected vlan tx queue is unaligned to selected queue by
real net_devce ndo_select_queue.

Unaligned vlan tx queue selection causes thrash with higher vlan
tx lock contention for least fcoe traffic and wrong socket tx
queue_mapping for ixgbe having ndo_select_queue implemented.

-v2

As per Eric Dumazet<eric.dumazet@gmail.com> comments, mirrored
vlan net_device_ops to have them with and without vlan_dev_select_queue
and then select according to real dev ndo_select_queue present or not
for a vlan net_device. This is to completely skip vlan_dev_select_queue
calling for real net_device not supporting ndo_select_queue.

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoi2c-scmi: Provide module aliases for automatic loading
Darrick J. Wong [Wed, 24 Mar 2010 13:38:39 +0000 (14:38 +0100)] 
i2c-scmi: Provide module aliases for automatic loading

Provide module aliases for automatic loading.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoi2c-scmi: Support IBM SMBus CMI devices
Crane Cai [Wed, 24 Mar 2010 13:38:38 +0000 (14:38 +0100)] 
i2c-scmi: Support IBM SMBus CMI devices

*) add a new HID for IBM SMBus CMI devices
*) add methods for IBM SMBus CMI devices
*) hook different HID with different control methods set
*) minor tweaks as suggested by Jean Delvare

Slightly modified by Darrick to use #define'd IBM SMBUS HID from Darrick's ACPI
scan quirk patch.

Signed-off-by: Crane Cai <crane.cai@amd.com>
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agoacpi: Support IBM SMBus CMI devices
Darrick J. Wong [Wed, 24 Mar 2010 13:38:37 +0000 (14:38 +0100)] 
acpi: Support IBM SMBus CMI devices

On some old IBM workstations and desktop computers, the BIOS presents in the
DSDT an SMBus object that is missing the HID identifier that the i2c-scmi
driver looks for.  Modify the ACPI device scan code to insert the missing HID
if it finds an IBM system with such an object.

Affected machines: IntelliStation Z20/Z30.  Note that the i2c-i801 driver no
longer works on these machines because of ACPI resource conflicts.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
14 years agogenirq: Move two IRQ functions from .init.text to .text
Henrik Kretzschmar [Wed, 24 Mar 2010 11:59:20 +0000 (12:59 +0100)] 
genirq: Move two IRQ functions from .init.text to .text

Both functions should not be marked as __init, since they be called
from modules after the init section is freed.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Jiri Kosina <jkosina@suse.cz>
LKML-Reference: <1269431961-5731-1-git-send-email-henne@nachtwindheim.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agogenirq: Protect access to irq_desc->action in can_request_irq()
Thomas Gleixner [Tue, 23 Mar 2010 21:40:53 +0000 (22:40 +0100)] 
genirq: Protect access to irq_desc->action in can_request_irq()

can_request_irq() accesses and dereferences irq_desc->action w/o
holding irq_desc->lock. So action can be freed on another CPU before
it's dereferenced. Unlikely, but ...

Protect it with desc->lock.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years ago[S390] fix boot failures with compressed kernels
Martin Schwidefsky [Wed, 24 Mar 2010 10:49:57 +0000 (11:49 +0100)] 
[S390] fix boot failures with compressed kernels

Fix two bugs with the kernel image compression:
1) reset the bss section of the compressed vmlinux
2) clear the high half of the registers for 64 bit early enough
   for the decompression step

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] fix broken proc interface for sclp_async
Hans-Joachim Picht [Wed, 24 Mar 2010 10:49:56 +0000 (11:49 +0100)] 
[S390] fix broken proc interface for sclp_async

This patch now allows the use of the proc interface to either activate
or deactivate call home on panic.
e.g.  echo 1 > /proc/sys/kernel/callhome
strict_strtoul() requires _either_'\n\0' _or_ '\0' termination.
This was missing and therefore the interface did not recognise valid input.

Signed-off-by: Hans-Joachim Picht <hans@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] sclp: avoid 64 bit division
Heiko Carstens [Wed, 24 Mar 2010 10:49:55 +0000 (11:49 +0100)] 
[S390] sclp: avoid 64 bit division

Avoid 64 bit division to fix this compile error on 32 bit:
drivers/s390/char/sclp_cmd.c:711: undefined reference to `__udivdi3'

Also move the whole arch_get_memory_phys_device function to the
memory hotplug related functions.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: check tsb validity
Stefan Haberland [Wed, 24 Mar 2010 10:49:54 +0000 (11:49 +0100)] 
[S390] dasd: check tsb validity

Check tsb validity before the tcw_get_tsb function is called.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] dasd: fix alignment of transport mode recovery TCW
Stefan Weinhuber [Wed, 24 Mar 2010 10:49:53 +0000 (11:49 +0100)] 
[S390] dasd: fix alignment of transport mode recovery TCW

All TCWs need to be aligned on a 64 byte boundary or the I/O will be
rejected. For recovery requests we create fresh TCWs, so we need to
do the proper alignment here as well.

Signed-off-by: Stefan Weinhuber <wein@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] system.h: Fix compile error for 1 and 2 byte cmpxchg
Christian Borntraeger [Wed, 24 Mar 2010 10:49:52 +0000 (11:49 +0100)] 
[S390] system.h: Fix compile error for 1 and 2 byte cmpxchg

commit 024914477e15ef8b17f271ec47f1bb8a589f0806 "memcg: move charges of anonymous
swap" revealed that the 1 byte and 2 byte cmpxchg is currently broken:

arch/s390/include/asm/system.h: Assembler messages:
arch/s390/include/asm/system.h:241: Error: junk at end of line: `(%r5)'
make[1]: *** [mm/page_cgroup.o] Error 1
make[1]: *** Waiting for unfinished jobs....

It turned out that commit 987bcdacb18a3adc2a48d85c9b005069c2f4dd7b ([S390] use
inline assembly contraints available with gcc 3.3.3) broke the inline assembly.
The or operands are now in constraint 3 and 4 instead of 2 and 3.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] smp: fix lowcore allocation
Heiko Carstens [Wed, 24 Mar 2010 10:49:51 +0000 (11:49 +0100)] 
[S390] smp: fix lowcore allocation

The intermediate lowcore for CONFIG_SMP is allocated using a call to
__alloc_bootmem() with a goal of 0. That however doesn't guarantee that
the allocated piece of memory is below 2GB.
Instead we should call __alloc_bootmem_low().

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] zcore: CPU registers are not saved under LPAR
Michael Holzheu [Wed, 24 Mar 2010 10:49:50 +0000 (11:49 +0100)] 
[S390] zcore: CPU registers are not saved under LPAR

To save the registers for all CPUs a sigp "store status" is done that
stores the registers to address absolute zero. To access storage at
absolute zero, normally the address of the prefix register of the
accessing CPU has to be used. This does not work when large pages are
active (currently only under LPAR). In order to fix that problem,
instead of memcpy memcpy_real is used, which switches to real mode
where prefixing works.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years agopcmcia: use dev_pm_ops for class pcmcia_socket_class
Dominik Brodowski [Mon, 15 Mar 2010 20:46:34 +0000 (21:46 +0100)] 
pcmcia: use dev_pm_ops for class pcmcia_socket_class

Instead of requiring PCMCIA socket drivers to call various functions
during their (bus) resume and suspend functions, register an own
dev_pm_ops for this class. This fixes several suspend/resume bugs
seen on db1xxx-ss, and probably on some other socket drivers, too.

With regard to the asymmetry with only _noirq suspend, but split up
resume, please see bug 14334 and commit 9905d1b411946fb3 .

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agopower: support _noirq actions on device types and classes
Dominik Brodowski [Mon, 15 Mar 2010 20:43:11 +0000 (21:43 +0100)] 
power: support _noirq actions on device types and classes

The new-style dev_pm_ops provide callbacks for both IRQs enabled
and disabled. However, the _noirq variants were only called for
buses registered with a device, not for classes and types.

In order to properly use dev_pm_ops in class pcmcia_socket_class,
support _noirq actions also on classes and types.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agopcmcia: allow for four multifunction subdevices (again)
Dominik Brodowski [Wed, 24 Mar 2010 09:49:14 +0000 (10:49 +0100)] 
pcmcia: allow for four multifunction subdevices (again)

Commit aa584ca4 broke what 6cf5be51 had already fixed: there may
be four multifunction devices, but just two pseudo-multifunction
devices per PCMCIA card.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Wed, 24 Mar 2010 07:03:38 +0000 (08:03 +0100)] 
Merge branch 'fix/hda' into for-linus

14 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Wed, 24 Mar 2010 07:03:34 +0000 (08:03 +0100)] 
Merge branch 'fix/asoc' into for-linus

14 years agoALSA: cmipci: work around invalid PCM pointer
Clemens Ladisch [Wed, 24 Mar 2010 06:10:54 +0000 (07:10 +0100)] 
ALSA: cmipci: work around invalid PCM pointer

When the CMI8738 FRAME2 register is read, the chip sometimes (probably
when wrapping around) returns an invalid value that would be outside the
programmed DMA buffer. This leads to an inconsistent PCM pointer that is
likely to result in an underrun.

To work around this, read the register multiple times until we get a
valid value; the error state seems to be very short-lived.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Matija Nalis <mnalis-alsadev@voyager.hr>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoigb: only use vlan_gro_receive if vlans are registered
Alexander Duyck [Tue, 23 Mar 2010 18:35:18 +0000 (18:35 +0000)] 
igb: only use vlan_gro_receive if vlans are registered

This change makes it so that vlan_gro_receive is only used if vlans have been
registered to the adapter structure.  Previously we were just sending all vlan
tagged frames in via this function but this results in a null pointer
dereference when vlans are not registered.

[ This fixes bugzilla entry 15582 -Eric Dumazet]

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: do not modify tx_queue_len on link speed change
Emil Tantilov [Tue, 23 Mar 2010 18:34:57 +0000 (18:34 +0000)] 
igb: do not modify tx_queue_len on link speed change

Previously the driver tweaked txqueuelen to avoid false Tx hang reports seen at half duplex.
This had the effect of overriding user set values on link change/reset. Testing shows that
adjusting only the timeout factor is sufficient to prevent Tx hang reports at half duplex.

Based on e1000e patch by Franco Fichtner <franco@lastsummer.de>

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: count Rx FIFO errors correctly
Mitch Williams [Tue, 23 Mar 2010 18:34:38 +0000 (18:34 +0000)] 
igb: count Rx FIFO errors correctly

Don't aggregate rx_no_buffer_count into rx_fifo_errors. RNBC counts
packets that get queued temporarily in the adapter's FIFO. These
packets are not dropped and are not errors. The correct counter
is rx_missed_errors (MPC).

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Use proper handler during netpoll.
Michael Chan [Tue, 23 Mar 2010 13:13:12 +0000 (13:13 +0000)] 
bnx2: Use proper handler during netpoll.

Netpoll needs to call the proper handler depending on the IRQ mode
and the vector.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: Fix netpoll crash.
Benjamin Li [Tue, 23 Mar 2010 13:13:11 +0000 (13:13 +0000)] 
bnx2: Fix netpoll crash.

The bnx2 driver calls netif_napi_add() for all the NAPI structs during
->probe() time but not all of them will be used if we're not in MSI-X
mode.  This creates a problem for netpoll since it will poll all the
NAPI structs in the dev_list whether or not they are scheduled, resulting
in a crash when we access structure fields not initialized for that vector.

We fix it by moving the netif_napi_add() call to ->open() after the number
of IRQ vectors has been determined.

Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoext4: Fixed inode allocator to correctly track a flex_bg's used_dirs
Eric Sandeen [Wed, 24 Mar 2010 01:32:00 +0000 (21:32 -0400)] 
ext4: Fixed inode allocator to correctly track a flex_bg's used_dirs

When used_dirs was introduced for the flex_groups struct, it looks
like the accounting was not put into place properly, in some places
manipulating free_inodes rather than used_dirs.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Don't use delayed allocation by default when used instead of ext3
Jan Kara [Thu, 25 Mar 2010 00:18:37 +0000 (20:18 -0400)] 
ext4: Don't use delayed allocation by default when used instead of ext3

When ext4 driver is used to mount a filesystem instead of the ext3 file
system driver (through CONFIG_EXT4_USE_FOR_EXT23), do not enable delayed
allocation by default since some ext3 users and application writers have
developed unfortunate expectations about the safety of writing files on
systems subject to sudden and violent death without using fsync().

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Fix spelling of CONTIG_FS_EXT3 to CONFIG_FS_EXT3
Theodore Ts'o [Thu, 25 Mar 2010 00:06:41 +0000 (20:06 -0400)] 
ext4: Fix spelling of CONTIG_FS_EXT3 to CONFIG_FS_EXT3

Oops.  (Blush.)

Thanks to Sedat Dilek for pointing this out.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoocfs2: Fix a race in o2dlm lockres mastery
Srinivas Eeda [Mon, 22 Mar 2010 23:50:47 +0000 (16:50 -0700)] 
ocfs2: Fix a race in o2dlm lockres mastery

In o2dlm, the master of a lock resource keeps a map of all interested
nodes.  This prevents the master from purging the resource before an
interested node can create a lock.

A race between the mastery thread and the mastery handler allowed an
interested node to discover who the master is without informing the
master directly.  This is easily fixed by holding the dlm spinlock a
little longer in the mastery handler.

Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years agoOcfs2: Handle deletion of reflinked oprhan inodes correctly.
Tristan Ye [Fri, 19 Mar 2010 01:21:10 +0000 (09:21 +0800)] 
Ocfs2: Handle deletion of reflinked oprhan inodes correctly.

The rule is that all inodes in the orphan dir have ORPHANED_FL,
otherwise we treated it as an ERROR.  This rule works well except
for some rare cases of reflink operation:

http://oss.oracle.com/bugzilla/show_bug.cgi?id=1215

The problem is caused by how reflink and our orphan_scan thread
interact.

 * The orphan scan pulls the orphans into a queue first, then runs the
   queue at a later time.  We only hold the orphan_dir's lock
   during scanning.

 * Reflink create a oprhaned target in orphan_dir as its first step.
   It removes the target and clears the flag as the final step.
   These two steps take the orphan_dir's lock, but it is not held for
   the duration.

Based on the above semantics, a reflink inode can be moved out of the
orphan dir and have its ORPHANED_FL cleared before the queue of orphans
is run.  This leads to a ERROR in ocfs2_query_wipde_inode().

This patch teaches ocfs2_query_wipe_inode() to detect previously
orphaned reflink targets.  If a reflink fails or a crash occurs during
the relfink operation, the inode will retain ORPHANED_FL and will be
properly wiped.

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years agoOcfs2: Journaling i_flags and i_orphaned_slot when adding inode to orphan dir.
Tristan Ye [Fri, 19 Mar 2010 01:21:09 +0000 (09:21 +0800)] 
Ocfs2: Journaling i_flags and i_orphaned_slot when adding inode to orphan dir.

Currently, some callers were missing to journal the dirty inode after
adding it to orphan dir.

Now we're going to journal such modifications within the ocfs2_orphan_add()
itself, It's safe to do so, though some existing caller may duplicate this,
and it makes the logic look more straightforward anyway.

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years agoocfs2: Clear undo bits when local alloc is freed
Mark Fasheh [Fri, 12 Mar 2010 02:31:09 +0000 (18:31 -0800)] 
ocfs2: Clear undo bits when local alloc is freed

When the local alloc file changes windows, unused bits are freed back to the
global bitmap. By defnition, those bits can not be in use by any file. Also,
the local alloc will never have been able to allocate those bits if they
were part of a previous truncate. Therefore it makes sense that we should
clear unused local alloc bits in the undo buffer so that they can be used
immediatly.

[ Modified to call it ocfs2_release_clusters() -- Joel ]

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years agoresources: add interfaces that return conflict information
Bjorn Helgaas [Fri, 12 Mar 2010 00:01:09 +0000 (17:01 -0700)] 
resources: add interfaces that return conflict information

request_resource() and insert_resource() only return success or failure,
which no information about what existing resource conflicted with the
proposed new reservation.  This patch adds request_resource_conflict()
and insert_resource_conflict(), which return the conflicting resource.

Callers may use this for better error messages or to adjust the new
resource and retry the request.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agoksz884x: fix return value of netdev_set_eeprom
Jens Rottmann [Tue, 23 Mar 2010 04:23:50 +0000 (04:23 +0000)] 
ksz884x: fix return value of netdev_set_eeprom

ksz884x: fix return value of netdev_set_eeprom

netdev_set_eeprom() confused ethtool by just returning 1 on error
instead of a proper -EINVAL.

Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocgroups: net_cls as module
Ben Blum [Tue, 23 Mar 2010 05:24:03 +0000 (05:24 +0000)] 
cgroups: net_cls as module

Allows the net_cls cgroup subsystem to be compiled as a module

This patch modifies net/sched/cls_cgroup.c to allow the net_cls subsystem
to be optionally compiled as a module instead of builtin.  The
cgroup_subsys struct is moved around a bit to allow the subsys_id to be
either declared as a compile-time constant by the cgroup_subsys.h include
in cgroup.h, or, if it's a module, initialized within the struct by
cgroup_load_subsys.

Signed-off-by: Ben Blum <bblum@andrew.cmu.edu>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Paul Menage <menage@google.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrm/i915: Stop trying to use ACPI lid status to determine LVDS connection.
Eric Anholt [Wed, 17 Mar 2010 20:48:06 +0000 (13:48 -0700)] 
drm/i915: Stop trying to use ACPI lid status to determine LVDS connection.

I've been getting more and more quirk reports about this.  It seems
clear at this point that other OSes are not using this for determining
whether the integrated panel should be turned on, and it is not
reliable for doing so.  Better to light up an unintended panel than to
not light up the only usable output on the system.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
14 years agopcmcia: do not use ioports < 0x100 on x86
Dominik Brodowski [Tue, 23 Mar 2010 15:05:00 +0000 (16:05 +0100)] 
pcmcia: do not use ioports < 0x100 on x86

On x86 systems using ACPI _CRS information -- now the default for
post-2008 systems -- the PCI root bus no longer pretends to be
offering the root ioport_resource. To avoid accidentally hitting
some platform / system device, use only I/O ports >= 0x100 for
PCMCIA devices on x86.

Reported-by: Komuro <komurojun-mbn@nifty.com>
CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years ago[ARM] Orion5x: replace KEY_WLAN with KEY_WPS_BUTTON
Christian Lamparter [Mon, 8 Mar 2010 23:26:35 +0000 (15:26 -0800)] 
[ARM] Orion5x: replace KEY_WLAN with KEY_WPS_BUTTON

"Input: add KEY_WPS_BUTTON definition" introduced
a generic keycode for WPS input events.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
14 years ago[ARM] Kirkwood: WPS button keycode mapping
Christian Lamparter [Mon, 8 Mar 2010 23:25:29 +0000 (15:25 -0800)] 
[ARM] Kirkwood: WPS button keycode mapping

Commit "Input: add KEY_WPS_BUTTON definition"
added a generic keycode for WPS button.
Let's use it, instead of "F1" mapping.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
14 years agonilfs2: fix imperfect completion wait in nilfs_wait_on_logs
Ryusuke Konishi [Mon, 22 Mar 2010 10:33:43 +0000 (19:33 +0900)] 
nilfs2: fix imperfect completion wait in nilfs_wait_on_logs

nilfs_wait_on_logs has a potential to slip out before completion of
all bio requests when it met an error.  This synchronization fault may
cause unexpected results, for instance, violative access to freed
segment buffers from an end-bio callback routine.

This fixes the issue by ensuring that nilfs_wait_on_logs waits all
given logs.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
14 years agotime: Fix accumulation bug triggered by long delay.
John Stultz [Thu, 18 Mar 2010 21:47:30 +0000 (14:47 -0700)] 
time: Fix accumulation bug triggered by long delay.

The logarithmic accumulation done in the timekeeping has some overflow
protection that limits the max shift value. That means it will take
more then shift loops to accumulate all of the cycles. This causes
the shift decrement to underflow, which causes the loop to never exit.

The simplest fix would be simply to do a:
if (shift)
shift--;

However that is not optimal, as we know the cycle offset is larger
then the interval << shift, the above would make shift drop to zero,
then we would be spinning for quite awhile accumulating at interval
chunks at a time.

Instead, this patch only decreases shift if the offset is smaller
then cycle_interval << shift.  This makes sure we accumulate using
the largest chunks possible without overflowing tick_length, and limits
the number of iterations through the loop.

This issue was found and reported by Sonic Zhang, who also tested the fix.
Many thanks your explanation and testing!

Reported-by: Sonic Zhang <sonic.adi@gmail.com>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Tested-by: Sonic Zhang <sonic.adi@gmail.com>
LKML-Reference: <1268948850-5225-1-git-send-email-johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
14 years agopd6729: Coding Style fixes
Komuro [Fri, 19 Mar 2010 21:39:19 +0000 (06:39 +0900)] 
pd6729: Coding Style fixes

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
14 years agonilfs2: fix hang-up of cleaner after log writer returned with error
Ryusuke Konishi [Mon, 22 Mar 2010 12:36:06 +0000 (21:36 +0900)] 
nilfs2: fix hang-up of cleaner after log writer returned with error

According to the report from Andreas Beckmann (Message-ID:
<4BA54677.3090902@abeckmann.de>), nilfs in 2.6.33 kernel got stuck
after a disk full error.

This turned out to be a regression by log writer updates merged at
kernel 2.6.33.  nilfs_segctor_abort_construction, which is a cleanup
function for erroneous cases, was skipping writeback completion for
some logs.

This fixes the bug and would resolve the hang issue.

Reported-by: Andreas Beckmann <debian@abeckmann.de>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: stable <stable@kernel.org> [2.6.33.x]
14 years agoceph: avoid loaded term 'OSD' in documention
Sage Weil [Mon, 22 Mar 2010 16:37:14 +0000 (09:37 -0700)] 
ceph: avoid loaded term 'OSD' in documention

'OSD' means different things to different people; avoid it here to avoid
confusion.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: fix possible double-free of mds request reference
Sage Weil [Wed, 10 Mar 2010 20:03:32 +0000 (12:03 -0800)] 
ceph: fix possible double-free of mds request reference

Clear pointer to mds request after dropping the reference to
ensure we don't drop it again, as there is at least one error
path through this function that does not reset fi->last_readdir
to a new value.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: fix session check on mds reply
Sage Weil [Sun, 21 Mar 2010 03:50:58 +0000 (20:50 -0700)] 
ceph: fix session check on mds reply

Fix a broken check that a reply came back from the same MDS we sent the
request to.  I don't think a case that actually triggers this would ever
come up in practice, but it's clearly wrong and easy to fix.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: handle kmalloc() failure
Dan Carpenter [Sat, 20 Mar 2010 12:30:16 +0000 (15:30 +0300)] 
ceph: handle kmalloc() failure

Return ERR_PTR(-ENOMEM) if kmalloc() fails.  We handle allocation
failures the same way later in the function.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: propagate mds session allocation failures to caller
Sage Weil [Sun, 21 Mar 2010 03:43:28 +0000 (20:43 -0700)] 
ceph: propagate mds session allocation failures to caller

Return error to original caller if register_session() fails.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: make write_begin wait propagate ERESTARTSYS
Sage Weil [Fri, 19 Mar 2010 20:27:53 +0000 (13:27 -0700)] 
ceph: make write_begin wait propagate ERESTARTSYS

Currently, if the wait_event_interruptible is interrupted, we
return EAGAIN unconditionally and loop, such that we aren't, in
fact, interruptible.  So, propagate ERESTARTSYS if we get it.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: fix snap rebuild condition
Sage Weil [Fri, 19 Mar 2010 20:24:39 +0000 (13:24 -0700)] 
ceph: fix snap rebuild condition

We were rebuilding the snap context when it was not necessary
(i.e. when the realm seq hadn't changed _and_ the parent seq
was still older), which caused page snapc pointers to not match
the realm's snapc pointer (even though the snap context itself
was identical).  This confused begin_write and put it into an
endless loop.

The correct logic is: rebuild snapc if _my_ realm seq changed, or
if my parent realm's seq is newer than mine (and thus mine needs
to be rebuilt too).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: avoid reopening osd connections when address hasn't changed
Sage Weil [Mon, 22 Mar 2010 21:51:18 +0000 (14:51 -0700)] 
ceph: avoid reopening osd connections when address hasn't changed

We get a fault callback on _every_ tcp connection fault.  Normally, we
want to reopen the connection when that happens.  If the address we have
is bad, however, and connection attempts always result in a connection
refused or similar error, explicitly closing and reopening the msgr
connection just prevents the messenger's backoff logic from kicking in.
The result can be a console full of

[ 3974.417106] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.423295] ceph: osd11 10.3.14.138:6800 connection failed
[ 3974.429709] ceph: osd11 10.3.14.138:6800 connection failed

Instead, if we get a fault, and have outstanding requests, but the osd
address hasn't changed and the connection never successfully connected in
the first place, do nothing to the osd connection.  The messenger layer
will back off and retry periodically, because we never connected and thus
the lossy bit is not set.

Instead, touch each request's r_stamp so that handle_timeout can tell the
request is still alive and kicking.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: rename r_sent_stamp r_stamp
Sage Weil [Mon, 22 Mar 2010 21:42:30 +0000 (14:42 -0700)] 
ceph: rename r_sent_stamp r_stamp

Make variable name slightly more generic, since it will (soon)
reflect either the time the request was sent OR the time it was
last determined to be still retrying.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: fix connection fault con_work reentrancy problem
Sage Weil [Thu, 18 Mar 2010 22:20:53 +0000 (15:20 -0700)] 
ceph: fix connection fault con_work reentrancy problem

The messenger fault was clearing the BUSY bit, for reasons unclear.  This
made it possible for the con->ops->fault function to reopen the connection,
and requeue work in the workqueue--even though the current thread was
already in con_work.

This avoids a problem where the client busy loops with connection failures
on an unreachable OSD, but doesn't address the root cause of that problem.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: prevent dup stale messages to console for restarting mds
Sage Weil [Thu, 18 Mar 2010 20:43:09 +0000 (13:43 -0700)] 
ceph: prevent dup stale messages to console for restarting mds

Prevent duplicate 'mds0 caps stale' message from spamming the console every
few seconds while the MDS restarts.  Set s_renew_requested earlier, so that
we only print the message once, even if we don't send an actual request.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: fix pg pool decoding from incremental osdmap update
Sage Weil [Wed, 17 Mar 2010 17:05:28 +0000 (10:05 -0700)] 
ceph: fix pg pool decoding from incremental osdmap update

The incremental map decoding of pg pool updates wasn't skipping
the snaps and removed_snaps vectors.  This caused osd requests
to stall when pool snapshots were created or fs snapshots were
deleted.  Use a common helper for full and incremental map
decoders that decodes pools properly.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: fix mds sync() race with completing requests
Sage Weil [Tue, 16 Mar 2010 22:28:54 +0000 (15:28 -0700)] 
ceph: fix mds sync() race with completing requests

The wait_unsafe_requests() helper dropped the mdsc mutex to wait
for each request to complete, and then examined r_node to get the
next request after retaking the lock.  But the request completion
removes the request from the tree, so r_node was always undefined
at this point.  Since it's a small race, it usually led to a
valid request, but not always.  The result was an occasional
crash in rb_next() while dereferencing node->rb_left.

Fix this by clearing the rb_node when removing the request from
the request tree, and not walking off into the weeds when we
are done waiting for a request.  Since the request we waited on
will _always_ be out of the request tree, take a ref on the next
request, in the hopes that it won't be.  But if it is, it's ok:
we can start over from the beginning (and traverse over older read
requests again).

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: only release unused caps with mds requests
Sage Weil [Tue, 16 Mar 2010 22:01:07 +0000 (15:01 -0700)] 
ceph: only release unused caps with mds requests

We were releasing used caps (e.g. FILE_CACHE) from encode_inode_release
with MDS requests (e.g. setattr).  We don't carry refs on most caps, so
this code worked most of the time, but for setattr (utimes) we try to
drop Fscr.

This causes cap state to get slightly out of sync with reality, and may
result in subsequent mds revoke messages getting ignored.

Fix by only releasing unused caps.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: clean up handle_cap_grant, handle_caps wrt session mutex
Sage Weil [Tue, 16 Mar 2010 20:42:00 +0000 (13:42 -0700)] 
ceph: clean up handle_cap_grant, handle_caps wrt session mutex

Drop session mutex unconditionally in handle_cap_grant, and do the
check_caps from the handle_cap_grant helper.  This avoids using a magic
return value.

Also avoid using a flag variable in the IMPORT case and call
check_caps at the appropriate point.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: fix session locking in handle_caps, ceph_check_caps
Sage Weil [Tue, 16 Mar 2010 20:39:28 +0000 (13:39 -0700)] 
ceph: fix session locking in handle_caps, ceph_check_caps

Passing a session pointer to ceph_check_caps() used to mean it would leave
the session mutex locked.  That wasn't always possible if it wasn't passed
CHECK_CAPS_AUTHONLY.   If could unlock the passed session and lock a
differet session mutex, which was clearly wrong, and also emitted a
warning when it a racing CPU retook it and we did an unlock from the wrong
context.

This was only a problem when there was more than one MDS.

First, make ceph_check_caps unconditionally drop the session mutex, so that
it is free to lock other sessions as needed.  Then adjust the one caller
that passes in a session (handle_cap_grant) accordingly.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: drop unnecessary WARN_ON in caps migration
Sage Weil [Tue, 16 Mar 2010 17:36:40 +0000 (10:36 -0700)] 
ceph: drop unnecessary WARN_ON in caps migration

If we don't have the exported cap it's because we already released it. No
need to WARN.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: fix null pointer deref of r_osd in debug output
Sage Weil [Tue, 16 Mar 2010 05:20:39 +0000 (22:20 -0700)] 
ceph: fix null pointer deref of r_osd in debug output

This causes an oops when debug output is enabled and we kick
an osd request with no current r_osd (sometime after an osd
failure).  Check the pointer before dereferencing.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: clean up service ticket decoding
Sage Weil [Mon, 15 Mar 2010 23:12:25 +0000 (16:12 -0700)] 
ceph: clean up service ticket decoding

Previously we would decode state directly into our current ticket_handler.
This is problematic if for some reason we fail to decode, because we end
up with half new state and half old state.

We are probably already in bad shape if we get an update we can't decode,
but we may as well be tidy anyway.  Decode into new_* temporaries and
update the ticket_handler only on success.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agolibata-sff: fix spurious IRQ handling
Tejun Heo [Tue, 23 Mar 2010 03:24:08 +0000 (12:24 +0900)] 
libata-sff: fix spurious IRQ handling

Commit 27943620cbd960f710a385ff4a538e14ed3f1922 introduced spurious
IRQ handling but it has a race condition where valid completion can be
lost while trying to clear spurious IRQ leading to occassional command
timeouts.

This patch improves SFF interrupt handler such that

1. Once BMDMA HSM is stopped, the condition is never considered
   spurious.  As there's no way to resume stopped BMDMA HSM, if device
   status doesn't agree with BMDMA status, the only way out is
   aborting the command (otherwise, it will just end up timing out).

2. ap->ops->sff_check_status() can be safely called to clear spurious
   device IRQ as it atomically returns completion status but BMDMA IRQ
   status can't be cleared in safe way if command is in flight.  After
   a spurious IRQ, call ap->ops->sff_irq_clear() only if the
   respective device is idle and retry completion if
   sff_check_status() indicates command completion.

Please note that ata_piix uses bmdma_status for sff_irq_check() and #2
won't weaken spurious IRQ handling even with in-flight command because
if bmdma_status indicates IRQ pending but device status is not on
spurious check, the next IRQ handler invocation will abort the command
due to #1.

This fixes bko#15537.

   https://bugzilla.kernel.org/show_bug.cgi?id=15537

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Andrew Benton <b3nton@gmail.com>
Cc: Petr Uzel <petr.uzel@centrum.cz>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6
Russell King [Tue, 23 Mar 2010 08:18:25 +0000 (08:18 +0000)] 
Merge branch 'fix' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6

14 years agosh: Silence unintialized variable warnings in dwarf unwinder.
Paul Mundt [Tue, 23 Mar 2010 08:07:41 +0000 (17:07 +0900)] 
sh: Silence unintialized variable warnings in dwarf unwinder.

The parent rb_node needs to be initialized to shut up the compiler, even
though we're unlikely to ever hit this issue at run time.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Tidy up a couple of section mismatches.
Paul Mundt [Tue, 23 Mar 2010 08:06:47 +0000 (17:06 +0900)] 
sh: Tidy up a couple of section mismatches.

select_idle_routine() and register_sh_pmu() both needed their annotations
fixed up to silence section mismatch warnings.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Fix build after dynamic PMB rework
Matt Fleming [Mon, 22 Mar 2010 22:09:58 +0000 (22:09 +0000)] 
sh: Fix build after dynamic PMB rework

set_pmb_entry() is now only used by a function that is wrapped in #ifdef
CONFIG_PM, so wrap set_pmb_entry() in CONFIG_PM too.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Replace unsafe manipulation of MMUCR
Matt Fleming [Sun, 21 Mar 2010 19:51:52 +0000 (19:51 +0000)] 
sh: Replace unsafe manipulation of MMUCR

Setting the TI in MMUCR causes all the TLB bits in MMUCR to be
cleared. Unfortunately, the TLB wired bits are also cleared when setting
the TI bit, causing any wired TLB entries to become unwired.

Use local_flush_tlb_all() which implements TLB flushing in a safer
manner by using the memory-mapped TLB registers. As each CPU has its own
PMB the modifications in pmb_init() only affect the local CPU, so only
flush the local CPU's TLB.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Flush ITLB too in PTEAEX's flush_tlb_page()
Matt Fleming [Sun, 21 Mar 2010 19:51:43 +0000 (19:51 +0000)] 
sh: Flush ITLB too in PTEAEX's flush_tlb_page()

flush_tlb_page() can be used to flush TLB entries that map executable
pages. Therefore, we need to ensure that the ITLB is also flushed in
local_flush_tlb_page().

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh64: Remove long unused mid_sched macro
Andreas Bombe [Sat, 20 Mar 2010 00:38:01 +0000 (00:38 +0000)] 
sh64: Remove long unused mid_sched macro

interruptible_sleep_on() is referenced for use in the mid_sched macro
which is not used anywhere.  Remove reference and macro as well as the
comment which appears to belong with them.

Signed-off-by: Andreas Bombe <aeb@debian.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoSH: remove superfluous warning from the serial driver
Guennadi Liakhovetski [Fri, 19 Mar 2010 13:53:36 +0000 (13:53 +0000)] 
SH: remove superfluous warning from the serial driver

This warning has been introduced during the SCI DMA support developmenr and is
not needed any more.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoSH: fix SCIFA SCASCR register bit definitions
Guennadi Liakhovetski [Fri, 19 Mar 2010 13:52:35 +0000 (13:52 +0000)] 
SH: fix SCIFA SCASCR register bit definitions

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agoserial: sh-sci: fix SH-Mobile SH breakage
Magnus Damm [Tue, 16 Mar 2010 11:21:07 +0000 (11:21 +0000)] 
serial: sh-sci: fix SH-Mobile SH breakage

The follwing commit breaks SH-Mobile on non-ARM platforms:
"8a77b8d serial: sh-sci: Support ARM-based SH-Mobile CPUs."

The commit assumed that CONFIG_ARCH_SHMOBILE only was set
on ARM platforms, but it turns out that this kconfig is also
set by all SH-based SoCs. Sh7724 and other older SH-Mobile
SoCs are all broken without this fix.

This patch converts the "defined(CONFIG_ARCH_SHMOBILE)" into
one "defined()" per SoC model - similar to existing SH code.

Reported-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Add watch-dog register address for SH7722/SH7723/SH7724
Kuninori Morimoto [Tue, 16 Mar 2010 02:02:08 +0000 (02:02 +0000)] 
sh: Add watch-dog register address for SH7722/SH7723/SH7724

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: ms7724: Add tiny-document for sound
Kuninori Morimoto [Tue, 16 Mar 2010 02:01:53 +0000 (02:01 +0000)] 
sh: ms7724: Add tiny-document for sound

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: mach-ecovec24: Add i2c_put_adapter on sh_eth_init
Kuninori Morimoto [Tue, 16 Mar 2010 02:01:33 +0000 (02:01 +0000)] 
sh: mach-ecovec24: Add i2c_put_adapter on sh_eth_init

i2c_put_adapter is needed after i2c_get_adapter

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agonetxen: The driver doesn't work on NX_P3_B1 so cause probe to fail.
Eric W. Biederman [Wed, 17 Mar 2010 22:24:39 +0000 (22:24 +0000)] 
netxen: The driver doesn't work on NX_P3_B1 so cause probe to fail.

I haven't been able to get link up on a NX_P3_B1 since 2.6.31.  The
driver complains about a firmware hang instead.  When I asked I was
told rev 0x41 was a preproduction rev.  So disable support in the
driver so no one is surprised the code doesn't work.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetpoll: warn when there are spaces in parameters
Amerigo Wang [Sun, 21 Mar 2010 22:59:58 +0000 (22:59 +0000)] 
netpoll: warn when there are spaces in parameters

v2: update according to Frans' comments.

Currently, if we leave spaces before dst port,
netconsole will silently accept it as 0. Warn about this.

Also, when spaces appear in other places, make them
visible in error messages.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: David Miller <davem@davemloft.net>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: bfin_can: switch to common Blackfin can header
Mike Frysinger [Sun, 21 Mar 2010 21:06:01 +0000 (21:06 +0000)] 
can: bfin_can: switch to common Blackfin can header

The MMR bits are being moved to this header, so include it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of /home/davem/src/GIT/linux-2.6/
David S. Miller [Tue, 23 Mar 2010 03:05:26 +0000 (20:05 -0700)] 
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/

14 years agopata_via: Add VIA VX900 support
JosephChan@via.com.tw [Fri, 19 Mar 2010 06:08:11 +0000 (14:08 +0800)] 
pata_via: Add VIA VX900 support

Signed-off-by: Joseph Chan <josephchan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoFix up prototype for sys_ipc breakage
Linus Torvalds [Mon, 22 Mar 2010 20:12:33 +0000 (13:12 -0700)] 
Fix up prototype for sys_ipc breakage

Commit 45575f5a426c ("ppc64 sys_ipc breakage in 2.6.34-rc2") fixed the
definition of the sys_ipc() helper, but didn't fix the prototype in
<linux/syscalls.h>

Reported-and-tested-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoregulator: fix dangling pointers
Wolfram Sang [Sat, 20 Mar 2010 14:12:58 +0000 (15:12 +0100)] 
regulator: fix dangling pointers

Fix I2C-drivers which missed setting clientdata to NULL before freeing the
structure it points to. Also fix drivers which do this _after_ the structure
was freed already.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agolp3971: Fix BUCK_VOL_CHANGE_SHIFT logic
Axel Lin [Thu, 11 Mar 2010 01:50:07 +0000 (09:50 +0800)] 
lp3971: Fix BUCK_VOL_CHANGE_SHIFT logic

Given x=0,1,2, current implementation of BUCK_VOL_CHANGE_SHIFT(x) returns 0,4,8.
The correct return value should be 0,4,6.
This patch fix the logic.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
14 years agolp3971: Fix setting val for LDO2 and LDO4
Axel Lin [Tue, 9 Mar 2010 08:53:59 +0000 (16:53 +0800)] 
lp3971: Fix setting val for LDO2 and LDO4

In lp3971_ldo_set_voltage function, it requires val to left shift 4
bits for LDO2 and LDO4.
This patch fix this issue.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
This page took 0.052192 seconds and 5 git commands to generate.