/* Hit power state D3 (sleep) */
iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
that fails. StickyHW is 0x83. lspci says:
0000:00:07.0 Ethernet controller: VIA Technologies, Inc. VT86C100A
[Rhine] (rev 06)
Flags: bus master, medium devsel, latency 32, IRQ 18
I/O ports at ec00 [size=128]
Memory at dfffff80 (32-bit, non-prefetchable) [size=128]
In other words, it's trying to read outside of the I/O range (0x80),
which matches the fauling address.
I'm guessing my chip revision doesn't support WOL, it's a crappy noname
card.
It does seem as if rhine_power_init checks quirks for rqWOL before
touching any registers. Should rhine_shutdown do the same? Proposed
patch below, which resolves the problem on my system.
Check to make sure WOL is supported before setting it up in
rhine_shutdown.
Signed-off-by: Olof Johansson <olof@austin.ibm.com> Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Chris Wright [Sat, 12 Mar 2005 13:46:45 +0000 (05:46 -0800)]
[PATCH] sis900 kernel oops fix
Backport of fix described below.
From: Herbert Xu <herbert@gondor.apana.org.au>
Fix bug #4223.
OK, this happened because we got preempted before sis900_mii_probe
finished setting the sis_priv->mii. Theoretically this can happen
with SMP as well but I suppose the number of SMP machines with sis900
is fairly small.
Anyway, the fix is to make sure that sis900_mii_probe is done before
the device can be opened. This patch does it by moving the setup
before register_netdevice.
Since the netdev name is not available before register_netdev, I've
changed the relevant printk's to use pci_name instead. Note that
one of those printk's may be called after register_netdev as well.
Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David S. Miller [Sat, 12 Mar 2005 13:41:54 +0000 (05:41 -0800)]
[PATCH] [TCP]: Put back tcp_timer_bug_msg[] symbol export.
This wrecks the ipv6 modular build for a lot of people.
In fact, since I always build ipv6 modular I am surprised
I never hit this. My best guess is that my compiler is
optimizing the reference away, but that can never be
depended upon and the symbol export really is needed.
[TCP]: Put back tcp_timer_bug_msg[] symbol export.
It is needed for tcp_reset_xmit_timer(), which is invoked by
tcp_prequeue() which is invoked from tcp_ipv6.c
Signed-off-by: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jean Delvare [Sat, 12 Mar 2005 13:40:46 +0000 (05:40 -0800)]
[PATCH] Fix i2c messsage flags in video drivers
While working on the saa7110 driver I found a problem with the way
various video drivers (found on Zoran-based boards) prepare i2c messages
to be used by i2c_transfer. The drivers improperly copy the i2c client
flags as the message flags, while both sets are mostly unrelated. The
net effect in this case is to trigger an I2C block read instead of the
expected I2C block write. The fix is simply not to pass any flag,
because none are needed.
I think this patch qualifies hands down as a "critical bug fix" to be
included in whatever bug-fix-only trees exist these days. As far as I
can see, all Zoran-based boards are broken in 2.6.11 without this patch.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andrew Morton [Sat, 12 Mar 2005 13:39:19 +0000 (05:39 -0800)]
[PATCH] ppc32: Compilation fixes for Ebony, Luan and Ocotea
From: Matt Porter <mporter@kernel.crashing.org>
this patch fixes the problem, that the current kernel (linux-2.6.11-rc5)
could not be compiled, when "support for early boot texts over serial port"
(CONFIG_SERIAL_TEXT_DEBUG=y) is active.
Signed-off-by: Gerhard Jaeger <gjaeger@sysgo.com> Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dave Airlie [Sat, 12 Mar 2005 13:38:27 +0000 (05:38 -0800)]
[PATCH] drm missing memset can crash X server..
Egbert Eich reported a bug 2673 on bugs.freedesktop.org and tracked it
down to a missing memset in the setversion ioctl, this causes X server
crashes...
From: Egbert Eich <eich@pdx.freedesktop.org> Signed-off-by: Dave Airlie <airlied@linux.ie> Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Andrew Morton [Sat, 12 Mar 2005 13:35:18 +0000 (05:35 -0800)]
[PATCH] cramfs: small stat(2) fix
From: Eric Lammerts <eric@lammerts.org>
When I stat(2) a device node on a cramfs, the st_blocks field is bogus
(it's derived from the size field which in this case holds the major/minor
numbers). This makes du(1) output completely wrong.
Signed-off-by: Eric Lammerts <eric@lammerts.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jean Delvare [Sat, 12 Mar 2005 13:33:36 +0000 (05:33 -0800)]
[PATCH] fix amd64 2.6.11 oops on modprobe (saa7110)
This is a rewrite of the saa7110_write_block function, which was plain
broken in the case where the underlying adapter supports I2C_FUNC_I2C.
It also includes related fixes which ensure that different parts of the
driver agree on the number of registers the chip has.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>