Dmitry Torokhov [Fri, 4 Mar 2005 00:12:02 +0000 (16:12 -0800)]
[PATCH] Fix keyboards for Dell machines
Some ACPI-related changes were recently made to i8042 discovery for ia64.
Unfortunately this broke a significant number of Dell laptops due to their
having incorrect BIOS tables.
So, for now, arrange for the new code to be ia64-only.
Olof Johansson [Thu, 3 Mar 2005 07:14:35 +0000 (23:14 -0800)]
[PATCH] Fix for trivial fix for 2.6.11 raid6 compilation on ppc w/ Altivec
Here's a patch that will work for both PPC and PPC64. The proper way to
fix this in mainline is to merge -mm's cpu_has_feature patch, but for
the stable 2.6.11-series, this much less intrusive (i.e. just the pure
bugfix, not the cleanup part).
Signed-off-by: Olof Johansson <olof@austin.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andrew Morton [Tue, 1 Mar 2005 00:48:38 +0000 (16:48 -0800)]
[IA64] ia64 audit build fix
With CONFIG_AUDITSYSCALL=n:
arch/ia64/kernel/ptrace.c: In function `syscall_trace_enter':
arch/ia64/kernel/ptrace.c:1615: warning: implicit declaration of function `audit_syscall_entry'
arch/ia64/kernel/ptrace.c: In function `syscall_trace_leave':
arch/ia64/kernel/ptrace.c:1631: warning: implicit declaration of function `audit_syscall_exit'
And the link fails, due to audit_syscall_entry() not being present.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
Sascha Hauer [Mon, 28 Feb 2005 18:24:24 +0000 (18:24 +0000)]
[ARM PATCH] 2496/1: i.MX DMA fix
Patch from Sascha Hauer
This patch fixes the handling of the dma interrupt acknowledge register (DISR).
A DMA interrupt is acknowledged by setting the corresponding bit in
DISR. So we are not allowed to use |= on this register because we could
lose interrupts.
Sascha Hauer
Signed-off-by: Sascha Hauer Signed-off-by: Russell King
Alex Williamson [Mon, 28 Feb 2005 16:09:45 +0000 (16:09 +0000)]
[SERIAL] 8250 woraround for buggy uart
Patch from Alex Williamson
This patch adds support for detecting and working around a bug in
the A2 rev of the Exar ST16C2550 UART. The chip incorrectly
advertises an EFR and mis-detects as having the wrong size FIFO.
Much of the patch below is Russell's proposed solution to the
problem. The only changes I've made are to check the FIFO size
on the part (because there is a real part with the same divisor
ID and larger FIFO) and save and restore the LCR register around
the size_fifo() routine (it doesn't work correctly with a LCR
value of 0xBF).
Signed-off-by: Alex Williamson Signed-off-by: Russell King
Exit-only function uninit_aedsp16() was marked __init instead of __exit;
ae_config data was marked __initdata but used during exit;
several cleanup functions were marked _init but used for init or exit
cleanups;
Error: ./sound/oss/aedsp16.o .exit.text refers to 0000000000000004 R_X86_64_PC32 .init.data+0x000000000000003b
Error: ./sound/oss/aedsp16.o .exit.text refers to 000000000000000c R_X86_64_PC32 .init.text+0x00000000000001e4
Error: ./sound/oss/aedsp16.o .exit.text refers to 0000000000000013 R_X86_64_PC32 .init.text+0x0000000000000034
Error: ./sound/oss/aedsp16.o .exit.text refers to 0000000000000019 R_X86_64_PC32 .init.data+0x000000000000003f
Error: ./sound/oss/aedsp16.o .exit.text refers to 0000000000000023 R_X86_64_PC32 .init.text+0x00000000000001b4
Signed-off-by: Randy Dunlap <rddunlap@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrea Arcangeli [Mon, 28 Feb 2005 00:36:29 +0000 (16:36 -0800)]
[PATCH] Make the new merged pipe writes check for SIGPIPE
The new pipe buffer merging doesn't check for the "no readers" case, so
with small writes that coalesce, we may not get a timely SIGPIPE/EPIPE
notification to the writer.
Signed-off-by: Andrea Arcangeli <andrea@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds [Mon, 28 Feb 2005 00:36:14 +0000 (16:36 -0800)]
Make pipe "poll()" take direction of pipe into account.
The pipe code has traditionally not cared about which end-point of the
pipe you are polling, meaning that if you poll the write-only end of a
pipe, it will still set the "this pipe is readable" bits if there is
data to be read on the read side.
That makes no sense, and together with the new bigger buffers breaks
python-twisted.
Based on debugging/patch by Andrea Arcangeli and testcase from
Thomas Crhak
David S. Miller [Sun, 27 Feb 2005 03:10:03 +0000 (19:10 -0800)]
[IPV4]: Fix lost routes in fn_hash netlink dumps.
Spotted by itkes@fat.imed.msu.ru, the fn_hash_dump_bucket() main
loop does not increment 'i' properly, and thus routes will not
be listed, when the test 'i < s_i' passes.
The bug was added when the code was converted over to
hlist_for_each_entry() by your's truly.
Signed-off-by: David S. Miller <davem@davemloft.net>
Aurelien Jarno [Fri, 25 Feb 2005 12:28:59 +0000 (04:28 -0800)]
[PATCH] USB: Fix usbfs regression
I have just tested kernel version 2.6.11-rc5 and noticed it is not
possible to do an USB transfer by submitting an URB to an output
endpoint. This breaks newest versions of libusb and thus SANE, gphoto2,
and a lot of software.
The bug was introduced in version 2.6.11-rc1 and is due to a wrong
comparison.
David Gibson [Fri, 25 Feb 2005 00:48:33 +0000 (16:48 -0800)]
[PATCH] ppc64: hugepage hash flushing bugfix
This fixes a potentially bad (although very rarely triggered) bug in the
ppc64 hugepage code.
hpte_update() did not correctly calculate the address for hugepages, so
pte_clear() (which we use for hugepage ptes as well as normal ones)
would not correctly flush the hash page table entry. Under the right
circumstances this could potentially lead to duplicate hash entries,
which is very bad.
davem's upcoming patch to pass the virtual address directly to set_pte()
and its ilk will obsolete this, but this is bad enough it should
probably be fixed in the meantime.
Signed-off-by: David Gibson <dwg@au1.ibm.com> Acked-by: William Irwin <wli@holomorphy.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[ide] fix build for built-in hpt366 and modular ide-disk
* always call __ide_do_rw_disk() in ide_do_rw_disk()
* modify ide_hwif_t->rw_disk hook accordingly
* update and cleanup hpt372n_rw_disk()
(the only user of ide_hwif_t->rw_disk hook)
* make __ide_do_rw_disk() static + fix comment
Harald Welte [Wed, 23 Feb 2005 11:50:04 +0000 (03:50 -0800)]
[NETFILTER]: ipt_hashlimit rule load time race condition
This is the best we've got: We cannot release and re-grab lock,
since checkentry() is called before ip_tables.c grabs ipt_mutex.
We also cannot grab the hashtable spinlock, since htable_create will
call vmalloc, and that can sleep. And we cannot just re-search
the list of htable's in htable_create(), since then we would
create duplicate proc files.
Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Do it in addrconf_ifdown. This fixes OOPSes on shutdown
with 2.6.10
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Wed, 23 Feb 2005 11:38:18 +0000 (03:38 -0800)]
[NETFILTER]: Prevent NAT from seeing fragments
The path for loopback is:
LOCAL_OUT: conntrack defrags
POST_ROUTING: conntrack refrags
PRE_ROUTING: skip conntrack defrag because skb->nfct != NULL
PRE_ROUTING: NAT gets hit by fragments
Always defrag on loopback if NAT is compiled in.
Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Rusty Russel <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
François Romieu [Wed, 23 Feb 2005 13:19:19 +0000 (08:19 -0500)]
[PATCH] r8169: IRQ races during change of mtu
IRQ races during change of mtu
- NAPI poll must be enabled prior to IRQ activation or the IRQ handler
will not know what to do with an incoming packet;
- rtl8169_down() needs to try twice to sync with the IRQ handler when
it is not issued under !netif_running() protection.
Both changes make it safe to request a change of mtu on a live device.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Olof Johansson [Wed, 23 Feb 2005 05:56:33 +0000 (21:56 -0800)]
[PATCH] Fix possible futex mmap_sem deadlock
Some futex functions do get_user calls while holding mmap_sem for
reading. If get_user() faults, and another thread happens to be in mmap
(or somewhere else holding waiting on down_write for the same
semaphore), then do_page_fault will deadlock. Most architectures seem
to be exposed to this.
To avoid it, make sure the page is available. If not, release the
semaphore, fault it in and retry.
I also found another exposure by inspection, moving some of the code
around avoids the possible deadlock there.
Signed-off-by: Olof Johansson <olof@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Garzik [Wed, 23 Feb 2005 09:47:10 +0000 (04:47 -0500)]
[libata] Add missing hooks, to avoid oops in advanced SATA drivers
Advanced SATA drivers should not (and cannot) use the basic
PCI IDE hooks for checking the Status and Error registers, as these
registers are either in non-standard locations, or simply don't
exist.
In the error handling path, libata was unconditionally calling some
PCI IDE hardware bitbanging functions, which would cause an oops
in the AHCI driver and any other advanced libata driver.
Dmitry Torokhov [Wed, 23 Feb 2005 00:41:49 +0000 (16:41 -0800)]
[PATCH] ALPS: do not activate on unsupported models
It feels like 2.6.11 is right around the corner. I would like to disable
ALPS suport for some devices we don't know how to handle properly yet to
cut down on number of complaints that we broke mouse support.
Input: ALPS - do not activate native mode for devices whose data
we can not handle yet.
Paul Mackerras [Wed, 23 Feb 2005 00:41:36 +0000 (16:41 -0800)]
[PATCH] ppc64: fix compilation for Maple board
A patch that I sent in earlier to allow the use of the data address
breakpoint on machines with a hypervisor happened to break things for those
configs, such as for the Maple board, where we don't compile in the
routines for calling the hypervisor. This patch fixes it.
Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[PATCH] ppc32: Wrong vaddr in flush_hash_one_pte()
Reworking the ppc32 mm helps me find interesting bugs in the existing bug,
well, brown paper bag for me, I made this one a while ago.
The routine flush_hash_one_pte() used by ptep_test_and_clear_young()
wasn't properly recaclulating the vaddr from the pte pointer &
page->index. The result is that we probably never flushed things from
the hash, so that's at least the _second_ bug affecting
ptep_test_and_clear_young(), swap on ppc32 must have been really broken
:(
This fixes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Christoph Lameter's patch that change page allocators to use GFP_ZERO
broke ppc32 in a subtle way. Our allocator is designed to work before
mem_init_done, in which cases it uses a ppc specific early_get_page()
which doesn't return zeroed pages. However, he removed the call to
clear_page() unconditionally, thus causing the kernel initial page
tables to have random data in them.
They are initialized with set_pte, which means it's _mostly_ harmless,
except that set_pte on ppc32 preserves the _PAGE_HASHPTE bit, thus we
end up with random bits there, which can cause issues with further
manipulation of the kernel page tables and will slow down all hash
faults to them causing unnecessary searches.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tom Rini [Tue, 22 Feb 2005 06:12:49 +0000 (22:12 -0800)]
[PATCH] Re-order <linux/fs.h> includes to fix userland breakage
The following moves all includes <linux/fs.h> (except <linux/ioctl.h>
and <linux/config.h> down to below the existing __KERNEL__ test. None
of these includes are needed by the user-visible portions of the header,
and in some cases can cause userland apps to break.
For example, LTP and sash with an empty <linux/autoconf.h> will fail
thusly:
cc -Wall -I../../include -g -Wall -I../../../../include -Wall setrlimit02.c -L../../../../lib -lltp -o setrlimit02
In file included from /usr/include/asm/atomic.h:6,
from /usr/include/linux/fs.h:20,
from setrlimit02.c:46:
/usr/include/asm/processor.h:68: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/processor.h:68: error: requested alignment is not a constant
Build/run tested with a glibc rebuild as well.
Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
[TCP]: Fix excessive stack usage resulting in OOPS with 4KSTACKS.
Various routines were putting a full struct tcp_sock on
the local stack. What they really wanted was a subset
of this information when doing TCP options processing
when we only have a mini-socket (for example in SYN-RECVD
and TIME_WAIT states).
Therefore pull out the needed information into a sub-struct
and use that in the TCP options processing routines.
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: David S. Miller <davem@davemloft.net>
Anton Blanchard [Mon, 21 Feb 2005 23:30:18 +0000 (15:30 -0800)]
[PATCH] ppc64: Fix 32bit largepage issue
The paca holds a shadow of the context struct, used for the real mode SLB
handler. When we open up a new segment we have to sync up the paca copy
otherwise we will instantiate small page SLB entries until the next context
switch (at which point we resync the paca copy).
Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
The BIC TCP cwnd problem as identified by Yee-Ting Li and Doug Leith
is that the computation is recalc_ssthresh is incorrect and
BICTCP_1_OVER_BETA/2 should be BICTCP_1_OVER_BETA*2.
My fix is to implement the code from BIC TCP 1.1 which uses a sysctl
to set the beta. There are a few variable name changes from the 1.1
code, and made the scaling factor a #define instead of hardcoded.
I validated this using netem and kprobes, for more details see
http://developer.osdl.org/shemminger/bic-beta-patch.pdf
Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
ppc32's implementation of ptep_test_and_clear_young() has a logic error
which makes it fail to flush the hash table. Thus PAGE_ACCESSED is
almost never set again after beeing cleared (unless something else cause
that hash entry to be flushed).
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>