platform/kernel/linux-3.10.git
17 years agoPNP SMCf010 quirk: work around Toshiba Portege 4000 ACPI issues
Bjorn Helgaas [Fri, 6 Jul 2007 09:39:54 +0000 (02:39 -0700)]
PNP SMCf010 quirk: work around Toshiba Portege 4000 ACPI issues

When we enable the SMCf010 IR device, the Toshiba Portege 4000 BIOS claims
the device is working, but it really isn't configured correctly.  The BIOS
*will* configure it, but only if we call _SRS after (1) reversing the order
of the SIR and FIR I/O port regions and (2) changing the IRQ from
active-high to active-low.

This patch addresses the 2.6.22 regression:
    "no irda0 interface (2.6.21 was OK), smsc does not find chip"

I tested this on a Portege 4000.  The smsc-ircc2 driver correctly detects
the device, and "irattach irda0 -s && irdadump" shows transmitted and
received packets.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.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 agofix logic error in ipc compat semctl()
Alexander Graf [Fri, 6 Jul 2007 09:39:53 +0000 (02:39 -0700)]
fix logic error in ipc compat semctl()

When calling a semctl(IPC_STAT) without IPC_64 the check if the memory is
unevaluated.  This patch fixes this.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86_64: fix headers_install
David Woodhouse [Fri, 6 Jul 2007 09:39:52 +0000 (02:39 -0700)]
x86_64: fix headers_install

A bug in headers_install for ARCH=x86_64 yields an asm/ directory full of
files all of which are using the same #ifdef guard, "__ASM_STUB_" with no
postfix.  So the second and later asm files #included in the same C file
(often through standard headers like ioctl.h) yields no symbols.

Strangeness with the Ubuntu 'tell me if I support something that's not
explcitly mentioned in POSIX, and I'll strip it out' shell, I believe.

We don't need the 'export' but we do need a semicolon at the end of the
FNAME line:

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMTRR: Fix race causing set_mtrr to go into infinite loop
Loic Prylli [Fri, 6 Jul 2007 09:39:52 +0000 (02:39 -0700)]
MTRR: Fix race causing set_mtrr to go into infinite loop

Processors synchronization in set_mtrr requires the .gate field to be set
after .count field is properly initialized.  Without an explicit barrier,
the compiler was reordering those memory stores.  That was sometimes
causing a processor (in ipi_handler) to see the .gate change and decrement
.count before the latter is set by set_mtrr() (which then hangs in a
infinite loop with irqs disabled).

Signed-off-by: Loic Prylli <loic@myri.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoi386: fix regression, endless loop in ptrace singlestep over an int80
Jason Wessel [Fri, 6 Jul 2007 09:39:50 +0000 (02:39 -0700)]
i386: fix regression, endless loop in ptrace singlestep over an int80

The commit 635cf99a80f4ebee59d70eb64bb85ce829e4591f introduced a
regression.  Executing a ptrace single step after certain int80
accesses will infinitely loop and never advance the PC.

The TIF_SINGLESTEP check should be done on the return from the syscall
and not before it.

I loops on each single step on the pop right after the int80 which writes out
to the console.  At that point you can issue as many single steps as you want
and it will not advance any further.

The test case is below:

/* Test whether singlestep through an int80 syscall works.
 */
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <asm/user.h>
#include <string.h>

static int child, status;
static struct user_regs_struct regs;

static void do_child()
{
char str[80] = "child: int80 test\n";

ptrace(PTRACE_TRACEME, 0, 0, 0);
kill(getpid(), SIGUSR1);
write(fileno(stdout),str,strlen(str));
asm ("int $0x80" : : "a" (20)); /* getpid */
}

static void do_parent()
{
unsigned long eip, expected = 0;
again:
waitpid(child, &status, 0);
if (WIFEXITED(status) || WIFSIGNALED(status))
return;

if (WIFSTOPPED(status)) {
ptrace(PTRACE_GETREGS, child, 0, &regs);
eip = regs.eip;
if (expected)
fprintf(stderr, "child stop @ %08lx, expected %08lx %s\n",
eip, expected,
eip == expected ? "" : " <== ERROR");

if (*(unsigned short *)eip == 0x80cd) {
fprintf(stderr, "int 0x80 at %08x\n", (unsigned int)eip);
expected = eip + 2;
} else
expected = 0;

ptrace(PTRACE_SINGLESTEP, child, NULL, NULL);
}
goto again;
}

int main(int argc, char * const argv[])
{
child = fork();
if (child)
do_parent();
else
do_child();
return 0;
}

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: <stable@kernel.org>
Cc: Chuck Ebbert <76306.1226@compuserve.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix elf_core_dump() when writing arch specific notes (spu coredumps)
Michael Ellerman [Fri, 6 Jul 2007 09:39:49 +0000 (02:39 -0700)]
Fix elf_core_dump() when writing arch specific notes (spu coredumps)

elf_core_dump() supports dumping arch specific ELF notes, via the #define
ELF_CORE_WRITE_EXTRA_NOTES.  Currently the only user of this is the powerpc
spu coredump code.

There is a bug in the handling of foffset WRT the arch notes, which causes
us to erroneously increment foffset by the size of the arch notes, leaving
a block of zeroes in the file, and causing all subsequent data in the file
to be at <supposed position> + <arch note size>.  eg:

  LOAD  0x050000 0x00100000 0x00000000 0x20000 0x20000 R E 0x10000

Tells us we should have a chunk of data at 0x50000.  The truth is the data
is at 0x90dbc = 0x50000 + 0x40dbc (the size of the arch notes).

This bug prevents gdb from reading the core file correctly.

The simplest fix is to simply remember the size of the arch notes, and add
it to foffset after we've written the arch notes.  The only drawback is
that if the arch code doesn't write as many bytes as it said it would, we
end up with a broken core dump again.  For now I think that's a reasonable
requirement.

Tested on a Cell blade, gdb no longer complains about the core file being
bogus.

While I'm here I should point out that the spu coredump code does not work
if we're dumping to a pipe - we'll have to wait for 23 to fix that.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 5 Jul 2007 23:10:16 +0000 (16:10 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] always allow dump_stack() to produce a backtrace
  [ARM] Fix non-page aligned boot time mappings
  [ARM] 4458/1: pxa: Fix CKEN usage and hence fix pxa suspend/resume
  [ARM] 4454/1: Use word accesses in Versatile PCI config reads

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Thu, 5 Jul 2007 22:55:37 +0000 (15:55 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: document some of keycodes
  Input: add a new EV_SW SW_RADIO event, for radio switches on laptops
  Input: serio - take drv_mutex in serio_cleanup()
  Input: atkbd - use printk_ratelimit for spurious ACK messages
  Input: atkbd - throttle LED switching
  Input: i8042 - add HP Pavilion ZT1000 to the MUX blacklist

17 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Thu, 5 Jul 2007 22:55:00 +0000 (15:55 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Update defconfigs
  [POWERPC] Uninline and export virq_to_hw() for the pasemi_mac driver
  [POWERPC] Fix PMI breakage in cbe_cbufreq driver
  [POWERPC] Disable old EMAC driver in arch/powerpc

17 years agoFix slab redzone alignment
David Woodhouse [Thu, 5 Jul 2007 01:26:44 +0000 (21:26 -0400)]
Fix slab redzone alignment

Commit b46b8f19c9cd435ecac4d9d12b39d78c137ecd66 fixed a couple of bugs
by switching the redzone to 64 bits. Unfortunately, it neglected to
ensure that the _second_ redzone, after the slab object, is aligned
correctly. This caused illegal instruction faults on sparc32, which for
some reason not entirely clear to me are not trapped and fixed up.

Two things need to be done to fix this:
  - increase the object size, rounding up to alignof(long long) so
    that the second redzone can be aligned correctly.
  - If SLAB_STORE_USER is set but alignof(long long)==8, allow a
    full 64 bits of space for the user word at the end of the buffer,
    even though we may not _use_ the whole 64 bits.

This patch should be a no-op on any 64-bit architecture or any 32-bit
architecture where alignof(long long) == 4. Of the others, it's tested
on ppc32 by myself and a very similar patch was tested on sparc32 by
Mark Fortescue, who reported the new problem.

Also, fix the conditions for FORCED_DEBUG, which hadn't been adjusted to
the new sizes. Again noticed by Mark.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[ARM] always allow dump_stack() to produce a backtrace
Russell King [Thu, 5 Jul 2007 18:59:51 +0000 (19:59 +0100)]
[ARM] always allow dump_stack() to produce a backtrace

Don't make this dependent on CONFIG_DEBUG_KERNEL - if we hit a WARN_ON
we need the stack trace to work out how we got to that point.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoRemove the blink driver
Linus Torvalds [Wed, 4 Jul 2007 22:24:39 +0000 (15:24 -0700)]
Remove the blink driver

Yeah, we could have just disabled it, but there's work on a new one that
isn't as fundamentally broken, so there really doesn't seem to be any
point in keeping it around.

The recent timer cleanup broke the only valid use, and when I say
"valid", I obviously mean "totally broken".  So it's not like it works,
or really even can work in the current format that uses the unsafe
"panic" LED blinking routines..

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[ARM] Fix non-page aligned boot time mappings
Russell King [Wed, 4 Jul 2007 20:16:33 +0000 (21:16 +0100)]
[ARM] Fix non-page aligned boot time mappings

AT91SAM9260 stopped booting with the recent changes to MM
initialisation - it was asking for a non-aligned virtual address
which caused loops to be non-terminal.  Fix this by rounding
virtual addresses down, but remember to include the offset in
the length, and round the length up to the following page.

This means that asking for a mapping of 4K starting at 2K into
a page maps two pages as one would expect.

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 [Wed, 4 Jul 2007 16:26:44 +0000 (09:26 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] VSMP: Fix initialization ordering bug.
  [MIPS] Add whitelists for checksyscalls.sh
  [MIPS] die(): Properly declare as non-returning
  [MIPS] Fix include wrapper symbol definitions in IP32 code.

17 years ago[MIPS] VSMP: Fix initialization ordering bug.
Ralf Baechle [Tue, 3 Jul 2007 16:25:58 +0000 (18:25 +0200)]
[MIPS] VSMP: Fix initialization ordering bug.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Add whitelists for checksyscalls.sh
Atsushi Nemoto [Tue, 29 May 2007 14:30:04 +0000 (23:30 +0900)]
[MIPS] Add whitelists for checksyscalls.sh

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] die(): Properly declare as non-returning
Maciej W. Rozycki [Tue, 29 May 2007 14:03:56 +0000 (15:03 +0100)]
[MIPS] die(): Properly declare as non-returning

 This marks the declaration of die() correctly, removing "control reaches
end of non-void function" warnings from non-void functions that die() at
the end.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Fix include wrapper symbol definitions in IP32 code.
Kumba [Fri, 25 May 2007 06:26:47 +0000 (02:26 -0400)]
[MIPS] Fix include wrapper symbol definitions in IP32 code.

Some IP35 defines snuck into some IP32-specific code during the DMA re-write.

Signed-off-by: Joshua Kinard <kumba@gentoo.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[JFFS2] Fix readinode failure when read_dnode() detects CRC failure.
David Woodhouse [Tue, 3 Jul 2007 20:51:19 +0000 (16:51 -0400)]
[JFFS2] Fix readinode failure when read_dnode() detects CRC failure.

We should have stopped returning 1 from read_dnode() to indicate
failure. We can just mark the damn thing obsolete immediately. But I
missed a case where we don't.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
17 years agoRemove some unused variables
Linus Torvalds [Wed, 4 Jul 2007 01:27:53 +0000 (18:27 -0700)]
Remove some unused variables

When Andi reverted the HPET resource reservation (in commit
0f8dc2f06560e2ca126d1670a24126ba08357d38), he didn't remove the now
unused variables, which just causes gcc to be noisy.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodio: remove bogus refcounting BUG_ON
Zach Brown [Tue, 3 Jul 2007 22:28:55 +0000 (15:28 -0700)]
dio: remove bogus refcounting BUG_ON

Badari Pulavarty reported a case of this BUG_ON is triggering during
testing.  It's completely bogus and should be removed.

It's trying to notice if we left references to the dio hanging around in
the sync case.  They should have been dropped as IO completed while this
path was in dio_await_completion().  This condition will also be
checked, via some twisty logic, by the BUG_ON(ret != -EIOCBQUEUED) a few
lines lower.  So to start this BUG_ON() is redundant.

More fatally, it's dereferencing dio-> after having dropped its
reference.  It's only safe to dereference the dio after releasing the
lock if the final reference was just dropped.  Another CPU might free
the dio in bio completion and reuse the memory after this path drops the
dio lock but before the BUG_ON() is evaluated.

This patch passed aio+dio regression unit tests and aio-stress on ext3.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRevert perfctr reservation to 2.6.21 state
Andi Kleen [Tue, 3 Jul 2007 23:38:13 +0000 (01:38 +0200)]
Revert perfctr reservation to 2.6.21 state

With this change it works again when the nmi watchdog is disabled.

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Björn Steinbrink <B.Steinbrink@gmx.de>
Cc: Stephane Eranian <eranian@hpl.hp.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRevert HPET resource reservation
Andi Kleen [Fri, 29 Jun 2007 14:16:36 +0000 (16:16 +0200)]
Revert HPET resource reservation

Matthias Lenk reports that the PCI subsystem would move the HPET on
SB400/SB600-based systems, where the HPET is in BAR1 of the SMbus
controller.

The reason? The ACPI layer registered the PCI MMIO range as being busy
too early, before PCI enumeration had happened, causing the PCI layer to
decide that it should relocate the resources somewhere else.

Firmware resources should be marked busy _after_ the PCI enumeration and
probing has happened, not before.

Remove the too-early reservation, we'll fix it up to do it properly
later.  In the meantime, this solves the regression.

Tested-by: Matthias Lenk <matthias.lenk@amd.com>
Cc: Aaron Durbin <adurbin@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Tue, 3 Jul 2007 20:58:49 +0000 (13:58 -0700)]
Merge /pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  ide: ide_scan_pcibus(): check __pci_register_driver return value
  ide: pdc202xx_new PLL input clock fix
  it821x: fix incorrect SWDMA mask
  amd74xx: resume fix
  hpt366: use correct enablebits for HPT36x
  hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66
  ide: Fix a theoretical Ooops case
  ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy

17 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Tue, 3 Jul 2007 20:58:03 +0000 (13:58 -0700)]
Merge branch 'master' of ssh:///linux/kernel/git/mchehab/v4l-dvb

* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (5822): Fix the return value in ttpci_budget_init()
  V4L/DVB (5818): CinergyT2: fix flush_workqueue() vs work->func() deadlock
  V4L/DVB (5816): Cx88-blackbird: fix vidioc_g_tuner never ending list of tuners
  V4L/DVB (5808): Bttv: fix v4l1 breaking the driver

17 years agoSLUB: Make lockdep happy by not calling add_partial with interrupts enabled during...
Christoph Lameter [Tue, 3 Jul 2007 16:31:04 +0000 (09:31 -0700)]
SLUB: Make lockdep happy by not calling add_partial with interrupts enabled during bootstrap

If we move the local_irq_enable() to the end of the function then
add_partial() in early_kmem_cache_node_alloc() will be called
with interrupts disabled like during regular operations.

This makes lockdep happy.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Tested-by: Andre Noll <maan@systemlinux.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoNTP: remove clock_was_set() call to prevent deadlock
Thomas Gleixner [Tue, 3 Jul 2007 18:05:20 +0000 (20:05 +0200)]
NTP: remove clock_was_set() call to prevent deadlock

The clock_was_set() call in seconds_overflow() which happens only when
leap seconds are inserted / deleted is wrong in two aspects:

1. it results in a call to on_each_cpu() with interrupts disabled
2. it is potential deadlock source vs. call_lock in smp_call_function()

The only possible side effect of the removal might be, that an absolute
CLOCK_REALTIME timer fires 1 second too late, in the rare case of leap
second deletion and an absolute CLOCK_REALTIME timer which expires in
the affected time frame. It will never fire too early.

This was probably observed by the reporter of a June 30th -> July 1st
hang: http://lkml.org/lkml/2007/7/3/103

A similar problem was observed by Dave Jones, who provided a screen shot
with a lockdep back trace, which allowed to analyse the problem.

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 agoide: ide_scan_pcibus(): check __pci_register_driver return value
Andrew Morton [Tue, 3 Jul 2007 20:28:36 +0000 (22:28 +0200)]
ide: ide_scan_pcibus(): check __pci_register_driver return value

drivers/ide/setup-pci.c: In function 'ide_scan_pcibus':
drivers/ide/setup-pci.c:879: warning: ignoring return value of '__pci_register_driver', declared with attribute warn_unused_result

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: pdc202xx_new PLL input clock fix
Albert Lee [Tue, 3 Jul 2007 20:28:36 +0000 (22:28 +0200)]
ide: pdc202xx_new PLL input clock fix

Recently the PLL input clock of Promise 2027x is sometimes detected
higher than expected (e.g. 20.027 MHz compared to 16.714 MHz).
It seems sometimes the mdelay() function is not as precise as it
used to be. Per Alan's advice, HT or power management might affect
the precision of mdelay().

This patch calls gettimeofday() to measure the time elapsed and
calculate the PLL input clock accordingly.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Bahadir Balban <bahadir.balban@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoit821x: fix incorrect SWDMA mask
Bartlomiej Zolnierkiewicz [Tue, 3 Jul 2007 20:28:35 +0000 (22:28 +0200)]
it821x: fix incorrect SWDMA mask

SWDMA modes are unsupported by it821x.  Attempts to tune SWDMA modes always
fail (due to sanity check in ->speedproc) and result in PIO being tuned.

* Fix incorrect SWDMA mask so core code won't try these modes and will just
  tune PIO if no other DMA modes are available.

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
17 years agoamd74xx: resume fix
Bartlomiej Zolnierkiewicz [Tue, 3 Jul 2007 20:28:35 +0000 (22:28 +0200)]
amd74xx: resume fix

* Driver can't skip programming transfer mode on the device in amd_set_drive()
  (similar fix has been applied to via82cxxx driver ages ago).

* While at it remove redundant warning (ide_config_drive_speed() already
  produces more valuable one).

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: use correct enablebits for HPT36x
Sergei Shtylyov [Tue, 3 Jul 2007 20:28:35 +0000 (22:28 +0200)]
hpt366: use correct enablebits for HPT36x

The HPT36x chips finally turned out to have the channel enable bits -- however,
badly implemented.  Make use of them despite it's probably only going to burden
the driver's code -- assuming both channels are always enabled by the HighPoint
BIOS anyway...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Cc: michal.kepien@poczta.onet.pl
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agohpt366: blacklist MAXTOR STM3320620A for UltraDMA/66
Sergei Shtylyov [Tue, 3 Jul 2007 20:28:35 +0000 (22:28 +0200)]
hpt366: blacklist MAXTOR STM3320620A for UltraDMA/66

Add the MAXTOR STM3320620A drive into the UltraDMA/66 mode blacklist
for the HPT36x chips.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: Fix a theoretical Ooops case
Alan Cox [Tue, 3 Jul 2007 20:28:35 +0000 (22:28 +0200)]
ide: Fix a theoretical Ooops case

Found by a static analyser. It is in theory possible we dereference
dev->id when it has become invalid. Re-order to avoid this.

Not needed for new-ide as we no longer support the crazy exabyte nest stuff

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: never called printk statement in ide-taskfile.c::wait_drive_not_busy
Masatake YAMATO [Tue, 3 Jul 2007 20:28:34 +0000 (22:28 +0200)]
ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy

Look at wait_drive_not_busy in drivers/ide/ide-taskfile.c:

    static u8 wait_drive_not_busy(ide_drive_t *drive)
    {
            ide_hwif_t *hwif = HWIF(drive);
            int retries = 100;
            u8 stat;

            /*
             * Last sector was transfered, wait until drive is ready.
             * This can take up to 10 usec, but we will wait max 1 ms
             * (drive_cmd_intr() waits that long).
             */
            while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
                    udelay(10);

            if (!retries)
                    printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);

            return stat;
    }

`printk' is never called because `retries' never holds zero at the
outside of `while' loop: when `retries' holds zero at the while's loop
condition, `retries' will hold -1 at the if condition.

Signed-off-by: Masatake YAMATO <jet@gyve.org>
Cc: Chuck Ebbert <cebbert@redhat.com>
Cc: joe@perches.com
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoV4L/DVB (5822): Fix the return value in ttpci_budget_init()
Hartmut Birr [Mon, 2 Jul 2007 16:39:41 +0000 (13:39 -0300)]
V4L/DVB (5822): Fix the return value in ttpci_budget_init()

if the call to budget_register() fails in ttpci_budget_int(),
ttpci_budget_init() returns success. The attached patch will
fix this problem.

Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5818): CinergyT2: fix flush_workqueue() vs work->func() deadlock
Oleg Nesterov [Mon, 2 Jul 2007 15:26:20 +0000 (12:26 -0300)]
V4L/DVB (5818): CinergyT2: fix flush_workqueue() vs work->func() deadlock

Spotted and tested by Thomas Sattler <tsattler@gmx.de>.

cinergyT2.c does cancel_delayed_work() + flush_scheduled_work() while
holding cinergyt2->sem. This leads to deadlock because work->func()
needs the same mutex to complete. Another bug is that this code in fact
can't reliably stop the re-arming delayed_work.

Convert this code to use cancel_rearming_delayed_work() and move it
out of ->sem. Another mutex, ->wq_sem, was added to protect against the
concurrent open/resume.

This patch is a horrible hack to fix the lockup which happens in practice.
As Dmitry Torokhov pointed out this driver has other problems and needs
further changes.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5816): Cx88-blackbird: fix vidioc_g_tuner never ending list of tuners
Jelle Foks [Mon, 21 May 2007 17:56:17 +0000 (14:56 -0300)]
V4L/DVB (5816): Cx88-blackbird: fix vidioc_g_tuner never ending list of tuners

v4l-info and other programs would loop indefinitely while querying the
tuners for cx88-blackbird cards.

The cause was that vidioc_g_tuner didn't return an error value for
qctrl->id != 0, making the application think there is a never ending
list of tuners...

This patch adds the same index check as done in vidioc_g_tuner() in
cx88-video.

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agoV4L/DVB (5808): Bttv: fix v4l1 breaking the driver
Trent Piepho [Tue, 3 Jul 2007 18:08:10 +0000 (15:08 -0300)]
V4L/DVB (5808): Bttv: fix v4l1 breaking the driver

If one uses a V4L *one* application, such as vlc or mplayer's v4l driver, as
the first user after the driver is loaded, the driver wedges itself and will
never capture properly.  Even if one uses a V4L2 application later, it still
won't work.

If one uses a V4L *two* application first, such as tvtime or mplayer's v4l2
driver, then the driver will be ok.  One can then run a V4L1 application, and
it will work.

It turns out the problem is with norm changing and the crop support that was
added in 2.6.21.  The driver defaults to PAL, and keeps the last norm it was
set too across opens.  If one changes the norm via V4L1, the cropping
parameters are not reset like they should be, and they'll remain broken across
device opens.

This patch removes the direct setting of btv->tvnorm in the V4L1 ioctl
VIDIOCSCHAN handler.  The norm is set via the existing call to set_input(),
which calls set_tvnorm(), which will reset the cropping values now that it is
able to detect the norm change.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
17 years agopata_pcmcia: Switch to ata_sff_port_start
Alan Cox [Tue, 3 Jul 2007 14:14:05 +0000 (15:14 +0100)]
pata_pcmcia: Switch to ata_sff_port_start

PCMCIA doesn't use DMA and as this driver is used on many platforms we
don't want it to fail on those that define the DMA alloc API as a NULL
return

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_pdc202xx_old: Correct cable detect logic
Alan Cox [Tue, 3 Jul 2007 14:15:13 +0000 (15:15 +0100)]
pata_pdc202xx_old: Correct cable detect logic

We got it backwards and now the other detects are fixed it shows up

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoata_generic: Check the right register for the DMA enabled flags
Alan Cox [Tue, 3 Jul 2007 14:11:30 +0000 (15:11 +0100)]
ata_generic: Check the right register for the DMA enabled flags

Mirrors change in IT821X

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_ali: fix UDMA settings
Chuck Ebbert [Mon, 25 Jun 2007 23:13:32 +0000 (19:13 -0400)]
pata_ali: fix UDMA settings

This patch was found to fix some of the problems with the
pata_ali driver.

https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=156482

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_mv: PCI-ID for Adaptec 1430SA SATA Controller
Florian Attenberger [Mon, 2 Jul 2007 15:09:29 +0000 (17:09 +0200)]
sata_mv: PCI-ID for Adaptec 1430SA SATA Controller

Signed-off-by: Florian Attenberger <valdyn@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: fix assigned IRQ reporting
Tejun Heo [Mon, 2 Jul 2007 16:38:47 +0000 (01:38 +0900)]
libata: fix assigned IRQ reporting

host->irq and host->irq2 should be set before ata_host_register() for
IRQ reporting to work.  Move up host->irq assignment in
ata_host_activate() and add it to ata_pci_init_one() native path and
pata_cs5520.

The port info printing in ata_host_register() doesn't fit all the
different controllers.  It should probably be moved out to LLDs with
some helpers in the future.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoACPI: fix acpi_osi=!Linux
Len Brown [Tue, 3 Jul 2007 03:57:45 +0000 (23:57 -0400)]
ACPI: fix acpi_osi=!Linux

Need to check for special case "acpi_osi=!Linux" before handling the
general case "acpi_osi=!*", or it will have no effect.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
Linus Torvalds [Tue, 3 Jul 2007 04:05:35 +0000 (21:05 -0700)]
Merge branch 'for-linus' of /linux/kernel/git/roland/infiniband

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IPoIB/cm: Partial error clean up unmaps wrong address
  mlx4_core: Add new Mellanox device IDs

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfi...
Linus Torvalds [Tue, 3 Jul 2007 04:05:14 +0000 (21:05 -0700)]
Merge branch 'master' of /linux/kernel/git/cooloney/blackfin-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin arch: remove zero-sized include/asm-blackfin/macros.h
  Blackfin arch: update board defconfig files
  Blackfin arch: Fix up remaining printks with proper log levels
  Blackfin arch: Add proper -mcpu option according to the cpu and silicon revision configuration

17 years agoMerge branch 'upstream-linus2' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 3 Jul 2007 04:04:36 +0000 (21:04 -0700)]
Merge branch 'upstream-linus2' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus2' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [libata] sata_nv: undo merge error

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 3 Jul 2007 04:01:38 +0000 (21:01 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  3c589_cs: fix local_bh_enable warning
  RESEND [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon module unload
  drivers/net/ns83820.c: fix a check-after-use
  net/usb/cdc_ether minor sparse cleanup
  RESEND [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registers
  RESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctly
  dm9601: Return 0 from bind() on success
  Update MAINTAINERS for USB network devices
  usbnet: Zero padding byte if there is tail room in skb
  dm9601: HW header size shouldn't be included in packet length
  starfire list alpha as 64 bit arch
  myri10ge: SET_NETDEV_DEV()
  gianfar: Fix typo bug introduced by move to udp_hdr()
  [PATCH] libertas: remove private ioctls
  [PATCH] libertas: fix WPA associations by handling ENABLE_RSN correctly
  [PATCH] libertas: kill wlan_scan_process_results
  [PATCH] libertas: style fixes

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 3 Jul 2007 04:01:13 +0000 (21:01 -0700)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: PATA-mode fixes for sis_sata
  libata: add HTS541616J9SA00 to NCQ blacklist
  sata_nv: allow changing queue depth
  sata_inic162x: disable LBA48 devices
  libata: remove reading alt_status from ata_hsm_qc_complete()
  libata: pata_pdc2027x PLL input clock fix
  scsi disk help file is not complete

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Tue, 3 Jul 2007 03:59:54 +0000 (20:59 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: add Kconfig help on building both stacks
  firewire: fix async reception on big endian machines

17 years agoIPoIB/cm: Partial error clean up unmaps wrong address
Ralph Campbell [Fri, 29 Jun 2007 18:37:56 +0000 (11:37 -0700)]
IPoIB/cm: Partial error clean up unmaps wrong address

If a page can't be allocated for the frag list of a skb, the code to
unmap the partially allocated list is off by one.  For exaple, if
'frags' equals one, i == 0, and the alloc_page() fails, then the old
loop would have unmapped mapping[1] which is uninitialized.  The same
would happen if the call to ib_dma_map_page() failed.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Acked-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agomlx4_core: Add new Mellanox device IDs
Jack Morgenstein [Mon, 2 Jul 2007 14:36:18 +0000 (17:36 +0300)]
mlx4_core: Add new Mellanox device IDs

Add new IDs for PCIe gen2 devices.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
17 years agoBlackfin arch: remove zero-sized include/asm-blackfin/macros.h
Marco Roeland [Tue, 3 Jul 2007 00:25:50 +0000 (08:25 +0800)]
Blackfin arch: remove zero-sized include/asm-blackfin/macros.h

 This file accidentally got truncated instead of deleted in commit df30b11.

Signed-off-by: Marco Roeland <marco.roeland@xs4all.nl>
Cc: Robert P. J. Day <rpjday@mindspring.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Alex Riesen <raa.lkml@gmail.com>
Cc: Robin Getz <robin.getz@analog.com>
Acked-by: Bryan Wu <bryan.wu@analog.com>
17 years ago[libata] sata_nv: undo merge error
Jeff Garzik [Mon, 2 Jul 2007 22:12:19 +0000 (18:12 -0400)]
[libata] sata_nv: undo merge error

Only the ADMA entry was supposed to be able to change queue depth.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago3c589_cs: fix local_bh_enable warning
Patrick McHardy [Mon, 2 Jul 2007 14:08:28 +0000 (16:08 +0200)]
3c589_cs: fix local_bh_enable warning

Russell King wrote:
> Having upgraded from 2.6.16 to 2.6.22-rc6, I'm now seeing the following.
>
> Looks like netfilter is calling local_bh_enable() with IRQs disabled,
> which would appear to be illegal.  Thankfully, this is a warn-once
> warning.
>
> WARNING: at /home/rmk/git/linux-2.6-rmk/kernel/softirq.c:138 local_bh_enable()
> [...]
> [<c01447fc>] (nf_conntrack_destroy+0x0/0x2c) from [<c012c05c>] (__kfree_skb+0xd0/0x100)
> [<c012bf8c>] (__kfree_skb+0x0/0x100) from [<c012c0d8>] (kfree_skb+0x4c/0x50)
>  r5:c12a3800 r4:00000300
> [<c012c08c>] (kfree_skb+0x0/0x50) from [<bf03cbb0>] (el3_start_xmit+0xb8/0xd0 [3c589_cs])
> [<bf03caf8>] (el3_start_xmit+0x0/0xd0 [3c589_cs]) from [<c01324dc>] (dev_hard_start_xmit+0x1a8/0x244)
>  r7:c12a3800 r6:c1a9aa00 r5:c1a9aa00 r4:c12a3800
> [<c0132334>] (dev_hard_start_xmit+0x0/0x244) from [<c013fcc0>] (__qdisc_run+0xb0/0x198)

Thats a bug in the 3c589_cs driver. Patch attached.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: PATA-mode fixes for sis_sata
Uwe Koziolek [Thu, 14 Jun 2007 21:40:43 +0000 (23:40 +0200)]
libata: PATA-mode fixes for sis_sata

Changed PATA handler for PATA-ports used by sata_sis.
This patch was originally submitted by Jeff Garzik.

Added PCI-ID 1180 for SiS966 Controller in pata_sis.
The 1180 mode is fully compatible to other SiS PATA-controller.

The PCI-ID 1183 is SATA in PATA-emulation, but not fully compatible
to SiS5513/5518. sata_sis.c is forwarding this ID to pata_sis.
1183 is not working if simply added to pata_sis.
This handling fixes issues with SiS968.

Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: add HTS541616J9SA00 to NCQ blacklist
Tejun Heo [Mon, 25 Jun 2007 02:28:59 +0000 (11:28 +0900)]
libata: add HTS541616J9SA00 to NCQ blacklist

Another member of HTS5416* family doing spurious NCQ completion.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Enrico Sardi <enricoss@tiscali.it>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_nv: allow changing queue depth
Robert Hancock [Fri, 29 Jun 2007 00:52:24 +0000 (18:52 -0600)]
sata_nv: allow changing queue depth

The sata_nv driver was missing the change_queue_depth hook in the SCSI host
template which the other NCQ-capable libata drivers had. This made it impossible
to change the queue depth by user request. Add this in.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_inic162x: disable LBA48 devices
Tejun Heo [Fri, 29 Jun 2007 02:33:08 +0000 (11:33 +0900)]
sata_inic162x: disable LBA48 devices

sata_inic162x can't do LBA48 properly yet and is likely to corrupt
data on drives larger than LBA28 limit.  Disable LBA48 devices during
device configuration.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: remove reading alt_status from ata_hsm_qc_complete()
Albert Lee [Thu, 28 Jun 2007 02:05:31 +0000 (10:05 +0800)]
libata: remove reading alt_status from ata_hsm_qc_complete()

In ata_hsm_qc_complete():
Calling ata_altstatus() after the qc is completed might race with next qc. Remove it.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: pata_pdc2027x PLL input clock fix
Albert Lee [Tue, 26 Jun 2007 05:43:15 +0000 (13:43 +0800)]
libata: pata_pdc2027x PLL input clock fix

Recently the PLL input clock of pata_pdc2027x is sometimes detected
higer than expected (e.g. 20.027 MHz compared to 16.714 MHz).
It seems sometimes the mdelay() function is not as precise as it
used to be. Per Alan's advice, HT or power management might affect
the precision of mdelay().

This patch calls gettimeofday() to mesure the time elapsed and
calculate the PLL input clock accordingly.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoscsi disk help file is not complete
Randy Dunlap [Mon, 11 Jun 2007 18:59:34 +0000 (11:59 -0700)]
scsi disk help file is not complete

On Mon, 11 Jun 2007 20:28:16 +0200 api wrote:

> Good day,
> When doing make menuconfig one comes across CONFIG_BLK_DEV_SD.
> The help file states that this is for scsi disks.NO MENTION IS MADE THAT
> IT IS NEEDE FOR SATA DISKS AS WELL!
> Would have saved me a lot of time if the help was up to date.
> I hope this can be changed so others can make a kernel for sata systems
> quicker.

From: Randy Dunlap <randy.dunlap@oracle.com>

Add help info for BLK_DEV_SD referring to its use in
SATA or PATA driver configurations.

Add help text for "ATA" indicating that it probably needs
some SCSI config symbols enabled in order to be useful.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[ARM] 4458/1: pxa: Fix CKEN usage and hence fix pxa suspend/resume
Richard Purdie [Mon, 2 Jul 2007 09:19:07 +0000 (10:19 +0100)]
[ARM] 4458/1: pxa: Fix CKEN usage and hence fix pxa suspend/resume

The PXA CKEN changes broken syspend/resume on the pxa27x. This patch
corrects the problem and fixes another couple of bad references.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4454/1: Use word accesses in Versatile PCI config reads
Andrzej Zaborowski [Tue, 26 Jun 2007 13:31:23 +0000 (14:31 +0100)]
[ARM] 4454/1: Use word accesses in Versatile PCI config reads

ARM Versatile PCI config reads of one byte width have the lowest two
bits of the address cleared and result in reading from a wrong place
in the config space.  This change is to use word size accesses like it is done for halfword reads.

Byte reads are used for retrieving the IRQ number of a PCI device and the problem was not exposed until 2.6.20 because the value read was discarded in drivers/pci/setup-irq.c (recently fixed).

Signed-off-by: Andrzej Zaborowski <andrew@openedhand.com>
Acked-by: Paul Brook <paul@codesourcery.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoRESEND [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon module...
Dhananjay Phadke [Mon, 2 Jul 2007 04:07:57 +0000 (09:37 +0530)]
RESEND [PATCH 3/3] NetXen: Graceful teardown of interface and hardware upon module unload

Resending patch 3/3 only.

These changes allow driver close routine to be called during module unload,
to clean-up buffers and other software resources, flush queues etc. Also,
hardware is reset to pristine state.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: Milan Bag <mbag@netxen.com>
Signed-off-by: Wen Xiong <wenxiong@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agodrivers/net/ns83820.c: fix a check-after-use
Adrian Bunk [Sun, 1 Jul 2007 20:21:10 +0000 (22:21 +0200)]
drivers/net/ns83820.c: fix a check-after-use

This patch fixes a check-after-use spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agonet/usb/cdc_ether minor sparse cleanup
David Brownell [Sun, 1 Jul 2007 18:47:59 +0000 (11:47 -0700)]
net/usb/cdc_ether minor sparse cleanup

Remove an "sparse" warning about a shadowed variable name.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoRESEND [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registers
dhananjay.phadke@gmail.com [Sun, 1 Jul 2007 18:56:00 +0000 (00:26 +0530)]
RESEND [PATCH 2/3] NetXen: Support per PCI-function interrupt mask registers

This patch updates the various access routines to access different
control and status settings present in different register locations.
This will fix problems related to working of different ports in
multi Port card.

Signed-off by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off by: Milan Bag <mbag@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoRESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctly
dhananjay.phadke@gmail.com [Sun, 1 Jul 2007 18:55:59 +0000 (00:25 +0530)]
RESEND [PATCH 1/3] NetXen: Fix issue of MSI not working correctly

NetXen driver uses PCI function 0 to provide the functionality of MSI.
The patch makes driver check the bus master bit for function 0 and
enable it after the card initialization.

Signed-off-by: Dhananjay Phadke<dhananjay@netxen.com>
Signed-off-by: Milan Bag <mbag@netxen.com>
Signed-off-by: Wen Xiong <wenxiong@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agodm9601: Return 0 from bind() on success
Peter Korsgaard [Sat, 30 Jun 2007 21:07:42 +0000 (23:07 +0200)]
dm9601: Return 0 from bind() on success

Fixup dm9601_bind() so it returns 0 on success rather than just a positive
number, as otherwise usbnet doesn't init the status handler.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoUpdate MAINTAINERS for USB network devices
Peter Korsgaard [Wed, 27 Jun 2007 19:18:18 +0000 (21:18 +0200)]
Update MAINTAINERS for USB network devices

>>>>> "Greg" == Greg KH <greg@kroah.com> writes:

 Greg> Yeah, this is the cdc_acm driver that is still in the USB drivers/
 Greg> directory tree as it is a USB class driver that shows up as a tty device
 Greg> to userspace.  It should not be moved to the networking list unless no
 Greg> one minds that I never see any queries about it :)

Ok, here's an updated patch:

Questions regarding the USB network drivers should now go to netdev.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agousbnet: Zero padding byte if there is tail room in skb
Peter Korsgaard [Wed, 27 Jun 2007 06:48:15 +0000 (08:48 +0200)]
usbnet: Zero padding byte if there is tail room in skb

Usbnet adds a padding byte if a 0 byte USB packet would be sent. Zero
padding byte if there is tail room in skb.

Signed-of-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agodm9601: HW header size shouldn't be included in packet length
Peter Korsgaard [Wed, 27 Jun 2007 06:14:50 +0000 (08:14 +0200)]
dm9601: HW header size shouldn't be included in packet length

The dm9601 driver was including the 2 byte hardware header in the
packet length, causing the HW to send 2 extra bytes of garbage on tx.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agostarfire list alpha as 64 bit arch
maximilian attems [Sun, 24 Jun 2007 21:36:45 +0000 (23:36 +0200)]
starfire list alpha as 64 bit arch

instead of:
"This driver has not been ported to this 64-bit architecture yet."
the driver is said to work on alpha, see
http://bugs.debian.org/305330

Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agomyri10ge: SET_NETDEV_DEV()
Maik Hampel [Thu, 28 Jun 2007 15:07:26 +0000 (17:07 +0200)]
myri10ge: SET_NETDEV_DEV()

SET_NETDEV_DEV() in myri10ge to create the "/sys/class/net/<if>/device"
symlink.

Signed-off-by: Maik Hampel <m.hampel@gmx.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoMerge branch 'for_linus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc...
Jeff Garzik [Mon, 2 Jul 2007 12:15:33 +0000 (08:15 -0400)]
Merge branch 'for_linus' of /linux/kernel/git/galak/powerpc into upstream-fixes

17 years agoMerge branch 'libertas-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...
Jeff Garzik [Mon, 2 Jul 2007 12:14:30 +0000 (08:14 -0400)]
Merge branch 'libertas-fixes' of git://git./linux/kernel/git/linville/wireless-2.6 into upstream-fixes

17 years agoBlackfin arch: update board defconfig files
Mike Frysinger [Mon, 2 Jul 2007 05:49:15 +0000 (13:49 +0800)]
Blackfin arch: update board defconfig files

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
17 years ago[POWERPC] Update defconfigs
Kumar Gala [Mon, 2 Jul 2007 05:04:36 +0000 (00:04 -0500)]
[POWERPC] Update defconfigs

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Uninline and export virq_to_hw() for the pasemi_mac driver
Olof Johansson [Mon, 4 Jun 2007 04:47:04 +0000 (14:47 +1000)]
[POWERPC] Uninline and export virq_to_hw() for the pasemi_mac driver

Uninline virq_to_hw and export it so modules can use it. The alternative
would be to export the irq_map array instead, but it's an infrequently
called function, and keeping the array unexported seems considerably
cleaner.

This is needed so that the pasemi_mac driver can be compiled as a module.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix PMI breakage in cbe_cbufreq driver
Christian Krafft [Thu, 28 Jun 2007 11:14:38 +0000 (21:14 +1000)]
[POWERPC] Fix PMI breakage in cbe_cbufreq driver

The recent change to cell_defconfig to enable cpufreq on Cell exposed
the fact that the cbe_cpufreq driver currently needs the PMI interface
code to compile, but Kconfig doesn't make sure that the PMI interface
code gets built if cbe_cpufreq is enabled.

In fact cbe_cpufreq can work without PMI, so this ifdefs out the code
that deals with PMI.  This is a minimal solution for 2.6.22; a more
comprehensive solution will be merged for 2.6.23.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Disable old EMAC driver in arch/powerpc
David Gibson [Thu, 28 Jun 2007 01:27:57 +0000 (11:27 +1000)]
[POWERPC] Disable old EMAC driver in arch/powerpc

The EMAC driver, in drivers/net/ibm_emac, for the embedded Ethernet
MAC found in PowerPC 4xx embedded chips is not suitable for
arch/powerpc.  It will not build because it relies on the old arch/ppc
OCP mechanism.  BenH has a new, device-tree aware version of the
driver which will work in arch/powerpc, but until it's merged, this
patch will disable the old, non-building version.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoLinux 2.6.22-rc7 v2.6.22-rc7
Linus Torvalds [Sun, 1 Jul 2007 19:54:24 +0000 (12:54 -0700)]
Linux 2.6.22-rc7

Last -rc? That's the plan..

17 years agoPM: introduce set_target method in pm_ops
Rafael J. Wysocki [Sun, 1 Jul 2007 19:07:33 +0000 (12:07 -0700)]
PM: introduce set_target method in pm_ops

Commit 52ade9b3b97fd3bea42842a056fe0786c28d0555 changed the suspend code
ordering to execute pm_ops->prepare() after the device model per-device
.suspend() calls in order to fix some ACPI-related issues.  Unfortunately, it
broke the at91 platform which assumed that pm_ops->prepare() would be called
before suspending devices.

at91 used pm_ops->prepare() to get notified of the target system sleep state,
so that it could use this information while suspending devices.  However, with
the current suspend code ordering pm_ops->prepare() is called too late for
this purpose.  Thus, at91 needs an additional method in 'struct pm_ops' that
will be used for notifying the platform of the target system sleep state.
Moreover, in the future such a method will also be needed by ACPI.

This patch adds the .set_target() method to 'struct pm_ops' and makes the
suspend code call it, if implemented, before executing the device model
per-device .suspend() calls.  It also modifies the at91 code to use
pm_ops->set_target() instead of pm_ops->prepare().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Len Brown <lenb@kernel.org>
Cc: 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 agosmsc-ircc2: bypass PNP detection until we get the quirks worked out
Bjorn Helgaas [Sun, 1 Jul 2007 19:06:49 +0000 (12:06 -0700)]
smsc-ircc2: bypass PNP detection until we get the quirks worked out

Don't use PNP detection by default yet.  We have some PNP and BIOS issues
to work out first.

Sample problem on a Toshiba Portege 4000: the SMCf010 device is handed off
disabled.  We assign I/O ports originally assigned to the SMCf010 to a
PCMCIA device instead.  We enable the SMCf010, configuring it to use
disjoint ports, but _SRS doesn't work correctly, so the device doesn't
work.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoi386: mtrr crash fix
Andrew Morton [Sun, 1 Jul 2007 19:06:48 +0000 (12:06 -0700)]
i386: mtrr crash fix

Commit 3ebad5905609476a4ff1151a66b21d9794009961 ("[PATCH] x86: Save and
restore the fixed-range MTRRs of the BSP when suspending") added mtrr
operations without verifying that the CPU has MTRRs.  Crashes transmeta
CPUs.

Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <linux@horizon.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoasus_acpi: fix oops on non-asus machines
Maxime Austruy [Sun, 1 Jul 2007 19:06:38 +0000 (12:06 -0700)]
asus_acpi: fix oops on non-asus machines

If asus_acpi_init doesn't find any device it knows about, it mistakenly
returns a "success" error code even though it cleans up after itself.  Later
when trying to rmmod asus_acpi, the module_exit routine would try to clean up
one more time and we would end up calling
acpi_bus_unregister_driver(&asus_hotk_driver) twice.  This patch addresses
this first problem by returning -ENODEV when no appropriate device is found.

Then there was also another bug with the code handling the return value of
backlight_device_register.  If this function ever failed, the driver would
cleanup by calling the module_exit routine from module_init, but it would
still return "success".  So any attempt to rmmod this module would result in
asus_acpi_exit being called twice but it's not ready to handle it (I haven't
hit this bug, just found it by code inspection).  This patch fixes that by
inserting a return -ENODEV; at the end of this error handling path.

Signed-off-by: Maxime Austruy <maxime@tralhalla.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agopci.h stubs (for EDD build error)
Randy Dunlap [Sun, 1 Jul 2007 19:06:37 +0000 (12:06 -0700)]
pci.h stubs (for EDD build error)

Provide stubs for more PCI bus/slot functions when CONFIG_PCI=n.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: 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 agoALSA: more section mismatches
Randy Dunlap [Sun, 1 Jul 2007 19:06:37 +0000 (12:06 -0700)]
ALSA: more section mismatches

Fix section mismatch warnings:

WARNING: sound/built-in.o(.exit.text+0x3ad): Section mismatch: reference to .init.text: (between 'sb_exit' and 'unload_uart6850')
WARNING: sound/built-in.o(.exit.text+0x753): Section mismatch: reference to .init.text: (between 'snd_mts64_module_exit' and 'snd_portman_module_exit')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofrv: fix fallout from "remove sched.h from mm.h" patch
Alexey Dobriyan [Sun, 1 Jul 2007 19:06:36 +0000 (12:06 -0700)]
frv: fix fallout from "remove sched.h from mm.h" patch

/home/rpjday/AMD/k/topics/0_hi/hi1.c:15: error: dereferencing pointer to incomplete type
/home/rpjday/AMD/k/topics/0_hi/hi1.c:16: error: dereferencing pointer to incomplete type

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoSLAB: remove WARN_ON_ONCE for zero sized objects for 2.6.22 release
Christoph Lameter [Sun, 1 Jul 2007 19:06:35 +0000 (12:06 -0700)]
SLAB: remove WARN_ON_ONCE for zero sized objects for 2.6.22 release

We agreed to remove the WARN_ON_ONCE before 2.6.22 is released.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoblink driver power saving
Stephen Hemminger [Sun, 1 Jul 2007 16:50:35 +0000 (12:50 -0400)]
blink driver power saving

The blink driver wakes up every jiffies which wastes power unnecessarily.
Using a notifier gives same effect. Also add ability to unload module.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
[ We should really just delete the whole thing. The blink driver is
  broken in many other ways too  -Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoi386: remove bogus mtrr range check
Linus Torvalds [Sun, 1 Jul 2007 17:56:11 +0000 (10:56 -0700)]
i386: remove bogus mtrr range check

Commit 9215da33209b861b01c51382254b178a3fe92a30 "fixed" the MTRR range
check to not allow any MTRR's under the 1MB mark (since that's where the
fixed MTRR's are active).

However, that was totally bogus, since it's normal (and almost required)
to have a large variable MTRR that starts at 0, and covers some large
percentage of the whole RAM, and then using the fixed MTRR's to override
that large MTRR to handle the special ISA hole in the 640k-1M region.

The old check was bogus too (checking that no variable MTRR is used that
is entirely under the 1MB range), but at least it wasn't actively
detrimental, because no sane situation would ever trigger such MTRR
usage in the first place.

That said, the whole notion of not allowing variable MTRR's in the low
1MB is just stupid, so rather than revert the commit, this just removes
the whole sad and unnecessary check entirely.

Cc: Jan Beulich <jbeulich@novell.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Luca Palermo <darkmage@sabayonlinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Sat, 30 Jun 2007 04:30:18 +0000 (21:30 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Add linux/pagemap.h to asm/tlb.h
  [SPARC64]: Need to set state to IDLE during sun4v IRQ enable.
  [SPARC64]: Fix VIRQ enabling.
  [SPARC64]: Add irqs to mdesc_node.

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 30 Jun 2007 04:29:57 +0000 (21:29 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IRDA]: fix printk format
  [NETPOLL] netconsole: fix soft lockup when removing module
  [NETPOLL]: tx lock deadlock fix
  SCTP: lock_sock_nested in sctp_sock_migrate
  SCTP: Fix sctp_getsockopt_get_peer_addrs
  SCTP: update sctp_getsockopt helpers to allow oversized buffers

17 years agoFix VDSO gettimeofday() when called with NULL struct timeval.
Will Schmidt [Fri, 29 Jun 2007 20:49:50 +0000 (15:49 -0500)]
Fix VDSO gettimeofday() when called with NULL struct timeval.

The vdso64 portion of patch 74609f4536f2b8fd6a48381bbbe3cd37da20a527 for
fixing problems with NULL gettimeofday input mistakenly checks for a
null tz field twice, when it should be checking for null tz once, and
null tv once; by way of a r10/r11 typo.

Any application calling gettimeofday(&tv,NULL) will "fail".

This corrects that typo, and makes my G5 happy.

Tested on G5.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Cc: Tony Breeds <tony@bakeyournoodle.com>
Forwarded-by: Ben Herrenschmidt <benh@kernel.crashing.org>
[ Ben says: "I checked the 32 bits part of the change is correct.  You
  can probably blame me for originally writing the 2 versions with
  inversed usage of r10 and r11, thus confusing Tony :-)"

  Ben duly blamed.   - Linus ]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofirewire: add Kconfig help on building both stacks
Stefan Richter [Mon, 25 Jun 2007 20:18:40 +0000 (22:18 +0200)]
firewire: add Kconfig help on building both stacks

Alas that won't work so good, because nobody reads help texts.

I thought about adding some crude multiple choice selection (build the
old stack, build the new stack, build both stacks).  It's possible, but
it would introduce awkward dummy config variables.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
17 years agofirewire: fix async reception on big endian machines
Stefan Richter [Sat, 23 Jun 2007 18:28:17 +0000 (20:28 +0200)]
firewire: fix async reception on big endian machines

descriptor.data_address is little endian

Tested-by: Olaf Hering <olh@suse.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>