]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agox86: correctly set UTS_MACHINE for "make ARCH=x86"
Andreas Herrmann [Mon, 26 Nov 2007 19:42:19 +0000 (20:42 +0100)]
x86: correctly set UTS_MACHINE for "make ARCH=x86"

x86: correctly set UTS_MACHINE for "make ARCH=x86"

For a kernel built with "make ARCH=x86" the following system
information is displayed when running the new kernel

    $ uname -m
    x86

On some i386 systems (e.g. K7) we even have the following information

    $ uname -m
    x66

This is weird. The usual information for "uname -m" should be "x86_64"
on 64-bit and "i386" or "i686" on 32-bit.

This patch fixes the issue by setting UTS_MACHINE to "i386" for 32-bit
kernel builds and to "x86_64" for 64-bit kernel builds. I.e., "x86"
won't be used for UTS_MACHINE anymore.

Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andreas Herrmann <aherrman@arcor.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@redhat.com>
16 years agolockdep: annotate do_debug() trap handler
Peter Zijlstra [Mon, 26 Nov 2007 19:42:19 +0000 (20:42 +0100)]
lockdep: annotate do_debug() trap handler

Ensure the hardirq state is consistent before using locks. Use the rare
trace_hardirqs_fixup() because the trap can happen in any context.

resolves this rare lockdep warning:

WARNING: at kernel/lockdep.c:2658 check_flags()
 [<c013571e>] check_flags+0x90/0x140
 [<c0138a69>] lock_release+0x4b/0x1d0
 [<c0507fea>] notifier_call_chain+0x2a/0x47
 [<c050806b>] __atomic_notifier_call_chain+0x64/0x6d
 [<c0508007>] __atomic_notifier_call_chain+0x0/0x6d
 [<c050808b>] atomic_notifier_call_chain+0x17/0x1a
 [<c0131802>] notify_die+0x30/0x34
 [<c0506b09>] do_debug+0x3e/0xd4
 [<c050658f>] debug_stack_correct+0x27/0x2c
 [<c04be389>] tcp_rcv_established+0x1/0x620
 [<c04c38c2>] tcp_v4_do_rcv+0x2b/0x313
 [<c04c56b6>] tcp_v4_rcv+0x467/0x85d
 [<c0505ff2>] _spin_lock_nested+0x27/0x32
 [<c04c5a4d>] tcp_v4_rcv+0x7fe/0x85d
 [<c04c560e>] tcp_v4_rcv+0x3bf/0x85d
 [<c04adbb5>] ip_local_deliver_finish+0x11b/0x1b0
 [<c04adac8>] ip_local_deliver_finish+0x2e/0x1b0
 [<c04ada7b>] ip_rcv_finish+0x27b/0x29a
 [<c04961e5>] netif_receive_skb+0xfb/0x2a6
 [<c04add0f>] ip_rcv+0x0/0x1fb
 [<c0496354>] netif_receive_skb+0x26a/0x2a6
 [<c04961e5>] netif_receive_skb+0xfb/0x2a6
 [<c049872e>] process_backlog+0x7f/0xc6
 [<c04983ba>] net_rx_action+0xb9/0x1ac
 [<c0498348>] net_rx_action+0x47/0x1ac
 [<c01376cb>] trace_hardirqs_on+0x118/0x16b
 [<c01225e2>] __do_softirq+0x49/0xa2
 [<c010595f>] do_softirq+0x60/0xdd
 [<c0506300>] _spin_unlock_irq+0x20/0x2c
 [<c0103e4f>] restore_nocheck+0x12/0x15
 [<c01440e1>] handle_fasteoi_irq+0x0/0x9b
 [<c0105a70>] do_IRQ+0x94/0xaa
 [<c0506300>] _spin_unlock_irq+0x20/0x2c
 [<c0104832>] common_interrupt+0x2e/0x34
 [<c0114703>] native_safe_halt+0x2/0x3
 [<c0102c01>] default_idle+0x44/0x65
 [<c010257f>] cpu_idle+0x42/0x50
 [<c076ea09>] start_kernel+0x26b/0x270
 [<c076e317>] unknown_bootoption+0x0/0x196
 =======================
irq event stamp: 559190
hardirqs last  enabled at (559190): [<c0507316>] kprobe_exceptions_notify+0x299/0x305
hardirqs last disabled at (559189): [<c05067bf>] do_int3+0x1d/0x95
softirqs last  enabled at (559172): [<c010595f>] do_softirq+0x60/0xdd
softirqs last disabled at (559181): [<c010595f>] do_softirq+0x60/0xdd

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: turn off iommu merge by default
Ingo Molnar [Mon, 26 Nov 2007 19:42:19 +0000 (20:42 +0100)]
x86: turn off iommu merge by default

revert this commit for now:

    commit 948062683004d13ca21c8c05ac052d387978a449
    Author: Andi Kleen <ak@suse.de>
    Date:   Fri Oct 19 20:35:03 2007 +0200

        x86: enable iommu_merge by default

it's causing regressions:

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

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix ACPI compile for LOCAL_APIC=n
Thomas Gleixner [Mon, 26 Nov 2007 19:42:19 +0000 (20:42 +0100)]
x86: fix ACPI compile for LOCAL_APIC=n

ACPI processor idle code references local_apic_timer_c2_ok, which
is not available when LOCAL_APIC is disabled.

Define local_apic_timer_c2_ok as a constant, when LOCAL_APIC=n

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: printk kernel version in WARN_ON and other dump_stack users
Arjan van de Ven [Mon, 26 Nov 2007 19:42:19 +0000 (20:42 +0100)]
x86: printk kernel version in WARN_ON and other dump_stack users

today, all oopses contain a version number of the kernel, which is nice
because the people who actually do bother to read the oops get this
vital bit of information always without having to ask the reporter in
another round trip.

However, WARN_ON() and many other dump_stack() users right now lack this
information; the patch below adds this. This information is essential
for getting people to use their time effectively when looking at these
things; in addition, it's essential for tools that try to collect
statistics about defects.

Please consider, since its so simple and important for long term kernel
quality processes.

The code is identical between 32/64 bit; a lot of this code should be
unified over time, the patch keeps the identical-ness intact.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoACPI: Set max_cstate to 1 for early Opterons.
Alexey Starikovskiy [Mon, 26 Nov 2007 19:42:19 +0000 (20:42 +0100)]
ACPI: Set max_cstate to 1 for early Opterons.

AMD Opteron processors before CG revision don't like C-states > 1.

This solves the long standing bugzilla #5303 and probably some more
on affected machines:

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

[ tglx@linutronix.de: reworked the patch so it does not wreck ia64 ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix NMI watchdog & 'stopped time' problem
Maciej W. Rozycki [Mon, 26 Nov 2007 19:42:19 +0000 (20:42 +0100)]
x86: fix NMI watchdog & 'stopped time' problem

More than 3 years ago Niclas Gustafsson reported a 'stopped time'
problem:

> Watching the /proc/interrupts with 10s apart after the "stop".
>
> [root@s151 root]# more /proc/interrupts
>            CPU0
>   0:   66413955  local-APIC-edge  timer
[...]
> LOC:   67355837
> ERR:          0
> MIS:          0
> [root@s151 root]# more /proc/interrupts
>            CPU0
>   0:   66413955  local-APIC-edge  timer
[...]
> LOC:   67379568
> ERR:          0
> MIS:          0

This may be because buggy SMM firmware messes with the 8259A (configured
for a transparent mode -- yes that rare "local-APIC-edge" mode is tricky
;-) ) insanely.

this should resolve:

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

Patch-dusted-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years ago[MIPS] vpe: Add missing "space"
Joe Perches [Tue, 20 Nov 2007 01:47:54 +0000 (17:47 -0800)]
[MIPS] vpe: Add missing "space"

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Compliment va_start() with va_end().
Richard Knutsson [Sat, 24 Nov 2007 21:22:19 +0000 (22:22 +0100)]
[MIPS] Compliment va_start() with va_end().

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP22: Fix broken eeprom access by using __raw_readl/__raw_writel
Thomas Bogendoerfer [Fri, 23 Nov 2007 19:40:15 +0000 (20:40 +0100)]
[MIPS] IP22: Fix broken eeprom access by using __raw_readl/__raw_writel

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP22: Fix broken EISA interrupt setup by switching to generic i8259
Thomas Bogendoerfer [Fri, 23 Nov 2007 19:34:16 +0000 (20:34 +0100)]
[MIPS] IP22: Fix broken EISA interrupt setup by switching to generic i8259

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] 64-bit Sibyte kernels need DMA32.
Ralf Baechle [Sat, 3 Nov 2007 02:05:43 +0000 (02:05 +0000)]
[MIPS] 64-bit Sibyte kernels need DMA32.

Sibyte SOCs only have 32-bit PCI.  Due to the sparse use of the address
space only the first 1GB of memory is mapped at physical addresses
below 1GB.  If a system has more than 1GB of memory 32-bit DMA will
not be able to reach all of it.

For now this patch is good enough to keep Sibyte users happy but it seems
eventually something like swiotlb will be needed for Sibyte.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Only build r4k clocksource for systems that work ok with it.
Ralf Baechle [Sat, 24 Nov 2007 22:33:28 +0000 (22:33 +0000)]
[MIPS] Only build r4k clocksource for systems that work ok with it.

In particular as-is it's not suited for multicore and mutiprocessors
systems where there is on guarantee that the counter are synchronized
or running from the same clock at all.  This broke Sibyte and probably
others since the "[MIPS] Handle R4000/R4400 mfc0 from count register."
commit.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Handle R4000/R4400 mfc0 from count register.
Ralf Baechle [Wed, 21 Nov 2007 16:39:44 +0000 (16:39 +0000)]
[MIPS] Handle R4000/R4400 mfc0 from count register.

The R4000 and R4400 have an errata where if the cp0 count register is read
in the exact moment when it matches the compare register no interrupt will
be generated.

This bug may be triggered if the cp0 count register is being used as
clocksource and the compare interrupt as clockevent.  So a simple
workaround is to avoid using the compare for both facilities on the
affected CPUs.

This is different from the workaround suggested in the old errata documents;
at some opportunity probably the official version should be implemented
and tested.  Another thing to find out is which processor versions
exactly are affected.  I only have errata documents upto R4400 V3.0
available so for the moment the code treats all R4000 and R4400 as broken.

This is potencially a problem for some machines that have no other decent
clocksource available; this workaround will cause them to fall back to
another clocksource, worst case the "jiffies" source.

16 years ago[MIPS] Fix possible hang in LL/SC futex loops.
Ralf Baechle [Tue, 20 Nov 2007 10:44:18 +0000 (10:44 +0000)]
[MIPS] Fix possible hang in LL/SC futex loops.

The LL / SC loops in __futex_atomic_op() have the usual fixups necessary
for memory acccesses to userspace from kernel space installed:

        __asm__ __volatile__(
        "       .set    push                            \n"
        "       .set    noat                            \n"
        "       .set    mips3                           \n"
        "1:     ll      %1, %4  # __futex_atomic_op     \n"
        "       .set    mips0                           \n"
        "       " insn  "                               \n"
        "       .set    mips3                           \n"
        "2:     sc      $1, %2                          \n"
        "       beqz    $1, 1b                          \n"
        __WEAK_LLSC_MB
        "3:                                             \n"
        "       .set    pop                             \n"
        "       .set    mips0                           \n"
        "       .section .fixup,\"ax\"                  \n"
        "4:     li      %0, %6                          \n"
        "       j       2b                              \n" <-----
        "       .previous                               \n"
        "       .section __ex_table,\"a\"               \n"
        "       "__UA_ADDR "\t1b, 4b                    \n"
        "       "__UA_ADDR "\t2b, 4b                    \n"
        "       .previous                               \n"
        : "=r" (ret), "=&r" (oldval), "=R" (*uaddr)
        : "0" (0), "R" (*uaddr), "Jr" (oparg), "i" (-EFAULT)
        : "memory");

The branch at the end of the fixup code, it goes back to the SC
instruction, no matter if the fault was first taken by the LL or SC
instruction resulting in an endless loop which will only terminate if
the address become valid again due to another thread setting up an
accessible mapping and the CPU happens to execute the SC instruction
successfully which due to the preceeding ERET instruction of the fault
handler would only happen if UNPREDICTABLE instruction behaviour of the
SC instruction without a preceeding LL happens to favor that outcome.
But normally processes are nice, pass valid arguments and we were just
getting away with this.

Thanks to Kaz Kylheku <kaz@zeugmasystems.com> for providing the original
report and a test case.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix context DSP context / TLS pointer switching bug for new threads.
Ralf Baechle [Tue, 30 Oct 2007 17:25:26 +0000 (17:25 +0000)]
[MIPS] Fix context DSP context / TLS pointer switching bug for new threads.

A new born thread starts execution not in schedule but rather in
ret_from_fork which results in it bypassing the part of the code to
load a new context written in C which are the DSP context and the
userlocal register which Linux uses for the TLS pointer.  Frequently
we were just getting away with this bug for a number of reasons:

 o Real world application scenarios are very unlikely to use clone or fork
   in blocks of DSP code.
 o Linux by default runs the child process right after the fork, so the
   child by luck will find all the right context in the DSP and userlocal
   registers.
 o So far the rdhwr instruction was emulated on all hardware so userlocal
   wasn't getting referenced at all and the emulation wasn't suffering
   from the issue since it gets it's value straight from the thread's
   thread_info.

Fixed by moving the code to load the context from switch_to() to
finish_arch_switch which will be called by newborn and old threads.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP32: More interrupt renumbering fixes.
Ralf Baechle [Tue, 30 Oct 2007 15:43:44 +0000 (15:43 +0000)]
[MIPS] IP32: More interrupt renumbering fixes.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] time: MIPSsim's plat_time_init doesn't need to be irq safe.
Ralf Baechle [Tue, 30 Oct 2007 15:39:18 +0000 (15:39 +0000)]
[MIPS] time: MIPSsim's plat_time_init doesn't need to be irq safe.

It's running early during the bootup process so interrupts are still off.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] time: Fix negated condition in cevt-r4k driver.
Ralf Baechle [Tue, 30 Oct 2007 02:21:08 +0000 (02:21 +0000)]
[MIPS] time: Fix negated condition in cevt-r4k driver.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix pcspeaker build.
Ralf Baechle [Thu, 15 Nov 2007 23:42:11 +0000 (23:42 +0000)]
[MIPS] Fix pcspeaker build.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agolibata: bump transfer chunk size if it's odd
Tejun Heo [Mon, 26 Nov 2007 11:58:02 +0000 (20:58 +0900)]
libata: bump transfer chunk size if it's odd

None of the drives I have follows what the standard says about
transfer chunk size.  Of the four SATA and six PATA ATAPI devices
tested, four ignore transfer chunk size completely and the ones which
honor it don't behave according to the spec when it's odd.

According to the spec, transfer chunk size can be odd if the amount of
data to transfer equals or is smaller than the chunk size and the
device can indicate the same odd number and transfer the whole thing
at one go with a pad byte appended.  However, in reality, none of the
drives I have does that.  They all indicate and transfer even number
of bytes one byte shorter than the chunk size first; then indicate and
transfer two bytes, which is clearly out of spec.

In addition to unnecessary second PIO data phase, this also creates a
weird problem when combined with SATA controllers which perform PIO
via DMA.  Some of these controllers use actualy number of bytes
received to update DMA pointer so chunks which are sized 4n + 2 makes
DMA pointer off by two bytes.  This causes data corruption and buffer
overruns.

This patch rounds nbytes up to the nearest even number such that ATAPI
devices don't split data transfer for the last odd byte.  This
shouldn't confuse controllers which depend on transfer chunk size as
devices will report the rounded-up number, actually transfer that much
and padding buffer is there to receive them.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: Return proper ATA INT status in pata_bf54x driver
sonic zhang [Mon, 26 Nov 2007 09:50:56 +0000 (17:50 +0800)]
libata: Return proper ATA INT status in pata_bf54x driver

INT status can be OR.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[IPV4]: Remove bogus ifdef mess in arp_process
Adrian Bunk [Mon, 26 Nov 2007 15:17:53 +0000 (23:17 +0800)]
[IPV4]: Remove bogus ifdef mess in arp_process

The #ifdef's in arp_process() were not only a mess, they were also wrong
in the CONFIG_NET_ETHERNET=n and (CONFIG_NETDEV_1000=y or
CONFIG_NETDEV_10000=y) cases.

Since they are not required this patch removes them.

Also removed are some #ifdef's around #include's that caused compile
errors after this change.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[SKBUFF]: Free old skb properly in skb_morph
Herbert Xu [Mon, 26 Nov 2007 15:11:19 +0000 (23:11 +0800)]
[SKBUFF]: Free old skb properly in skb_morph

The skb_morph function only freed the data part of the dst skb, but leaked
the auxiliary data such as the netfilter fields.  This patch fixes this by
moving the relevant parts from __kfree_skb to skb_release_all and calling
it in skb_morph.

It also makes kfree_skbmem static since it's no longer called anywhere else
and it now no longer does skb_release_data.

Thanks to Yasuyuki KOZAKAI for finding this problem and posting a patch for
it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[IPV4]: Fix memory leak in inet_hashtables.h when NUMA is on
Pavel Emelyanov [Mon, 26 Nov 2007 12:23:31 +0000 (20:23 +0800)]
[IPV4]: Fix memory leak in inet_hashtables.h when NUMA is on

The inet_ehash_locks_alloc() looks like this:

#ifdef CONFIG_NUMA
if (size > PAGE_SIZE)
x = vmalloc(...);
else
#endif
x = kmalloc(...);

Unlike it, the inet_ehash_locks_alloc() looks like this:

#ifdef CONFIG_NUMA
if (size > PAGE_SIZE)
vfree(x);
else
#else
kfree(x);
#endif

The error is obvious - if the NUMA is on and the size
is less than the PAGE_SIZE we leak the pointer (kfree is
inside the #else branch).

Compiler doesn't warn us because after the kfree(x) there's
a "x = NULL" assignment, so here's another (minor?) bug: we
don't set x to NULL under certain circumstances.

Boring explanation, I know... Patch explains it better.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[IPSEC]: Temporarily remove locks around copying of non-atomic fields
Herbert Xu [Mon, 26 Nov 2007 11:07:34 +0000 (19:07 +0800)]
[IPSEC]: Temporarily remove locks around copying of non-atomic fields

The change 050f009e16f908932070313c1745d09dc69fd62b

[IPSEC]: Lock state when copying non-atomic fields to user-space

caused a regression.

Ingo Molnar reports that it causes a potential dead-lock found by the
lock validator as it tries to take x->lock within xfrm_state_lock while
numerous other sites take the locks in opposite order.

For 2.6.24, the best fix is to simply remove the added locks as that puts
us back in the same state as we've been in for years.  For later kernels
a proper fix would be to reverse the locking order for every xfrm state
user such that if x->lock is taken together with xfrm_state_lock then
it is to be taken within it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[CIFS] Fix check after use error in ACL code
Steve French [Sun, 25 Nov 2007 10:01:00 +0000 (10:01 +0000)]
[CIFS] Fix check after use error in ACL code

Spotted by the coverity scanner.

CC: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years agoMerge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Steve French [Sun, 25 Nov 2007 09:53:27 +0000 (09:53 +0000)]
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6

16 years agoIB/iser: Add missing counter increment in iser_data_buf_aligned_len()
Erez Zilber [Wed, 21 Nov 2007 11:11:37 +0000 (13:11 +0200)]
IB/iser: Add missing counter increment in iser_data_buf_aligned_len()

While adding sg chaining support to iSER, a "for" loop was replaced
with a "for_each_sg" loop. The "for" loop included the incrementation
of 2 variables. Only one of them is incremented in the current
"for_each_sg" loop. This caused iSER to think that all data is
unaligned, and all data was copied to aligned buffers.

This patch increments the missing counter inside the "for_each_sg"
loop whenever necessary.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ehca: Fix static rate regression
Joachim Fenkes [Thu, 22 Nov 2007 10:26:26 +0000 (12:26 +0200)]
IB/ehca: Fix static rate regression

Wrong choice of port number caused modify_qp() to fail -- fixed.

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agopata_ali: trim trailing whitespace (fix checkpatch complaints)
Jeff Garzik [Sat, 24 Nov 2007 02:08:42 +0000 (21:08 -0500)]
pata_ali: trim trailing whitespace (fix checkpatch complaints)

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agopata_isapnp: Polled devices
Alan Cox [Mon, 19 Nov 2007 14:41:05 +0000 (14:41 +0000)]
pata_isapnp: Polled devices

If a card has no IRQ then pass no interrupt handler but allow polled
usage.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_hpt37x: Fix cable detect bug spotted by Sergei
Alan Cox [Mon, 19 Nov 2007 14:39:13 +0000 (14:39 +0000)]
pata_hpt37x: Fix cable detect bug spotted by Sergei

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_ali: Lots of problems still showing up with small ATAPI DMA
Alan Cox [Mon, 19 Nov 2007 14:37:58 +0000 (14:37 +0000)]
pata_ali: Lots of problems still showing up with small ATAPI DMA

Hopefully there is a better long term solution but for now lets favour
reliability.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_ali: Add Mitac 8317 and derivatives
Alan Cox [Mon, 19 Nov 2007 14:36:28 +0000 (14:36 +0000)]
pata_ali: Add Mitac 8317 and derivatives

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata-core: List more documentation sources for reference
Alan Cox [Mon, 19 Nov 2007 14:30:16 +0000 (14:30 +0000)]
libata-core: List more documentation sources for reference

And next time I'll be able to find the ata tape spec easily...

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoata_piix: Invalid use of writel/readl with iomap
Alan Cox [Mon, 19 Nov 2007 14:28:28 +0000 (14:28 +0000)]
ata_piix: Invalid use of writel/readl with iomap

Should use ioread* as discussed previously

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosata_sil24: fix sg table sizing
Tejun Heo [Thu, 22 Nov 2007 09:46:57 +0000 (18:46 +0900)]
sata_sil24: fix sg table sizing

sil24 unnecessarily used LIBATA_MAX_PRD and ATAPI sg table was short
by one entry which might cause very obscure problems.  This patch
updates sg table sizing such that

* One full page is used for PRB + sg table.  On 4k page,
  this results in 253 sg's.

* Make ATAPI sg block properly sized.

* Make build fail if command block size doesn't equal PAGE_SIZE.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_jmicron: fix disabled port handling in jmicron_pre_reset()
Tejun Heo [Mon, 19 Nov 2007 09:06:11 +0000 (18:06 +0900)]
pata_jmicron: fix disabled port handling in jmicron_pre_reset()

There are two bugs in disabled port handling.

* test in PORT_PATA0 is reversed
* ->prereset should return -ENOENT for disabled ports not 0

The first bug makes the PATA channel considered disabled but the
second bug saves the day by returning 0.  The net result is that cable
is always left at ATA_CBL_UNKNOWN.  This results in false 80c
configuration and thus transfer errors.

This patch fixes both bugs.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_sil680: kill bogus reset code (take 2)
Sergei Shtylyov [Fri, 16 Nov 2007 16:50:04 +0000 (19:50 +0300)]
pata_sil680: kill bogus reset code (take 2)

Since writing to two reserved bits ain't much of a housekeeping, I think it's
time we get rid of the custom error handler in this driver. ;-)

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years ago[CRYPTO] api: Fix potential race in crypto_remove_spawn
Herbert Xu [Sat, 17 Nov 2007 14:09:38 +0000 (22:09 +0800)]
[CRYPTO] api: Fix potential race in crypto_remove_spawn

As it is crypto_remove_spawn may try to unregister an instance which is
yet to be registered.  This patch fixes this by checking whether the
instance has been registered before attempting to remove it.

It also removes a bogus cra_destroy check in crypto_register_instance as
1) it's outside the mutex;
2) we have a check in __crypto_register_alg already.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[CRYPTO] authenc: Move initialisations up to shut up gcc
Herbert Xu [Thu, 11 Oct 2007 08:45:17 +0000 (16:45 +0800)]
[CRYPTO] authenc: Move initialisations up to shut up gcc

It seems that newer versions of gcc have regressed in their abilities to
analyse initialisations.  This patch moves the initialisations up to avoid
the warnings.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[TCP] MTUprobe: Cleanup send queue check (no need to loop)
Ilpo Järvinen [Fri, 23 Nov 2007 11:10:56 +0000 (19:10 +0800)]
[TCP] MTUprobe: Cleanup send queue check (no need to loop)

The original code has striking complexity to perform a query
which can be reduced to a very simple compare.

FIN seqno may be included to write_seq but it should not make
any significant difference here compared to skb->len which was
used previously. One won't end up there with SYN still queued.

Use of write_seq check guarantees that there's a valid skb in
send_head so I removed the extra check.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Acked-by: John Heffner <jheffner@psc.edu>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[TCP]: MTUprobe: receiver window & data available checks fixed
Ilpo Järvinen [Fri, 23 Nov 2007 11:08:16 +0000 (19:08 +0800)]
[TCP]: MTUprobe: receiver window & data available checks fixed

It seems that the checked range for receiver window check should
begin from the first rather than from the last skb that is going
to be included to the probe. And that can be achieved without
reference to skbs at all, snd_nxt and write_seq provides the
correct seqno already. Plus, it SHOULD account packets that are
necessary to trigger fast retransmit [RFC4821].

Location of snd_wnd < probe_size/size_needed check is bogus
because it will cause the other if() match as well (due to
snd_nxt >= snd_una invariant).

Removed dead obvious comment.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agosh: include ax88796 in the defconfig for r7785rp
Magnus Damm [Fri, 23 Nov 2007 05:39:55 +0000 (14:39 +0900)]
sh: include ax88796 in the defconfig for r7785rp

This patch adds the ax88796 device driver to the r7785rp defconfig.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: include ax88796 in the defconfig for r7780mp
Magnus Damm [Fri, 23 Nov 2007 05:39:39 +0000 (14:39 +0900)]
sh: include ax88796 in the defconfig for r7780mp

This patch adds the ax88796 device driver to the r7780mp defconfig.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: fix R2D-1 CF support
Magnus Damm [Fri, 23 Nov 2007 05:39:13 +0000 (14:39 +0900)]
sh: fix R2D-1 CF support

This patch fixes CF support for R2D-1 boards. Both R2D-1 and
R2D-PLUS are equipped with CF IRQs, but the R2D-1 FPGA version
seem to deliver IRQ spikes with certain CF cards during libata
probing.  This patch enables polling for R2D-1 as a workaround
for this broken FGPA logic.

R2D-1 CF support was recently introduced by commit:
43f4b8c7578b928892b6f01d374346ae14e5eb70.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years ago[MAINTAINERS]: tlan list is subscribers-only
Gabriel Craciunescu [Thu, 22 Nov 2007 11:43:36 +0000 (19:43 +0800)]
[MAINTAINERS]: tlan list is subscribers-only

Your mail to 'Tlan-devel' with the subject

    drivers/net/tlan question

Is being held until the list moderator can review it for approval.

The reason it is being held:

    Post by non-member to a members-only list

Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[SUNRPC]: Remove SPIN_LOCK_UNLOCKED
Jiri Slaby [Thu, 22 Nov 2007 11:40:22 +0000 (19:40 +0800)]
[SUNRPC]: Remove SPIN_LOCK_UNLOCKED

SPIN_LOCK_UNLOCKED is deprecated, use DEFINE_SPINLOCK instead

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[SUNRPC]: Make xprtsock.c:xs_setup_{udp,tcp}() static
Adrian Bunk [Thu, 22 Nov 2007 11:38:25 +0000 (19:38 +0800)]
[SUNRPC]: Make xprtsock.c:xs_setup_{udp,tcp}() static

xs_setup_{udp,tcp}() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[PFKEY]: Sending an SADB_GET responds with an SADB_GET
Charles Hardin [Thu, 22 Nov 2007 11:35:15 +0000 (19:35 +0800)]
[PFKEY]: Sending an SADB_GET responds with an SADB_GET

From: Charles Hardin <chardin@2wire.com>

Kernel needs to respond to an SADB_GET with the same message type to
conform to the RFC 2367 Section 3.1.5

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[IRDA]: Compilation for CONFIG_INET=n case
Pavel Emelyanov [Thu, 22 Nov 2007 11:15:56 +0000 (19:15 +0800)]
[IRDA]: Compilation for CONFIG_INET=n case

Found this occasionally.

The CONFIG_INET=n is hardly ever set, but if it is the
irlan_eth_send_gratuitous_arp() compilation should produce a
warning about unused variable in_dev.

Too pedantic? :)

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agoInput: gpio-keys - request and configure GPIOs
Herbert Valerio Riedel [Wed, 21 Nov 2007 19:42:33 +0000 (14:42 -0500)]
Input: gpio-keys - request and configure GPIOs

Currently, gpio_keys.c assumes the GPIOs to be already properly configured;
this patch changes gpio-keys to perform explicit calls to gpio_request() and
gpio_configure_input().

This matches the behaviour of leds-gpio.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoInput: i8042 - add i8042.noloop quirk for MS Virtual Machine
Jiri Kosina [Wed, 21 Nov 2007 19:17:38 +0000 (14:17 -0500)]
Input: i8042 - add i8042.noloop quirk for MS Virtual Machine

When booting under Microsoft Virtual Machine, the noloop quirk is
needed, otherwise PS/2 mouse is not properly detected.

Reported-by: Lawrence Steeger <vendor@russte.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
16 years agoSonypi: use synchronize_irq instead of sycnronize_sched
Dmitry Torokhov [Wed, 21 Nov 2007 19:16:38 +0000 (14:16 -0500)]
Sonypi: use synchronize_irq instead of sycnronize_sched

We know exactly what IRQ we are using, so synchronize_irq()
suits much better. Plus synchronize_sched() will not work
for us in -rt kernels.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Mattia Dongili <malattia@linux.it>
16 years agosonypi: fit input devices into sysfs tree
Dmitry Torokhov [Wed, 21 Nov 2007 19:16:16 +0000 (14:16 -0500)]
sonypi: fit input devices into sysfs tree

Properly set up parent on input devices registered by sonypi.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Mattia Dongili <malattia@linux.it>
16 years agosony-laptop: fit input devices into sysfs tree
Dmitry Torokhov [Wed, 21 Nov 2007 19:15:53 +0000 (14:15 -0500)]
sony-laptop: fit input devices into sysfs tree

Properly set up parent on input devices registered by sony-laptop.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Mattia Dongili <malattia@linux.it>
16 years agommc: Avoid re-using minor numbers before the original device is closed.
David Woodhouse [Wed, 21 Nov 2007 17:45:12 +0000 (18:45 +0100)]
mmc: Avoid re-using minor numbers before the original device is closed.

Move the code which marks the minor number as free to mmc_blk_put() so
that it happens on the final close() (or removal), instead of doing it
at removal even when the device is still logically open.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agotifm_sd: handle non-power-of-2 block sizes
Alex Dubov [Wed, 14 Nov 2007 12:55:36 +0000 (23:55 +1100)]
tifm_sd: handle non-power-of-2 block sizes

It is possible to handle arbitrary block sizes with tifm card reader by
conditionally switching to PIO in case such block has to be delivered. At
the beginning of each request, DMA is either disabled (non-power-of-2 block
size) or set to load time user preference.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agommc_block: check card state after write
Pierre Ossman [Fri, 2 Nov 2007 17:21:13 +0000 (18:21 +0100)]
mmc_block: check card state after write

Some cards have been reported to signal that they're ready prematurely.
Checking both the busy bit and card state solves the issue.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
16 years agoBlackfin arch: fix bug when enable uart1 with uart0 disabled => no initial console
Sonic Zhang [Wed, 21 Nov 2007 09:04:41 +0000 (17:04 +0800)]
Blackfin arch: fix bug when enable uart1 with uart0 disabled => no initial console

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: split apart dump_bfin_regs and merge/remove show_regs from process...
Mike Frysinger [Wed, 21 Nov 2007 08:46:49 +0000 (16:46 +0800)]
Blackfin arch: split apart dump_bfin_regs and merge/remove show_regs from process.c, which was largely duplicated

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: use common __INIT/__FINIT defines rather than setting the .section...
Mike Frysinger [Wed, 21 Nov 2007 08:45:08 +0000 (16:45 +0800)]
Blackfin arch: use common __INIT/__FINIT defines rather than setting the .section ourselves to .init.text

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: fix bug when sending signals with the wrong PC, cause gdb get confused
Robin Getz [Wed, 21 Nov 2007 08:38:05 +0000 (16:38 +0800)]
Blackfin arch: fix bug when sending signals with the wrong PC, cause gdb get confused

We need to send signals with the proper PC, or gdb gets
confused, and lots of tests fail. This should fix that.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: Ensure we printk out strings with the proper loglevel
Robin Getz [Wed, 21 Nov 2007 08:35:57 +0000 (16:35 +0800)]
Blackfin arch: Ensure we printk out strings with the proper loglevel

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: Need to specify ax with the .init.text section,
Bernd Schmidt [Wed, 21 Nov 2007 08:33:47 +0000 (16:33 +0800)]
Blackfin arch: Need to specify ax with the .init.text section,

Need to specify "ax" with the .init.text section, otherwise the linker will
make unique .init.text.1 .. .init.text.3 sections to cope with the flags

16 years agoBlackfin arch: Update Kconfig to latest Blackfin silicon datasheets
Robin Getz [Wed, 21 Nov 2007 08:29:20 +0000 (16:29 +0800)]
Blackfin arch: Update Kconfig to latest Blackfin silicon datasheets

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: update defconfig files
Mike Frysinger [Wed, 21 Nov 2007 08:23:51 +0000 (16:23 +0800)]
Blackfin arch: update defconfig files

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: Fix typo, and add ENDPROC - no functional changes
Mike Frysinger [Wed, 21 Nov 2007 08:15:48 +0000 (16:15 +0800)]
Blackfin arch: Fix typo, and add ENDPROC - no functional changes

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: convert READY to DMA_READY as it causes build errors in common sound...
Mike Frysinger [Wed, 21 Nov 2007 08:17:11 +0000 (16:17 +0800)]
Blackfin arch: convert READY to DMA_READY as it causes build errors in common sound code otherwise

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: add defines for the on-chip L1 ROM of BF54x
Mike Frysinger [Wed, 21 Nov 2007 08:14:03 +0000 (16:14 +0800)]
Blackfin arch: add defines for the on-chip L1 ROM of BF54x

Should not need separate cplb entry though as we cover L1 with a 4 meg page

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: cplb and map header file cleanup
Mike Frysinger [Wed, 21 Nov 2007 08:12:12 +0000 (16:12 +0800)]
Blackfin arch: cplb and map header file cleanup

 - remove duplicated defines for the BF561
 - generalize L2 support (so that it works for BF54x) and mark it executable
 - add support for reading/executing the Boot ROM sections
   (since it has data/functions we may need at runtime)
 - and fixup names for each map

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: cleanup the cplb declares
Mike Frysinger [Wed, 21 Nov 2007 07:55:45 +0000 (15:55 +0800)]
Blackfin arch: cleanup the cplb declares

 - no need to declare their sizes in the common header
 - no need to tack on the section attribute as only the definition matters, not references

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: fix broken on BF52x, remove silly checks on processors for L1_SCRATCH...
Mike Frysinger [Wed, 21 Nov 2007 07:57:53 +0000 (15:57 +0800)]
Blackfin arch: fix broken on BF52x, remove silly checks on processors for L1_SCRATCH defines

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: add support for working around anomaly 05000312
Mike Frysinger [Wed, 21 Nov 2007 08:08:58 +0000 (16:08 +0800)]
Blackfin arch: add support for working around anomaly 05000312

Anomaly 05000312 - Errors When SSYNC, CSYNC, or Loads to LT, LB and LC Registers Are Interrupted:

DESCRIPTION:
When instruction cache is enabled, erroneous behavior may occur when any of the following instructions are interrupted:

. CSYNC
• SSYNC
• LCx =
• LTx = (only when LCx is non-zero)
• LBx = (only when LCx is non-zero)

When this problem occurs, a variety of incorrect things could happen, including an illegal instruction exception. Additional errors could
show up as an exception, a hardware error, or an instruction that is valid but different than the one that was expected.

WORKAROUND:
Place a cli before all SSYNC, CSYNC, "LCx =", "LTx =", and "LBx =" instructions to disable interrupts, and place an sti after each of these
instructions to re-enable interrupts. When these instructions are executed in code that is already non-interruptible, the problem will not
occur.

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: cleanup BF54x header file and add BF547 definition
Mike Frysinger [Wed, 21 Nov 2007 08:04:49 +0000 (16:04 +0800)]
Blackfin arch: cleanup BF54x header file and add BF547 definition

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: fix building for BF542 processors which only have 1 TWI
Mike Frysinger [Wed, 21 Nov 2007 08:03:07 +0000 (16:03 +0800)]
Blackfin arch: fix building for BF542 processors which only have 1 TWI

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: rename _return_from_exception to _bfin_return_from_exception and export it
Mike Frysinger [Wed, 21 Nov 2007 07:53:49 +0000 (15:53 +0800)]
Blackfin arch: rename _return_from_exception to _bfin_return_from_exception and export it

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: move EXPORT_SYMBOL() to C files where the symbol is actually defined
Mike Frysinger [Wed, 21 Nov 2007 07:34:51 +0000 (15:34 +0800)]
Blackfin arch: move EXPORT_SYMBOL() to C files where the symbol is actually defined

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: fix bug NOR Flash MTD mount fail
Sonic Zhang [Wed, 21 Nov 2007 15:49:52 +0000 (23:49 +0800)]
Blackfin arch: fix bug NOR Flash MTD mount fail

Config EBIU flash mode properly. EBIU_MODE EBIU_FCTL
EBIU_MBSCTL register should be configurd to Flash
mode.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years agoBlackfin arch: export symbol get_dma_curr_desc_ptr for driver usage
Cliff Cai [Wed, 21 Nov 2007 07:22:58 +0000 (15:22 +0800)]
Blackfin arch: export symbol get_dma_curr_desc_ptr for driver usage

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
16 years ago[IPVS]: Fix compiler warning about unused register_ip_vs_protocol
Pavel Emelyanov [Wed, 21 Nov 2007 01:44:01 +0000 (17:44 -0800)]
[IPVS]: Fix compiler warning about unused register_ip_vs_protocol

This is silly, but I have turned the CONFIG_IP_VS to m,
to check the compilation of one (recently sent) fix
and set all the CONFIG_IP_VS_PROTO_XXX options to n to
speed up the compilation.

In this configuration the compiler warns me about

  CC [M]  net/ipv4/ipvs/ip_vs_proto.o
net/ipv4/ipvs/ip_vs_proto.c:49: warning: 'register_ip_vs_protocol' defined but not used

Indeed. With no protocols selected there are no
calls to this function - all are compiled out with
ifdefs.

Maybe the best fix would be to surround this call with
ifdef-s or tune the Kconfig dependences, but I think that
marking this register function as __used is enough. No?

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ARP]: Fix arp reply when sender ip 0
Jonas Danielsson [Wed, 21 Nov 2007 01:38:16 +0000 (17:38 -0800)]
[ARP]: Fix arp reply when sender ip 0

Fix arp reply when received arp probe with sender ip 0.

Send arp reply with target ip address 0.0.0.0 and target hardware
address set to hardware address of requester. Previously sent reply
with target ip address and target hardware address set to same as
source fields.

Signed-off-by: Jonas Danielsson <the.sator@gmail.com>
Acked-by: Alexey Kuznetov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6] TCPMD5: Fix deleting key operation.
YOSHIFUJI Hideaki [Wed, 21 Nov 2007 01:31:23 +0000 (17:31 -0800)]
[IPV6] TCPMD5: Fix deleting key operation.

Due to the bug, refcnt for md5sig pool was leaked when
an user try to delete a key if we have more than one key.
In addition to the leakage, we returned incorrect return
result value for userspace.

This fix should close Bug #9418, reported by <ming-baini@163.com>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6] TCPMD5: Check return value of tcp_alloc_md5sig_pool().
YOSHIFUJI Hideaki [Wed, 21 Nov 2007 01:30:56 +0000 (17:30 -0800)]
[IPV6] TCPMD5: Check return value of tcp_alloc_md5sig_pool().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4] TCPMD5: Use memmove() instead of memcpy() because we have overlaps.
YOSHIFUJI Hideaki [Wed, 21 Nov 2007 01:30:31 +0000 (17:30 -0800)]
[IPV4] TCPMD5: Use memmove() instead of memcpy() because we have overlaps.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4] TCPMD5: Omit redundant NULL check for kfree() argument.
YOSHIFUJI Hideaki [Wed, 21 Nov 2007 01:30:06 +0000 (17:30 -0800)]
[IPV4] TCPMD5: Omit redundant NULL check for kfree() argument.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'fixes-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Wed, 21 Nov 2007 01:24:29 +0000 (17:24 -0800)]
Merge branch 'fixes-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

16 years agoPull bugzilla-9327 into release branch
Len Brown [Wed, 21 Nov 2007 01:07:49 +0000 (20:07 -0500)]
Pull bugzilla-9327 into release branch

Conflicts:

drivers/acpi/ec.c

Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: EC: Workaround for optimized controllers (version 3)
Alexey Starikovskiy [Wed, 21 Nov 2007 00:23:32 +0000 (03:23 +0300)]
ACPI: EC: Workaround for optimized controllers (version 3)

Some controllers fail to send confirmation GPE after address or data write.
Detect this and don't expect such confirmation in future.
This is a generalization of previous workaround
(66c5f4e7367b0085652931b2f3366de29e7ff5ec), which did only read address.

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

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Romano Giannetti <romano.giannetti@gmail.com>
Tested-by: Mats Johannesson
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: EC: use printk_ratelimit(), add some DEBUG mode messages
Márton Németh [Wed, 21 Nov 2007 00:23:26 +0000 (03:23 +0300)]
ACPI: EC: use printk_ratelimit(), add some DEBUG mode messages

Sometimes it is usefull to see raw protocol dump.
Uncomment '#define DEBUG' at the beginning of file to make EC
really verbose.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoRevert "ACPI: EC: Workaround for optimized controllers"
Len Brown [Wed, 21 Nov 2007 00:59:08 +0000 (19:59 -0500)]
Revert "ACPI: EC: Workaround for optimized controllers"

This reverts commit f2d68935ba08cf80f151bbdb5628381184e4a498.

16 years ago[CIFS] Fix potential data corruption when writing out cached dirty pages
Jeff Layton [Tue, 20 Nov 2007 23:19:03 +0000 (23:19 +0000)]
[CIFS] Fix potential data corruption when writing out cached dirty pages

Fix RedHat bug 329431

The idea here is separate "conscious" from "unconscious" flushes.
Conscious flushes are those due to a fsync() or close(). Unconscious
ones are flushes that occur as a side effect of some other operation or
due to memory pressure.

Currently, when an error occurs during an unconscious flush (ENOSPC or
EIO), we toss out the page and don't preserve that error to report to
the user when a conscious flush occurs. If after the unconscious flush,
there are no more dirty pages for the inode, the conscious flush will
simply return success even though there were previous errors when writing
out pages. This can lead to data corruption.

The easiest way to reproduce this is to mount up a CIFS share that's
very close to being full or where the user is very close to quota. mv
a file to the share that's slightly larger than the quota allows. The
writes will all succeed (since they go to pagecache). The mv will do a
setattr to set the new file's attributes. This calls
filemap_write_and_wait,
which will return an error since all of the pages can't be written out.
Then later, when the flush and release ops occur, there are no more
dirty pages in pagecache for the file and those operations return 0. mv
then assumes that the file was written out correctly and deletes the
original.

CIFS already has a write_behind_rc variable where it stores the results
from earlier flushes, but that value is only reported in cifs_close.
Since the VFS ignores the return value from the release operation, this
isn't helpful. We should be reporting this error during the flush
operation.

This patch does the following:

1) changes cifs_fsync to use filemap_write_and_wait and cifs_flush and also
sync to check its return code. If it returns successful, they then check
the value of write_behind_rc to see if an earlier flush had reported any
errors. If so, they return that error and clear write_behind_rc.

2) sets write_behind_rc in a few other places where pages are written
out as a side effect of other operations and the code waits on them.

3) changes cifs_setattr to only call filemap_write_and_wait for
ATTR_SIZE changes.

4) makes cifs_writepages accurately distinguish between EIO and ENOSPC
errors when writing out pages.

Some simple testing indicates that the patch works as expected and that
it fixes the reproduceable known problem.

Acked-by: Dave Kleikamp <shaggy@austin.rr.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
16 years agoieee80211: Stop net_ratelimit/IEEE80211_DEBUG_DROP log pollution
Guillaume Chazarain [Mon, 19 Nov 2007 09:07:00 +0000 (10:07 +0100)]
ieee80211: Stop net_ratelimit/IEEE80211_DEBUG_DROP log pollution

if (net_ratelimit())
IEEE80211_DEBUG_DROP(...)

can pollute the logs with messages like:

printk: 1 messages suppressed.
printk: 2 messages suppressed.
printk: 7 messages suppressed.

if debugging information is disabled. These messages are printed by
net_ratelimit(). Add a wrapper to net_ratelimit() that takes into account
the log level, so that net_ratelimit() is called only when we really want
to print something.

Signed-off-by: Guillaume Chazarain <guichaz@yahoo.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add missing space in error message
Bruno Randolf [Fri, 16 Nov 2007 08:04:01 +0000 (17:04 +0900)]
mac80211: add missing space in error message

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[POWERPC] 83xx: Update mpc8349emitx(gp) defconfig for USB
Grant Likely [Wed, 17 Oct 2007 23:41:00 +0000 (17:41 -0600)]
[POWERPC] 83xx: Update mpc8349emitx(gp) defconfig for USB

USB support for the 8349itx got added a while back; but the defconfig
never got updated.  This patch adds the appropriate USB config options
to the defconfigs

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
CC: Scott Wood <scottwood@freescale.com>
CC: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: Update mpc832x_rdb_defconfig to enable MMC-over-SPI
Anton Vorontsov [Tue, 13 Nov 2007 17:00:43 +0000 (20:00 +0300)]
[POWERPC] 83xx: Update mpc832x_rdb_defconfig to enable MMC-over-SPI

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 83xx: MPC832x RDB - remove spidev stub, use mmc_spi
Anton Vorontsov [Tue, 13 Nov 2007 17:00:11 +0000 (20:00 +0300)]
[POWERPC] 83xx: MPC832x RDB - remove spidev stub, use mmc_spi

mmc_spi has hit the mainline, so we can start using it.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] 8xxx: MDS board RTC fixes
Kim Phillips [Thu, 8 Nov 2007 19:37:06 +0000 (13:37 -0600)]
[POWERPC] 8xxx: MDS board RTC fixes

Now the rtc class ds1374 driver has been added, remove the old rtc
driver hookup code, add rtc node to device trees, and turn on the
new driver in the defconfigs.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agomac80211: fix allmulti/promisc behaviour
Johannes Berg [Fri, 16 Nov 2007 01:54:53 +0000 (02:54 +0100)]
mac80211: fix allmulti/promisc behaviour

When an interface with promisc/allmulti bit is taken down,
the mac80211 state can become confused. This fixes it by
making mac80211 keep track of all *active* interfaces that
have the promisc/allmulti bit set in the sdata, we sync
the interface bit into sdata at set_multicast_list() time
so this works.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>