Linus Torvalds [Sun, 30 Nov 2008 19:07:16 +0000 (11:07 -0800)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] Update default configuration.
[S390] Fix alignment of initial kernel stack.
[S390] pgtable.h: Fix oops in unmap_vmas for KVM processes
[S390] fix/cleanup sched_clock
[S390] fix system call parameter functions.
Linus Torvalds [Sun, 30 Nov 2008 19:06:40 +0000 (11:06 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
toshiba_acpi: close race in toshiba_acpi driver
ACPICA: disable _BIF warning
ACPI: delete OSI(Linux) DMI dmesg spam
ACPICA: Allow _WAK method to return an Integer
ACPI: thinkpad-acpi: fix fan sleep/resume path
sony-laptop: printk tweak
sony-laptop: brightness regression fix
Revert "ACPI: don't enable control method power button as wakeup device when Fixed Power button is used"
ACPI suspend: Blacklist boxes that require us to set SCI_EN directly on resume
ACPI: scheduling in atomic via acpi_evaluate_integer ()
ACPI: battery: Convert discharge energy rate to current properly
ACPI: EC: count interrupts only if called from interrupt handler.
Linus Torvalds [Sun, 30 Nov 2008 19:05:21 +0000 (11:05 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: wacom - add support for new USB Tablet PCs
Input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback
Input: i8042 - add Compal Hel80 laptop to nomux blacklist
Input: cm109 - add keymap for ATCom AU-100 phone
Input: fix the example of an input device driver
Input: psmouse - fix incorrect validate_byte check in OLPC protocol
Input: atkbd - cancel delayed work before freeing its structure
Input: atkbd - add keymap quirk for Inventec Symphony systems
Input: i8042 - add Dell XPS M1530 to nomux list
Input: elo - fix format string in elo driver
Christoph Hellwig [Tue, 25 Nov 2008 07:10:03 +0000 (08:10 +0100)]
remove __ARCH_WANT_COMPAT_SYS_PTRACE
All architectures now use the generic compat_sys_ptrace, as should every
new architecture that needs 32bit compat (if we'll ever get another).
Remove the now superflous __ARCH_WANT_COMPAT_SYS_PTRACE define, and also
kill a comment about __ARCH_SYS_PTRACE that was added after
__ARCH_SYS_PTRACE was already gone.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 30 Nov 2008 18:38:22 +0000 (10:38 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: Make BUG() __noreturn.
Arjan van de Ven [Mon, 24 Nov 2008 00:57:36 +0000 (16:57 -0800)]
input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback
ml_ff_playback() uses spin_(un)lock_bh. However this function is called
with interrupts disabled from erase_effect() in drivers/input/ff-core.c:196.
This is not permitted, and will result in a WARN_ON in the bottom half handling code.
This patch changes this function to just use spin_lock_irqsave() instead, solving
the problem and simplifying the locking logic.
This was reported as entry #106559 in kerneloops.org
Reported-by: kerneloops.org
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:38:34 +0000 (17:38 +0000)]
hotplug_memory_notifier section annotation
Same as for hotplug_cpu - we want static notifier_block in there in meminitdata,
to avoid false positives whenever it's used.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:38:24 +0000 (17:38 +0000)]
sn_pci_controller_fixup() should be __init
called only from __init
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:38:14 +0000 (17:38 +0000)]
get xenbus_driver ->probe() "recognized" by modpost
... by giving the instances' names magic suffix recognized by modpost ;-/
Their ->probe() is __devinit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:38:04 +0000 (17:38 +0000)]
xen_play_dead() is __cpuinit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:37:54 +0000 (17:37 +0000)]
xen_setup_vcpu_info_placement() is not init on x86
... so get xen-ops.h in agreement with xen/smp.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:37:44 +0000 (17:37 +0000)]
kvm_setup_secondary_clock() is cpuinit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:37:34 +0000 (17:37 +0000)]
enable_IR_x2apic() needs to be __init
calls __init, called only from __init
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:37:14 +0000 (17:37 +0000)]
pci_setup() is init, not devinit
for fsck sake, it's used only when parsing kernel command line...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:37:04 +0000 (17:37 +0000)]
alpha: pcibios_resource_to_bus() is callable from normal code
pci_enable_rom(), specifically.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:36:54 +0000 (17:36 +0000)]
tricky one: hisax sections
a) hisax_init_pcmcia() needs to be defined only if we have
CONFIG_HOTPLUG (no PCMCIA support otherwise) and can be declared
__devinit.
b) HiSax_inithardware() can go __init
c) hisax_register() is passing to checkcard() full-blown hisax_cs_setup_card():
checkcard(i, id, NULL, hisax_d_if->owner, hisax_cs_setup_card);
The problem with it is that
* hisax_cs_setup_card() is __devinit
* hisax_register() is not
* hisax_cs_setup_card() is a switch from hell, calling a lot of
setup_some_weirdcard() depending on card->typ. _These_ are also
__devinit.
However, in hisax_register() we have card->typ equal to
ISDN_CTYPE_DYNAMIC, which reduces hisax_cs_setup_card() to "nevermind
all that crap, just do nothing and return 2". So we add a
trimmed-down callback doing just that and passed to checkcard() by
hisax_register(). _This_ is non-init (we can stand the impact on
.text size).
Voila - no section warnings from drivers/isdn
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:36:44 +0000 (17:36 +0000)]
cpuinit fixes in kernel/*
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:36:34 +0000 (17:36 +0000)]
uninorth-agp section mess
'aperture' is declared devinitdata (the whole word of it) and
is used from ->fetch_size() which can, AFAICS, be used on
!HOTPLUG after init time.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:36:24 +0000 (17:36 +0000)]
rapidio section noise
functions calling devinit and called only from devinit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:36:14 +0000 (17:36 +0000)]
section errors in smc911x/smc91x
a) ->probe() can be __devinit; no need to put it into .text
b) calling __init stuff from it, OTOH, is wrong
c) ->remove() is __devexit fodder
Acked-by: rmk+kernel@arm.linux.org.uk
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:36:04 +0000 (17:36 +0000)]
fix the section noise in sparc head.S
usual .text.head trick
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:35:54 +0000 (17:35 +0000)]
m32r: section noise in head.S
usual "introduce .text.head, put it in front of TEXT_TEXT in vmlinux.lds.S,
make the stuff up to jump to start_kernel live in it", same as on other
targets.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:35:44 +0000 (17:35 +0000)]
section misannotation in ibmtr_cs
ibmtr_resume() is calling ibmtr_probe(), which is devinit. Whether
that's the right thing to do there is a separate question, but
since it's PCMCIA and thus will never compile without HOTPLUG...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:35:34 +0000 (17:35 +0000)]
ixgbe section fixes
ixgbe_init_interrupt_scheme() is called from ixgbe_resume(). Build that
with CONFIG_PM and without CONFIG_HOTPLUG and you've got a problem.
Several helpers called by it also are misannotated __devinit.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:35:24 +0000 (17:35 +0000)]
rackmeter section fixes
* rackmeter_remove() reference needs devexit_p
* rackmeter_setup() is calls devinit and is called only from devinit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:35:14 +0000 (17:35 +0000)]
gdth section fixes
PCI side of driver should be devinit, not init
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:35:04 +0000 (17:35 +0000)]
of_platform_driver noise on sparce
switch to __init for those; unlike powerpc sparc has no hotplug support
for that stuff and their ->probe() tends to call __init functions while
being declared __devinit.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:34:54 +0000 (17:34 +0000)]
advansys fix on ISA-less configs
The code
if (shost->dma_channel != NO_ISA_DMA)
free_dma(shost->dma_channel);
in there is triggerable only if we have CONFIG_ISA (we only set ->dma_channel to
something other than NO_ISA_DMA under #ifdef CONFIG_ISA). OTOH, free_dma() is
not guaranteed to be there in absense of CONFIG_ISA. IOW, driver runs into
undefined symbols on PCI-but-not-ISA configs (e.g. on frv) and it's a false
positive.
Fix: put the entire if () under #ifdef CONFIG_ISA; behaviour doesn't change and
dependency on free_dma() disappears for !CONFIG_ISA.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:34:44 +0000 (17:34 +0000)]
W1_MASTER_DS1WM should depend on HAVE_CLK
Uses clk_...() a lot
Acked-by: rmk+kernel@arm.linux.org.uk
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:34:34 +0000 (17:34 +0000)]
icside section warnings
icside_register_v[56] is called from (__devinit) icside_probe
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:34:24 +0000 (17:34 +0000)]
fix talitos
talitos_remove() can be called from talitos_probe() on failure
exit path, so it can't be __devexit.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:34:14 +0000 (17:34 +0000)]
istallion section warnings
stli_findeisabrds() and stli_initbrds() are using __init and called only
from __init.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:34:04 +0000 (17:34 +0000)]
sparc64 trivial section misannotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:33:54 +0000 (17:33 +0000)]
sparc32 cpuinit flase positives
All noise since we don't have CPU hotplug there. However, they
did expose something very odd-looking in there - poke_viking()
does a bunch of identical btfixup each time it's called (i.e.
for each CPU). That one is left alone for now; just the trivial
misannotation fixes.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:33:44 +0000 (17:33 +0000)]
powerpc set_huge_psize() false positive
called only from __init, calls __init. Incidentally, it ought to be static
in file.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:33:34 +0000 (17:33 +0000)]
false __cpuinit positives on alpha
pure noise - alpha doesn't have CPU hotplug
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Sat, 22 Nov 2008 17:33:24 +0000 (17:33 +0000)]
meminit section warnings
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Arjan van de Ven [Fri, 28 Nov 2008 16:19:09 +0000 (08:19 -0800)]
toshiba_acpi: close race in toshiba_acpi driver
the toshiba ACPI driver will, in a failure case, free the rfkill state
before stopping the polling timer that would use this state. More interesting,
in the same failure case handling, it calls the exit function, which also
frees the rfkill state, but after stopping the polling.
If the race happens, a NULL pointer is passed to rfkill_force_state()
which then causes a nice dereference.
Fix the race by just not doing the too-early freeing of the rfkill state.
This appears to be the cause of a hot issue on kerneloops.org; while I
have no solid evidence of that this patch will fix the issue, the race
appears rather real.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Martin Schwidefsky [Thu, 27 Nov 2008 10:05:59 +0000 (11:05 +0100)]
[S390] Update default configuration.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Heiko Carstens [Thu, 27 Nov 2008 10:05:58 +0000 (11:05 +0100)]
[S390] Fix alignment of initial kernel stack.
We need an alignment of 16384 bytes for the initial kernel stack if
the kernel is configured for 16384 bytes stacks but the linker script
currently guarantees only an alignment of 8192 bytes.
So fix this and simply use THREAD_SIZE as alignment value which will
always do the right thing.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Christian Borntraeger [Thu, 27 Nov 2008 10:05:57 +0000 (11:05 +0100)]
[S390] pgtable.h: Fix oops in unmap_vmas for KVM processes
When running several kvm processes with lots of memory overcommitment,
we have seen an oops during process shutdown:
------------[ cut here ]------------
Kernel BUG at
0000000000193434 [verbose debug info unavailable]
addressing exception: 0005 [#1] PREEMPT SMP
Modules linked in: kvm sunrpc qeth_l2 dm_mod qeth ccwgroup
CPU: 10 Not tainted 2.6.28-rc4-kvm-bigiron-00521-g0ccca08-dirty #8
Process kuli (pid: 14460, task:
0000000149822338, ksp:
0000000024f57650)
Krnl PSW :
0704e00180000000 0000000000193434 (unmap_vmas+0x884/0xf10)
R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 EA:3
Krnl GPRS:
0000000000000002 0000000000000000 000000051008d000 000003e05e6034e0
00000000001933f6 00000000000001e9 0000000407259e0a 00000002be88c400
00000200001c1000 0000000407259608 0000000407259e08 0000000024f577f0
0000000407259e09 0000000000445fa8 00000000001933f6 0000000024f577f0
Krnl Code:
0000000000193426:
eb22000c000d sllg %r2,%r2,12
000000000019342c:
a7180000 lhi %r1,0
0000000000193430:
b2290012 iske %r1,%r2
>
0000000000193434:
a7110002 tmll %r1,2
0000000000193438:
a7840006 brc 8,193444
000000000019343c:
9602c000 oi 0(%r12),2
0000000000193440:
96806000 oi 0(%r6),128
0000000000193444:
a7110004 tmll %r1,4
Call Trace:
([<
00000000001933f6>] unmap_vmas+0x846/0xf10)
[<
0000000000199680>] exit_mmap+0x210/0x458
[<
000000000012a8f8>] mmput+0x54/0xfc
[<
000000000012f714>] exit_mm+0x134/0x144
[<
000000000013120c>] do_exit+0x240/0x878
[<
00000000001318dc>] do_group_exit+0x98/0xc8
[<
000000000013e6b0>] get_signal_to_deliver+0x30c/0x358
[<
000000000010bee0>] do_signal+0xec/0x860
[<
0000000000112e30>] sysc_sigpending+0xe/0x22
[<
000002000013198a>] 0x2000013198a
INFO: lockdep is turned off.
Last Breaking-Event-Address:
[<
00000000001a68d0>] free_swap_and_cache+0x1a0/0x1a4
<4>---[ end trace
bc19f1d51ac9db7c ]---
The faulting instruction is the storage key operation (iske) in
ptep_rcp_copy (called by pte_clear, called by unmap_vmas). iske
reads dirty and reference bit information for a physical page and
requires a valid physical address. Since we are in pte_clear, we
cannot rely on the pte containing a valid address. Fortunately we
dont need these information in pte_clear - after all there is no
mapping. The best fix is to remove the needless call to ptep_rcp_copy
that contains the iske.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Christian Borntraeger [Thu, 27 Nov 2008 10:05:56 +0000 (11:05 +0100)]
[S390] fix/cleanup sched_clock
CONFIG_PRINTK_TIME reveals that sched_clock has a wrong offset during boot:
..
[ 0.000000] Movable zone: 0 pages used for memmap
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 775679
[ 0.000000] Kernel command line: dasd=4b6c root=/dev/dasda1 ro noinitrd
[ 0.000000] PID hash table entries: 4096 (order: 12, 32768 bytes)
[6920575.975232] console [ttyS0] enabled
[6920575.987586] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[6920575.991404] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
..
The s390 implementation of sched_clock uses the store clock instruction and
subtracts jiffies_timer_cc.
jiffies_timer_cc is a local variable in arch/s390/kernel/time.c and only used
for sched_clock and monotonic clock. For historical reasons there is an offset
on that value. With todays code this offset is unnecessary. By removing that
offset we can get a sched_clock which returns the nanoseconds after time_init.
This improves CONFIG_PRINTK_TIME.
Since sched_clock is the only user, I have also renamed jiffies_timer_cc to
sched_clock_base_cc. In addition, the local variable init_timer_cc is redundant
and can be romved as well.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Martin Schwidefsky [Thu, 27 Nov 2008 10:05:55 +0000 (11:05 +0100)]
[S390] fix system call parameter functions.
syscall_get_nr() currently returns a valid result only if the call
chain of the traced process includes do_syscall_trace_enter(). But
collect_syscall() can be called for any sleeping task, the result of
syscall_get_nr() in general is completely bogus.
To make syscall_get_nr() work for any sleeping task the traps field
in pt_regs is replace with svcnr - the system call number the process
is executing. If svcnr == 0 the process is not on a system call path.
The syscall_get_arguments and syscall_set_arguments use regs->gprs[2]
for the first system call parameter. This is incorrect since gprs[2]
may have been overwritten with the system call number if the call
chain includes do_syscall_trace_enter. Use regs->orig_gprs2 instead.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Lin Ming [Thu, 27 Nov 2008 06:42:30 +0000 (14:42 +0800)]
ACPICA: disable _BIF warning
A generic work-around from ACPICA is in the queue,
but since Linux has a work-around in its battery
driver, we can disable this warning now.
Allow _BIF method to return an Package with Buffer elements
http://bugzilla.kernel.org/show_bug.cgi?id=11822
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Sat, 8 Nov 2008 06:21:10 +0000 (01:21 -0500)]
ACPI: delete OSI(Linux) DMI dmesg spam
Linux will continue to ignore OSI(Linux),
except for a white-list containing a few systems.
So delete the black-list,
and stop soliciting user-feedback on the console.
Signed-off-by: Len Brown <len.brown@intel.com>
Bob Moore [Thu, 13 Nov 2008 03:01:34 +0000 (11:01 +0800)]
ACPICA: Allow _WAK method to return an Integer
This can happen if the _WAK method returns nothing (as per ACPI
1.0) but does return an integer if the implicit return mechanism
is enabled. This is the only method that has this problem,
since it is also defined to return a package of two integers
(ACPI 1.0b+). In all other cases, if a method returns an object
when one was not expected, no warning is issued.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Henrique de Moraes Holschuh [Sun, 9 Nov 2008 12:54:02 +0000 (10:54 -0200)]
ACPI: thinkpad-acpi: fix fan sleep/resume path
This fixes a regression from v2.6.27, caused by commit
5814f737e1cd2cfa2893badd62189acae3e1e1fd, "ACPI: thinkpad-acpi:
attempt to preserve fan state on resume".
It is possible for fan_suspend() to fail to properly initialize
fan_control_desired_level as required by fan_resume(), resulting on
the fan always being set to level 7 on resume if the user didn't
touch the fan controller.
In order to get fan sleep/resume handling to work right:
1. Fix the fan_suspend handling of the T43 firmware quirk. If it is
still undefined, we didn't touch the fan yet and that means we have no
business doing it on resume.
2. Store the fan level on its own variable to avoid any possible
issues with hijacking fan_control_desired_level (which isn't supposed
to have anything other than 0-7 in it, anyway).
3. Change the fan_resume code to me more straightforward to understand
(although we DO optimize the boolean logic there, otherwise it looks
disgusting).
4. Add comments to help understand what the code is supposed to be
doing.
5. Change fan_set_level to be less strict about how auto and
full-speed modes are requested.
http://bugzilla.kernel.org/show_bug.cgi?id=11982
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Reported-by: Tino Keitel <tino.keitel@tikei.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Alessandro Guido [Wed, 12 Nov 2008 22:13:35 +0000 (23:13 +0100)]
sony-laptop: printk tweak
There's no need to print "Sony: " just after "sony-laptop: " (DRV_PFX).
Signed-off-by: Alessandro Guido <ag@alessandroguido.name>
Signed-off-by: Len Brown <len.brown@intel.com>
Alessandro Guido [Wed, 12 Nov 2008 22:03:28 +0000 (23:03 +0100)]
sony-laptop: brightness regression fix
After commit
540b8bb9c33935183ceb5bed466a42ad72b2af56:
sony-laptop: fingers off backlight if video.ko is serving this functionality
I can't set brightness on my sony laptop (nothing in /sys/class/backlight).
dmesg says "sony-laptop: Sony: Brightness ignored, must be controlled by ACPI
video driver".
The function acpi_video_backlight_support returns 0 if we should use the
vendor-specific backlight support, while non-0 if the ACPI generic should
be used. Because of this, the check introduced by the said commit appears
reversed.
Signed-off-by: Alessandro Guido <ag@alessandroguido.name>
Signed-off-by: Len Brown <len.brown@intel.com>
Len Brown [Wed, 26 Nov 2008 22:55:15 +0000 (17:55 -0500)]
Revert "ACPI: don't enable control method power button as wakeup device when Fixed Power button is used"
This reverts commit
faee816b1502385dc9bc5abf2960d1cc645844d1.
http://bugzilla.kernel.org/show_bug.cgi?id=12091
Signed-off-by: Len Brown <len.brown@intel.com>
Rafael J. Wysocki [Wed, 26 Nov 2008 22:53:13 +0000 (17:53 -0500)]
ACPI suspend: Blacklist boxes that require us to set SCI_EN directly on resume
Some Apple boxes evidently require us to set SCI_EN on resume
directly, because if we don't do that, they hung somewhere in the
resume code path. Moreover, on these boxes it is not sufficient to
use acpi_enable() to turn ACPI on during resume. All of this is
against the ACPI specification which states that (1) the BIOS is
supposed to return from the S3 sleep state with ACPI enabled
(SCI_EN set) and (2) the SCI_EN bit is owned by the hardware and we
are not supposed to change it.
For this reason, blacklist the affected systems so that the SCI_EN
bit is set during resume on them.
[NOTE: Unconditional setting SCI_EN for all system on resume doesn't
work, because it makes some other systems crash (that's to be
expected). Also, it is not entirely clear right now if all of the
Apple boxes require this workaround.]
This patch fixes the recent regression tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12038
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Tino Keitel <tino.keitel@gmx.de>
Tested-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Pavel Machek [Tue, 25 Nov 2008 11:05:08 +0000 (12:05 +0100)]
ACPI: scheduling in atomic via acpi_evaluate_integer ()
Now I know why I had strange "scheduling in atomic" problems:
acpi_evaluate_integer() does malloc(..., irqs_disabled() ? GFP_ATOMIC
: GFP_KERNEL)... which is (of course) broken.
There's no way to reliably tell if we need GFP_ATOMIC or not from
code, this one for example fails to detect spinlocks held.
Fortunately, allocation seems small enough to be done on stack.
Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Alexey Starikovskiy [Fri, 21 Nov 2008 14:41:01 +0000 (22:41 +0800)]
ACPI: battery: Convert discharge energy rate to current properly
ACPI battery interface reports its state either in mW or in mA, and
discharge rate in your case is reported in mW. power_supply interface
does not have such a parameter, so current_now parameter is used
for all cases. But in case of mW, reported discharge should
be converted into mA.
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
Alexey Starikovskiy [Thu, 13 Nov 2008 09:00:03 +0000 (12:00 +0300)]
ACPI: EC: count interrupts only if called from interrupt handler.
fix 2.6.28 EC interrupt storm regression
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Ping Cheng [Mon, 24 Nov 2008 16:44:27 +0000 (11:44 -0500)]
Input: wacom - add support for new USB Tablet PCs
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Arjan van de Ven [Mon, 24 Nov 2008 03:35:57 +0000 (22:35 -0500)]
Input: replace spin_lock_bh with spin_lock_irqsave in ml_ff_playback
ml_ff_playback() uses spin_(un)lock_bh. However this function is
called with interrupts disabled from erase_effect() in
drivers/input/ff-core.c:196.
This is not permitted, and will result in a WARN_ON in the bottom
half handling code. This patch changes this function to just use
spin_lock_irqsave() instead, solving the problem and simplifying
the locking logic.
This was reported as entry #106559 in kerneloops.org
Reported-by: kerneloops.org
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
David Daney [Fri, 21 Nov 2008 01:26:36 +0000 (17:26 -0800)]
MIPS: Make BUG() __noreturn.
Often we do things like put BUG() in the default clause of a case
statement. Since it was not declared __noreturn, this could sometimes
lead to bogus compiler warnings that variables were used
uninitialized.
There is a small problem in that we have to put a magic while(1); loop to
fool GCC into really thinking it is noreturn. This makes the new
BUG() function 3 instructions long instead of just 1, but I think it
is worth it as it is now unnecessary to do extra work to silence the
'used uninitialized' warnings.
I also re-wrote BUG_ON so that if it is given a constant condition, it
just does BUG() instead of loading a constant value in to a register
and testing it.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Linus Torvalds [Fri, 21 Nov 2008 02:08:09 +0000 (18:08 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] 5330/1: mach-pxa: Fixup reset for systems using reboot=cold or other strings
[ARM] pxa: fix incorrect PCMCIA PSKTSEL pin configuration for spitz
[ARM] pxa: fix I2C controller device being registered twice on Akita
pxafb: only initialize the smart panel thread when dealing with a smartpanel
pxafb: introduce LCD_TYPE_MASK and use it.
Linus Torvalds [Thu, 20 Nov 2008 23:19:22 +0000 (15:19 -0800)]
Linux 2.6.28-rc6
Linus Torvalds [Thu, 20 Nov 2008 23:07:40 +0000 (15:07 -0800)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] xen: fix xen_get_eflags.
[IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
[IA64] remove duplicate include iommu.h
[IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
[IA64] Rationalize kernel mode alignment checking
Linus Torvalds [Thu, 20 Nov 2008 21:53:21 +0000 (13:53 -0800)]
Merge git://git./linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
USB: ACE1001 patch for cp2101.c
USB: usbmon: fix read(2)
USB: gadget rndis: send notifications
USB: gadget rndis: stop windows self-immolation
USB: storage: update unusual_devs entries for Nokia 5300 and 5310
USB: storage: updates unusual_devs entry for the Nokia 6300
usb: musb: fix bug in musb_schedule
USB: fix SB700 usb subsystem hang bug
Isaku Yamahata [Tue, 18 Nov 2008 10:20:51 +0000 (19:20 +0900)]
[IA64] xen: fix xen_get_eflags.
fix xen_get_eflags. It doesn't take any argument.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Isaku Yamahata [Tue, 18 Nov 2008 10:19:50 +0000 (19:19 +0900)]
[IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case.
pv_cpu_ops.getreg(_IA64_REG_IP) returned constant.
But the returned ip valued should be the one in the caller, not of the callee.
This patch fixes that.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Huang Weiyi [Thu, 20 Nov 2008 21:38:16 +0000 (13:38 -0800)]
[IA64] remove duplicate include iommu.h
arch/ia64/kernel/pci-dma.c only needs to include iommu once.
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Hidetoshi Seto [Mon, 17 Nov 2008 01:18:08 +0000 (10:18 +0900)]
[IA64] use mprintk instead of printk, in ia64_mca_modify_original_stack
Using printk from MCA/INIT context is unsafe since it can cause deadlock.
The ia64_mca_modify_original_stack is called from both of mca handler and
init handler, so it should use mprintk instead of printk.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Tony Luck [Thu, 20 Nov 2008 21:27:12 +0000 (13:27 -0800)]
[IA64] Rationalize kernel mode alignment checking
Itanium processors can handle some misaligned data accesses. They
also provide a mode where all such accesses are forced to trap. The
kernel was schizophrenic about use of this mode:
* Base kernel code ran in permissive mode where the only traps
generated were from those cases that the h/w could not handle.
* Interrupt, syscall and trap code ran in strict mode where all
unaligned accesses caused traps to the 0x5a00 unaligned reference
vector.
Use strict alignment checking throughout the kernel, but make
sure that we continue to let user mode use more relaxed mode
as the default.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Matthew Wilcox [Thu, 20 Nov 2008 21:09:33 +0000 (14:09 -0700)]
x86: Fix interrupt leak due to migration
When we migrate an interrupt from one CPU to another, we set the
move_in_progress flag and clean up the vectors later once they're not
being used. If you're unlucky and call destroy_irq() before the vectors
become un-used, the move_in_progress flag is never cleared, which causes
the interrupt to become unusable.
This was discovered by Jesse Brandeburg for whom it manifested as an
MSI-X device refusing to use MSI-X mode when the driver was unloaded
and reloaded repeatedly.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Trond Myklebust [Thu, 20 Nov 2008 21:06:21 +0000 (16:06 -0500)]
SUNRPC: Fix a performance regression in the RPC authentication code
Fix a regression reported by Max Kellermann whereby kernel profiling
showed that his clients were spending 45% of their time in
rpcauth_lookup_credcache.
It turns out that although his processes had identical uid/gid/groups,
generic_match() was failing to detect this, because the task->group_info
pointers were not shared. This again lead to the creation of a huge number
of identical credentials at the RPC layer.
The regression is fixed by comparing the contents of task->group_info
if the actual pointers are not identical.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 20 Nov 2008 21:14:16 +0000 (13:14 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
[CIFS] Do not attempt to close invalidated file handles
[CIFS] fix check for dead tcon in smb_init
Linus Torvalds [Thu, 20 Nov 2008 21:13:48 +0000 (13:13 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.
MIPS: csrc-r4k: Fix spelling mistake.
MIPS: RB532: Provide functions for gpio configuration
MIPS: IP22: Make indy_sc_ops variable static
MIPS: RB532: GPIO register offsets are relative to GPIOBASE
MIPS: Malta: Fix include paths in malta-amon.c
Linus Torvalds [Thu, 20 Nov 2008 21:13:03 +0000 (13:13 -0800)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
intel-iommu: fix compile warnings
Linus Torvalds [Thu, 20 Nov 2008 21:12:14 +0000 (13:12 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (23 commits)
net: fix tiny output corruption of /proc/net/snmp6
atl2: don't request irq on resume if netif running
ipv6: use seq_release_private for ip6mr.c /proc entries
pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
smc911x: Fix printf format typo in smc911x driver.
asix: Fix asix-based cards connecting to 10/100Mbs LAN.
mv643xx_eth: fix recycle check bound
mv643xx_eth: fix the order of mdiobus_{unregister, free}() calls
sh: sh_eth: Update to change of mii_bus
TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()
TPROXY: fill struct flowi->flags in udp_sendmsg()
net: ipg.c fix bracing on endian swapping
phylib: Fix auto-negotiation restart avoidance
net: jme.c rxdesc.flags is __le16, other missing endian swaps
phylib: fix phy name example in documentation
net: Do not fire linkwatch events until the device is registered.
phonet: fix compilation with gcc-3.4
ixgbe: fix compilation with gcc-3.4
pktgen: fix multiple queue warning
net: fix ip_mr_init() error path
...
Linus Torvalds [Thu, 20 Nov 2008 21:11:21 +0000 (13:11 -0800)]
Merge branch 'tracing-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
ftrace: fix dyn ftrace filter selection
ftrace: make filtered functions effective on setting
ftrace: fix set_ftrace_filter
trace: introduce missing mutex_unlock()
tracing: kernel/trace/trace.c: introduce missing kfree()
Linus Torvalds [Thu, 20 Nov 2008 21:09:32 +0000 (13:09 -0800)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: uaccess_64: fix return value in __copy_from_user()
x86: quirk for reboot stalls on a Dell Optiplex 330
Helge Deller [Thu, 20 Nov 2008 09:54:09 +0000 (10:54 +0100)]
parisc: fix bug in compat_arch_ptrace
Commit
81e192d6ce303b6792aa38ff35f41a1a7357f23a ("parisc: convert to
generic compat_sys_ptrace") introduced a bug which segfaults the parisc
64bit kernel when stracing 32bit applications:
Kernel Fault: Code=15 regs=
00000000bafa42b0 (Addr=
00000001baf5ab57)
YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW:
00001000000001101111111100001011 Tainted: G W
r00-03
000000ff0806ff0b 000000004068edc0 00000000401203f8 00000000fb3e2508
r04-07
0000000040686dc0 00000000baf5a800 fffffffffffffffc fffffffffb3e2508
r08-11
00000000baf5a800 000000000004b068 00000000000402b0 0000000000040d68
r12-15
0000000000042a9c 0000000000040a9c 0000000000040d60 0000000000042e9c
r16-19
000000000004b060 000000000004b058 0000000000042d9c ffffffffffffffff
r20-23
000000000800000b 0000000000000000 000000000800000b fffffffffb3e2508
r24-27
00000000fffffffc 0000000000000003 00000000fffffffc 0000000040686dc0
r28-31
00000001baf5a7ff 00000000bafa4280 00000000bafa42b0 00000000000001d7
sr00-03
0000000000fca000 0000000000000000 0000000000000000 0000000000fca000
sr04-07
0000000000000000 0000000000000000 0000000000000000 0000000000000000
IASQ:
0000000000000000 0000000000000000 IAOQ:
0000000040120400 0000000040120404
IIR:
4b9a06b0 ISR:
0000000000000000 IOR:
00000001baf5ab57
CPU: 0 CR30:
00000000bafa4000 CR31:
00000000d22344e0
ORIG_R28:
00000000fb3e2248
IAOQ[0]: compat_arch_ptrace+0xb8/0x160
IAOQ[1]: compat_arch_ptrace+0xbc/0x160
RP(r2): compat_arch_ptrace+0xb0/0x160
Backtrace:
[<
00000000401612ac>] compat_sys_ptrace+0x15c/0x180
[<
0000000040104ef8>] syscall_exit+0x0/0x14
The problem is that compat_arch_ptrace() enters with an addr value of
type compat_ulong_t and calls translate_usr_offset() to translate the
address offset into a struct pt_regs offset like this:
addr = translate_usr_offset(addr)
this means that any return value of translate_usr_offset() is stored
back as compat_ulong_t type into the addr variable.
But since translate_usr_offset() returns -1 for invalid offsets, addr
can now get the value 0xffffffff which then fails the next return-value
sanity check and thus the kernel tries to access invalid memory:
if (addr < 0)
break;
Fix this bug by modifying translate_usr_offset() to take and return
values of type compat_ulong_t, and by returning the value
"sizeof(struct pt_regs)" as an error indicator.
Additionally change the sanity check to check for return values
for >= sizeof(struct pt_regs).
This patch survived my compile and run-tests.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Steve French [Thu, 20 Nov 2008 20:00:44 +0000 (20:00 +0000)]
[CIFS] Do not attempt to close invalidated file handles
If a connection with open file handles has gone down
and come back up and reconnected without reopening
the file handle yet, do not attempt to send an SMB close
request for this handle in cifs_close. We were
checking for the connection being invalid in cifs_close
but since the connection may have been reconnected
we also need to check whether the file handle
was marked invalid (otherwise we could close the
wrong file handle by accident).
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Ralf Baechle [Mon, 3 Nov 2008 11:32:34 +0000 (11:32 +0000)]
MIPS: csrc-r4k: Fix declaration depending on the wrong CONFIG_ symbol.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle [Mon, 3 Nov 2008 11:31:54 +0000 (11:31 +0000)]
MIPS: csrc-r4k: Fix spelling mistake.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Phil Sutter [Sat, 1 Nov 2008 14:13:21 +0000 (15:13 +0100)]
MIPS: RB532: Provide functions for gpio configuration
As gpiolib doesn't support pin multiplexing, it provides no way to
access the GPIOFUNC register. Also there is no support for setting
interrupt status and level. These functions provide access to them and
are needed by the CompactFlash driver.
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Dmitri Vorobiev [Fri, 31 Oct 2008 17:54:11 +0000 (19:54 +0200)]
MIPS: IP22: Make indy_sc_ops variable static
The indy_sc_ops variable in arch/mips/mm/sc-ip22.c is needlessly defined
global, and this patch makes it static.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---
Florian Fainelli [Fri, 31 Oct 2008 13:24:29 +0000 (14:24 +0100)]
MIPS: RB532: GPIO register offsets are relative to GPIOBASE
This patch fixes the wrong use of GPIO register offsets
in devices.c. To avoid further problems, use gpio_get_value
to return the NAND status instead of our own expanded code.
Also define the zero offset of the alternate function register to allow
consistent access.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
David Daney [Sat, 20 Sep 2008 17:16:36 +0000 (10:16 -0700)]
MIPS: Malta: Fix include paths in malta-amon.c
On linux-queue, malta doesn't build after the include file relocation.
This should fix it.
There some occurrences of 'asm-mips' in the comments of quite a few
files, but this is the only place I found it in any code.
Signed-off-by: David Daney <ddaney@avtrex.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Alexey Dobriyan [Thu, 20 Nov 2008 12:20:10 +0000 (04:20 -0800)]
net: fix tiny output corruption of /proc/net/snmp6
Because "name" is static, it can be occasionally be filled with
somewhat garbage if two processes read /proc/net/snmp6.
Also, remove useless casts and "-1" -- snprintf() correctly terminates it's
output.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Alan Jenkins [Thu, 20 Nov 2008 12:18:25 +0000 (04:18 -0800)]
atl2: don't request irq on resume if netif running
If the device is suspended with the cable disconnected, then
resumed with the cable connected, dev->open is called before
resume. During resume, we request an IRQ, but the IRQ was
already assigned during dev->open, resulting in the warning
shown below.
Don't request an IRQ if the device is running.
Call Trace:
[<
c011b89a>] warn_on_slowpath+0x40/0x59
[<
c023df15>] raw_pci_read+0x4d/0x55
[<
c023dff3>] pci_read+0x1c/0x21
[<
c01bcd81>] __pci_find_next_cap_ttl+0x44/0x70
[<
c01bce86>] __pci_find_next_cap+0x1a/0x1f
[<
c01bcef9>] pci_find_capability+0x28/0x2c
[<
c01c4144>] pci_msi_check_device+0x53/0x62
[<
c01c49c2>] pci_enable_msi+0x3a/0x1cd
[<
e019f17b>] atl2_write_phy_reg+0x40/0x5f [atl2]
[<
c01061b1>] dma_generic_alloc_coherent+0x0/0xd7
[<
e019f107>] atl2_request_irq+0x15/0x49 [atl2]
[<
e01a1481>] atl2_open+0x20b/0x297 [atl2]
[<
c024a35c>] dev_open+0x62/0x91
[<
c0248b9a>] dev_change_flags+0x93/0x141
[<
c024f308>] do_setlink+0x238/0x2d5
[<
c02501b2>] rtnl_setlink+0xa9/0xbf
[<
c0297f0c>] mutex_lock+0xb/0x19
[<
c024ffa7>] rtnl_dump_ifinfo+0x0/0x69
[<
c0250109>] rtnl_setlink+0x0/0xbf
[<
c024fe42>] rtnetlink_rcv_msg+0x185/0x19f
[<
c0240fd1>] sock_rmalloc+0x23/0x57
[<
c024fcbd>] rtnetlink_rcv_msg+0x0/0x19f
[<
c0259457>] netlink_rcv_skb+0x2d/0x71
[<
c024fcb7>] rtnetlink_rcv+0x14/0x1a
[<
c025929e>] netlink_unicast+0x184/0x1e4
[<
c025992a>] netlink_sendmsg+0x233/0x240
[<
c023f405>] sock_sendmsg+0xb7/0xd0
[<
c0129131>] autoremove_wake_function+0x0/0x2b
[<
c0129131>] autoremove_wake_function+0x0/0x2b
[<
c0147796>] mempool_alloc+0x2d/0x9e
[<
c020c923>] scsi_pool_alloc_command+0x35/0x4f
[<
c0297f0c>] mutex_lock+0xb/0x19
[<
c028e867>] unix_stream_recvmsg+0x357/0x3e2
[<
c01b81c9>] copy_from_user+0x23/0x4f
[<
c02452ea>] verify_iovec+0x3e/0x6c
[<
c023f5ab>] sys_sendmsg+0x18d/0x1f0
[<
c023ffa8>] sys_recvmsg+0x146/0x1c8
[<
c0240016>] sys_recvmsg+0x1b4/0x1c8
[<
c0118f48>] __wake_up+0xf/0x15
[<
c02586cd>] netlink_table_ungrab+0x17/0x19
[<
c01b83ba>] copy_to_user+0x25/0x3b
[<
c023fe4a>] move_addr_to_user+0x50/0x68
[<
c0240266>] sys_getsockname+0x6f/0x9a
[<
c0240280>] sys_getsockname+0x89/0x9a
[<
c015046a>] do_wp_page+0x3ae/0x41a
[<
c0151525>] handle_mm_fault+0x4c5/0x540
[<
c02405d0>] sys_socketcall+0x176/0x1b0
[<
c010376d>] sysenter_do_call+0x12/0x21
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Jay Cliburn <jcliburn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Benjamin Thery [Thu, 20 Nov 2008 12:16:12 +0000 (04:16 -0800)]
ipv6: use seq_release_private for ip6mr.c /proc entries
In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif
are opened with seq_open_private(), thus seq_release_private() should be
used to release them.
Should fix a small memory leak.
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Thu, 20 Nov 2008 12:07:14 +0000 (04:07 -0800)]
pkt_sched: fix missing check for packet overrun in qdisc_dump_stab()
nla_nest_start() might return NULL, causing a NULL pointer dereference.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 20 Nov 2008 12:01:29 +0000 (04:01 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Vernon Sauder [Thu, 20 Nov 2008 09:56:08 +0000 (01:56 -0800)]
smc911x: Fix printf format typo in smc911x driver.
Signed-off-by: Vernon Sauder <VernonInHand@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pantelis Koukousoulas [Thu, 20 Nov 2008 09:48:46 +0000 (01:48 -0800)]
asix: Fix asix-based cards connecting to 10/100Mbs LAN.
Add AX_MEDIUM_ENCK also when speed = 10/100Mbps. This allows my belkin
f5d5055 to work with my 100Mbps switch and with an old 10Mbps ISA card.
Without this patch, the card is recognized and the interface is brought
up fine, but no packets actually flow through the interface.
Signed-off-by: Pantelis Koukousoulas <pktoss@gmail.com>
Acked-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Lennert Buytenhek [Tue, 18 Nov 2008 04:28:58 +0000 (04:28 +0000)]
mv643xx_eth: fix recycle check bound
When mv643xx_eth allocates skbuffs, it adds
'dma_get_cache_alignment() - 1' to the length it needs, so that it can
align the skb's ->data pointer to a cache boundary. When checking
whether a transmitted skbuff can be reused as a receive buffer, these
bytes needs to be included into the minimum bound for the recycle check.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Lennert Buytenhek [Tue, 18 Nov 2008 04:28:35 +0000 (04:28 +0000)]
mv643xx_eth: fix the order of mdiobus_{unregister, free}() calls
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Nobuhiro Iwamatsu [Mon, 17 Nov 2008 20:29:58 +0000 (20:29 +0000)]
sh: sh_eth: Update to change of mii_bus
Update to change of mii_bus interface and fix some warning.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Balazs Scheidler [Thu, 20 Nov 2008 09:08:06 +0000 (01:08 -0800)]
TPROXY: supply a struct flowi->flags argument in inet_sk_rebuild_header()
inet_sk_rebuild_header() does a new route lookup if the dst_entry
associated with a socket becomes stale. However inet_sk_rebuild_header()
didn't use struct flowi->flags, causing the route lookup to
fail for foreign-bound IP_TRANSPARENT sockets, causing an error
state to be set for the sockets in question.
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Balazs Scheidler [Thu, 20 Nov 2008 09:07:24 +0000 (01:07 -0800)]
TPROXY: fill struct flowi->flags in udp_sendmsg()
udp_sendmsg() didn't fill struct flowi->flags, which means that
the route lookup would fail for non-local IPs even if the
IP_TRANSPARENT sockopt was set.
This prevents sendto() to work properly for UDP sockets, whereas
bind(foreign-ip) + connect() + send() worked fine.
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
M Kondrin [Fri, 14 Nov 2008 10:02:45 +0000 (13:02 +0300)]
USB: ACE1001 patch for cp2101.c
The patch which adds IDs for AKTAKOM USB->RS232 cable
(http://www.aktakom.ru/product/kio/ace-1001.htm) is attached.
From: M Kondrin <mkondrin@hppi.troitsk.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pete Zaitcev [Fri, 14 Nov 2008 16:47:41 +0000 (09:47 -0700)]
USB: usbmon: fix read(2)
There's a bug in the usbmon binary reader: When using read() to fetch
the packets and a packet's data is partially read, the next read call
will once again return up to len_cap bytes of data. The b_read counter
is not regarded when determining the remaining chunk size.
So, when dumping USB data with "cat /dev/usbmon0 > usbmon.trace" while
reading from a USB storage device and analyzing the dump file
afterwards it will get out of sync after a couple of packets.
Signed-off-by: Ingo van Lil <inguin@gmx.de>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Richard Röjfors [Sun, 16 Nov 2008 03:53:24 +0000 (19:53 -0800)]
USB: gadget rndis: send notifications
It turns out that atomic_inc_return() returns the *new* value
not the original one, so the logic in rndis_response_available()
kept the first RNDIS response notification from getting out.
This prevented interoperation with MS-Windows (but not Linux).
Fix this to make RNDIS behave again.
Signed-off-by: Richard Röjfors <richard.rojfors@endian.se>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Sun, 16 Nov 2008 03:53:21 +0000 (19:53 -0800)]
USB: gadget rndis: stop windows self-immolation
Somewhere in the conversion of the RNDIS gadget code to the new
framework, the descriptor of its data interface seems to have
been copied from the CDC Ethernet driver. Unfortunately that
means it got a nonzero altsetting ... which is incorrect. Issue
uncovered by Richard Röjfors <richard.rojfors@endian.se>.
This patch fixes that problem, and resolves at least some cases
of Windows XP bluescreening itself.
Tested-by: Richard Röjfors <richard.rojfors@endian.se>.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 17 Nov 2008 19:32:16 +0000 (14:32 -0500)]
USB: storage: update unusual_devs entries for Nokia 5300 and 5310
This patch (as1168) updates the unusual_devs entry for the Nokia 5300.
According to Jorge Lucangeli Obes <t4m5yn@gmail.com>, some existing
models have a revision number lower than the lower limit of the
current entry.
The patch also moves the entry for the Nokia 5310 to its correct place
in the file.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Mon, 17 Nov 2008 21:12:32 +0000 (16:12 -0500)]
USB: storage: updates unusual_devs entry for the Nokia 6300
This patch (as1169) modifies the unusual_devs entry for the Nokia
6300. According to Maciej Gierok <mgierok@gmail.com> and David
McBride <dwm@doc.ic.ac.uk>, the revision limits need to be wider.
This fixes Bugzilla #11768.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>