]> err.no Git - linux-2.6/log
linux-2.6
17 years agocxgb3 - detect NIC only adapters
Divy Le Ray [Sat, 31 Mar 2007 07:23:19 +0000 (00:23 -0700)]
cxgb3 - detect NIC only adapters

Differentiate NIC only adapters from RNICs.
Initialize offload capabilities for RNICs only.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - Safeguard TCAM size usage
Divy Le Ray [Sat, 31 Mar 2007 07:23:13 +0000 (00:23 -0700)]
cxgb3 - Safeguard TCAM size usage

Ensure that the TCAM active region size is at least 16.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 2 Apr 2007 22:23:08 +0000 (15:23 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SCSI]: Fix scsi_send_eh_cmnd scatterlist handling
  [SPARC]: Add unsigned to unused bit field in a.out.h

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 2 Apr 2007 22:22:20 +0000 (15:22 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS.
  [BNX2]: Fix nvram write logic.
  [IPv6]: Fix incorrect length check in rawv6_sendmsg()
  [NET_SCHED]: cls_basic: fix memory leak in basic_destroy
  [NET]: Change "not found" return value for rule lookup

17 years ago[SCSI]: Fix scsi_send_eh_cmnd scatterlist handling
David S. Miller [Mon, 2 Apr 2007 21:21:55 +0000 (14:21 -0700)]
[SCSI]: Fix scsi_send_eh_cmnd scatterlist handling

This fixes a regression caused by commit:

2dc611de5a3fd955cd0298c50691d4c05046db97

The sense buffer code in scsi_send_eh_cmnd was changed to use
alloc_page() and a scatter list, but the sense data copy was not
updated to match so what we actually get in the sense buffer is total
grabage starting with the kernel address of the struct page we got.
Basically the stack frame of scsi_send_eh_cmd() is what ends up
in the sense buffer.

Depending upon how pointers look on a given platform, you can
end up getting sr_ioctl.c errors when you mount a cdrom.  If
the CDROM gives a check condition for GPCMD_GET_CONFIGURATION issued
by drivers/cdrom/cdrom.c:cdrom_mmc_profile(), sr_ioctl will
spit out this error message in sr_do_ioctl() with the way pointers
are on sparc64:

default:
printk(KERN_ERR "%s: CDROM (ioctl) error, command: ", cd->cdi.name);
__scsi_print_command(cgc->cmd);
scsi_print_sense_hdr("sr", &sshdr);
err = -EIO;

This is the error Tom Callaway reported in:

http://marc.info/?l=linux-sparc&m=117407453208101&w=2

Anyways, fix this by using page_address(sgl.page) which is OK
because we know this is low-mem due to GFP_ATOMIC.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Christoph Hellwig <hch@lst.de>
17 years ago[SPARC]: Add unsigned to unused bit field in a.out.h
Robert Reif [Wed, 28 Mar 2007 21:21:08 +0000 (14:21 -0700)]
[SPARC]: Add unsigned to unused bit field in a.out.h

Add unsigned to unused bit field in a.out.h to make sparse happy.

[ I took care of the sparc64 side as well -DaveM ]

Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS.
John Heffner [Mon, 2 Apr 2007 20:56:32 +0000 (13:56 -0700)]
[TCP]: Do receiver-side SWS avoidance for rcvbuf < MSS.

Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Mon, 2 Apr 2007 20:52:10 +0000 (13:52 -0700)]
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (5496): Pluto2: fix incorrect TSCR register setting
  V4L/DVB (5495): Tda10086: fix DiSEqC message length

17 years ago[BNX2]: Fix nvram write logic.
Michael Chan [Fri, 30 Mar 2007 21:53:06 +0000 (14:53 -0700)]
[BNX2]: Fix nvram write logic.

The nvram dword alignment logic was broken when writing less than 4
bytes on a non-aligned offset.  It was missing logic to round the
length to 4 bytes.

The page erase code is also moved so that it is only called when
using non-buffered flash for better code clarity.

Update version to 1.5.7.

Based on initial patch from Tony Cureington <tony.cureington@hp.com>.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPv6]: Fix incorrect length check in rawv6_sendmsg()
YOSHIFUJI Hideaki [Fri, 30 Mar 2007 21:45:35 +0000 (14:45 -0700)]
[IPv6]: Fix incorrect length check in rawv6_sendmsg()

In article <20070329.142644.70222545.davem@davemloft.net> (at Thu, 29 Mar 2007 14:26:44 -0700 (PDT)), David Miller <davem@davemloft.net> says:

> From: Sridhar Samudrala <sri@us.ibm.com>
> Date: Thu, 29 Mar 2007 14:17:28 -0700
>
> > The check for length in rawv6_sendmsg() is incorrect.
> > As len is an unsigned int, (len < 0) will never be TRUE.
> > I think checking for IPV6_MAXPLEN(65535) is better.
> >
> > Is it possible to send ipv6 jumbo packets using raw
> > sockets? If so, we can remove this check.
>
> I don't see why such a limitation against jumbo would exist,
> does anyone else?
>
> Thanks for catching this Sridhar.  A good compiler should simply
> fail to compile "if (x < 0)" when 'x' is an unsigned type, don't
> you think :-)

Dave, we use "int" for returning value,
so we should fix this anyway, IMHO;
we should not allow len > INT_MAX.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET_SCHED]: cls_basic: fix memory leak in basic_destroy
Patrick McHardy [Fri, 30 Mar 2007 20:36:23 +0000 (13:36 -0700)]
[NET_SCHED]: cls_basic: fix memory leak in basic_destroy

tp->root is not freed on destruction.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Change "not found" return value for rule lookup
Steven Whitehouse [Fri, 30 Mar 2007 20:34:27 +0000 (13:34 -0700)]
[NET]: Change "not found" return value for rule lookup

This changes the "not found" error return for the lookup
function to -ESRCH so that it can be distinguished from
the case where a rule or route resulting in -ENETUNREACH
has been found during the search.

It fixes a bug where if DECnet was compiled with routing
support, but no routes were added to the routing table,
it was failing to fall back to endnode routing.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Patrick Caulfield <pcaulfie@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
Linus Torvalds [Mon, 2 Apr 2007 18:41:55 +0000 (11:41 -0700)]
Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6

* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6:
  [PATCH] x86: Don't probe for DDC on VBE1.2
  [PATCH] x86-64: Increase NMI watchdog probing timeout
  [PATCH] x86-64: Let oprofile reserve MSR on all CPUs
  [PATCH] x86-64: Disable local APIC timer use on AMD systems with C1E

17 years ago[PATCH] i386: fix file_read_actor() and pipe_read() for original i386 systems
Thomas Gleixner [Mon, 2 Apr 2007 12:25:31 +0000 (14:25 +0200)]
[PATCH] i386: fix file_read_actor() and pipe_read() for original i386 systems

The __copy_to_user_inatomic() calls in file_read_actor() and pipe_read()
are broken on original i386 machines, where WP-works-ok == false, as
__copy_to_user_inatomic() on such systems calls functions which might
sleep and/or contain cond_resched() calls inside of a kmap_atomic()
region.

The original check for WP-works-ok was in access_ok(), but got moved
during the 2.5 series to fix a race vs. swap.

Return the number of bytes to copy in the case where we are in an atomic
region, so the non atomic code pathes in file_read_actor() and
pipe_read() are taken.

This could be optimized to avoid the kmap_atomicby moving the check for
WP-works-ok into fault_in_pages_writeable(), but this is more intrusive
and can be done later.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] vt: fix potential race in VT_WAITACTIVE handler
Michal Januszewski [Mon, 2 Apr 2007 06:49:51 +0000 (23:49 -0700)]
[PATCH] vt: fix potential race in VT_WAITACTIVE handler

On a multiprocessor machine the VT_WAITACTIVE ioctl call may return 0 if
fg_console has already been updated in redraw_screen() but the console
switch itself hasn't been completed.  Fix this by checking fg_console in
vt_waitactive() with the console sem held.

Signed-off-by: Michal Januszewski <spock@gentoo.org>
Acked-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Fix microcode-related suspend problem
Rafael J. Wysocki [Mon, 2 Apr 2007 06:49:49 +0000 (23:49 -0700)]
[PATCH] Fix microcode-related suspend problem

Fix the regression resulting from the recent change of suspend code
ordering that causes systems based on Intel x86 CPUs using the microcode
driver to hang during the resume.

The problem occurs since the microcode driver uses request_firmware() in
its CPU hotplug notifier, which is called after tasks has been frozen and
hangs.  It can be fixed by telling the microcode driver to use the
microcode stored in memory during the resume instead of trying to load it
from disk.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Adrian Bunk <bunk@stusta.de>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Maxim <maximlevitsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] driver core: fix built-in drivers sysfs links
Kay Sievers [Mon, 2 Apr 2007 06:49:48 +0000 (23:49 -0700)]
[PATCH] driver core: fix built-in drivers sysfs links

built-in drivers had broken sysfs links that caused bootup hangs for
certain driver unregistry sequences.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] rtc-cmos lockdep fix, irq updates
David Brownell [Mon, 2 Apr 2007 06:49:47 +0000 (23:49 -0700)]
[PATCH] rtc-cmos lockdep fix, irq updates

Lockdep reported cmos_suspend() and cmos_resume() calling rtc_update_irq()
with IRQs enabled; not allowed.

Also fix problems seen on some hardware, whereby false alarm IRQs could be
reported (primarily to userspace); and update two comments to match changes
in ACPI.  Those make up most of this patch, by volume.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Correctly report PnP 64bit resources
Petr Vandrovec [Mon, 2 Apr 2007 06:49:46 +0000 (23:49 -0700)]
[PATCH] Correctly report PnP 64bit resources

Change PnP resource handling code to use proper type for resource start and
length.  Fixes bogus regions reported in /proc/iomem.

I've also made some pointer constant, as they are constant...

Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] revert "retries in ext4_prepare_write() violate ordering requirements"
Andrew Morton [Mon, 2 Apr 2007 06:49:44 +0000 (23:49 -0700)]
[PATCH] revert "retries in ext4_prepare_write() violate ordering requirements"

Revert b46be05004abb419e303e66e143eed9f8a6e9f3f.  Same reasoning as for ext3.

Cc: Kirill Korotaev <dev@openvz.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ken Chen <kenneth.w.chen@intel.com>
Cc: Andrey Savochkin <saw@sw.ru>
Cc: <linux-ext4@vger.kernel.org>
Cc: Dmitriy Monakhov <dmonakhov@openvz.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] revert "retries in ext3_prepare_write() violate ordering requirements"
Andrew Morton [Mon, 2 Apr 2007 06:49:43 +0000 (23:49 -0700)]
[PATCH] revert "retries in ext3_prepare_write() violate ordering requirements"

Revert e92a4d595b464c4aae64be39ca61a9ffe9c8b278.

Dmitry points out

"When we block_prepare_write() failed while ext3_prepare_write() we jump to
 "failure" label and call ext3_prepare_failure() witch search last mapped bh
 and invoke commit_write untill it.  This is wrong!!  because some bh from
 begining to the last mapped bh may be not uptodate.  As a result we commit to
 disk not uptodate page content witch contains garbage from previous usage."

and

"Unexpected file size increasing."

   Call trace the same as it was in first issue but result is different.
   For example we have file with i_size is zero.  we want write two blocks ,
   but fs has only one free block.

   ->ext3_prepare_write(...from == 0, to == 2048)
     retry:
     ->block_prepare_write() == -ENOSPC# we failed but allocated one block here.
     ->ext3_prepare_failure()
       ->commit_write( from == 0, to == 1024) # after this i_size becomes 1024 :)
     if (ret == -ENOSPC && ext3_should_retry_alloc(inode->i_sb, &retries))
        goto retry;

   Finally when all retries will be spended ext3_prepare_failure return
   -ENOSPC, but i_size was increased and later block trimm procedures can't
   help here.

We don't appear to have the horsepower to fix these issues, so let's put
things back the way they were for now.

Cc: Kirill Korotaev <dev@openvz.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ken Chen <kenneth.w.chen@intel.com>
Cc: Andrey Savochkin <saw@sw.ru>
Cc: <linux-ext4@vger.kernel.org>
Cc: Dmitriy Monakhov <dmonakhov@openvz.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] fix page leak during core dump
Brian Pomerantz [Mon, 2 Apr 2007 06:49:41 +0000 (23:49 -0700)]
[PATCH] fix page leak during core dump

When the dump cannot occur most likely because of a full file system and
the page to be written is the zero page, the call to page_cache_release()
is missed.

Signed-off-by: Brian Pomerantz <bapper@mvista.com>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: David Howells <dhowells@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] CPUSETS: add mems to basic usage documentation
Simon Horman [Mon, 2 Apr 2007 06:49:40 +0000 (23:49 -0700)]
[PATCH] CPUSETS: add mems to basic usage documentation

It seems that there must be at least one node in mems and at least one CPU
in cpus in order to be able to assign tasks to a cpuset.  This makes sense.
 And I think it would also make sense to include a mems setting in the
basic usage section of the documentation.

I also wonder if something logged to dmsg, explaining why a write failed,
would be a good enhancement.  I ended up having rummage arround in cpuset.c
in order to work out why my configuration was failing.

Signed-off-by: Simon Horman <horms@verge.net.au>
Acked-by: Paul Jackson <pj@sgi.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] drivers/mfd/sm501.c: fix an off-by-one
Adrian Bunk [Mon, 2 Apr 2007 06:49:38 +0000 (23:49 -0700)]
[PATCH] drivers/mfd/sm501.c: fix an off-by-one

Fix an off-by-one spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Vincent Sanders <vince@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: fix unreasonably long udelay
Paolo 'Blaisorblade' Giarrusso [Mon, 2 Apr 2007 06:49:37 +0000 (23:49 -0700)]
[PATCH] uml: fix unreasonably long udelay

Currently we have a confused udelay implementation.

* __const_udelay does not accept usecs but xloops in i386 and x86_64
* our implementation requires usecs as arg
* it gets a xloops count when called by asm/arch/delay.h

Bugs related to this (extremely long shutdown times) where reported by some
x86_64 users, especially using Device Mapper.

To hit this bug, a compile-time constant time parameter must be passed -
that's why UML seems to work most times.  Fix this with a simple udelay
implementation.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] proc: fix linkage with CONFIG_SYSCTL=y, CONFIG_PROC_SYSCTL=n
Andrew Morton [Mon, 2 Apr 2007 06:49:35 +0000 (23:49 -0700)]
[PATCH] proc: fix linkage with CONFIG_SYSCTL=y, CONFIG_PROC_SYSCTL=n

We're using #ifdef CONFIG_SYSCTL, but we should be using CONFIG_PROC_SYSCTL,
so we get

 fs/built-in.o: In function `proc_root_init':
 /usr/src/linux/fs/proc/root.c:83: undefined reference to `proc_sys_init'

Fix that up and remove an ifdef-in-C.

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Helge Hafting <helgehaf@aitel.hist.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoV4L/DVB (5496): Pluto2: fix incorrect TSCR register setting
Andreas Oberritter [Mon, 2 Apr 2007 13:44:35 +0000 (10:44 -0300)]
V4L/DVB (5496): Pluto2: fix incorrect TSCR register setting

The ADEF bits in the TSCR register have different meanings in read and
write mode. For this reason ADEF has to be reset on every
read-modify-write operation.
This patch introduces a special write function for this register, which
takes care of it.

Thanks to Holger Magnussen for pointing my nose at this problem.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5495): Tda10086: fix DiSEqC message length
Andreas Oberritter [Sun, 1 Apr 2007 22:29:16 +0000 (19:29 -0300)]
V4L/DVB (5495): Tda10086: fix DiSEqC message length

Setting the message length to zero means to send one byte, so you need a
subtraction instead of an addition.

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years ago[PATCH] x86: Don't probe for DDC on VBE1.2
Zwane Mwaikambo [Mon, 2 Apr 2007 10:14:12 +0000 (12:14 +0200)]
[PATCH] x86: Don't probe for DDC on VBE1.2

VBE1.2 doesn't support function 15h (DDC) resulting in a 'hang' whilst
uncompressing kernel with some video cards. Make sure we check VBE version
before fiddling around with DDC.

http://bugzilla.kernel.org/show_bug.cgi?id=1458

Opened: 2003-10-30 09:12 Last update: 2007-02-13 22:03

Much thanks to Tobias Hain for help in testing and investigating the bug.
Tested on;

i386, Chips & Technologies 65548 VESA VBE 1.2
CONFIG_VIDEO_SELECT=Y
CONFIG_FIRMWARE_EDID=Y

Untested on x86_64.

Signed-off-by: Zwane Mwaikambo <zwane@infradead.org>
Signed-off-by: Andi Kleen <ak@suse.de>
17 years ago[PATCH] x86-64: Increase NMI watchdog probing timeout
Andi Kleen [Mon, 2 Apr 2007 10:14:12 +0000 (12:14 +0200)]
[PATCH] x86-64: Increase NMI watchdog probing timeout

A 4 core Opteron needs longer than 10 ticks for this.

Signed-off-by: Andi Kleen <ak@suse.de>
17 years ago[PATCH] x86-64: Let oprofile reserve MSR on all CPUs
Andi Kleen [Mon, 2 Apr 2007 10:14:12 +0000 (12:14 +0200)]
[PATCH] x86-64: Let oprofile reserve MSR on all CPUs

The MSR reservation is per CPU and oprofile would only allocate them
on the CPU it was initialized on. Change this to handle all CPUs.

This also fixes a warning about unprotected use of smp_processor_id()
in preemptible kernels.

Signed-off-by: Andi Kleen <ak@suse.de>
17 years ago[PATCH] x86-64: Disable local APIC timer use on AMD systems with C1E
Andi Kleen [Mon, 2 Apr 2007 10:14:12 +0000 (12:14 +0200)]
[PATCH] x86-64: Disable local APIC timer use on AMD systems with C1E

AMD dual core laptops with C1E do not run the APIC timer correctly
when they go idle. Previously the code assumed this only happened
on C2 or deeper.  But not all of these systems report support C2.

Use a AMD supplied snippet to detect C1E being enabled and then disable
local apic timer use.

This supercedes an earlier workaround using DMI detection of specific systems.

Thanks to Mark Langsdorf for the detection snippet.

Signed-off-by: Andi Kleen <ak@suse.de>
17 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sun, 1 Apr 2007 21:43:57 +0000 (14:43 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4298/1: fix memory barriers for DMA coherent and SMP platforms
  [ARM] 4295/2: Fix error-handling in pxaficp_ir.c (version 2)
  [ARM] Fix __NR_kexec_load
  [ARM] Export dma_channel_active()
  [ARM] 4296/1: ixp4xx: compile fix
  [ARM] 4289/1: AT91: SAM9260 NAND flash timing

17 years ago[ARM] 4298/1: fix memory barriers for DMA coherent and SMP platforms
Lennert Buytenhek [Sat, 31 Mar 2007 11:03:20 +0000 (12:03 +0100)]
[ARM] 4298/1: fix memory barriers for DMA coherent and SMP platforms

This patch:
- Switches mb/rmb/wmb back to being full-blown DMBs on ARM SMP systems,
  since mb/rmb/wmb are required to order Normal memory accesses as well.
- Enables the use of DMB and ISB on XSC3 (which is an ARMv5TE ISA core
  but conforms to the ARMv6 memory ordering model and supports the
  various ARMv6 barriers.)
- Makes DMA coherent platforms (only ixp23xx at the moment) map
  mb/rmb/wmb to dmb(), as on DMA coherent platforms, DMA consistent
  mappings are done as Normal mappings, which are weakly ordered.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4295/2: Fix error-handling in pxaficp_ir.c (version 2)
Guennadi Liakhovetski [Fri, 30 Mar 2007 07:49:55 +0000 (08:49 +0100)]
[ARM] 4295/2: Fix error-handling in pxaficp_ir.c (version 2)

This patch addresses the following issues with the pxa2xx FIr driver:

1. increment overrun error counter and not frame error counter on ICSR1_ROR bit set in ICSR1.
2. drop frames reported with the frame error from the IC.
3. when resetting the receiver and preparing it for the next DMA in pxa_irda_fir_irq() actually clear the Rx FIFO. See description in Table 11-2 in PXA270 Developer's Manual of the RXE bit.

Correction added in version 2: clearing the IC Rx FIFO also has to be done in pxa_irda_fir_dma_tx_irq()

Signed-off-by: G. Liakhovetski <gl@dsa-ac.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] Fix __NR_kexec_load
Russell King [Sun, 1 Apr 2007 21:35:01 +0000 (22:35 +0100)]
[ARM] Fix __NR_kexec_load

It's __NR_kexec_load, not __NR_sys_kexec_load

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[PATCH] kbuild: fix dependency generation
Jan Beulich [Thu, 29 Mar 2007 09:27:14 +0000 (10:27 +0100)]
[PATCH] kbuild: fix dependency generation

Commit 2e3646e51b2d6415549b310655df63e7e0d7a080 changed the way the
split config tree is built, but failed to also adjust fixdep accordingly
- if changing a config option from or to m, files referencing the
respective CONFIG_..._MODULE (but not the corresponding CONFIG_...)
didn't get rebuilt.

The problem is that trisate symbol are represent with three different
symbols:
    SYMBOL=n => no symbol defined
    SYMBOL=y => CONFIG_SYMBOL defined to '1'
    SYMBOL=m => CONFIG_SYMBOL_MODULE defined to '1'

But conf_split_config do not distingush between the =y and =m case, so
only the =y case is honoured.

This is fixed in fixdep so when a CONFIG symbol with _MODULE is found we
skip that part and only look for the CONFIG_SYMBOL version.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodriver core: do not wait unnecessarily in driver_unregister()
Linus Torvalds [Sun, 1 Apr 2007 17:54:13 +0000 (10:54 -0700)]
driver core: do not wait unnecessarily in driver_unregister()

Ingo reported that built-in drivers suffered bootup hangs with certain
driver unregistry sequences, due to sysfs breakage.

Do the minimal fix for v2.6.21: only wait if the driver is a module.

Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[ARM] Export dma_channel_active()
Russell King [Sat, 31 Mar 2007 20:36:53 +0000 (21:36 +0100)]
[ARM] Export dma_channel_active()

dma_channel_active() is used by some modules and is part of our
DMA API, so export it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sat, 31 Mar 2007 03:40:56 +0000 (20:40 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] api: Flush the current page right than the next
  [CRYPTO] api: Use the right value when advancing scatterwalk_copychunks

17 years ago[CRYPTO] api: Flush the current page right than the next
Herbert Xu [Sat, 31 Mar 2007 02:58:20 +0000 (12:58 +1000)]
[CRYPTO] api: Flush the current page right than the next

On platforms where flush_dcache_page is needed we're currently flushing
the next page right than the one we've just processed.  This patch fixes
the off-by-one error.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years ago[PATCH] crypto api: Use the right value when advancing scatterwalk_copychunks
Herbert Xu [Sat, 31 Mar 2007 02:14:37 +0000 (12:14 +1000)]
[PATCH] crypto api: Use the right value when advancing scatterwalk_copychunks

In the scatterwalk_copychunks loop, We should be advancing by
len_this_page and not nbytes.  The latter is the total length.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: fix static linking for real
Paolo 'Blaisorblade' Giarrusso [Sat, 31 Mar 2007 01:20:27 +0000 (03:20 +0200)]
[PATCH] uml: fix static linking for real

There was a typo in commit 7632fc8f809a97f9d82ce125e8e3e579390ce2e5,
preventing it from working - 32bit binaries crashed hopelessly before
the below fix and work perfectly now.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[CRYPTO] api: Use the right value when advancing scatterwalk_copychunks
Herbert Xu [Sat, 31 Mar 2007 02:16:20 +0000 (12:16 +1000)]
[CRYPTO] api: Use the right value when advancing scatterwalk_copychunks

In the scatterwalk_copychunks loop, We should be advancing by
len_this_page and not nbytes.  The latter is the total length.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Fri, 30 Mar 2007 18:49:37 +0000 (11:49 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  Revert "ACPI: parse 2nd MADT by default"

17 years agoRevert "ACPI: parse 2nd MADT by default"
Len Brown [Fri, 30 Mar 2007 18:16:10 +0000 (14:16 -0400)]
Revert "ACPI: parse 2nd MADT by default"

This reverts commit 09fe58356d148ff66901ddf639e725ca1a48a0af.
http://bugzilla.kernel.org/show_bug.cgi?id=8283

Signed-off-by: Len Brown <len.brown@intel.com>
17 years ago[PATCH] Maxtor 6B250S0/BANC1B70 hangs with NCQ
Jens Axboe [Fri, 30 Mar 2007 07:27:58 +0000 (09:27 +0200)]
[PATCH] Maxtor 6B250S0/BANC1B70 hangs with NCQ

I've seen this several times on this drive, completely reproducible.

Once it has hung, power needs to be cut from the drive to recover it, a
simple reboot is not enough.  So I'd suggest disabling NCQ on this
drive.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[ARM] 4296/1: ixp4xx: compile fix
Vladimir Barinov [Thu, 29 Mar 2007 15:29:20 +0000 (16:29 +0100)]
[ARM] 4296/1: ixp4xx: compile fix

Fix compilation fail for ixp4xx platforms for the case when CONFIG_IXP4XX_INDIRECT_PCI is set. That is due to the check_signature() is appeared in include/linux/io.h.

Signed-off-by: Vladimir Barinov <vbarinov@ru.mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Fri, 30 Mar 2007 03:30:12 +0000 (20:30 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] SMTC: Fix recursion in instant IPI replay code.
  [MIPS] BCM1480: Fix setting of irq affinity.
  [MIPS] do_page_fault() needs to use raw_smp_processor_id().
  [MIPS] SMTC: Fix false trigger of debug code on single VPE.
  [MIPS] SMTC: irq_{enter,leave} and kstats keeping for relayed timer ints.
  [MIPS] lockdep: Deal with interrupt disable hazard in TRACE_IRQFLAGS
  [MIPS] lockdep: Handle interrupts in R3000 style c0_status register.
  [MIPS] MV64340: Add missing prototype for mv64340_irq_init().
  [MIPS] MT: MIPS_MT_SMTC_INSTANT_REPLAY currently conflicts with PREEMPT.
  [MIPS] EV64120: Include <asm/irq.h> to fix warning.
  [MIPS] Ocelot: Fix warning.
  [MIPS] Ocelot: Give PMON_v1_setup a proper prototype.

17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 30 Mar 2007 03:25:03 +0000 (20:25 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix arch/ia64/pci/pci.c:571: warning: `return' with a value
  [IA64] Speed up boot - skip unnecessary clock calibration
  [IA64] bugfix stack layout upside-down
  [IA64] Fix possible invalid memory access in ia64_setup_msi_irq()

17 years ago[MIPS] SMTC: Fix recursion in instant IPI replay code.
Ralf Baechle [Thu, 29 Mar 2007 22:42:42 +0000 (23:42 +0100)]
[MIPS] SMTC: Fix recursion in instant IPI replay code.

local_irq_restore -> raw_local_irq_restore -> irq_restore_epilog ->
smtc_ipi_replay -> smtc_ipi_dq -> spin_unlock_irqrestore ->
_spin_unlock_irqrestore -> local_irq_restore

The recursion does abort when there is no more IPI queued for a CPU, so
this isn't usually fatal which is why we got away with this for so long
until this was discovered by code inspection.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] BCM1480: Fix setting of irq affinity.
Mark Mason [Mon, 26 Mar 2007 20:28:26 +0000 (13:28 -0700)]
[MIPS] BCM1480: Fix setting of irq affinity.

Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] do_page_fault() needs to use raw_smp_processor_id().
Ralf Baechle [Thu, 29 Mar 2007 21:30:01 +0000 (22:30 +0100)]
[MIPS] do_page_fault() needs to use raw_smp_processor_id().

Original patch posted by Deepak Saxena <dsaxena@plexity.net>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Fix false trigger of debug code on single VPE.
Ralf Baechle [Tue, 27 Mar 2007 14:19:58 +0000 (15:19 +0100)]
[MIPS] SMTC: Fix false trigger of debug code on single VPE.

Make smtc_setup_irq() update the list of interrupts which need to be
watched by the debug code itself.  Also there is no need to initialize the
IPI swint when running with a single VPE, so don't initialize it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: irq_{enter,leave} and kstats keeping for relayed timer ints.
Ralf Baechle [Tue, 27 Mar 2007 14:11:54 +0000 (15:11 +0100)]
[MIPS] SMTC: irq_{enter,leave} and kstats keeping for relayed timer ints.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] lockdep: Deal with interrupt disable hazard in TRACE_IRQFLAGS
Chris Dearman [Mon, 26 Mar 2007 13:48:50 +0000 (14:48 +0100)]
[MIPS] lockdep: Deal with interrupt disable hazard in TRACE_IRQFLAGS

Between the mtc0 or di instruction that disables interrupts and the
following hazard barrier a processor may still take interrupts.  If an
interrupt is taken after interrupts are disabled but before the state
is updated it will appear to restore_all that it is incorrectly returning
with interrupts disabled.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] lockdep: Handle interrupts in R3000 style c0_status register.
Chris Dearman [Mon, 26 Mar 2007 13:47:06 +0000 (14:47 +0100)]
[MIPS] lockdep: Handle interrupts in R3000 style c0_status register.

Check the IEP bit for R3000 style processors when checking to see if
interrupts will be reenabled in restore_all.

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] MV64340: Add missing prototype for mv64340_irq_init().
Ralf Baechle [Mon, 26 Mar 2007 08:30:32 +0000 (09:30 +0100)]
[MIPS] MV64340: Add missing prototype for mv64340_irq_init().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] MT: MIPS_MT_SMTC_INSTANT_REPLAY currently conflicts with PREEMPT.
Ralf Baechle [Mon, 26 Mar 2007 14:13:57 +0000 (15:13 +0100)]
[MIPS] MT: MIPS_MT_SMTC_INSTANT_REPLAY currently conflicts with PREEMPT.

So until MIPS_MT_SMTC_INSTANT_REPLAY has been rewritten to solve this
issue, don't allow selecting it with PREEMPT.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] EV64120: Include <asm/irq.h> to fix warning.
Ralf Baechle [Mon, 26 Mar 2007 08:22:00 +0000 (09:22 +0100)]
[MIPS] EV64120: Include <asm/irq.h> to fix warning.

arch/mips/pci/pci-ev64120.c:10: warning: implicit declaration of function 'allocate_irqno'

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Ocelot: Fix warning.
Ralf Baechle [Mon, 26 Mar 2007 08:14:24 +0000 (09:14 +0100)]
[MIPS] Ocelot: Fix warning.

Remove unused variable.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Ocelot: Give PMON_v1_setup a proper prototype.
Ralf Baechle [Mon, 26 Mar 2007 07:59:52 +0000 (08:59 +0100)]
[MIPS] Ocelot: Give PMON_v1_setup a proper prototype.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[IA64] Fix arch/ia64/pci/pci.c:571: warning: `return' with a value
Tony Luck [Thu, 29 Mar 2007 22:41:37 +0000 (15:41 -0700)]
[IA64] Fix arch/ia64/pci/pci.c:571: warning: `return' with a value

Typo/thinko in bba6f6fc68e74d4572028646f61dd3505a68747e

Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Speed up boot - skip unnecessary clock calibration
Jack Steiner [Tue, 27 Mar 2007 19:30:19 +0000 (14:30 -0500)]
[IA64] Speed up boot - skip unnecessary clock calibration

Skip clock calibration if cpu being brought online is exactly the same
speed, stepping, etc., as the previous cpu. This significantly reduces
the time to boot very large systems.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] bugfix stack layout upside-down
KAMEZAWA Hiroyuki [Fri, 23 Mar 2007 03:17:46 +0000 (12:17 +0900)]
[IA64] bugfix stack layout upside-down

ia64 expects following vm layout:

== low memory
[register-stack grows up]
[memory-stack grows down]
== high memory

But the code assigns the base of the register stack at the
maximum stack size offset from the fixed address where the
stack *might* start.  Stack randomization will result in the
memory stack starting at a lower address than this, and if the
user has set a low stack limit with "ulimit -s", then you can
end up with the register stack above the memory stack (or if
you were very unlucky right on top of it!).

Fix: Calculate the base address for the register stack starting
from the actual address of the memory stack.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years ago[IA64] Fix possible invalid memory access in ia64_setup_msi_irq()
Kenji Kaneshige [Mon, 26 Mar 2007 00:38:42 +0000 (09:38 +0900)]
[IA64] Fix possible invalid memory access in ia64_setup_msi_irq()

The following 'if' statement in ia64_setup_msi_irq() always fails even
if create_irq() returns <0 value, because variable 'irq' is defined as
unsigned int. It would cause invalid memory access.

        irq = create_irq();
        if (irq < 0)
                return irq;

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Thu, 29 Mar 2007 20:22:07 +0000 (13:22 -0700)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  NetXen: Fix hardware access for ppc architecture.
  sis190: new PHY support
  atl1: save mac address on remove

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 29 Mar 2007 20:15:13 +0000 (13:15 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IFB]: Fix crash on input device removal
  [BNX2]: Fix link interrupt problem.

17 years ago[POWERPC] qe: ucc_slow.guemr is in the wrong place
Timur Tabi [Mon, 26 Mar 2007 19:25:42 +0000 (14:25 -0500)]
[POWERPC] qe: ucc_slow.guemr is in the wrong place

The definition of struct ucc_slow puts the guemr register immediately after the
utpt register, when it should be at offset 0x90.  This patch adds the missing
0x52-byte padding.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] qe: Fix QUICC Engine SDMA setup errors
Chuck Meade [Tue, 27 Mar 2007 14:46:10 +0000 (10:46 -0400)]
[POWERPC] qe: Fix QUICC Engine SDMA setup errors

Correct the alignment of the internal buffer used by the QUICC Engine
SDMA controller to 4Kbytes.  Correct the shift direction in the logic
that sets up the SDMR register for the QUICC Engine SDMA controller.

Signed-off-by: Chuck Meade <chuckmeade@mindspring.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[IFB]: Fix crash on input device removal
Patrick McHardy [Thu, 29 Mar 2007 18:46:52 +0000 (11:46 -0700)]
[IFB]: Fix crash on input device removal

The input_device pointer is not refcounted, which means the device may
disappear while packets are queued, causing a crash when ifb passes packets
with a stale skb->dev pointer to netif_rx().

Fix by storing the interface index instead and do a lookup where neccessary.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[PATCH] Add suspend/resume for HPET
Maxim Levitsky [Thu, 29 Mar 2007 13:46:48 +0000 (15:46 +0200)]
[PATCH] Add suspend/resume for HPET

This adds support of suspend/resume on i386 for HPET, which fixes a
number of timer-related failures around STR.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Acked-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Thu, 29 Mar 2007 15:23:52 +0000 (08:23 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block:
  [PATCH] splice: partial write fix

17 years ago[PATCH] mm: fix xip issue with /dev/zero
Carsten Otte [Thu, 29 Mar 2007 08:20:39 +0000 (01:20 -0700)]
[PATCH] mm: fix xip issue with /dev/zero

Fix the bug, that reading into xip mapping from /dev/zero fills the user
page table with ZERO_PAGE() entries.  Later on, xip cannot tell which pages
have been ZERO_PAGE() filled by access to a sparse mapping, and which ones
origin from /dev/zero.  It will unmap ZERO_PAGE from all mappings when
filling the sparse hole with data.  xip does now use its own zeroed page
for its sparse mappings.  Please apply.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] holepunch: fix mmap_sem i_mutex deadlock
Hugh Dickins [Thu, 29 Mar 2007 08:20:38 +0000 (01:20 -0700)]
[PATCH] holepunch: fix mmap_sem i_mutex deadlock

sys_madvise has down_write of mmap_sem, then madvise_remove calls
vmtruncate_range which takes i_mutex and i_alloc_sem: no, we can easily devise
deadlocks from that ordering.

madvise_remove drop mmap_sem while calling vmtruncate_range: luckily, since
madvise_remove doesn't split or merge vmas, it's easy to handle this case with
a NULL prev, without restructuring sys_madvise.  (Though sad to retake
mmap_sem when it's unlikely to be needed, and certainly down_read is
sufficient for MADV_REMOVE, unlike the other madvices.)

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] holepunch: fix disconnected pages after second truncate
Hugh Dickins [Thu, 29 Mar 2007 08:20:37 +0000 (01:20 -0700)]
[PATCH] holepunch: fix disconnected pages after second truncate

shmem_truncate_range has its own truncate_inode_pages_range, to free any pages
racily instantiated while it was in progress: a SHMEM_PAGEIN flag is set when
this might have happened.  But holepunching gets no chance to clear that flag
at the start of vmtruncate_range, so it's always set (unless a truncate came
just before), so holepunch almost always does this second
truncate_inode_pages_range.

shmem holepunch has unlikely swap<->file races hereabouts whatever we do
(without a fuller rework than is fit for this release): I was going to skip
the second truncate in the punch_hole case, but Miklos points out that would
make holepunch correctness more vulnerable to swapoff.  So keep the second
truncate, but follow it by an unmap_mapping_range to eliminate the
disconnected pages (freed from pagecache while still mapped in userspace) that
it might have left behind.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] holepunch: fix shmem_truncate_range punch locking
Hugh Dickins [Thu, 29 Mar 2007 08:20:36 +0000 (01:20 -0700)]
[PATCH] holepunch: fix shmem_truncate_range punch locking

Miklos Szeredi observes that during truncation of shmem page directories,
info->lock is released to improve latency (after lowering i_size and
next_index to exclude races); but this is quite wrong for holepunching, which
receives no such protection from i_size or next_index, and is left vulnerable
to races with shmem_unuse, shmem_getpage and shmem_writepage.

Hold info->lock throughout when holepunching?  No, any user could prevent
rescheduling for far too long.  Instead take info->lock just when needed: in
shmem_free_swp when removing the swap entries, and whenever removing a
directory page from the level above.  But so long as we remove before
scanning, we can safely skip taking the lock at the lower levels, except at
misaligned start and end of the hole.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] holepunch: fix shmem_truncate_range punching too far
Hugh Dickins [Thu, 29 Mar 2007 08:20:35 +0000 (01:20 -0700)]
[PATCH] holepunch: fix shmem_truncate_range punching too far

Miklos Szeredi observes BUG_ON(!entry) in shmem_writepage() triggered in rare
circumstances, because shmem_truncate_range() erroneously removes partially
truncated directory pages at the end of the range: later reclaim on pages
pointing to these removed directories triggers the BUG.  Indeed, and it can
also cause data loss beyond the hole.

Fix this as in the patch proposed by Miklos, but distinguish between "limit"
(how far we need to search: ignore truncation's next_index optimization in the
holepunch case - if there are races it's more consistent to act on the whole
range specified) and "upper_limit" (how far we can free directory pages:
generally we must be careful to keep partially punched pages, but can relax at
end of file - i_size being held stable by i_mutex).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Miklos Szeredi <mszeredi@suse.cs>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Wire up DEC serial drivers in Kconfig
Ralf Baechle [Thu, 29 Mar 2007 08:20:34 +0000 (01:20 -0700)]
[PATCH] Wire up DEC serial drivers in Kconfig

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] drivers/isdn/gigaset: mark some static data as const (v2)
Tilman Schmidt [Thu, 29 Mar 2007 08:20:34 +0000 (01:20 -0700)]
[PATCH] drivers/isdn/gigaset: mark some static data as const (v2)

Mark some static arrays as const that aren't and shouldn't be modified, and
remove incorrect static attribute from some variables.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Hansjoerg Lipp <hjlipp@web.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: hostfs variable renaming
Paolo 'Blaisorblade' Giarrusso [Thu, 29 Mar 2007 08:20:33 +0000 (01:20 -0700)]
[PATCH] uml: hostfs variable renaming

* rename name to host_root_path
* rename data to req_root.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: fix compilation problems
Jeff Dike [Thu, 29 Mar 2007 08:20:32 +0000 (01:20 -0700)]
[PATCH] uml: fix compilation problems

Fix a few miscellaneous compilation problems -
an assignment with mismatched types in ldt.c
a missing include in mconsole.h which needs a definition of uml_pt_regs
I missed removing an include of user_util.h in hostfs

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: fix LVM crash
Jason Lunz [Thu, 29 Mar 2007 08:20:31 +0000 (01:20 -0700)]
[PATCH] uml: fix LVM crash

Permit lvm to create logical volumes without crashing UML.

When device-mapper's DM_DEV_CREATE_CMD ioctl is called to create a new device,
dev_create()->dm_create()->alloc_dev()-> blk_queue_bounce_limit(md->queue,
BLK_BOUNCE_ANY) is called.

blk_queue_bounce_limit(BLK_BOUNCE_ANY) calls init_emergency_isa_pool() if
blk_max_pfn < blk_max_low_pfn.  This is the case on UML, but
init_emergency_isa_pool() hits BUG_ON(!isa_page_pool) because there doesn't
seem to be a dma zone on UML for mempool_create() to allocate from.

Most architectures seem to have max_low_pfn == max_pfn, but UML doesn't
because of the uml_reserved chunk it keeps for itself.  From what I can see,
max_pfn and max_low_pfn don't get much use after the bootmem-allocator stops
being used anyway, except that they initialize the block layer's
blk_max_low_pfn/blk_max_pfn.

This ensures init_emergency_isa_pool() doesn't crash uml in this situation by
setting max_low_pfn == max_pfn in mem_init().

Signed-off-by: Jason Lunz <lunz@falooley.org>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: irq locking fixes
Jeff Dike [Thu, 29 Mar 2007 08:20:30 +0000 (01:20 -0700)]
[PATCH] uml: irq locking fixes

As the comment immediately preceding this points out, this list is changed in
irq context, so it needs to be protected with spin_lock_irqsave in process
context when it is processed.

Sometimes, gcc should just compile the comments and forget the code.

The IRQ side of this was better, in the sense that it blocked and unblocked
interrupts, but it still should have saved and restored them.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: fix pte bit collision
Miklos Szeredi [Thu, 29 Mar 2007 08:20:29 +0000 (01:20 -0700)]
[PATCH] uml: fix pte bit collision

_PAGE_PROTNONE conflicts with the lowest bit of pgoff.  This causes all sorts
of weirdness when nonlinear mappings are used.

Took me a good half day to track this down.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: fix device unplug crash
Jeff Dike [Thu, 29 Mar 2007 08:20:28 +0000 (01:20 -0700)]
[PATCH] uml: fix device unplug crash

Fix a NULL dereference when unplugging a device.  The default value of
err_msg wants to be "" in case the driver doesn't modify it.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: fix I/O hang when multiple devices are in use
Jeff Dike [Thu, 29 Mar 2007 08:20:27 +0000 (01:20 -0700)]
[PATCH] uml: fix I/O hang when multiple devices are in use

Commit 62f96cb01e8de7a5daee472e540f726db2801499 introduced per-devices
queues and locks, which was fine as far as it went, but left in place a
global which controlled access to submitting requests to the host.  This
should have been made per-device as well, since it causes I/O hangs when
multiple block devices are in use.

This patch fixes that by replacing the global with an activity flag in the
device structure in order to tell whether the queue is currently being run.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] bluetooth hid quirks: mightymouse quirk
Jiri Kosina [Thu, 29 Mar 2007 08:20:25 +0000 (01:20 -0700)]
[PATCH] bluetooth hid quirks: mightymouse quirk

I have a bugreport that scrollwheel of bluetooth version of apple
mightymouse doesn't work.  The USB version of mightymouse works, as there
is a quirk for handling scrollwheel in hid/usbhid for it.

Now that bluetooth git tree is hooked to generic hid layer, it could easily
use the quirks which are already present in generic hid parser, hid-input,
etc.

Below is a simple patch against bluetooth git tree, which adds quirk
handling to current bluetooth hidp code, and sets quirk flags for device
0x05ac/0x030c, which is the bluetooth version of the apple mightymouse.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] adaptec MAINTAINERS updates
Salyzyn, Mark [Thu, 29 Mar 2007 08:20:24 +0000 (01:20 -0700)]
[PATCH] adaptec MAINTAINERS updates

The IPS and DPT_I2O drivers are missing, so here is my 'hand coded'
addition to deal with overlap to the patch below (apply both). I
selected Maintained rather than supported for the ips and dpt_i2o driver
due to their legacy nature.

Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] pid: Properly detect orphaned process groups in exit_notify
Eric W. Biederman [Thu, 29 Mar 2007 05:38:16 +0000 (23:38 -0600)]
[PATCH] pid: Properly detect orphaned process groups in exit_notify

In commit 0475ac0845f9295bc5f69af45f58dff2c104c8d1 when converting the
orphaned process group handling to use struct pid I made a small
mistake.  I accidentally replaced an == with a !=.

Besides just being a dumb thing to do apparently this has a bad side
effect.  The improper orphaned process group detection causes kwin to
die after a suspend/resume cycle.

I'm amazed this patch has been around as long as it has without anyone
else noticing something funny going on.

And the following people deserve credit for spotting and helping
to reproduce this.

Thanks to: Sid Boyce <g3vbv@blueyonder.co.uk>
Thanks to: "Michael Wu"

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] x86_64 irq: Fix comments after changing IRQ0_VECTOR from 0x20 to 0x30
Yinghai Lu [Thu, 29 Mar 2007 05:10:29 +0000 (23:10 -0600)]
[PATCH] x86_64 irq: Fix comments after changing IRQ0_VECTOR from 0x20 to 0x30

Signed-off-by: Yinghai Lu <yinghai.lu@amd.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] splice: partial write fix
Dmitriy Monakhov [Thu, 29 Mar 2007 12:24:09 +0000 (14:24 +0200)]
[PATCH] splice: partial write fix

Currently if partial write has happened while ->commit_write() then page
wasn't marked as accessed and rebalanced.

Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years agoNetXen: Fix hardware access for ppc architecture.
Linsys Contractor Adhiraj Joshi [Fri, 23 Mar 2007 15:21:24 +0000 (07:21 -0800)]
NetXen: Fix hardware access for ppc architecture.

NetXen: Fix for hardware access on big endian machine.

Signed-off-by: Adhiraj Joshi <adhiraj@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosis190: new PHY support
Francois Romieu [Wed, 28 Mar 2007 22:18:50 +0000 (00:18 +0200)]
sis190: new PHY support

Reported to work on the WinFast 761GXK8MB-RS motherboard.

Plain 10/100 Mbps.

Signed-off-by: Paul Gibbons <paul@pkami.e7even.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoatl1: save mac address on remove
Chris Snook [Thu, 29 Mar 2007 00:51:51 +0000 (20:51 -0400)]
atl1: save mac address on remove

Some atl1 boards get their MAC address written directly to the register
by the BIOS during POST, rather than storing it in EEPROM that's
accessible to the driver.  If the MAC register on one of these boards
is changed and then the module is unloaded, the permanent MAC address
will be forgotten until the box is rebooted.  We should save the
permanent address during removal if we've been messing with it.

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[ARM] 4289/1: AT91: SAM9260 NAND flash timing
Andrew Victor [Mon, 26 Mar 2007 10:02:48 +0000 (11:02 +0100)]
[ARM] 4289/1: AT91: SAM9260 NAND flash timing

Fix the NAND flash timings on the AT91SAM9260.

The current timings lead to the detection of a number of bad blocks.
These timings are now set the same as on the AT91SAM9263.

Patch from Nicolas Ferre.

Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[BNX2]: Fix link interrupt problem.
Michael Chan [Wed, 28 Mar 2007 21:17:36 +0000 (14:17 -0700)]
[BNX2]: Fix link interrupt problem.

bnx2_has_work()'s logic is flawed and can cause the driver to miss
a link event.  The fix is to compare the status block's attn_bits
and attn_bits_ack to determine if there is a link event.

Update version to 1.5.6.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[POWERPC] Fix dcr_unmap()
Jean-Christophe Dubois [Wed, 28 Mar 2007 10:07:41 +0000 (11:07 +0100)]
[POWERPC] Fix dcr_unmap()

Fix a bug in dcr_unmap().

At unmap time the DCR offset need to be added instead of substracted.

Signed-off-by: Jean-Christophe Dubois <jdubois@mc.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Wed, 28 Mar 2007 21:02:03 +0000 (14:02 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2_dlm: Check for migrateable lockres in dlm_empty_lockres()
  ocfs2_dlm: Fix lockres ref counting bug

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Wed, 28 Mar 2007 21:01:21 +0000 (14:01 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [VIDEO]: Fix section mismatch in cg3.c
  [SPARC]: sparc64 gcc-4.2.0 20070317 -Werror failure
  [VIDEO] ffb: Fix two DAC handling bugs.
  [SPARC32]: Fix SMP build regression
  [DRM]: Delete sparc64 FFB driver code that never gets built.