]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
16 years agolockdep: fix debug_show_all_locks()
Ingo Molnar [Wed, 5 Dec 2007 14:46:09 +0000 (15:46 +0100)]
lockdep: fix debug_show_all_locks()

fix the oops that can be seen in:

   http://bugzilla.kernel.org/attachment.cgi?id=13828&action=view

it is not safe to print the locks of running tasks.

(even with this fix we have a small race - but this is a debug
 function after all.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
16 years agosched: style cleanups
Ingo Molnar [Wed, 5 Dec 2007 14:46:09 +0000 (15:46 +0100)]
sched: style cleanups

style cleanup of various changes that were done recently.

no code changed:

      text    data     bss     dec     hex filename
     23680    2542      28   26250    668a sched.o.before
     23680    2542      28   26250    668a sched.o.after

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agofutex: fix for futex_wait signal stack corruption
Steven Rostedt [Wed, 5 Dec 2007 14:46:09 +0000 (15:46 +0100)]
futex: fix for futex_wait signal stack corruption

David Holmes found a bug in the -rt tree with respect to
pthread_cond_timedwait. After trying his test program on the latest git
from mainline, I found the bug was there too.  The bug he was seeing
that his test program showed, was that if one were to do a "Ctrl-Z" on a
process that was in the pthread_cond_timedwait, and then did a "bg" on
that process, it would return with a "-ETIMEDOUT" but early. That is,
the timer would go off early.

Looking into this, I found the source of the problem. And it is a rather
nasty bug at that.

Here's the relevant code from kernel/futex.c: (not in order in the file)

[...]
smlinkage long sys_futex(u32 __user *uaddr, int op, u32 val,
                          struct timespec __user *utime, u32 __user *uaddr2,
                          u32 val3)
{
        struct timespec ts;
        ktime_t t, *tp = NULL;
        u32 val2 = 0;
        int cmd = op & FUTEX_CMD_MASK;

        if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI)) {
                if (copy_from_user(&ts, utime, sizeof(ts)) != 0)
                        return -EFAULT;
                if (!timespec_valid(&ts))
                        return -EINVAL;

                t = timespec_to_ktime(ts);
                if (cmd == FUTEX_WAIT)
                        t = ktime_add(ktime_get(), t);
                tp = &t;
        }
[...]
        return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);
}

[...]

long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
                u32 __user *uaddr2, u32 val2, u32 val3)
{
        int ret;
        int cmd = op & FUTEX_CMD_MASK;
        struct rw_semaphore *fshared = NULL;

        if (!(op & FUTEX_PRIVATE_FLAG))
                fshared = &current->mm->mmap_sem;

        switch (cmd) {
        case FUTEX_WAIT:
                ret = futex_wait(uaddr, fshared, val, timeout);

[...]

static int futex_wait(u32 __user *uaddr, struct rw_semaphore *fshared,
                      u32 val, ktime_t *abs_time)
{
[...]
               struct restart_block *restart;
                restart = &current_thread_info()->restart_block;
                restart->fn = futex_wait_restart;
                restart->arg0 = (unsigned long)uaddr;
                restart->arg1 = (unsigned long)val;
                restart->arg2 = (unsigned long)abs_time;
                restart->arg3 = 0;
                if (fshared)
                        restart->arg3 |= ARG3_SHARED;
                return -ERESTART_RESTARTBLOCK;
[...]

static long futex_wait_restart(struct restart_block *restart)
{
        u32 __user *uaddr = (u32 __user *)restart->arg0;
        u32 val = (u32)restart->arg1;
        ktime_t *abs_time = (ktime_t *)restart->arg2;
        struct rw_semaphore *fshared = NULL;

        restart->fn = do_no_restart_syscall;
        if (restart->arg3 & ARG3_SHARED)
                fshared = &current->mm->mmap_sem;
        return (long)futex_wait(uaddr, fshared, val, abs_time);
}

So when the futex_wait is interrupt by a signal we break out of the
hrtimer code and set up or return from signal. This code does not return
back to userspace, so we set up a RESTARTBLOCK.  The bug here is that we
save the "abs_time" which is a pointer to the stack variable "ktime_t t"
from sys_futex.

This returns and unwinds the stack before we get to call our signal. On
return from the signal we go to futex_wait_restart, where we update all
the parameters for futex_wait and call it. But here we have a problem
where abs_time is no longer valid.

I verified this with print statements, and sure enough, what abs_time
was set to ends up being garbage when we get to futex_wait_restart.

The solution I did to solve this (with input from Linus Torvalds)
was to add unions to the restart_block to allow system calls to
use the restart with specific parameters.  This way the futex code now
saves the time in a 64bit value in the restart block instead of storing
it on the stack.

Note: I'm a bit nervious to add "linux/types.h" and use u32 and u64
in thread_info.h, when there's a #ifdef __KERNEL__ just below that.
Not sure what that is there for.  If this turns out to be a problem, I've
tested this with using "unsigned int" for u32 and "unsigned long long" for
u64 and it worked just the same. I'm using u32 and u64 just to be
consistent with what the futex code uses.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 4 Dec 2007 20:21:11 +0000 (12:21 -0800)]
Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  PHY: Add the phy_device_release device method.
  gianfar: fix compile warning
  pasemi_mac: Fix reuse of free'd skb
  SMC911X: Fix using of dereferenced skb after netif_rx
  sky2: recovery deadlock fix
  Fix memory corruption in fec_mpc52xx
  Don't claim to do IPv6 checksum offload
  cxgb - revert file mode changes.

16 years agoPHY: Add the phy_device_release device method.
Anton Vorontsov [Tue, 4 Dec 2007 13:17:33 +0000 (16:17 +0300)]
PHY: Add the phy_device_release device method.

Lately I've got this nice badness on mdio bus removal:

Device 'e0103120:06' does not have a release() function, it is broken and must be fixed.
------------[ cut here ]------------
Badness at drivers/base/core.c:107
NIP: c015c1a8 LR: c015c1a8 CTR: c0157488
REGS: c34bdcf0 TRAP: 0700   Not tainted  (2.6.23-rc5-g9ebadfbb-dirty)
MSR: 00029032 <EE,ME,IR,DR>  CR: 24088422  XER: 00000000
...
[c34bdda0] [c015c1a8] device_release+0x78/0x80 (unreliable)
[c34bddb0] [c01354cc] kobject_cleanup+0x80/0xbc
[c34bddd0] [c01365f0] kref_put+0x54/0x6c
[c34bdde0] [c013543c] kobject_put+0x24/0x34
[c34bddf0] [c015c384] put_device+0x1c/0x2c
[c34bde00] [c0180e84] mdiobus_unregister+0x2c/0x58
...

Though actually there is nothing broken, it just device
subsystem core expects another "pattern" of resource managment.

This patch implement phy device's release function, thus
we're getting rid of this badness.

Also small hidden bug fixed, hope none other introduced. ;-)

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agogianfar: fix compile warning
Grant Likely [Sun, 2 Dec 2007 05:10:03 +0000 (22:10 -0700)]
gianfar: fix compile warning

Eliminate an uninitialized variable warning.  The code is correct, but
a pointer to the automatic variable 'addr' is passed to dma_alloc_coherent.
Since addr has never been initialized, and the compiler doesn't know
what dma_alloc_coherent will do with it, it complains.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopasemi_mac: Fix reuse of free'd skb
Olof Johansson [Tue, 4 Dec 2007 03:34:14 +0000 (21:34 -0600)]
pasemi_mac: Fix reuse of free'd skb

Turns out we're freeing the skb when we detect CRC error, but we're
not clearing out info->skb. We could either clear it and have the stack
reallocate it, or just leave it and the rx ring refill code will reuse
the one that was allocated.

Reusing a freed skb obviously caused some nasty crashes of various kind,
as reported by Brent Baude and David Woodhouse.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoSMC911X: Fix using of dereferenced skb after netif_rx
Wang Chen [Tue, 4 Dec 2007 02:01:37 +0000 (10:01 +0800)]
SMC911X: Fix using of dereferenced skb after netif_rx

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: recovery deadlock fix
Stephen Hemminger [Tue, 4 Dec 2007 01:02:17 +0000 (17:02 -0800)]
sky2: recovery deadlock fix

Prevent deadlock in sky2 recovery logic. sky2_down calls napi_synchronize
which gets stuck if napi was already disabled.

Fix by rearranging slightly and not calling napi_disable until after
both ports are stopped. The napi_disable probably is being overly
paranoid, but it is safe now.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoFix memory corruption in fec_mpc52xx
Jon Smirl [Mon, 3 Dec 2007 22:38:10 +0000 (22:38 +0000)]
Fix memory corruption in fec_mpc52xx

The mpc5200 fec driver is corrupting memory. This patch fixes two bugs
where the wrong skb was being referenced.

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoDon't claim to do IPv6 checksum offload
David Woodhouse [Mon, 3 Dec 2007 04:34:32 +0000 (04:34 +0000)]
Don't claim to do IPv6 checksum offload

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb - revert file mode changes.
Divy Le Ray [Sat, 1 Dec 2007 23:57:17 +0000 (15:57 -0800)]
cxgb - revert file mode changes.

revert inavertant file mode changes

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agopata_amd/pata_via: de-couple programming of PIO/MWDMA and UDMA timings
Bartlomiej Zolnierkiewicz [Sun, 2 Dec 2007 02:47:01 +0000 (03:47 +0100)]
pata_amd/pata_via: de-couple programming of PIO/MWDMA and UDMA timings

* Don't program UDMA timings when programming PIO or MWDMA modes.

  This has also a nice side-effect of fixing regression added by commit
  681c80b5d96076f447e8101ac4325c82d8dce508 ("libata: correct handling of
  SRST reset sequences") (->set_piomode method for PIO0 is called before
  ->cable_detect method which checks UDMA timings to get the cable type).

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tested-by: "Thomas Lindroth" <thomas.lindroth@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoahci: add the Device IDs of MCP79 AHCI controller to ahci.c
peerchen [Mon, 3 Dec 2007 14:20:37 +0000 (22:20 +0800)]
ahci: add the Device IDs of MCP79 AHCI controller to ahci.c

Add the device IDs of legacy mode of MCP79 AHCI controller to ahci.c

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosata_mv: Warn about HPT RocketRAID BIOS treatment of "Legacy" drives
Mark Lord [Tue, 4 Dec 2007 19:07:52 +0000 (14:07 -0500)]
sata_mv:  Warn about HPT RocketRAID BIOS treatment of "Legacy" drives

The Highpoint RocketRAID boards using Marvell 7042 chips
overwrite the 9th sector of attached drives at boot time,
when those drives are configured as "Legacy" (the default)
in the HighPoint BIOS.

This kills GRUB, and probably other stuff.
But it all happens *before* Linux is even loaded.

So, for now we'll log a WARNING when such boards are detected,
and advise users to configure BIOS "JBOD" volumes instead,
which don't appear to suffer from this problem.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_nv: don't use legacy DMA in ADMA mode (v3)
Robert Hancock [Sun, 25 Nov 2007 22:59:36 +0000 (16:59 -0600)]
sata_nv: don't use legacy DMA in ADMA mode (v3)

We need to run any DMA command with result taskfile requested in ADMA mode
when the port is in ADMA mode, otherwise it may try to use the legacy DMA engine
in ADMA mode which is not allowed. Enforce this with BUG_ON() since data
corruption could potentially result if this happened. Also, fail any attempt to
try and issue NCQ commands with result taskfile requested, since the hardware
doesn't allow this.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 4 Dec 2007 17:37:39 +0000 (09:37 -0800)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] Make sure the restore psw masks are initialized.
  [S390] Fix compile error on 31bit without preemption
  [S390] dcssblk: prevent early access without own make_request function
  [S390] cio: add missing reprobe loop end statement
  [S390] cio: Issue SenseID per path.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Linus Torvalds [Tue, 4 Dec 2007 17:28:45 +0000 (09:28 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: arch_register_cpu() section fix
  x86: free_cache_attributes() section fix
  x86: add the word 'WARNING' in check_nmi_watchdog() output
  x86: revert CONFIG_X86_HT semantics change

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Tue, 4 Dec 2007 17:28:23 +0000 (09:28 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: default to more agressive yield for SCHED_BATCH tasks
  sched: fix crash in sys_sched_rr_get_interval()

16 years agoMAINTAINERS: remove the MTRR entry
Adrian Bunk [Tue, 4 Dec 2007 13:35:00 +0000 (14:35 +0100)]
MAINTAINERS: remove the MTRR entry

I haven't seen Richard doing MTRR related work for quite some time, and
the "X86 ARCHITECTURE" entry in MAINTAINERS already covers the people
currently responsible for this code.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/s390/net/ctcmain.c: fix build bug
Ingo Molnar [Tue, 4 Dec 2007 10:32:38 +0000 (11:32 +0100)]
drivers/s390/net/ctcmain.c: fix build bug

SET_MODULE_OWNER() is obsolete.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: arch_register_cpu() section fix
Andrew Morton [Tue, 4 Dec 2007 16:19:07 +0000 (17:19 +0100)]
x86: arch_register_cpu() section fix

fix this on i386 allnoconfig:

 WARNING: vmlinux.o(.text+0x6f2e): Section mismatch: reference to .init.text:register_cpu (between 'arch_register_cpu' and 'text_poke')

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: free_cache_attributes() section fix
Adrian Bunk [Tue, 4 Dec 2007 16:19:07 +0000 (17:19 +0100)]
x86: free_cache_attributes() section fix

free_cache_attributes() must be __cpuinit since it calls the
__cpuinit cache_remove_shared_cpu_map().

This patch fixes the following section mismatch reported by
Chris Clayton:

 ...
 WARNING: vmlinux.o(.text+0x90b6): Section mismatch: reference to .init.text:cache_remove_shared_cpu_map (between 'free_cache_attributes' and 'show_level')
 ...

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: add the word 'WARNING' in check_nmi_watchdog() output
Don Zickus [Tue, 4 Dec 2007 16:19:07 +0000 (17:19 +0100)]
x86: add the word 'WARNING' in check_nmi_watchdog() output

Our automated test suite looks for keywords like error, fail, warning in
the boot log.  In the case when the nmi watchdog is determined to be
stuck in check_nmi_watchdog(), none of those keywords are displayed.

This patch adds a keyword, "WARNING:", so it makes it easier to notice
when the nmi watchdog isn't working correctly. Also add a proper
KERN_WARNING mark to this printout.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: revert CONFIG_X86_HT semantics change
Adrian Bunk [Tue, 4 Dec 2007 16:19:07 +0000 (17:19 +0100)]
x86: revert CONFIG_X86_HT semantics change

The recent Kconfig changes in x86 resulted in CONFIG_X86_HT no longer
being set if (X86_32 && MK8).

After grep'ing through the tree I think the problem is that different
places have different assumptions about the semantics of CONFIG_X86_HT,
either:

- hyperthreading or
- multicore

This should be sorted out properly, but until then we should keep the
2.6.23 status quo.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agosched: default to more agressive yield for SCHED_BATCH tasks
Ingo Molnar [Tue, 4 Dec 2007 16:04:39 +0000 (17:04 +0100)]
sched: default to more agressive yield for SCHED_BATCH tasks

do more agressive yield for SCHED_BATCH tuned tasks: they are all
about throughput anyway. This allows a gentler migration path for
any apps that relied on stronger yield.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agosched: fix crash in sys_sched_rr_get_interval()
Ingo Molnar [Tue, 4 Dec 2007 16:04:39 +0000 (17:04 +0100)]
sched: fix crash in sys_sched_rr_get_interval()

Luiz Fernando N. Capitulino reported that sched_rr_get_interval()
crashes for SCHED_OTHER tasks that are on an idle runqueue.

The fix is to return a 0 timeslice for tasks that are on an idle
runqueue. (and which are not running, obviously)

this also shrinks the code a bit:

   text    data     bss     dec     hex filename
  47903    3934     336   52173    cbcd sched.o.before
  47885    3934     336   52155    cbbb sched.o.after

Reported-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years ago[S390] Make sure the restore psw masks are initialized.
Heiko Carstens [Tue, 4 Dec 2007 15:09:05 +0000 (16:09 +0100)]
[S390] Make sure the restore psw masks are initialized.

In case of TRACE_IRQFLAGS the restore psw masks will not be
initialized if noexec is turned on. This will lead to an
immediate system crash.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] Fix compile error on 31bit without preemption
Christian Borntraeger [Tue, 4 Dec 2007 15:09:04 +0000 (16:09 +0100)]
[S390] Fix compile error on 31bit without preemption

Commit b8e7a54cd06b0b0174029ef3a7f5a1415a2c28f2 introduced a compile
error if CONFIG_PREEMPT is not set:

arch/s390/kernel/built-in.o: In function `cleanup_io_leave_insn':
/space/kvm/arch/s390/kernel/entry.S:(.text+0xbfce): undefined reference to `preempt_schedule_irq'

This patch hides preempt_schedule_irq if CONFIG_PREEMPT is not set.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] dcssblk: prevent early access without own make_request function
Christian Borntraeger [Tue, 4 Dec 2007 15:09:03 +0000 (16:09 +0100)]
[S390] dcssblk: prevent early access without own make_request function

When loading a dcss segment with the dcssblk driver, sometimes the
following kind of message appears:

bio too big device dcssblk0 (8 > 0)
Buffer I/O error on device dcssblk0, logical block 172016
..

The fix is to move the disk registration after setting the
make_request function, to avoid calls into generic_make_request
for dcssblock without having the make_request function set up
properly.

Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] cio: add missing reprobe loop end statement
Peter Oberparleiter [Tue, 4 Dec 2007 15:09:02 +0000 (16:09 +0100)]
[S390] cio: add missing reprobe loop end statement

Add loop end statement to prevent looping over empty subchannel sets.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years ago[S390] cio: Issue SenseID per path.
Cornelia Huck [Tue, 4 Dec 2007 15:09:01 +0000 (16:09 +0100)]
[S390] cio: Issue SenseID per path.

We may receive a unit check for every path when we issue a SenseID.
Unfortunately, the channel subsystem will try on a different path
every time if we use a lpm of 0xff, which will exhaust our retry
counter.

Therefore, revert SenseID to its previous per-path behaviour and
just leave out the suspend multipath reconnect.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years agoLinux 2.6.24-rc4 v2.6.24-rc4
Linus Torvalds [Tue, 4 Dec 2007 04:26:10 +0000 (20:26 -0800)]
Linux 2.6.24-rc4

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.24
Linus Torvalds [Mon, 3 Dec 2007 23:46:37 +0000 (15:46 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.24

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.24:
  sh: Support PCI IO access of SH7780 base boards.
  sh: Fix PCI IO space base address of SH7780.

16 years ago[MIPS] BCM1480: Fix interrupt routing.
Ralf Baechle [Sun, 2 Dec 2007 12:09:11 +0000 (12:09 +0000)]
[MIPS] BCM1480: Fix interrupt routing.

The old code did did only work as long as CFE and the kernel were using
the same interrupt numbering ...

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
Linus Torvalds [Mon, 3 Dec 2007 16:45:15 +0000 (08:45 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86

* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: fix x86-32 early fixmap initialization.
  x86: disable hpet legacy replacement for kdump
  x86: disable hpet on shutdown

16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Mon, 3 Dec 2007 16:23:58 +0000 (08:23 -0800)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Remove xmon from ml300 and ml403 defconfig in arch/ppc
  Revert "[POWERPC] Fix RTAS os-term usage on kernel panic"

16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
Linus Torvalds [Mon, 3 Dec 2007 16:23:32 +0000 (08:23 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
  ACPICA: fix acpi-cpufreq boot crash due to _PSD return-by-reference
  ACPI: Delete the IRQ operation in throttling controll via PTC

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Mon, 3 Dec 2007 16:21:06 +0000 (08:21 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  sched: cpu accounting controller (V2)

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Mon, 3 Dec 2007 16:20:11 +0000 (08:20 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] NCR5380: Fix bugs and canonicalize irq handler usage
  [SCSI] zfcp: fix cleanup of dismissed error recovery actions
  [SCSI] zfcp: fix dismissal of error recovery actions
  [SCSI] qla1280: convert to use the data buffer accessors
  [SCSI] iscsi: return data transfer residual for data-out commands
  [SCSI] iscsi_tcp: fix potential lockup with write commands
  [SCSI] aacraid: fix security weakness
  [SCSI] aacraid: fix up le32 issues in BlinkLED
  [SCSI] aacraid: fix potential panic in thread stop
  [SCSI] aacraid: don't assign cpu_to_le32(constant) to u8

16 years agox86: fix x86-32 early fixmap initialization.
Eric W. Biederman [Sun, 2 Dec 2007 01:34:06 +0000 (18:34 -0700)]
x86: fix x86-32 early fixmap initialization.

pageexec@freemail.hu writes:

> i've just noticed that the chunk in i386/kernel/head.S ended up in a
> weird place, namely, it's not going to be executed as it's just after
> a 'jmp 3f' and before startup_32_smp, probably not what you intended.
> on a sidenote, the whole thing can be done in a single insn, like:
>
> movl $(swapper_pg_pmd - __PAGE_OFFSET + 0x067), (swapper_pg_dir -
> __PAGE_OFFSET+ 4092)

Thanks for the reminder I thought we had fixed this problem a while ago.

Needed to get fixed virtual address for USB debug and earlycon with mmio.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: disable hpet legacy replacement for kdump
OGAWA Hirofumi [Mon, 3 Dec 2007 16:17:10 +0000 (17:17 +0100)]
x86: disable hpet legacy replacement for kdump

we should also add hpet_disable() for kdump.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: disable hpet on shutdown
OGAWA Hirofumi [Mon, 3 Dec 2007 16:17:10 +0000 (17:17 +0100)]
x86: disable hpet on shutdown

If HPET was enabled by pci quirks, we use i8253 as initial clockevent
because pci quirks doesn't run until pci is initialized.

The above means the kernel (or something) is assuming HPET legacy
replacement is disabled and can use i8253 at boot.

If we used kexec, it isn't true. So, this patch disables HPET legacy
replacement for kexec in machine_shutdown().

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/net-2.6
Linus Torvalds [Mon, 3 Dec 2007 16:15:36 +0000 (08:15 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/net-2.6: (27 commits)
  [INET]: Fix inet_diag dead-lock regression
  [NETNS]: Fix /proc/net breakage
  [TEXTSEARCH]: Do not allow zero length patterns in the textsearch infrastructure
  [NETFILTER]: fix forgotten module release in xt_CONNMARK and xt_CONNSECMARK
  [NETFILTER]: xt_TCPMSS: remove network triggerable WARN_ON
  [DECNET]: dn_nl_deladdr() almost always returns no error
  [IPV6]: Restore IPv6 when MTU is big enough
  [RXRPC]: Add missing select on CRYPTO
  mac80211: rate limit wep decrypt failed messages
  rfkill: fix double-mutex-locking
  mac80211: drop unencrypted frames if encryption is expected
  mac80211: Fix behavior of ieee80211_open and ieee80211_close
  ieee80211: fix unaligned access in ieee80211_copy_snap
  mac80211: free ifsta->extra_ie and clear IEEE80211_STA_PRIVACY_INVOKED
  SCTP: Fix build issues with SCTP AUTH.
  SCTP: Fix chunk acceptance when no authenticated chunks were listed.
  SCTP: Fix the supported extensions paramter
  SCTP: Fix SCTP-AUTH to correctly add HMACS paramter.
  SCTP: Fix the number of HB transmissions.
  [TCP] illinois: Incorrect beta usage
  ...

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Mon, 3 Dec 2007 16:15:08 +0000 (08:15 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (48 commits)
  LIB82596: correct data types for hardware addresses
  via-velocity: don't oops on MTU change (resend)
  Stop phy code from returning success to unknown ioctls.
  SET_NETDEV_DEV() in fec_mpc52xx.c
  net: smc911x: only enable for mpr2 on sh.
  e1000: Fix NAPI state bug when Rx complete
  sky2: turn of dynamic Tx watermark workaround (FE+ only)
  sky2: don't use AER routines
  sky2: revert to access PCI config via device space
  cxgb - fix stats
  cxgb - fix NAPI
  cxgb - fix T2 GSO
  ucc_geth: handle passing of RX-only and TX-only internal delay PHY connection type parameters
  phylib: marvell: add support for TX-only and RX-only Internal Delay
  phylib: add PHY interface modes for internal delay for tx and rx only
  skge: MTU changing fix
  skge: serial mode register values
  skge version 1.13
  skge: increase TX threshold for Jumbo
  skge: fiber link up/down fix
  ...

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Mon, 3 Dec 2007 16:14:45 +0000 (08:14 -0800)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_mv: Fix broken Marvell 7042 support.
  libata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port (errno=-19))
  ata_piix: add more toshiba laptops to broken suspend list
  libata: More IVB horkage from TSST
  libata: report protocol and full CDB on error
  Several fixes for the AVR32 PATA driver
  sata_mv: fix compilation error when enabling DEBUG
  Set proper ATA UDMA mode for bf548 according to system clock.

16 years agoUpdate Kdump Maintainer's details
Vivek Goyal [Sat, 1 Dec 2007 20:16:30 +0000 (12:16 -0800)]
Update Kdump Maintainer's details

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: work around host tcsetattr bug
Jeff Dike [Sat, 1 Dec 2007 20:16:30 +0000 (12:16 -0800)]
uml: work around host tcsetattr bug

Under the conditions that UML uses it, tcgetattr is guaranteed to return
-EINTR when the console is attached to /dev/ptmx, making generic_console_write
hang because it loops, calling tcgetattr until it succeeds.  This is a host
bug - see http://marc.info/?l=linux-kernel&m=119618990807182&w=2 for the
details.

This patch works around it by blocking SIGIO while the terminal attributes are
being fiddled.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: after_sleep_interval should return something
Jeff Dike [Sat, 1 Dec 2007 20:16:29 +0000 (12:16 -0800)]
uml: after_sleep_interval should return something

I forgot to have an int-returning function actually return something.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: add !UML dependencies
Al Viro [Sat, 1 Dec 2007 20:16:29 +0000 (12:16 -0800)]
uml: add !UML dependencies

The previous commit ("uml: keep UML Kconfig in sync with x86") is not
enough, unfortunately.  If we go that way, we need to add dependencies
on !UML for several options.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agouml: keep UML Kconfig in sync with x86
Jeff Dike [Sat, 1 Dec 2007 20:16:28 +0000 (12:16 -0800)]
uml: keep UML Kconfig in sync with x86

Fix a UML build breakage introduced by commit
1032c0ba9da5c5b53173ad2dcf8b2a2da78f8b17 - it introduces X86_32, with many
things which UML needs depending on it.

This patch adds definitions of X86_32 and RWSEM_XCHGADD_ALGORITHM to
the UML/i386 Kconfig.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoI4L: fix isdn_ioctl memory overrun vulnerability
Karsten Keil [Sat, 1 Dec 2007 20:16:15 +0000 (12:16 -0800)]
I4L: fix isdn_ioctl memory overrun vulnerability

Fix possible memory overrun issue in the isdn ioctl code.

Found by ADLAB <adlab@venustech.com.cn>

Signed-off-by: Karsten Keil <kkeil@suse.de>
Cc: ADLAB <adlab@venustech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[INET]: Fix inet_diag dead-lock regression
Herbert Xu [Mon, 3 Dec 2007 04:51:25 +0000 (15:51 +1100)]
[INET]: Fix inet_diag dead-lock regression

The inet_diag register fix broke inet_diag module loading because the
loaded module had to take the same mutex that's already held by the
loader in order to register the new handler.

This patch fixes it by introducing a separate mutex to protect the
handling of handlers.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years ago[POWERPC] Remove xmon from ml300 and ml403 defconfig in arch/ppc
Grant Likely [Tue, 20 Nov 2007 06:08:49 +0000 (17:08 +1100)]
[POWERPC] Remove xmon from ml300 and ml403 defconfig in arch/ppc

xmon is broken under arch/ppc so remove it from the defconfig.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoRevert "[POWERPC] Fix RTAS os-term usage on kernel panic"
Paul Mackerras [Sun, 2 Dec 2007 22:30:04 +0000 (09:30 +1100)]
Revert "[POWERPC] Fix RTAS os-term usage on kernel panic"

This reverts commit a2b51812a4dc5db09ab4d4638d4d8ed456e2457e.

It turns out that this change caused some machines to fail to come
back up when being rebooted, and generated an error in the hypervisor
error log on some machines.  The platform architecture (PAPR) is a
little unclear on exactly when the RTAS ibm,os-term function should be
called.  Until that is clarified I'm reverting this commit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years agoPull bugzilla-9429 into release branch
Len Brown [Sun, 2 Dec 2007 19:33:33 +0000 (14:33 -0500)]
Pull bugzilla-9429 into release branch

16 years agoPull thermal into release branch
Len Brown [Sun, 2 Dec 2007 19:33:21 +0000 (14:33 -0500)]
Pull thermal into release branch

16 years agoACPICA: fix acpi-cpufreq boot crash due to _PSD return-by-reference
Bob Moore [Wed, 17 Oct 2007 20:10:18 +0000 (16:10 -0400)]
ACPICA: fix acpi-cpufreq boot crash due to _PSD return-by-reference

Changed resolution of named references in packages

Fixed a problem with the Package operator where all named
references were created as object references and left otherwise
unresolved. According to the ACPI specification, a Package can
only contain Data Objects or references to control methods. The
implication is that named references to Data Objects (Integer,
Buffer, String, Package, BufferField, Field) should be resolved
immediately upon package creation. This is the approach taken
with this change. References to all other named objects (Methods,
Devices, Scopes, etc.) are all now properly created as reference objects.

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

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agosched: cpu accounting controller (V2)
Srivatsa Vaddagiri [Sun, 2 Dec 2007 19:04:49 +0000 (20:04 +0100)]
sched: cpu accounting controller (V2)

Commit cfb5285660aad4931b2ebbfa902ea48a37dfffa1 removed a useful feature for
us, which provided a cpu accounting resource controller.  This feature would be
useful if someone wants to group tasks only for accounting purpose and doesnt
really want to exercise any control over their cpu consumption.

The patch below reintroduces the feature. It is based on Paul Menage's
original patch (Commit 62d0df64065e7c135d0002f069444fbdfc64768f), with
these differences:

        - Removed load average information. I felt it needs more thought (esp
  to deal with SMP and virtualized platforms) and can be added for
  2.6.25 after more discussions.
        - Convert group cpu usage to be nanosecond accurate (as rest of the cfs
  stats are) and invoke cpuacct_charge() from the respective scheduler
  classes
- Make accounting scalable on SMP systems by splitting the usage
  counter to be per-cpu
- Move the code from kernel/cpu_acct.c to kernel/sched.c (since the
  code is not big enough to warrant a new file and also this rightly
  needs to live inside the scheduler. Also things like accessing
  rq->lock while reading cpu usage becomes easier if the code lived in
  kernel/sched.c)

The patch also modifies the cpu controller not to provide the same accounting
information.

Tested-by: Balbir Singh <balbir@linux.vnet.ibm.com>
 Tested the patches on top of 2.6.24-rc3. The patches work fine. Ran
 some simple tests like cpuspin (spin on the cpu), ran several tasks in
 the same group and timed them. Compared their time stamps with
 cpuacct.usage.

Signed-off-by: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoACPI: Delete the IRQ operation in throttling controll via PTC
Zhao Yakui [Thu, 29 Nov 2007 08:22:43 +0000 (16:22 +0800)]
ACPI: Delete the IRQ operation in throttling controll via PTC

The IRQ operation(enable/disable) should be avoided when throttling is
controlled via PTC method. It is replaced by the migration of task.

This fixes an oops on T61 -- a regression due to
f79f06ab9f86 b/c FixedHW support tried to read remote MSR with interrupts disabled.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agosata_mv: Fix broken Marvell 7042 support.
Mark Lord [Sat, 1 Dec 2007 18:07:22 +0000 (13:07 -0500)]
sata_mv: Fix broken Marvell 7042 support.

sata_mv:  Fix broken Marvell 7042 support.

The Marvell 7042 chip is more or less the same as the 6042 internally,
but sports a PCIe bus.  Despite having identical SATA cores, the 7042
does differ from its PCI bus counterparts in placment and layout of
certain bus related registers.

This patch fixes sata_mv to distinguish between the PCI bus registers
of earlier chips, and the PCIe bus registers of the 7042.

Specifically, move the offsets and bit patterns for the
PCI/PCIe interrupt cause/mask registers into the struct mv_host_priv,
as these values differ between the 6xxx and 7xxx series chips.

This fixes the driver to not access reserved PCI addresses,
and prevents the lockups reported in linux-2.6.24 with 7042 boards.

Also add a new PCI ID for the Highpoint 2300 7042-based board
that I'm using for testing this stuff here.

Tested with Marvell 6081 + 7042 chips, on x86 & x86_64.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port...
Alan Cox [Fri, 30 Nov 2007 15:23:16 +0000 (15:23 +0000)]
libata: Fix early use of port printk. (Was Re: ata4294967295: failed to start port (errno=-19))

On Fri, 30 Nov 2007 14:34:11 +0200 (EET)
Meelis Roos <mroos@linux.ee> wrote:

> > Can you stick a stack trace in at that point ? That would help diagnose
> > it a great deal quicker.
>
> Finally done - found out hard way that BUG() is too bad and
> dump_st5ack() suits me better.

Thanks. This should fix the real cause, and also allow for port start to
fail politely with -ENODEV.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoata_piix: add more toshiba laptops to broken suspend list
Peter Schwenke [Fri, 30 Nov 2007 06:28:29 +0000 (15:28 +0900)]
ata_piix: add more toshiba laptops to broken suspend list

Add more toshiba laptops to broken suspend list.  This is from OSDL
bugzilla bug 7780.

tj: re-formatted patch and added description and SOB.

Signed-off-by: Peter Schwenke <peter@bluetoad.com.au>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: More IVB horkage from TSST
Peter Missel [Tue, 27 Nov 2007 17:04:42 +0000 (18:04 +0100)]
libata: More IVB horkage from TSST

libata: Add more TSST (Samsung/Toshiba) IDE drives with broken
cable detection validation bits.

signed-off-by: Peter Missel (peter.missel@onlinehome.de)
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agolibata: report protocol and full CDB on error
Tejun Heo [Wed, 28 Nov 2007 14:16:09 +0000 (23:16 +0900)]
libata: report protocol and full CDB on error

Protocol and CDB allocation size field are important in determining
what went wrong with ATAPI commands.  Report them on failure.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoSeveral fixes for the AVR32 PATA driver
Kristoffer Nyborg Gregertsen [Thu, 29 Nov 2007 11:01:51 +0000 (12:01 +0100)]
Several fixes for the AVR32 PATA driver

Several fixes for the AVR32 PATA driver:

* Updated to use new AVR32 SMC timing API. This removes the need for "magic"
constants in signal timing.

* Removed the ATA_FLAG_PIO_POLLING, the driver should use interrupts.

* Removed .port_disable and .irq_ack as these are no longer needed.

* Improved some comments.

Signed-off-by: Kristoffer Nyborg Gregertsen <kngregertsen@norway.atmel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosata_mv: fix compilation error when enabling DEBUG
Saeed Bishara [Tue, 27 Nov 2007 15:26:08 +0000 (17:26 +0200)]
sata_mv: fix compilation error when enabling DEBUG

use sstatus instead status.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoSet proper ATA UDMA mode for bf548 according to system clock.
sonic zhang [Tue, 27 Nov 2007 04:47:39 +0000 (12:47 +0800)]
Set proper ATA UDMA mode for bf548 according to system clock.

UDMA Mode - Frequency compatibility

UDMA5 - 100 MB/s   - SCLK  = 133 MHz
UDMA4 - 66 MB/s    - SCLK >=  80 MHz
UDMA3 - 44.4 MB/s  - SCLK >=  50 MHz
UDMA2 - 33 MB/s    - SCLK >=  40 MHz

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoLIB82596: correct data types for hardware addresses
Thomas Bogendoerfer [Fri, 30 Nov 2007 22:13:16 +0000 (23:13 +0100)]
LIB82596: correct data types for hardware addresses

dma_addr_t is 64bit wide on some architectures (for example 64bit MIPS),
so it's not a good idea to use it for 32bit wide addresses in descriptors.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agovia-velocity: don't oops on MTU change (resend)
Stephen Hemminger [Wed, 28 Nov 2007 22:20:16 +0000 (14:20 -0800)]
via-velocity: don't oops on MTU change (resend)

The VIA veloicty driver needs the following to allow changing MTU when down.
The buffer size needs to be computed when device is brought up, not when
device is initialized.  This also fixes a bug where the buffer size was
computed differently on change_mtu versus initial setting.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoStop phy code from returning success to unknown ioctls.
David Woodhouse [Wed, 28 Nov 2007 19:56:34 +0000 (19:56 +0000)]
Stop phy code from returning success to unknown ioctls.

This kind of sucks, and prevents the Fedora installer from using the
device for network installs...

[root@efika phy]# iwconfig eth0
Warning: Driver for device eth0 has been compiled with an ancient version
of Wireless Extension, while this program support version 11 and later.
Some things may be broken...

eth0        ESSID:off/any  Nickname:""
          NWID:0  Channel:0  Access Point: 00:00:BF:81:14:E0
          Bit Rate:-1.08206e+06 kb/s   Sensitivity=0/0
          RTS thr:off   Fragment thr:off
          Encryption key:<too big>
          Power Management:off

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoSET_NETDEV_DEV() in fec_mpc52xx.c
David Woodhouse [Wed, 28 Nov 2007 18:04:31 +0000 (18:04 +0000)]
SET_NETDEV_DEV() in fec_mpc52xx.c

This helps to allow the Fedora installer to use the built-in Ethernet on
the Efika for a network install.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agonet: smc911x: only enable for mpr2 on sh.
Paul Mundt [Wed, 28 Nov 2007 09:24:59 +0000 (18:24 +0900)]
net: smc911x: only enable for mpr2 on sh.

The smc911x.h is a bit of a mess, not supporting any sort of generic
configuration. For the moment only ARCH_PXA and SH_MAGIC_PANEL_R2 have
suitable definitions, so we reflect this in the Kconfig also.

While there are other SH boards that will likely turn this on in the
2.6.25 time frame, it's not worth trying to stub around at the moment.

Fixes up the allmodconfig build, as noted by akpm.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoe1000: Fix NAPI state bug when Rx complete
Auke Kok [Wed, 28 Nov 2007 00:26:36 +0000 (16:26 -0800)]
e1000: Fix NAPI state bug when Rx complete

Don't exit polling when we have not yet used our budget, this causes
the NAPI system to end up with a messed up poll list.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: turn of dynamic Tx watermark workaround (FE+ only)
Stephen Hemminger [Tue, 27 Nov 2007 19:02:07 +0000 (11:02 -0800)]
sky2: turn of dynamic Tx watermark workaround (FE+ only)

Add workaround for issues FE+ (A0) transmit watermark.
This is copied verbatim from vendor driver sk98lin (10.22.4.3).
Don't have that chip version and no more information seems to be available.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: don't use AER routines
Stephen Hemminger [Tue, 27 Nov 2007 19:02:32 +0000 (11:02 -0800)]
sky2: don't use AER routines

Using PCIE advanced error recovery stuff creates more user problems than it's worth.
The AER stuff depends on MMCONFIG and in many configurations it just doesn't work.
Plus it doesn't add any real functionality to the driver. The sky2
driver handles its own errors fine as is.

This reverts 555382cbfc6d2187b53888190755e56f52308cd6

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agosky2: revert to access PCI config via device space
Stephen Hemminger [Tue, 27 Nov 2007 18:57:27 +0000 (10:57 -0800)]
sky2: revert to access PCI config via device space

Using the hardware window into PCI config space is more reliable
and smaller/faster than using the pci_config routines. It avoids issues
with MMCONFIG etc.

Reverts: 167f53d05fccb47b6eeadac7f6705b3f2f042d03

Please apply for 2.6.24

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb - fix stats
Divy Le Ray [Tue, 27 Nov 2007 21:30:20 +0000 (13:30 -0800)]
cxgb - fix stats

Fix MAC stats accounting.
Fix get_stats.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb - fix NAPI
Divy Le Ray [Tue, 27 Nov 2007 21:30:15 +0000 (13:30 -0800)]
cxgb - fix NAPI

netif_rx_complete() should be called only
when work_done < budget.

Signed-off-by: Divy Le ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agocxgb - fix T2 GSO
Divy Le Ray [Tue, 27 Nov 2007 21:30:09 +0000 (13:30 -0800)]
cxgb - fix T2 GSO

The patch ensures that a GSO skb has enough headroom
to push an encapsulating cpl_tx_pkt_lso header.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoucc_geth: handle passing of RX-only and TX-only internal delay PHY connection type...
Kim Phillips [Mon, 26 Nov 2007 22:17:58 +0000 (16:17 -0600)]
ucc_geth: handle passing of RX-only and TX-only internal delay PHY connection type parameters

Extend the RGMII-Internal Delay specification case to include
TX-only and RX-only variants.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Tested-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agophylib: marvell: add support for TX-only and RX-only Internal Delay
Kim Phillips [Mon, 26 Nov 2007 22:17:52 +0000 (16:17 -0600)]
phylib: marvell: add support for TX-only and RX-only Internal Delay

Previously, Internal Delay specification implied the delay be
applied to both TX and RX.  This patch allows for separate TX/RX-only
internal delay specification.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Tested-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agophylib: add PHY interface modes for internal delay for tx and rx only
Kim Phillips [Mon, 26 Nov 2007 22:17:48 +0000 (16:17 -0600)]
phylib: add PHY interface modes for internal delay for tx and rx only

Allow phylib specification of cases where hardware needs to configure
PHYs for Internal Delay only on either RX or TX (not both).

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Tested-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge: MTU changing fix
Stephen Hemminger [Wed, 28 Nov 2007 22:25:05 +0000 (14:25 -0800)]
skge: MTU changing fix

The code to change MTU doesn't correctly handle all the chip variations
and requirements for restarting.  On Genesis chips changing MTU would just
cause receiver to hang.
Use a simpler approach of just taking link down/up if needed.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge: serial mode register values
Stephen Hemminger [Wed, 28 Nov 2007 22:23:01 +0000 (14:23 -0800)]
skge: serial mode register values

For compatiablity with sk98lin, make sure and set same values
in serial mode register.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge version 1.13
Stephen Hemminger [Mon, 26 Nov 2007 19:54:53 +0000 (11:54 -0800)]
skge version 1.13

Version for 2.6.24

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge: increase TX threshold for Jumbo
Stephen Hemminger [Mon, 26 Nov 2007 19:54:52 +0000 (11:54 -0800)]
skge: increase TX threshold for Jumbo

Need to increase TX threshold when doing Jumbo frames on dual port board
to avoid underruns. (Code from sk98lin).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge: fiber link up/down fix
Stephen Hemminger [Mon, 26 Nov 2007 19:54:51 +0000 (11:54 -0800)]
skge: fiber link up/down fix

The driver would not work over fibre if other end when down then
came back up (would require reloading driver). The correct way
to manage the link the same way for both TP and fibre.

Resloves problem described in:   http://lkml.org/lkml/2007/11/6/395

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge: retry on MAC shutdown
Stephen Hemminger [Mon, 26 Nov 2007 19:54:50 +0000 (11:54 -0800)]
skge: retry on MAC shutdown

Make sure and retry when shutting down the MAC. This code is copied
from sk98lin driver.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge: receive flush logic
Stephen Hemminger [Mon, 26 Nov 2007 19:54:49 +0000 (11:54 -0800)]
skge: receive flush logic

Receive FIFO overrun is not catastrophic condition, so don't flush when
it happens.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoskge: FIFO Ram calculation error
Stephen Hemminger [Mon, 26 Nov 2007 19:54:48 +0000 (11:54 -0800)]
skge: FIFO Ram calculation error

The calculation of usable FIFO RAM is wrong in the skge driver.
First, is doesn't take into account the reserved area on the original
SysKonnect Genesis boards. Second it has an off-by-one error because
hw->ports is either 1 or 2.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoctc: make use of alloc_netdev()
Peter Tiedemann [Thu, 29 Nov 2007 16:36:27 +0000 (17:36 +0100)]
ctc: make use of alloc_netdev()

Currently ctc-device initialization is broken (kernel bug in
ctc_new_device).
The new network namespace code reveals a deficiency of the
ctc driver. It should make use of alloc_netdev() as described
in Documentation/networking/netdevices.txt.

Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com>
Signed-off-by: Ursula Braun <braunu@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoS2io: Fixed the case when the card initialization fails on mtu change
Sreenivasa Honnur [Fri, 30 Nov 2007 06:46:08 +0000 (01:46 -0500)]
S2io: Fixed the case when the card initialization fails on mtu change

Fix the case when the card initialization fails on a mtu change and then
close is called (due to ifdown), which frees non existent rx buffers.
- Returning appropriate error codes in init_nic function.
- In s2io_close function s2io_card_down is called only when device is up.
- In s2io_change_mtu function return value of s2io_card_up function
  is checked and returned if it failed.

Signed-off-by: Surjit Reang <surjit.reang@neterion.com>
Signed-off-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
16 years agoMerge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linvill...
Jeff Garzik [Sat, 1 Dec 2007 21:20:02 +0000 (16:20 -0500)]
Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes

16 years agoMerge branch 'master' into upstream-fixes
Jeff Garzik [Sat, 1 Dec 2007 21:18:56 +0000 (16:18 -0500)]
Merge branch 'master' into upstream-fixes

16 years ago[NETNS]: Fix /proc/net breakage
Eric W. Biederman [Sat, 1 Dec 2007 13:33:17 +0000 (00:33 +1100)]
[NETNS]: Fix /proc/net breakage

Well I clearly goofed when I added the initial network namespace support
for /proc/net.  Currently things work but there are odd details visible to
user space, even when we have a single network namespace.

Since we do not cache proc_dir_entry dentries at the moment we can just
modify ->lookup to return a different directory inode depending on the
network namespace of the process looking at /proc/net, replacing the
current technique of using a magic and fragile follow_link method.

To accomplish that this patch:
- introduces a shadow_proc method to allow different dentries to
  be returned from proc_lookup.
- Removes the old /proc/net follow_link magic
- Fixes a weakness in our not caching of proc generic dentries.

As shadow_proc uses a task struct to decided which dentry to return we can
go back later and fix the proc generic caching without modifying any code
that uses the shadow_proc method.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Sat, 1 Dec 2007 04:07:54 +0000 (20:07 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ehca: Fix static rate if path faster than link
  IPoIB: Fix oops if xmit is called when priv->broadcast is NULL

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Sat, 1 Dec 2007 01:07:38 +0000 (17:07 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Fix build.
  [MIPS] Fix use of smp_processor_id() in preemptible code.

16 years ago[MIPS] Fix build.
Ralf Baechle [Wed, 28 Nov 2007 15:07:42 +0000 (15:07 +0000)]
[MIPS] Fix build.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix use of smp_processor_id() in preemptible code.
Pavel Kiryukhin [Tue, 27 Nov 2007 16:20:47 +0000 (19:20 +0300)]
[MIPS] Fix use of smp_processor_id() in preemptible code.

Freeing prom memory: 956kb freed
Freeing firmware memory: 978944k freed
Freeing unused kernel memory: 180k freed
BUG: using smp_processor_id() in preemptible [00000000] code: swapper/1
caller is r4k_dma_cache_wback_inv+0x144/0x2a0
Call Trace:
 [<80117af8>] r4k_dma_cache_wback_inv+0x144/0x2a0
 [<802e4b84>] debug_smp_processor_id+0xd4/0xf0
 [<802e4b7c>] debug_smp_processor_id+0xcc/0xf0
...
CONFIG_DEBUG_PREEMPT is enabled.
--
Bug cause is blast_dcache_range() in preemptible code [in
r4k_dma_cache_wback_inv()].
blast_dcache_range() is constructed via __BUILD_BLAST_CACHE_RANGE that
uses cpu_dcache_line_size(). It uses current_cpu_data that use
smp_processor_id() in turn. In case of CONFIG_DEBUG_PREEMPT
smp_processor_id emits BUG if we are executing with preemption
enabled.

Cpu options of cpu0 are assumed to be the superset of all processors.

Can I make the same assumptions for cache line size  and fix this
issue the following way:

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>