8 years agoLinux
Greg Kroah-Hartman [Thu, 28 Jan 2010 23:06:20 +0000 (15:06 -0800)]

8 years agox86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers.
Russ Anderson [Wed, 27 Jan 2010 02:37:22 +0000 (20:37 -0600)]
x86, msr/cpuid: Pass the number of minors when unregistering MSR and CPUID drivers.

commit da482474b8396e1a099c37ffc6541b78775aedb4 upstream.

Pass the number of minors when unregistering MSR and CPUID drivers.

Reported-by: Dean Nelson <>
Signed-off-by: Dean Nelson <>
LKML-Reference: <>
Signed-off-by: Russ Anderson <>
Signed-off-by: H. Peter Anvin <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agofnctl: f_modown should call write_lock_irqsave/restore
Greg Kroah-Hartman [Tue, 26 Jan 2010 23:04:02 +0000 (15:04 -0800)]
fnctl: f_modown should call write_lock_irqsave/restore

commit b04da8bfdfbbd79544cab2fadfdc12e87eb01600 upstream.

Commit 703625118069f9f8960d356676662d3db5a9d116 exposed that f_modown()
should call write_lock_irqsave instead of just write_lock_irq so that
because a caller could have a spinlock held and it would not be good to
renable interrupts.

Cc: Eric W. Biederman <>
Cc: Al Viro <>
Cc: Alan Cox <>
Cc: Tavis Ormandy <>
Signed-off-by: Greg Kroah-Hartman <>
Signed-off-by: Linus Torvalds <>
8 years agoiwlwifi: Fix throughput stall issue in HT mode for 5000
Wey-Yi Guy [Tue, 26 Jan 2010 20:00:43 +0000 (12:00 -0800)]
iwlwifi: Fix throughput stall issue in HT mode for 5000

commit 1152dcc28c66a74b5b3f1a3ede0aa6729bfd48e4 upstream

Similar to 6000 and 1000 series, RTS/CTS is the recommended protection
mechanism for 5000 series in HT mode based on the HW design.

Using RTS/CTS will better protect the inner exchange from interference,
especially in highly-congested environment, it also prevent uCode encounter
TX FIFO underrun and other HT mode related performance issues.

Signed-off-by: Wey-Yi Guy <>
Signed-off-by: Reinette Chatre <>
Signed-off-by: John W. Linville <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoACPI: enable C2 and Turbo-mode on Nehalem notebooks on A/C
Len Brown [Tue, 26 Jan 2010 21:15:28 +0000 (16:15 -0500)]
ACPI: enable C2 and Turbo-mode on Nehalem notebooks on A/C

upstream in 2.6.33-rc:  5d76b6f6c17572e662f5c99c2023adae92100855

Refreshed here for 2.6.32.y, applies w/ offset back to 2.6.29.y.

Linux has always ignored ACPI BIOS C2 with exit latency > 100 usec,
and the ACPI spec is clear that is correct FADT-supplied C2.

However, the ACPI spec explicitly states that _CST-supplied C-states
have no latency limits.

So move the 100usec C2 test out of the code shared
by FADT and _CST code-paths, and into the FADT-specific path.

This bug has not been visible until Nehalem, which advertises
a CPU-C2 worst case exit latency on servers of 205usec.
That (incorrect) figure is being used by BIOS writers
on mobile Nehalem systems for the AC configuration.
Thus, Linux ignores C2 leaving just C1, which is
saves less power, and also impacts performance
by preventing the use of turbo mode.

Tested-by: Alex Chiang <>
Signed-off-by: Len Brown <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agox86: Reenable TSC sync check at boot, even with NONSTOP_TSC
Pallipadi, Venkatesh [Thu, 17 Dec 2009 20:27:02 +0000 (12:27 -0800)]
x86: Reenable TSC sync check at boot, even with NONSTOP_TSC

commit 6c56ccecf05fafe100ab4ea94f6fccbf5ff00db7 upstream.

Commit 83ce4009 did the following change
If the TSC is constant and non-stop, also set it reliable.

But, there seems to be few systems that will end up with TSC warp across
sockets, depending on how the cpus come out of reset. Skipping TSC sync
test on such systems may result in time inconsistency later.

So, reenable TSC sync test even on constant and non-stop TSC systems.
Set, sched_clock_stable to 1 by default and reset it in
mark_tsc_unstable, if TSC sync fails.

This change still gives perf benefit mentioned in 83ce4009 for systems
where TSC is reliable.

Signed-off-by: Venkatesh Pallipadi <>
Acked-by: Suresh Siddha <>
LKML-Reference: <>
Signed-off-by: H. Peter Anvin <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoIPoIB: Clear ipoib_neigh.dgid in ipoib_neigh_alloc()
David J. Wilder [Wed, 9 Dec 2009 18:03:00 +0000 (10:03 -0800)]
IPoIB: Clear ipoib_neigh.dgid in ipoib_neigh_alloc()

commit 0cd4d0fd9b0a4e10c091fc6316d1bf92885dcd9c upstream.

IPoIB can miss a change in destination GID under some conditions.  The
problem is caused when ipoib_neigh->dgid contains a stale address.
The fix is to set ipoib_neigh->dgid to zero in ipoib_neigh_alloc().

This can happen when a system using bonding on its IPoIB interfaces
has switched its active interface from interface A to B and back to A.
The system that fails over will not correctly processes the 2nd
address change, as described below.

When an address has changed neighbor->ha is updated with the new
address.  Each neighbor has an associated ipoib_neigh.
ipoib_neigh->dgid also holds a copy of the remote node's hardware
address.  When an address changes neighbor->ha is updated by the
network layer (arp code) with the new address.  IPoIB detects this
change in ipoib_start_xmit() by comparing neighbor->ha with
ipoib_neigh->dgid.  The bug is that ipoib_neigh->dgid may already
contain the new address (A) thus the change from B to A is missed by
ipoib.  Here is the sequence of events:

    ipoib_neigh->dgid = A  and  neighbor->ha = A

The address is switched to B (the first switch)

    neighbor->ha = B

The change is seen in ipoib_start_xmit() -- neighbor->ha !=
ipoib_neigh->dgid so ipoib_neigh is released, and a new one is

The allocator may return the same chunk of memory that was just
released, therefore ipoib_neigh->dgid still contains A at this point.

ipoib_neigh->dgid should be updated in neigh_add_path(), but if the
following conditions are true dgid is not updated:

        1) __path_find() returns a path
        2) path->ah is NULL

The remote system now switches from address B to A, neighbor->ha is
updated to A.

Now we have again : ipoib_neigh->dgid = A  and  neighbor->ha = A

Since the addresses are the same ipoib won't process the change in
address.  Fix this by zeroing out the dgid field when allocating a new
struct ipoib_neigh.

Signed-off-by: David Wilder <>
Signed-off-by: Roland Dreier <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoKVM: only clear irq_source_id if irqchip is present
Marcelo Tosatti [Thu, 29 Oct 2009 15:44:17 +0000 (13:44 -0200)]
KVM: only clear irq_source_id if irqchip is present

commit e50212bb51356f0df48d6cce0aae5acf41df336d upstream.

Otherwise kvm might attempt to dereference a NULL pointer.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoKVM: fix lock imbalance in kvm_*_irq_source_id()
Jiri Slaby [Fri, 25 Sep 2009 07:33:38 +0000 (09:33 +0200)]
KVM: fix lock imbalance in kvm_*_irq_source_id()

commit 0c6ddcebd8303ada6faefa6f72ac18b6230320c4 upstream.

Stanse found 2 lock imbalances in kvm_request_irq_source_id and
kvm_free_irq_source_id. They omit to unlock kvm->irq_lock on fail paths.

Fix that by adding unlock labels at the end of the functions and jump
there from the fail paths.

Signed-off-by: Jiri Slaby <>
Cc: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoKVM: x86: Fix leak of free lapic date in kvm_arch_vcpu_init()
Wei Yongjun [Fri, 22 Jan 2010 06:21:29 +0000 (14:21 +0800)]
KVM: x86: Fix leak of free lapic date in kvm_arch_vcpu_init()

commit 443c39bc9ef7d8f648408d74c97e943f3bb3f48a upstream.

In function kvm_arch_vcpu_init(), if the memory malloc for
vcpu->arch.mce_banks is fail, it does not free the memory
of lapic date. This patch fixed it.

Signed-off-by: Wei Yongjun <>
Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoKVM: x86: Fix probable memory leak of vcpu->arch.mce_banks
Wei Yongjun [Fri, 22 Jan 2010 06:18:47 +0000 (14:18 +0800)]
KVM: x86: Fix probable memory leak of vcpu->arch.mce_banks

commit 36cb93fd6b6bf7e9163a69a8bf20207aed5fea44 upstream.

vcpu->arch.mce_banks is malloc in kvm_arch_vcpu_init(), but
never free in any place, this may cause memory leak. So this
patch fixed to free it in kvm_arch_vcpu_uninit().

Signed-off-by: Wei Yongjun <>
Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoKVM: x86: Fix host_mapping_level()
Sheng Yang [Tue, 5 Jan 2010 11:02:28 +0000 (19:02 +0800)]
KVM: x86: Fix host_mapping_level()

commit 82b7005f0e72d8d1a8226e4c192cbb0850d10b3f upstream.

When found a error hva, should not return PAGE_SIZE but the level...

Also clean up the coding style of the following loop.

Signed-off-by: Sheng Yang <>
Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoKVM: MMU: bail out pagewalk on kvm_read_guest error
Marcelo Tosatti [Thu, 14 Jan 2010 19:41:27 +0000 (17:41 -0200)]
KVM: MMU: bail out pagewalk on kvm_read_guest error

commit a6085fbaf65ab09bfb5ec8d902d6d21680fe1895 upstream.

Exit the guest pagetable walk loop if reading gpte failed. Otherwise its
possible to enter an endless loop processing the previous present pte.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoKVM: Fix race between APIC TMR and IRR
Avi Kivity [Tue, 29 Dec 2009 10:42:16 +0000 (12:42 +0200)]
KVM: Fix race between APIC TMR and IRR

commit a5d36f82c4f3e852b61fdf1fee13463c8aa91b90 upstream.

When we queue an interrupt to the local apic, we set the IRR before the TMR.
The vcpu can pick up the IRR and inject the interrupt before setting the TMR,
and perhaps even EOI it, causing incorrect behaviour.

The race is really insignificant since it can only occur on the first
interrupt (usually following interrupts will not change TMR), but it's better
closed than open.

Fixed by reordering setting the TMR vs IRR.

Signed-off-by: Avi Kivity <>
Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoKVM: only allow one gsi per fd
Michael S. Tsirkin [Wed, 13 Jan 2010 16:58:09 +0000 (18:58 +0200)]
KVM: only allow one gsi per fd

commit f1d1c309f35e9b0fb961cffd70fbd04f450ec47c upstream.

Looks like repeatedly binding same fd to multiple gsi's with irqfd can
use up a ton of kernel memory for irqfd structures.

A simple fix is to allow each fd to only trigger one gsi: triggering a
storm of interrupts in guest is likely useless anyway, and we can do it
by binding a single gsi to many interrupts if we really want to.

Signed-off-by: Michael S. Tsirkin <>
Acked-by: Acked-by: Gregory Haskins <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoKVM: S390: fix potential array overrun in intercept handling
Christian Borntraeger [Thu, 21 Jan 2010 11:19:07 +0000 (12:19 +0100)]
KVM: S390: fix potential array overrun in intercept handling

commit 062d5e9b0d714f449b261bb522eadaaf6f00f438 upstream.

kvm_handle_sie_intercept uses a jump table to get the intercept handler
for a SIE intercept. Static code analysis revealed a potential problem:
the intercept_funcs jump table was defined to contain (0x48 >> 2) entries,
but we only checked for code > 0x48 which would cause an off-by-one
array overflow if code == 0x48.

Use the compiler and ARRAY_SIZE to automatically set the limits.

Signed-off-by: Christian Borntraeger <>
Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agocfg80211: fix channel setting for wext
Abhijeet Kolekar [Wed, 13 Jan 2010 21:23:14 +0000 (13:23 -0800)]
cfg80211: fix channel setting for wext

commit 5f6120335c701ba07d5151206071f4d6ccaa684f upstream.

Patch fixes the bug at

Currently we cannot set the channel using wext extension
if we have already associated and disconnected. As
cfg80211_mgd_wext_siwfreq will not switch the channel if ssid is set.
This fixes it by clearing the ssid.
Following is the sequence which it tries to fix.
modprobe iwlagn
iwconfig wlan0 essid ""
ifconfig wlan0 down
iwconfig wlan0 chan X

wext is marked as deprecate.If we use nl80211 we can easily play with
setting the channel.

Signed-off-by: Abhijeet Kolekar <>
Acked-by: Samuel Ortiz <>
Signed-off-by: John W. Linville <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agomac80211: check that ieee80211_set_power_mgmt only handles STA interfaces.
Benoit Papillault [Fri, 15 Jan 2010 11:21:37 +0000 (12:21 +0100)]
mac80211: check that ieee80211_set_power_mgmt only handles STA interfaces.

commit e5de30c9bf4a39db9f54c4a373470ce65881ade0 upstream.

ieee80211_set_power_mgmt is meant for STA interfaces only. Moreover,
since sdata->u.mgd.mtx is only initialized for STA interfaces, using
this code for any other type of interface (like creating a monitor
interface) will result in a oops.

Signed-off-by: Benoit Papillault <>
Signed-off-by: John W. Linville <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoASoC: fix a memory-leak in wm8903
Guennadi Liakhovetski [Fri, 22 Jan 2010 17:00:03 +0000 (18:00 +0100)]
ASoC: fix a memory-leak in wm8903

commit 40aa7030e5213a43e9e0554fd7f95534ea310bf3 upstream.

Remember to free the temporary register-cache.

Signed-off-by: Guennadi Liakhovetski <>
Acked-by: Liam Girdwood <>
Signed-off-by: Mark Brown <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoUBI: initialise update marker
Peter Horton [Tue, 5 Jan 2010 11:14:36 +0000 (11:14 +0000)]
UBI: initialise update marker

commit ff998793288b49a3b22d929bf8e56362320905ff upstream.

The in kernel copy of a volume's update marker is not initialised from the
volume table. This means that volumes where an update was unfinnished will
not be treated as "forbidden to use". This is basically that the update
functionality was broken.

Signed-off-by: Peter Horton <>
Signed-off-by: Artem Bityutskiy <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoUBI: fix memory leak in update path
Artem Bityutskiy [Mon, 18 Jan 2010 14:43:44 +0000 (16:43 +0200)]
UBI: fix memory leak in update path

commit ebddd63b74dcf1cb676d14328d5852f1fee19a8a upstream.

When truncating an UBI volume, UBI should allocates a PEB-sized
buffer but does not release it, which leads to memory leaks.
This patch fixes the issue.

Reported-by: Marek Skuczynski <>
Signed-off-by: Artem Bityutskiy <>
Tested-by: Marek Skuczynski <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agohwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog
Hans de Goede [Mon, 25 Jan 2010 14:00:50 +0000 (15:00 +0100)]
hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog

commit c453615f77aa51593c1c9c9031b4278797d3fd19 upstream.

When /dev/watchdog gets opened a second time we return -EBUSY, but
we already have got a kref then, so we end up leaking our data struct.

Signed-off-by: Hans de Goede <>
Signed-off-by: Jean Delvare <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoALSA: hda - Fix HP T5735 automute
Takashi Iwai [Wed, 20 Jan 2010 07:35:06 +0000 (08:35 +0100)]
ALSA: hda - Fix HP T5735 automute

commit dc99be47667c56046555e89e62f1ac17fa06329a upstream.

This patch fixes the aut-mute setup on HP T5735 with ALC262 codec.
Instead of wrong amp, use pin control toggling for muting the speaker now.

Tested-by: Lee Trager <>
Signed-off-by: Takashi Iwai <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoipc ns: fix memory leak (idr)
Serge E. Hallyn [Wed, 16 Dec 2009 00:47:27 +0000 (16:47 -0800)]
ipc ns: fix memory leak (idr)

commit 7d6feeb287c61aafa88f06345387b1188edf4b86 upstream.

We have apparently had a memory leak since
7ca7e564e049d8b350ec9d958ff25eaa24226352 "ipc: store ipcs into IDRs" in
2007.  The idr of which 3 exist for each ipc namespace is never freed.

This patch simply frees them when the ipcns is freed.  I don't believe any
idr_remove() are done from rcu (and could therefore be delayed until after
this idr_destroy()), so the patch should be safe.  Some quick testing
showed no harm, and the memory leak fixed.

Caught by kmemleak.

Signed-off-by: Serge E. Hallyn <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Acked-by: Nick Piggin <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agonetiucv: displayed TX bytes value much too high
Ursula Braun [Thu, 12 Nov 2009 21:46:30 +0000 (21:46 +0000)]
netiucv: displayed TX bytes value much too high

commit 998221c26b86a7edd621e66b437628c5ec0f8e9b upstream.

tx_bytes value must be updated by skb length before skb is freed.

Signed-off-by: Ursula Braun <>
Signed-off-by: David S. Miller <>
Acked-by: John Jolly <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agocio: dont panic in non-fatal conditions
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:24 +0000 (12:51 +0100)]
cio: dont panic in non-fatal conditions

commit 16b9a0571da4ee5cd15ca75e871722b0b5aee64d upstream.

Remove the call to BUG() for situations which are unexpected
but do not cause actual problems.

Signed-off-by: Peter Oberparleiter <>
Signed-off-by: Martin Schwidefsky <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agocio: fix double free in case of probe failure
Peter Oberparleiter [Mon, 7 Dec 2009 11:51:15 +0000 (12:51 +0100)]
cio: fix double free in case of probe failure

commit 48e4c385c5f54626651cca027afe242439281899 upstream.

io_subchannel_probe() frees memory for sch->private which is later
freed again when io_subchannel_remove() is called. Fix this problem
by removing the cleanup in io_subchannel_probe().

Signed-off-by: Peter Oberparleiter <>
Signed-off-by: Martin Schwidefsky <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoV4L/DVB (13826): uvcvideo: Fix controls blacklisting
Laurent Pinchart [Thu, 10 Dec 2009 01:31:21 +0000 (22:31 -0300)]
V4L/DVB (13826): uvcvideo: Fix controls blacklisting

commit 385097e08b9c24655626ed760bc67eb7e50115a0 upstream.

The control blacklisting code erroneously used usb_match_id() by passing
a pointer to a usb_device_id structure instead of an array of such

Replace the usb_match_id() call by usb_match_id_one().

Thanks to Paulo Assis for diagnosing the bug and providing an initial

Signed-off-by: Laurent Pinchart <>
Signed-off-by: Mauro Carvalho Chehab <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agomd: fix small irregularity with start_ro module parameter
NeilBrown [Wed, 30 Dec 2009 01:08:50 +0000 (12:08 +1100)]
md: fix small irregularity with start_ro module parameter

commit 0f9552b5dc4fe10da37fa3f4a4ca185d90fa41c9 upstream.

The start_ro modules parameter can be used to force arrays to be
started in 'auto-readonly' in which they are read-only until the first
write.  This ensures that no resync/recovery happens until something
else writes to the device.  This is important for resume-from-disk
off an md array.

However if an array is started 'readonly' (by writing 'readonly' to
the 'array_state' sysfs attribute) we want it to be really 'readonly',
not 'auto-readonly'.

So strengthen the condition to only set auto-readonly if the
array is not already read-only.

Signed-off-by: NeilBrown <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoata_piix: fix MWDMA handling on PIIX3
Bartlomiej Zolnierkiewicz [Thu, 3 Dec 2009 19:32:08 +0000 (20:32 +0100)]
ata_piix: fix MWDMA handling on PIIX3

commit 6938594374ee506e91a4c03117a034ea0ed66783 upstream.

Fix erroneous check for ap->udma_mask in do_pata_set_dmamode()
resulting in controller not being programmed properly for MWDMA.

Signed-off-by: Bartlomiej Zolnierkiewicz <>
Signed-off-by: Jeff Garzik <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoahci: disable SNotification capability for ich8
Shaohua Li [Mon, 16 Nov 2009 01:56:05 +0000 (09:56 +0800)]
ahci: disable SNotification capability for ich8

commit 1b677afda44f7882b7e257d6f025d006ec5d14f9 upstream.

I obseved there is a sata_async_notification() for every ahci
interrupt. But the async notification does nothing (this is hard
disk drive and no pmp). This cause cpu wastes some time on sntf
register access.

It appears ICH AHCI doesn't support SNotification register, but the
controller reports it does. After quirking it, the async notification

PS. it appears all ICH don't support SNotification register from ICH
manual, don't know if we need quirk all ICH. I don't have machines
with all kinds of ICH.

Signed-off-by: Shaohua Li <>
Signed-off-by: Jeff Garzik <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoiTCO_wdt: Add Intel Cougar Point and PCH DeviceIDs
Seth Heasley [Thu, 14 Jan 2010 20:58:05 +0000 (20:58 +0000)]
iTCO_wdt: Add Intel Cougar Point and PCH DeviceIDs

commit 3c9d8eccd8687f0e770e4d89fd0d73d4f81a985a upstream.

This patch adds the Intel Cougar Point and PCH DeviceIDs for iTCO Watchdog.

Signed-off-by: Seth Heasley <>
Signed-off-by: Wim Van Sebroeck <>
Acked-by: Jiri Kosina <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoiTCO_wdt: add PCI ID for the Intel EP80579 (Tolapai) SoC
Imre Kaloz [Mon, 7 Dec 2009 19:42:26 +0000 (20:42 +0100)]
iTCO_wdt: add PCI ID for the Intel EP80579 (Tolapai) SoC

commit 4946f8353da9d3038e2a9d0295d5dfeee4cee5c5 upstream.

add PCI ID for the Intel EP80579 (Tolapai) SoC

Signed-off-by: Imre Kaloz <>
Signed-off-by: Wim Van Sebroeck <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoiTCO_wdt.c - cleanup chipset documentation
Wim Van Sebroeck [Sun, 15 Nov 2009 13:44:54 +0000 (13:44 +0000)]
iTCO_wdt.c - cleanup chipset documentation

commit cb711a1931363b8ad4dc98df4a92c262ced8eeb4 upstream.

Cleanup the documentation about the supported chipsets.

[needed for further device ids to add to this driver - gkh]

Signed-off-by: Wim Van Sebroeck <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoALSA: hda - Add missing Line-Out and PCM switches as slave
Takashi Iwai [Tue, 8 Dec 2009 11:36:52 +0000 (12:36 +0100)]
ALSA: hda - Add missing Line-Out and PCM switches as slave

commit 23033b2bce4361f2859ee0331f97c9056dae7091 upstream.

Realtek codecs may have "PCM" and "Line-Out" playback switches, and
they can be slaves for vmaster.

Signed-off-by: Takashi Iwai <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoALSA: hda - Fix quirk for Maxdata obook4-1
Takashi Iwai [Fri, 18 Dec 2009 07:48:42 +0000 (08:48 +0100)]
ALSA: hda - Fix quirk for Maxdata obook4-1

commit 2fef62c825f09e29d2f52dc187ddf6f99e28c7f1 upstream.

Works fine with the auto-parser.

Reference: Novell bnc#564940

Signed-off-by: Takashi Iwai <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoALSA: hda - select IbexPeak handler for Calpella
Wu Fengguang [Fri, 30 Oct 2009 10:34:19 +0000 (11:34 +0100)]
ALSA: hda - select IbexPeak handler for Calpella

commit 739b47f1e5aa3b36eadd7906cc6b41f0175c6ed1 upstream.

An earlier patch merely adds id for 0x80862804.
It has 2/3 cvt/pin nodes and shall be tied to the IbexPeak handler.

Signed-off-by: Wu Fengguang <>
Signed-off-by: Takashi Iwai <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoInput: i8042 - add Dritek quirk for Acer Aspire 5610.
Elliott Sales de Andrade [Mon, 11 Jan 2010 07:59:05 +0000 (23:59 -0800)]
Input: i8042 - add Dritek quirk for Acer Aspire 5610.

commit e6edbdc52bc0755cbfe0721ca91d4fd87649bc13 upstream.

Signed-off-by: Elliott Sales de Andrade <>
Signed-off-by: Dmitry Torokhov <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoInput: i8042 - add Gigabyte M1022M to the noloop list
Dmitry Torokhov [Sun, 13 Dec 2009 08:34:06 +0000 (00:34 -0800)]
Input: i8042 - add Gigabyte M1022M to the noloop list

commit a61cd03827eceefcec19eefc6e1173703fdc5e5d upstream.

Gigabyte netbook model M1022M requires i8042.noloop, otherwise AUX port
will not detected and the touchpad will not work. Unfortunately chassis
type in DMI set to "Other" and thus generic laptop entry does not fire
on it.

Reported-by: Darryl Bond <>
Signed-off-by: Dmitry Torokhov <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoInput: i8042 - remove identification strings from DMI tables
Dmitry Torokhov [Fri, 4 Dec 2009 18:24:19 +0000 (10:24 -0800)]
Input: i8042 - remove identification strings from DMI tables

commit f909b1df0a068f30e252d8dc3e9d45ca25bf266f upstream.

The driver does not reference identification strings in DMI tables and
since these strings are no longer required by DMI core we can safely
remove them and save some memory.

Signed-off-by: Dmitry Torokhov <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoDMI: allow omitting ident strings in DMI tables
Dmitry Torokhov [Fri, 4 Dec 2009 18:24:19 +0000 (10:24 -0800)]
DMI: allow omitting ident strings in DMI tables

commit 75757507e014fa074d25d2883c4ab604999584bd upstream.

The purpose of dmi->ident is twofold - it may be used by DMI callback
functions when composing log messages; it is also used to determine
end of DMI table in dmi_check_system() and dmi_first_match(). However,
in case when callbacks are not interested in using ident at all it just
wastes memory. Let's make entries with empty first match slot serve as
end-of-table markers instead.

[needed for DMI table changes that need to be done by later patches - gkh]

Acked-by: Jean Delvare <>
Signed-off-by: Dmitry Torokhov <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoPCI: AER: fix aer inject result in kernel oops
Song Youquan [Fri, 11 Dec 2009 23:42:35 +0000 (18:42 -0500)]
PCI: AER: fix aer inject result in kernel oops

commit 46256f83d0d066f99ffde547f27473dfd2a78009 upstream.

If the BIOS does not export _OSC to allow OS take over the PCIe AER, the
pcie aer driver will not initialize the aer service. However, the
aer_inject driver does not check this scenario, which results in a kernel
oops when injecting an aer error into OS.  For example:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000350
IP: [<ffffffff812e08f7>] _spin_lock_irqsave+0xc/0x23
PGD 155c41067 PUD 157fe0067 PMD 0
Oops: 0002 [#1] SMP
Pid: 5119, comm: aer-inject Not tainted 2.6.32-rc8-mce #2
RIP: 0010:[<ffffffff812e08f7>]  [<ffffffff812e08f7>] _spin_lock_irqsave+0xc/0x23
RSP: 0018:ffff880157f81e28  EFLAGS: 00010096
RAX: 0000000000000296 RBX: 0000000000000000 RCX: 0000000000000100
RDX: 0000000000010000 RSI: 0000000000000246 RDI: 0000000000000350
RBP: ffff880157f81e28 R08: 0000000000000004 R09: ffff880157f81dac
R10: ffff88015a666f60 R11: ffff88015a666f40 R12: ffff88015758cc00
R13: 0000000000000350 R14: 0000000000000000 R15: 0000000000000100
FS:  00007f4d4a66e6f0(0000) GS:ffff8800282e0000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000350 CR3: 000000015661a000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process aer-inject (pid: 5119, threadinfo ffff880157f80000, task ffff8801585f4340)
 ffff880157f81e78 ffffffff811b1615 ffff880157f81e78 ffffffff81222823
Call Trace:
 [<ffffffff811b1615>] aer_irq+0x38/0x117
 [<ffffffff81222823>] ? device_for_each_child+0x5f/0x6f
 [<ffffffffa00967bf>] aer_inject_write+0x409/0x45e [aer_inject]
 [<ffffffff810eb80e>] vfs_write+0xae/0x16a
 [<ffffffff810eb98e>] sys_write+0x47/0x6e
 [<ffffffff8100ba2b>] system_call_fastpath+0x16/0x1b
RIP  [<ffffffff812e08f7>] _spin_lock_irqsave+0xc/0x23
 RSP <ffff880157f81e28>
CR2: 0000000000000350

So check the _OSC before assuming that AER is available to the OS.

Signed-off-by: Song Youquan <>
Acked-by: Huang Ying <>
Signed-off-by: Jesse Barnes <>
Signed-off-by: Thomas Renninger <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoqlge: Bonding fix for mode 6.
Ron Mercer [Tue, 17 Nov 2009 11:10:40 +0000 (11:10 +0000)]
qlge: Bonding fix for mode 6.

commit 63ae93a19094d88c8ca62543586b20e3a7ff7637 upstream.

Allow MAC address to be changed even if device is not up.

Signed-off-by: Ron Mercer <>
Signed-off-by: David S. Miller <>
Signed-off-by: Brandon Philips <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoqlge: Add handler for DCBX firmware event.
Ron Mercer [Sat, 10 Oct 2009 09:35:05 +0000 (09:35 +0000)]
qlge: Add handler for DCBX firmware event.

commit 91ced682f9de17ebab5fcb2a70b48e372eb43281 upstream.

The driver has nothing to do, but this marker prevents the event from
showing up 'not handled'.

Signed-off-by: Ron Mercer <>
Signed-off-by: David S. Miller <>
Signed-off-by: Brandon Philips <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoqlge: Don't fail open when port is not initialized.
Ron Mercer [Sat, 10 Oct 2009 09:35:09 +0000 (09:35 +0000)]
qlge: Don't fail open when port is not initialized.

commit 80928860941023bb37e9c61927395d0eb753bc3b upstream.

Signed-off-by: Ron Mercer <>
Signed-off-by: David S. Miller <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoqlge: Set PCIE max read request size.
Ron Mercer [Sat, 10 Oct 2009 09:35:04 +0000 (09:35 +0000)]
qlge: Set PCIE max read request size.

commit bc9167f39ff8cd428e8577eb72751a653008edb2 upstream.

Signed-off-by: Ron Mercer <>
Signed-off-by: David S. Miller <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoqlge: Remove explicit setting of PCI Dev CTL reg.
Ron Mercer [Sat, 10 Oct 2009 09:35:03 +0000 (09:35 +0000)]
qlge: Remove explicit setting of PCI Dev CTL reg.

commit 1d1023d039d8295070b8dbb92c4d972237235304 upstream.

Remove explicit setting of error reporting bits.

Signed-off-by: Ron Mercer <>
Signed-off-by: David S. Miller <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agofcoe: Fix getting san mac for VLAN interface
Yi Zou [Tue, 3 Nov 2009 19:49:43 +0000 (11:49 -0800)]
fcoe: Fix getting san mac for VLAN interface

commit 5bab87e6d465d54a2b5899e0f583d42f00dbee2e upstream.

Make sure we are get the SAN MAC address from the real netdev if the input
netdev is a VLAN device.

Signed-off-by: Yi Zou <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agofcoe: Fix checking san mac address
Yi Zou [Tue, 3 Nov 2009 19:49:38 +0000 (11:49 -0800)]
fcoe: Fix checking san mac address

commit bf361707c81f8e8e43e332bfc8838bae76ae021a upstream.

This was fixed before in 7a7f0c7 but it's introduced again recently.

Signed-off-by: Yi Zou <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agofcoe, libfc: fix an libfc issue with queue ramp down in libfc
Vasu Dev [Fri, 16 Oct 2009 00:46:55 +0000 (17:46 -0700)]
fcoe, libfc: fix an libfc issue with queue ramp down in libfc

commit 14caf44c69184ed72d46a2f883311daf27a4192f upstream.

The cmd_per_lun value is used by scsi-ml as fall back lowest
queue_depth value but in case of libfc cmd_per_lun is set to
same value as max queue_depth = 32.

So this patch reduces cmd_per_lun value to 3 and configures
each lun with default max queue_depth 32 in fc_slave_alloc.

Signed-off-by: Vasu Dev <>
Acked-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolibfc: remote port gets stuck in restart state without really restarting
Abhijeet Joglekar [Thu, 10 Dec 2009 17:59:20 +0000 (09:59 -0800)]
libfc: remote port gets stuck in restart state without really restarting

commit 5543c72e2bbb30e5ba5938b18ec26617b8b3fb04 upstream.

We ran into a scenario where a remote port goes into RESTART state, but
never gets added to scsi transport. The running vmcore showed the following:
a) Port was in RESTART state
b) rdata->event was STOP
c) no work gets scheduled for the remote work to fc_rport_work

After this point, shut/no-shut of the remote port did not cause the port
to get re-discovered. The port would move betwen DELETE and RESTART states,
but the event would always be STOP, no work would get scheduled to
fc_rport_work and the port would not get added to scsi_transport.

The problem is that rdata->event is not set to NONE after a port is
restarted. After this point, no more work gets scheduled for the remote port
since new work is scheduled only if rdata->event is non-NONE. So, the event
and state keep changing, but fc_rport_work does not get scheduled to actually
handle the event.

Here's a transition of states that explains the above observation:

) Port is first in READY State, event is NONE

2) RSCN on shut, port goes to DELETED, event is stop

3) Before fc_rport_work runs, RSCN on no-shut, port goes to RESTART, event is
still STOP

4) fc_rport_work gets scheduled, removes the port from transport, sees state
as RESTART, begins the PLOGI state machine, event remains as STOP (event NOT
changed to NONE, this is the bug)

5) Plogi state machine completes, port state goes to READY, event goes to
READY, but no work is scheduled since event was STOP (non-NONE) before.
Fc_rport_work is not scheduled, port remains in READY state, but is not added
to transport.

Things are broken at this point. Libfc rport is ready, but no transport rport

6) now a shut causes port state to change to DELETE, event to change to STOP,
no work gets scheduled

7) no-shut causes port state to change to RESTART, event remains at STOP,
no work gets scheduled

(6) and (7) now get repeated everytime we do shut/no-shut. No way to get out
of this state. Fcc reset does not help too.

Only way to get out is to load/unload module.

Fix is to set rdata->event to NONE while processing the STOP/LOGO/FAILED
events, inside the discovery and rport locks.

Signed-off-by: Abhijeet Joglekar <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolibfc: fix free of fc_rport_priv with timer pending
Joe Eykholt [Wed, 21 Oct 2009 23:28:30 +0000 (16:28 -0700)]
libfc: fix free of fc_rport_priv with timer pending

commit b4a9c7ede96e90f7b1ec009ce7256059295e76df upstream.

Timer crashes were caused by freeing a struct fc_rport_priv
with a timer pending, causing the timer facility list to be
corrupted.  This was during FC uplink flap tests with a lot
of targets.

After discovery, we were doing an PLOGI on an rdata that was
in DELETE state but not yet removed from the lookup list.
This moved the rdata from DELETE state to PLOGI state.
If the PLOGI exchange allocation failed and needed to be
retried, the timer scheduling could race with the free
being done by fc_rport_work().

When fc_rport_login() is called on a rport in DELETE state,
move it to a new state RESTART.  In fc_rport_work, when
handling a LOGO, STOPPED or FAILED event, look for restart
state.  In the RESTART case, don't take the rdata off the
list and after the transport remote port is deleted and
exchanges are reset, re-login to the remote port.

Note that the new RESTART state also corrects a problem we
had when re-discovering a port that had moved to DELETE state.
In that case, a new rdata was created, but the old rdata
would do an exchange manager reset affecting the FC_ID
for both the new rdata and old rdata.  With the new state,
the new port isn't logged into until after any old exchanges
are reset.

Signed-off-by: Joe Eykholt <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolibfc: fix memory corruption caused by double frees and bad error handling
Chris Leech [Wed, 21 Oct 2009 23:28:09 +0000 (16:28 -0700)]
libfc: fix memory corruption caused by double frees and bad error handling

commit 8f550f937e9fdafa5c37e348e214aecec851ef3f upstream.

I was running into several different panics under stress, which I traced down
to a few different possible slab corruption issues in error handling paths.
I have not yet looked into why these exchange sends fail, but with these
fixes my test system is much more stable under stress than before.

fc_elsct_send() could fail and either leave the passed in frame intact
(failure in fc_ct/els_fill) or the frame could have been freed if the
failure was is fc_exch_seq_send().  The caller had no way of knowing, and
there was a potential double free in the error handling in fc_fcp_rec().

Make fc_elsct_send() always free the frame before returning, and remove the
fc_frame_free() call in fc_fcp_rec().

While fc_exch_seq_send() did always consume the frame, there were double free
bugs in the error handling of fc_fcp_cmd_send() and fc_fcp_srr() as well.

Numerous calls to error handling routines (fc_disc_error(),
fc_lport_error(), fc_rport_error_retry() ) were passing in a frame pointer that
had already been freed in the case of an error.  I have changed the call
sites to pass in a NULL pointer, but there may be more appropriate error
codes to use.

Question:  Why do these error routines take a frame pointer anyway?  I
understand passing in a pointer encoded error to the response handlers, but
the error routines take no action on a valid pointer and should never be
called that way.

Signed-off-by: Chris Leech <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolibfc: Fix frags in frame exceeding SKB_MAX_FRAGS in fc_fcp_send_data
Yi Zou [Wed, 21 Oct 2009 23:27:58 +0000 (16:27 -0700)]
libfc: Fix frags in frame exceeding SKB_MAX_FRAGS in fc_fcp_send_data

commit d37322a43ebac79eef417149f5696390cf8872db upstream.

In case of sequence offload, in fc_fcp_send_data(), the skb_fill_page_info()
called may end up adding more frags to the skb_shinfo(fp_skb(fp))->frags[],
exceeding SKB_MAX_FRAGS, this eventually corrupts the memory. I am adding the
FR_FRAME_SG_LEN back, but as SKB_MAX_FRAGS -1, leaving 1 for our fcoe_eof_crc
page. And send will be broken into multiple large sends if the frame already
contains more frags than skb handle.

Signed-off-by: Yi Zou <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agofcoe: initialize return value in fcoe_destroy
Mike Christie [Wed, 21 Oct 2009 23:27:44 +0000 (16:27 -0700)]
fcoe: initialize return value in fcoe_destroy

commit 8eca355fa8af660557fbdd5506bde1392eee9bfe upstream.

When doing echo ethX > /sys..../destroy I am getting
errors when the tear down succeeds. It looks like the
reason for this is because the rc var is not getting set
when the destruction works. This just sets it to zero.

Signed-off-by: Mike Christie <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolibfc: don't WARN_ON in lport_timeout for RESET state
Joe Eykholt [Wed, 21 Oct 2009 23:27:22 +0000 (16:27 -0700)]
libfc: don't WARN_ON in lport_timeout for RESET state

commit 22655ac22289d7b7def8ef2d72eafe5024bd57fe upstream.

It's possible and harmless to get FLOGI timeouts
while in RESET state.  Don't do a WARN_ON in that case.

Also, split out the other WARN_ONs in fc_lport_timeout, so
we can tell which one is hit by its line number.

Signed-off-by: Joe Eykholt <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolibfc: lport: fix minor documentation errors
Joe Eykholt [Wed, 21 Oct 2009 23:27:17 +0000 (16:27 -0700)]
libfc: lport: fix minor documentation errors

commit 1b69bc062c2a4c8f3e15ac69f487afec3aa8d774 upstream.

Fix minor errors.
A debug message said an RLIR was received instead of ECHO.
"Expected" was misspelled in several places.
Fix a type cast from u32 to __be32.

Rob, Some of these may have been also taken care of in your
other doc cleanup patch.  Feel free to fold them in.

Signed-off-by: Joe Eykholt <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolibfc: Fix wrong scsi return status under FC_DATA_UNDRUN
Yi Zou [Wed, 21 Oct 2009 23:27:12 +0000 (16:27 -0700)]
libfc: Fix wrong scsi return status under FC_DATA_UNDRUN

commit 4347fa66878e079766258bc0d077c350cb31a799 upstream.

This bug is exposed when there is a link flap in LLD. Particularly, when it
happens right after a SCSI write command is sent out, no FCP_DATA is sent,
causing fsp->status_code to be set as FC_DATA_UNDRUN in fc_fcp_complete_locked
even no SCSI status is received. Consequently, fc_io_compl treats this as DID_OK.
This results in SCSI returning successful to the initial I/O request even
there is no DATA actually sent. Particularly, if you run an I/O tool w/ data
verification on, the read back for verification is gonna fail.

This is fixed here by checking when FC_DATA_UNDRUN happens, SCSI status is
received w/ FC_SRB_RCV_STATUS set in fsp->state.

Signed-off-by: Yi Zou <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agofcoe: remove redundant checking of netdev->netdev_ops
Yi Zou [Wed, 21 Oct 2009 23:26:55 +0000 (16:26 -0700)]
fcoe: remove redundant checking of netdev->netdev_ops

commit b04d023cf5b7f4113cc4a09405c2fe8003bfe37d upstream.

Remove the redundant checking of netdev->netdev_ops as it will never be NULL.

Signed-off-by: Yi Zou <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolibfc: fix ddp in fc_fcp for 0 xid
Yi Zou [Wed, 21 Oct 2009 23:26:50 +0000 (16:26 -0700)]
libfc: fix ddp in fc_fcp for 0 xid

commit 5e472d077f45de4f37365171bd742f18b3ef20de upstream.

xid 0 was used as an indication of invalid xid before but now xid 0
can be used as a valid exchange i. This patch fixes the ddp completion
in fcp layer, i.e., in fc_fcp.c:fc_fcp_ddp_done() function, to make sure it
does not use xid 0 for indication of an invalid xid, instead, it now
uses use FC_XID_UNKNOWN for such indication.

Signed-off-by: Yi Zou <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolibfc: fix typo in retry check on received PRLI
Joe Eykholt [Wed, 21 Oct 2009 23:26:45 +0000 (16:26 -0700)]
libfc: fix typo in retry check on received PRLI

commit 85b5893ca97c69e409ecbb5ee90a5d99882369c4 upstream.

A received Fibre Channel ELS PRLI request contains a bit that
indicates whether the remote port supports certain retry processing
sequences.  The test for this bit was somehow coded to use multiply
instead of AND!

This case would apply only for target mode operation, and it is
unlikely to be noticed as an initiator.

Signed-off-by: Joe Eykholt <>
Signed-off-by: Robert Love <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agolpfc: fix hang on SGI ia64 platform
Michael Reed [Fri, 18 Sep 2009 17:02:05 +0000 (12:02 -0500)]
lpfc: fix hang on SGI ia64 platform

commit 8e68597d087977d3e4fd3e735d290ab45fd0b5ea upstream.

In testing 2.6.31 on one of our ia64 platforms I've encountered a hang
due to the driver using hardware ATEs which are a limited resource.
This is because the driver does not set the dma consistent mask to
64 bits.

Signed-off-by: Michael Reed <>
Acked-by: James Smart <James.Smart@Emulex.Com>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoscsi_transport_fc: remove invalid BUG_ON
Michael Reed [Fri, 9 Oct 2009 19:15:59 +0000 (14:15 -0500)]
scsi_transport_fc: remove invalid BUG_ON

commit 8798a694da59486e4a3ff0abeec183202fb34c20 upstream.

I was doing some large lun count testing with 2.6.31 and hit
a BUG_ON() in fc_timeout_deleted_rport(), and it seems like it
should have been just a matter of time before someone did.

It seems invalid to set port_state under lock, then expect it to
remain set after releasing the lock.  Another thread called
fc_remote_port_add() when the lock was released, changing the

This patch removes the BUG_ON and moves the test of the
port_state to inside the host_lock.  It's been running for
several weeks now with no ill effect.

Signed-off-by: Michael Reed <>
Acked-by: James Smart <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoscsi_dh: create sysfs file, dh_state for all SCSI disk devices
Chandra Seetharaman [Fri, 11 Sep 2009 17:20:35 +0000 (10:20 -0700)]
scsi_dh: create sysfs file, dh_state for all SCSI disk devices

commit 5917290ce9b376866b165d02a5ed88d5ecdb32d0 upstream.

Create the sysfs file, dh_state even if the new SCSI device is not
in the any of the device handler's internal lists.

Signed-Off-by: Chandra Seetharaman <>
Acked-by: Hannes Reinecke <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoscsi_devinfo: update Hitachi entries (v2)
Takahiro Yasui [Tue, 10 Nov 2009 21:22:19 +0000 (16:22 -0500)]
scsi_devinfo: update Hitachi entries (v2)

commit 627511e3e67553b04f6917c03e39b797df210e04 upstream.

Four models, OPEN-/DF400/DF500/DISK-SUBSYSTEM, can handle REPORT_LUN,
and the BLIST_REPORTLUN2 flag needs to be set. And DF600 doesn't require
any flags because it returns ANSI 03h (SPC).

Signed-off-by: Takahiro Yasui <>
Signed-off-by: James Bottomley <>
Acked-by: Hannes Reinecke <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoHID: fixup quirk for NCR devices
Jiri Kosina [Thu, 5 Nov 2009 13:08:03 +0000 (14:08 +0100)]
HID: fixup quirk for NCR devices

commit 5b915d9e6dc3d22fedde91dfef1cb1a8fa9a1870 upstream.

NCR devices are terminally broken by design -- they claim themselves to contain
proper input applications in their HID report descriptor, but behave very badly
if treated in standard way.

According to NCR developers, the devices get confused when queried for reports
in a standard way, rendering them unusable.

NCR is shipping application called "RPSL" that can be used to drive these
devices through hiddev, under the assumption that in-kernel driver doesn't
perform initial report query.
If it does, neither in-kernel nor hiddev-based driver can operate with these
devices any more.

Introduce a quirk that skips the report query for all NCR devices. The previous
NOGET quirk was wrong and had been introduced because I misunderstood the nature
of brokenness of these devices.

Signed-off-by: Jiri Kosina <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoNFS: Revert default r/wsize behavior
Chuck Lever [Thu, 3 Dec 2009 20:58:56 +0000 (15:58 -0500)]
NFS: Revert default r/wsize behavior

commit dd47f96c077b4516727e497e4b6fd47a06778c0a upstream.

When the "rsize=" or "wsize=" mount options are not specified,
text-based mounts have slightly different behavior than legacy binary
mounts.  Text-based mounts use the smaller of the server's maximum
and the client's maximum, but binary mounts use the smaller of the
server's _preferred_ size and the client's maximum.

This difference is actually pretty subtle.  Most servers advertise
the same value as their maximum and their preferred transfer size, so
the end result is the same in most cases.

The reason for this difference is that for text-based mounts, if
r/wsize are not specified, they are set to the largest value supported
by the client.  For legacy mounts, the values are set to zero if these
options are not specified.

nfs_server_set_fsinfo() can negotiate the transfer size defaults
correctly in any case.  There's no need to specify any particular
value as default in the text-based option parsing logic.

Note that nfs4 doesn't use nfs_server_set_fsinfo(), but the mount.nfs4
command does set rsize and wsize to 0 if the user didn't specify these
options.  So, make the same change for text-based NFSv4 mounts.

Thanks to James Pearson <> for reporting and
diagnosing the problem.

Signed-off-by: Chuck Lever <>
Signed-off-by: Trond Myklebust <>
Cc: Neil Brown <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoiscsi class: modify handling of replacement timeout
Mike Christie [Wed, 11 Nov 2009 22:34:34 +0000 (16:34 -0600)]
iscsi class: modify handling of replacement timeout

commit fdd46dcbe4468a1f47a2cc9be442d11c3d21dd68 upstream.

This patch modifies the replacement/recovery_timeout so it works
more like the fc fast io fail tmo.

If userspace tries to set the replacement/recovery_timeout to less than
zero, we will turn off the forced recovery cleanup.

If userspace sets the value to 0 then we will force the recovery
cleanup immediately.

Signed-off-by: Mike Christie <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoPCI: Always set prefetchable base/limit upper32 registers
Alex Williamson [Mon, 30 Nov 2009 21:51:44 +0000 (14:51 -0700)]
PCI: Always set prefetchable base/limit upper32 registers

commit 59353ea30e65ab3ae181d6175e3212e1361c3787 upstream.

Prior to 1f82de10 we always initialized the upper 32bits of the
prefetchable memory window, regardless of the address range used.
Now we only touch it for a >32bit address, which means the upper32
registers remain whatever the BIOS initialized them too.

It's valid for the BIOS to set the upper32 base/limit to
0xffffffff/0x00000000, which makes us program prefetchable ranges
like 0xffffffffabc00000 - 0x00000000abc00000

Revert the chunk of 1f82de10 that made this conditional so we always
write the upper32 registers and remove now unused pref_mem64 variable.

Signed-off-by: Alex Williamson <>
Signed-off-by: Jesse Barnes <>
Signed-off-by: Rafael J. Wysocki <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agotimers, init: Limit the number of per cpu calibration bootup messages
Mike Travis [Wed, 18 Nov 2009 00:22:13 +0000 (18:22 -0600)]
timers, init: Limit the number of per cpu calibration bootup messages

commit feae3203d711db0a9965300ee6d592257fdaae4f upstream.

Limit the number of per cpu calibration messages by only
printing out results for the first cpu to boot.

Also, don't print "CPUx is down" as this is expected, and we
don't need 4096 reminders... ;-)

Signed-off-by: Mike Travis <>
Cc: Heiko Carstens <>
Cc: Roland Dreier <>
Cc: Randy Dunlap <>
Cc: Tejun Heo <>
Cc: Andi Kleen <>
Cc: Greg Kroah-Hartman <>
Cc: Yinghai Lu <>
Cc: David Rientjes <>
Cc: Steven Rostedt <>
Cc: Rusty Russell <>
Cc: Hidetoshi Seto <>
Cc: Jack Steiner <>
Cc: Frederic Weisbecker <>
LKML-Reference: <>
Signed-off-by: Ingo Molnar <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agonfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups
Frank Filz [Wed, 21 Oct 2009 23:45:02 +0000 (16:45 -0700)]
nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups

commit aba24d71580180dfdf6a1a83a5858a1c048fd785 upstream.

We have been doing some extensive testing of Linux support for ACLs on
NFDS v4. We have noticed that the server rejects ACLs where the groups
are out of order, for example, the following ACL is rejected:


Examining the server code, I found that after converting an NFS v4 ACL
to POSIX, sort_pacl is called to sort the user ACEs and group ACEs.
Unfortunately, a minor bug causes the group sort to be skipped.

Signed-off-by: Frank Filz <>
Signed-off-by: J. Bruce Fields <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agonohz: Prevent clocksource wrapping during idle
Jon Hunter [Tue, 18 Aug 2009 17:45:10 +0000 (12:45 -0500)]
nohz: Prevent clocksource wrapping during idle

commit 98962465ed9e6ea99c38e0af63fe1dcb5a79dc25 upstream.

The dynamic tick allows the kernel to sleep for periods longer than a
single tick, but it does not limit the sleep time currently. In the
worst case the kernel could sleep longer than the wrap around time of
the time keeping clock source which would result in losing track of

Prevent this by limiting it to the safe maximum sleep time of the
current time keeping clock source. The value is calculated when the
clock source is registered.

[ tglx: simplified the code a bit and massaged the commit msg ]

Signed-off-by: Jon Hunter <>
Cc: John Stultz <>
LKML-Reference: <>
Signed-off-by: Thomas Gleixner <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agosched: Fix missing sched tunable recalculation on cpu add/remove
Christian Ehrhardt [Mon, 30 Nov 2009 11:16:46 +0000 (12:16 +0100)]
sched: Fix missing sched tunable recalculation on cpu add/remove

commit 0bcdcf28c979869f44e05121b96ff2cfb05bd8e6 upstream.

Based on Peter Zijlstras patch suggestion this enables recalculation of
the scheduler tunables in response of a change in the number of cpus. It
also adds a max of eight cpus that are considered in that scaling.

Signed-off-by: Christian Ehrhardt <>
Signed-off-by: Peter Zijlstra <>
LKML-Reference: <>
Signed-off-by: Ingo Molnar <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agosched: Fix isolcpus boot option
Rusty Russell [Wed, 2 Dec 2009 03:39:16 +0000 (14:09 +1030)]
sched: Fix isolcpus boot option

commit bdddd2963c0264c56f18043f6fa829d3c1d3d1c0 upstream.

Anton Blanchard wrote:

> We allocate and zero cpu_isolated_map after the isolcpus
> __setup option has run. This means cpu_isolated_map always
> ends up empty and if CPUMASK_OFFSTACK is enabled we write to a
> cpumask that hasn't been allocated.

I introduced this regression in 49557e620339cb13 (sched: Fix
boot crash by zalloc()ing most of the cpu masks).

Use the bootmem allocator if they set isolcpus=, otherwise
allocate and zero like normal.

Reported-by: Anton Blanchard <>
Signed-off-by: Rusty Russell <>
Cc: Linus Torvalds <>
Cc: <>
LKML-Reference: <>
Signed-off-by: Ingo Molnar <>
Tested-by: Anton Blanchard <>
8 years agoALSA: ice1724 - Patch for suspend/resume for ESI Juli@
Aleksey Kunitskiy [Sat, 14 Nov 2009 13:18:54 +0000 (15:18 +0200)]
ALSA: ice1724 - Patch for suspend/resume for ESI Juli@

commit 50d40f187f9182ee8caa1b83f80a0e11e2226baa upstream.

Add proper suspend/resume code for Juli@ cards. Based on ice1724
suspend/resume work of Igor Chernyshev.
Fixes bug
Tested on linux-

Signed-off-by: Aleksey Kunitskiy <>
Signed-off-by: Takashi Iwai <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agopartitions: use sector size for EFI GPT
Karel Zak [Mon, 23 Nov 2009 08:29:13 +0000 (09:29 +0100)]
partitions: use sector size for EFI GPT

commit 7d13af3279985f554784a45cc961f706dbcdbdd1 upstream.

Currently, kernel uses strictly 512-byte sectors for EFI GPT parsing.
That's wrong.

UEFI standard (version 2.3, May 2009, 5.3.1 GUID Format overview, page
95) defines that LBA is always based on the logical block size. It
means bdev_logical_block_size() (aka BLKSSZGET) for Linux.

This patch removes static sector size from EFI GPT parser.

The problem is reproducible with the latest GNU Parted:

 # modprobe scsi_debug dev_size_mb=50 sector_size=4096

  # ./parted /dev/sdb print
  Model: Linux scsi_debug (scsi)
  Disk /dev/sdb: 52.4MB
  Sector size (logical/physical): 4096B/4096B
  Partition Table: gpt

  Number  Start   End     Size    File system  Name     Flags
   1      24.6kB  3002kB  2978kB               primary
   2      3002kB  6001kB  2998kB               primary
   3      6001kB  9003kB  3002kB               primary

  # blockdev --rereadpt /dev/sdb
  # dmesg | tail -1
   sdb: unknown partition table      <---- !!!

with this patch:

  # blockdev --rereadpt /dev/sdb
  # dmesg | tail -1
   sdb: sdb1 sdb2 sdb3

Signed-off-by: Karel Zak <>
Signed-off-by: Jens Axboe <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agopartitions: read whole sector with EFI GPT header
Karel Zak [Mon, 23 Nov 2009 08:29:58 +0000 (09:29 +0100)]
partitions: read whole sector with EFI GPT header

commit 87038c2d5bda2418fda8b1456a0ae81cc3ff5bd8 upstream.

The size of EFI GPT header is not static, but whole sector is
allocated for the header. The HeaderSize field must be greater
than 92 (= sizeof(struct gpt_header) and must be less than or
equal to the logical block size.

It means we have to read whole sector with the header, because the
header crc32 checksum is calculated according to HeaderSize.

For more details see UEFI standard (version 2.3, May 2009):
  - 5.3.1 GUID Format overview, page 93
  - Table 13. GUID Partition Table Header, page 96

Signed-off-by: Karel Zak <>
Signed-off-by: Jens Axboe <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agonetfilter: xtables: fix conntrack match v1 ipt-save output
Florian Westphal [Mon, 23 Nov 2009 09:43:57 +0000 (10:43 +0100)]
netfilter: xtables: fix conntrack match v1 ipt-save output

commit 3a0429292daa0e1ec848bd26479f5e48b0d54a42 upstream.

commit d6d3f08b0fd998b647a05540cedd11a067b72867
(netfilter: xtables: conntrack match revision 2) does break the
v1 conntrack match iptables-save output in a subtle way.

Problem is as follows:

    up = kmalloc(sizeof(*up), GFP_KERNEL);
    * The strategy here is to minimize the overhead of v1 matching,
    * by prebuilding a v2 struct and putting the pointer into the
    * v1 dataspace.
    memcpy(up, info, offsetof(typeof(*info), state_mask));
    *(void **)info  = up;

As the v2 struct pointer is saved in the match data space,
it clobbers the first structure member (->origsrc_addr).

Because the _v1 match function grabs this pointer and does not actually
look at the v1 origsrc, run time functionality does not break.
But iptables -nvL (or iptables-save) cannot know that v1 origsrc_addr
has been overloaded in this way:

$ iptables -p tcp -A OUTPUT -m conntrack --ctorigsrc -j ACCEPT
$ iptables-save
-A OUTPUT -p tcp -m conntrack --ctorigsrc -j ACCEPT

(128.173... is the address to the v2 match structure).

To fix this, we take advantage of the fact that the v1 and v2 structures
are identical with exception of the last two structure members (u8 in v1,
u16 in v2).

We extract them as early as possible and prevent the v2 matching function
from looking at those two members directly.

Previously reported by Michel Messerschmidt via Ben Hutchings, also
see Debian Bug tracker #556587.

Signed-off-by: Florian Westphal <>
Signed-off-by: Patrick McHardy <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoV4L/DVB (13680b): DocBook/media: create links for included sources
Ben Hutchings [Thu, 3 Dec 2009 22:51:09 +0000 (19:51 -0300)]
V4L/DVB (13680b): DocBook/media: create links for included sources

commit 5bf583473813530c1bf82051a35fac8d5045f4f7 upstream.

If docs are being built in a separate directory, xmlto and xsltproc
can't find included sources.  Make links back to the source directory.

I would much prefer to have xmlto and xsltproc look in the source
directory for included entities but couldn't see how to do that.  This
needs to be solved in some way for 2.6.32, even if this patch isn't the
right way to do it.

Signed-off-by: Ben Hutchings <>
Cc: Ben Hutchings <>
Signed-off-by: Mauro Carvalho Chehab <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoV4L/DVB (13680a): DocBook/media: copy images after building HTML
Ben Hutchings [Thu, 3 Dec 2009 22:50:35 +0000 (19:50 -0300)]
V4L/DVB (13680a): DocBook/media: copy images after building HTML

commit 49b14650ba5bf80234cb1984fd8396aff03430ce upstream.

The rule for %.html removes the output directory, so there is no point
in copying images before building HTML.

Documentation/DocBook/Makefile |   10 +++++-----

Signed-off-by: Ben Hutchings <>
Signed-off-by: Mauro Carvalho Chehab <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoatl1e:disable NETIF_F_TSO6 for hardware limit
Jie Yang [Tue, 1 Dec 2009 17:18:34 +0000 (17:18 +0000)]
atl1e:disable NETIF_F_TSO6 for hardware limit

commit 7c7afb083675b3d4d012a2aacec3a958ba484ab0 upstream.

For hardware limit to support TSOV6, just disable this feature
Signed-off-by: Jie Yang <>
Signed-off-by: David S. Miller <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoatl1c:use common_task instead of reset_task and link_chg_task
Jie Yang [Sun, 6 Dec 2009 23:16:58 +0000 (23:16 +0000)]
atl1c:use common_task instead of reset_task and link_chg_task

commit cb19054697e92a793f336380fd72c588521178ff upstream.

use common_task instead of reset_task and link_chg_task, so it fix "call cancel_work_sync
from the work itself".

Signed-off-by: Jie Yang <>
Signed-off-by: David S. Miller <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoiTCO_wdt: Add support for Intel Ibex Peak
Seth Heasley [Wed, 11 Nov 2009 01:24:01 +0000 (02:24 +0100)]
iTCO_wdt: Add support for Intel Ibex Peak

commit 79e8941dda254505bb8af37b3a009165dfb7e98a upstream.

Add the Intel Ibex Peak (PCH) Device IDs to iTCO_wdt.c.

Signed-off-by: Seth Heasley <>
Signed-off-by: Wim Van Sebroeck <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoV4L/DVB (13168): Add support for Asus Europa Hybrid DVB-T card (SAA7134 SubVendor...
Danny Wood [Sun, 20 Sep 2009 15:14:21 +0000 (12:14 -0300)]
V4L/DVB (13168): Add support for Asus Europa Hybrid DVB-T card (SAA7134 SubVendor ID: 0x1043 Device ID: 0x4847)

commit e3c6e1aaa5db7822524f5b1355960fd732910068 upstream.

Adds the device IDs and driver linking to allow the Asus Europa DVB-T
card to operate with these drivers.
The device has a SAA7134 chipset with a TD1316 Hybrid Tuner.
All inputs work on the card including switching between DVB-T and
Analogue TV, there is also no IR with this card.

[ CodingStyle fixes]

Signed-off-by: Danny Wood <>
Cc: Ben Hutchings <>
Signed-off-by: Mauro Carvalho Chehab <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoUSB: ftdi_sio: add USB device ID's for B&B Electronics line
Cliff Brake [Tue, 1 Dec 2009 14:53:42 +0000 (09:53 -0500)]
USB: ftdi_sio: add USB device ID's for B&B Electronics line

commit a8cbd90a0410096e152f68a4e114a8b5c7abb49b upstream.

Reviewed-by: John Pilles <>
Signed-off-by: Cliff Brake <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoUSB: mos7840: add device IDs for B&B electronics devices
Cliff Brake [Tue, 1 Dec 2009 14:53:43 +0000 (09:53 -0500)]
USB: mos7840: add device IDs for B&B electronics devices

commit acf509ae28301d78b022c534c26b1e4765c18f2b upstream.

Reviewed-by: John Pilles <>
Signed-off-by: Cliff Brake <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoV4L/DVB (13569): smsusb: add autodetection support for five additional Hauppauge...
Michael Krufky [Mon, 30 Nov 2009 21:22:10 +0000 (18:22 -0300)]
V4L/DVB (13569): smsusb: add autodetection support for five additional Hauppauge USB IDs

commit 20d15a200d34cfb7141fb4558895d7d5233db84b upstream.

Add support for five new Hauppauge Device USB IDs:


Signed-off-by: Michael Krufky <>
Signed-off-by: Mauro Carvalho Chehab <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoALSA: hda - Add PCI IDs for Nvidia G2xx-series
Stefan Ringel [Mon, 14 Dec 2009 10:27:11 +0000 (11:27 +0100)]
ALSA: hda - Add PCI IDs for Nvidia G2xx-series

commit 6dd7dc767e35cfbb38f8c63a50b1c27acad25920 upstream.

Signed-off-by: Stefan Ringel <>
Signed-off-by: Takashi Iwai <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agovfs: get_sb_single() - do not pass options twice
Kay Sievers [Fri, 18 Dec 2009 20:18:15 +0000 (21:18 +0100)]
vfs: get_sb_single() - do not pass options twice

commit 9329d1beaeed1a94f030c784dcec5ff973f402c4 upstream.

Filesystem code usually destroys the option buffer while
parsing it. This leads to errors when the same buffer is
passed twice. In case we fill a new superblock do not call

This is needed to quite a warning that the debugfs code
causes every boot.

Cc: Miklos Szeredi <>
Signed-off-by: Kay Sievers <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agodriver-core: fix devtmpfs crash on s390
Heiko Carstens [Mon, 18 Jan 2010 13:36:12 +0000 (14:36 +0100)]
driver-core: fix devtmpfs crash on s390

commit f776c5ec4690b21b3668ad5956774a22c86f541a upstream.

On Mon, Jan 18, 2010 at 05:26:20PM +0530, Sachin Sant wrote:
> Hello Heiko,
> Today while trying to boot next-20100118 i came across
> the following Oops :
> Brought up 4 CPUs
> Unable to handle kernel pointer dereference at virtual kernel address 0000000000
> 543000
> Oops: 0004 #1 SMP
> Modules linked in:
> CPU: 0 Not tainted 2.6.33-rc4-autotest-next-20100118-5-default #1
> Process swapper (pid: 1, task: 00000000fd792038, ksp: 00000000fd797a30)
> Krnl PSW : 0704200180000000 00000000001eb0b8 (shmem_parse_options+0xc0/0x328)
>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
> Krnl GPRS: 000000000054388a 000000000000003d 0000000000543836 000000000000003d
>           0000000000000000 0000000000483f28 0000000000536112 00000000fd797d00
>           00000000fd4ba100 0000000000000100 0000000000483978 0000000000543832
>           0000000000000000 0000000000465958 00000000001eb0b0 00000000fd797c58
> Krnl Code: 00000000001eb0aac0e5000994f1       brasl   %r14,31da8c
>           00000000001eb0b0b9020022           ltgr    %r2,%r2
>           00000000001eb0b4a784010b           brc     8,1eb2ca
>          >00000000001eb0b892002000           mvi     0(%r2),0
>           00000000001eb0bca7080000           lhi     %r0,0
>           00000000001eb0c041902001           la      %r9,1(%r2)
>           00000000001eb0c4b9040016           lgr     %r1,%r6
>           00000000001eb0c8b904002b           lgr     %r2,%r11
> Call Trace:
> (<00000000fd797c50> 0xfd797c50)
> <00000000001eb5da> shmem_fill_super+0x13a/0x25c
> <0000000000228cfa> get_sb_single+0xbe/0xdc
> <000000000034ffc0> dev_get_sb+0x2c/0x38
> <000000000066c602> devtmpfs_init+0x46/0xc0
> <000000000066c53e> driver_init+0x22/0x60
> <000000000064d40a> kernel_init+0x24e/0x3d0
> <000000000010a7ea> kernel_thread_starter+0x6/0xc
> <000000000010a7e4> kernel_thread_starter+0x0/0xc
> I never tried to boot a kernel with DEVTMPFS enabled on a s390 box.
> So am wondering if this is supported or not ? If you think this
> is supported i will send a mail to community on this.

There is nothing arch specific to devtmpfs. This part crashes because the
kernel tries to modify the data read-only section which is write protected
on s390.

Signed-off-by: Heiko Carstens <>
Acked-by: Kay Sievers <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoDriver-Core: devtmpfs - set root directory mode to 0755
Kay Sievers [Fri, 30 Oct 2009 11:48:32 +0000 (12:48 +0100)]
Driver-Core: devtmpfs - set root directory mode to 0755

commit 03d673e6af6490371aaf64dfe1f84c658c48b71d upstream.

Signed-off-by: Kay Sievers <>
Cc: Mark Rosenstand <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoInput: ALPS - add interleaved protocol support (Dell E6x00 series)
Sebastian Kapfer [Fri, 15 Jan 2010 18:11:22 +0000 (10:11 -0800)]
Input: ALPS - add interleaved protocol support (Dell E6x00 series)

commit 1d9f26262aef6d63ff65eba0fd5f1583f342b69b upstream

Properly handle version of the protocol where standard PS/2 packets
from trackpoint are stuffed into middle (byte 3-6) of the standard
ALPS packets when both the touchpad and trackpoint are used together.

The patch is based on work done by Matthew Chapman and additional
research done by David Kubicek and Erik Osterholm:

Many thanks to David Kubicek for his efforts in researching fine points
of this new version of the protocol, especially interaction between pad
and stick in these models.

Cc: Andy Isaacson <>
Signed-off-by: Sebastian Kapfer <>
Signed-off-by: Dmitry Torokhov <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agodavinci: dm646x: Add support for 3.x silicon revision
Hemant Pedanekar [Wed, 2 Sep 2009 11:19:35 +0000 (16:49 +0530)]
davinci: dm646x: Add support for 3.x silicon revision

commit f63dd12da29f47c37bbc093abec098538e04357c upstream.

DM6467 silicon revisions 3.x have variant field in JTAGID register as '1'.
This path adds entry for the same in dm646x_ids to be able to boot on boards
with 3.x revision chips.

Also modifies name for 'variant=0' (revisions 1.0, 1.1).

Signed-off-by: Hemant Pedanekar <>
Signed-off-by: Kevin Hilman <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agopowerpc/fsl: Add PCI device ids for new QoirQ chips
Ben Hutchings [Sat, 23 Jan 2010 14:27:55 +0000 (14:27 +0000)]
powerpc/fsl: Add PCI device ids for new QoirQ chips

commit a3f62bd2b20c769ddc989b242ddd274179e19ee6 upstream by
Kumar Gala <>.  I have adjusted the patch
context for 2.6.32.

Signed-off-by: Kumar Gala <>
Signed-off-by: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoar9170: Add support for D-Link DWA 160 A2
Thomas Klute [Tue, 17 Nov 2009 10:58:18 +0000 (11:58 +0100)]
ar9170: Add support for D-Link DWA 160 A2

commit 15295380f45aa0d35665f6e5596ac98c081d95b9 upstream.

At least two revisions of the D-Link DWA 160 exist, called A1 and A2. A1
(USB-ID 07d1:3c10) is already listed in usb.c as D-Link DWA 160A. A2
(USB-ID 07d1:3a09) works if added to ar9170_usb_ids. I didn't do much
testing until now, but I was able to connect to APs using WPA or WEP and
transmit data.


* Add model revision number to the comment for D-Link DWA 160 A1 (07d1:3c10)
* Add support for D-Link DWA 160 A2 (07d1:3a09)

Signed-off-by: Thomas Klute <>
Signed-off-by: John W. Linville <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agompt2sas: New device SAS2208 support is added
Kashyap, Desai [Wed, 23 Sep 2009 11:54:27 +0000 (17:24 +0530)]
mpt2sas: New device SAS2208 support is added

commit db27136a89d061bf9dceb28953a61a8ef862ca7f upstream.

Added device ids range for { 0x80 - 87 } , modified mpi/mpi2_cnfg.h containing

Signed-off-by: Kashyap Desai <>
Signed-off-by: Eric Moore <>
Signed-off-by: James Bottomley <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agobe2net: Add the new PCI IDs to PCI_DEVICE_TABLE.
Ajit Khaparde [Thu, 29 Oct 2009 08:11:06 +0000 (01:11 -0700)]
be2net: Add the new PCI IDs to PCI_DEVICE_TABLE.

commit 59fd5d87a4243a992f3a3e69f3627cf4c509608e upstream.

This patch adds the PCI IDs for the next generation chip to the

Signed-off-by: Ajit Khaparde <>
Signed-off-by: David S. Miller <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agobe2net: Add support for next generation of BladeEngine device.
Ajit Khaparde [Sat, 17 Oct 2009 01:02:12 +0000 (18:02 -0700)]
be2net: Add support for next generation of BladeEngine device.

commit 12d7ea2c5a5c87834daf9fcd920aab80ff6248b1 upstream.

Add new PCI ids to support next generation of BladeEngine device.

Signed-off-by: Ajit Khaparde <>
Signed-off-by: David S. Miller <>
Cc: Ben Hutchings <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agosfc: Fix DMA mapping cleanup in case of an error in TSO
Neil Turton [Wed, 23 Dec 2009 13:47:13 +0000 (13:47 +0000)]
sfc: Fix DMA mapping cleanup in case of an error in TSO

commit a7ebd27a13757248863cd61e541af7fa9e7727ee upstream.

We need buffer->len to remain valid to work out the correct address to
be unmapped.  We therefore need to clear buffer->len after the unmap

Signed-off-by: Ben Hutchings <>
Signed-off-by: David S. Miller <>
Signed-off-by: Greg Kroah-Hartman <>
8 years agoACPI: don't cond_resched if irq is disabled
Xiaotian Feng [Thu, 10 Dec 2009 11:56:45 +0000 (19:56 +0800)]
ACPI: don't cond_resched if irq is disabled

commit c084ca704a3661bf77690a05bc6bd2c305d87c34 upstream.

commit 8bd108d adds preemption point after each opcode parse, then
a sleeping function called from invalid context bug was founded
during suspend/resume stage. this was fixed in commit abe1dfa by
don't cond_resched when irq_disabled. But recent commit 138d156 changes
the behaviour to don't cond_resched when in_atomic. This makes the
sleeping function called from invalid context bug happen again, which
is reported in

This patch also fixes

Reported-and-bisected-by: Larry Finger <>
Reported-and-bisected-by: Justin P. Mattock <>
Signed-off-by: Xiaotian Feng <>
Acked-by: Alexey Starikovskiy <>
Signed-off-by: Len Brown <>
Signed-off-by: Greg Kroah-Hartman <>