]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
17 years agoahci/pata_jmicron: match class not function number
Tejun Heo [Mon, 26 Feb 2007 11:24:03 +0000 (20:24 +0900)]
ahci/pata_jmicron: match class not function number

Make jmiron_ata quirk update pdev->class after programming the device
and update ahci and pata_jmicron such that they match class code
instead of checking function number manually.  For ahci, it matches
for vendor and class.  For pata_jmicron, it matches vendor, device and
class as IDE class isn't as well defined as AHCI class.

This makes jmicron device matching more conventional and script
friendly.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agojmicron ATA: reimplement jmicron ATA quirk
Tejun Heo [Mon, 26 Feb 2007 11:16:13 +0000 (20:16 +0900)]
jmicron ATA: reimplement jmicron ATA quirk

Reimplement jmicron ATA quirk.

* renamed to quirk_jmicron_ata()
* quirk is invoked only for the affected controllers
* programming is stricter.  e.g. conf5 bit24 is cleared if
  unnecessary.
* code factored for readability
* JMB360 and JMB368 are programmed into proper mode

Verified on JMB360, 363 and 368.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopata_jmicron: drop unnecessary device programming in [re]init
Tejun Heo [Mon, 26 Feb 2007 11:09:02 +0000 (20:09 +0900)]
pata_jmicron: drop unnecessary device programming in [re]init

Channel redirect and AHCI mode enable programmings are done via PCI
quirk for both probe and resume paths.  Drop duplicate and possibly
unsafe device programming from pata_jmicron().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: blacklist FUJITSU MHT2060BH for NCQ
Tejun Heo [Wed, 28 Feb 2007 06:21:23 +0000 (15:21 +0900)]
libata: blacklist FUJITSU MHT2060BH for NCQ

Blacklist FUJITSU MHT2060BH for NCQ.  On this drive, NCQ works iff
queue depth is equal to or less than 4.  Just turn it off.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mike Accetta <maccetta@laurelnetworks.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosata_sil24: kill unused local variable idx in sil24_fill_sg()
Tejun Heo [Mon, 26 Feb 2007 07:11:00 +0000 (16:11 +0900)]
sata_sil24: kill unused local variable idx in sil24_fill_sg()

Kill unused local variable idx in sil24_fill_sg().

Spotted by Jeff Garzik.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: clear drvdata in ata_host_release(), take#2
Tejun Heo [Tue, 27 Feb 2007 13:33:21 +0000 (22:33 +0900)]
libata: clear drvdata in ata_host_release(), take#2

Clearing drvdata in ->remove_one causes NULL pointer deference.  Clear
drvdata only in ata_host_release() after all resources are freed.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[PATCH] VM: invalidate_inode_pages2_range() should not exit early
Trond Myklebust [Thu, 1 Mar 2007 04:13:55 +0000 (20:13 -0800)]
[PATCH] VM: invalidate_inode_pages2_range() should not exit early

Fix invalidate_inode_pages2_range() so that it does not immediately exit
just because a single page in the specified range could not be removed.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] tty_io: fix race in master pty close/slave pty close path
Aristeu Sergio Rozanski Filho [Thu, 1 Mar 2007 04:13:53 +0000 (20:13 -0800)]
[PATCH] tty_io: fix race in master pty close/slave pty close path

This patch fixes a possible race that leads to double freeing an idr index.
 When the master begin to close, release_dev() is called and then
pty_close() is called:

        if (tty->driver->close)
                tty->driver->close(tty, filp);

This is done without helding any locks other than BKL.  Inside pty_close(),
being a master close, the devpts entry will be removed:

#ifdef CONFIG_UNIX98_PTYS
                if (tty->driver == ptm_driver)
                        devpts_pty_kill(tty->index);
#endif

But devpts_pty_kill() will call get_node() that may sleep while waiting for
&devpts_root->d_inode->i_sem.  When this happens and the slave is being
opened, tty_open() just found the driver and index:

        driver = get_tty_driver(device, &index);
        if (!driver) {
                mutex_unlock(&tty_mutex);
                return -ENODEV;
        }

This part of the code is already protected under tty_mute.  The problem is
that the slave close already got an index.  Then init_dev() is called and
blocks waiting for the same &devpts_root->d_inode->i_sem.

When the master close resumes, it removes the devpts entry, and the
relation between idr index and the tty is gone.  The master then sleeps
waiting for the tty_mutex on release_dev().

Slave open resumes and found no tty for that index.  As result, a NULL tty
is returned and init_dev() doesn't flow to fast_track:

        /* check whether we're reopening an existing tty */
        if (driver->flags & TTY_DRIVER_DEVPTS_MEM) {
                tty = devpts_get_tty(idx);
                if (tty && driver->subtype == PTY_TYPE_MASTER)
                        tty = tty->link;
        } else {
                tty = driver->ttys[idx];
        }
        if (tty) goto fast_track;

The result of this, is that a new tty will be created and init_dev() returns
sucessfull. After returning, tty_mutex is dropped and master close may resume.

Master close finds it's the only use and both sides are closing, then releases
the tty and the index. At this point, the idr index is free, but slave still
has it.

Slave open then calls pty_open() and finds that tty->link->count is 0,
because there's no master and returns error.  Then tty_open() calls
release_dev() which executes without any warning, as it was a case of last
slave close when the master is already closed (master->count == 0,
slave->count == 1).  The tty is then released with the already released idr
index.

This normally would only issue a warning on idr_remove() but in case of a
customer's critical application, it's never too simple:

thread1: opens master, gets index X
thread1: begin closing master
thread2: begin opening slave with index X
thread1: finishes closing master, index X released
thread3: opens master, gets index X, just released
thread2: fails opening slave, releases index X         <----
thread4: opens master, gets index X, init_dev() then find an already in use
 and healthy tty and fails

If no more indexes are released, ptmx_open() will keep failing, as the
first free index available is X, and it will make init_dev() fail because
you're trying to "reopen a master" which isn't valid.

The patch notices when this race happens and make init_dev() fail
imediately.  The init_dev() function is called with tty_mutex held, so it's
safe to continue with tty till the end of function because release_dev()
won't make any further changes without grabbing the tty_mutex.

Without the patch, on some machines it's possible get easily idr warnings
like this one:

idr_remove called for id=15 which is not allocated.
 [<c02555b9>] idr_remove+0x139/0x170
 [<c02a1b62>] release_mem+0x182/0x230
 [<c02a28e7>] release_dev+0x4b7/0x700
 [<c02a0ea7>] tty_ldisc_enable+0x27/0x30
 [<c02a1e64>] init_dev+0x254/0x580
 [<c02a0d64>] check_tty_count+0x14/0xb0
 [<c02a4f05>] tty_open+0x1c5/0x340
 [<c02a4d40>] tty_open+0x0/0x340
 [<c017388f>] chrdev_open+0xaf/0x180
 [<c017c2ac>] open_namei+0x8c/0x760
 [<c01737e0>] chrdev_open+0x0/0x180
 [<c0167bc9>] __dentry_open+0xc9/0x210
 [<c0167e2c>] do_filp_open+0x5c/0x70
 [<c0167a91>] get_unused_fd+0x61/0xd0
 [<c0167e93>] do_sys_open+0x53/0x100
 [<c0167f97>] sys_open+0x27/0x30
 [<c010303b>] syscall_call+0x7/0xb

using this test application available on:
 http://www.ruivo.org/~aris/pty_sodomizer.c

Signed-off-by: Aristeu Sergio Rozanski Filho <aris@ruivo.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] fix memory leak in dma_declare_coherent_memory()
Yoichi Yuasa [Thu, 1 Mar 2007 04:13:51 +0000 (20:13 -0800)]
[PATCH] fix memory leak in dma_declare_coherent_memory()

When it goes to free1_out, dev->dma_mem has not been freed.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Fix buffer overflow and races in capi debug functions
Karsten Keil [Thu, 1 Mar 2007 04:13:50 +0000 (20:13 -0800)]
[PATCH] Fix buffer overflow and races in capi debug functions

The CAPI trace debug functions were using a fixed size buffer, which can be
overflowed if wrong formatted CAPI messages were sent to the kernel capi
layer.  The code was also not protected against multiple callers.  This fix
bug 8028.

Additionally the patch make the CAPI trace functions optional.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] adapt page_lock_anon_vma() to PREEMPT_RCU
Oleg Nesterov [Thu, 1 Mar 2007 04:13:49 +0000 (20:13 -0800)]
[PATCH] adapt page_lock_anon_vma() to PREEMPT_RCU

page_lock_anon_vma() uses spin_lock() to block RCU.  This doesn't work with
PREEMPT_RCU, we have to do rcu_read_lock() explicitely.  Otherwise, it is
theoretically possible that slab returns anon_vma's memory to the system
before we do spin_unlock(&anon_vma->lock).

[ Hugh points out that this only matters for PREEMPT_RCU, which isn't merged
  yet, and may never be.  Regardless, this patch is conceptually the
  right thing to do, even if it doesn't matter at this point.  - Linus ]

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Acked-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Documentation: CPU load calculation description
Vassili Karpov [Thu, 1 Mar 2007 04:13:45 +0000 (20:13 -0800)]
[PATCH] Documentation: CPU load calculation description

Describes how/when the information exported to `/proc/stat' is calculated,
and possible problems with this approach.

Signed-off-by: Vassili Karpov <av1474@comtv.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] sched: fix SMT scheduler bug
Ingo Molnar [Thu, 1 Mar 2007 04:13:42 +0000 (20:13 -0800)]
[PATCH] sched: fix SMT scheduler bug

The SMT scheduler incorrectly skips kernel threads even if they are
runnable (but they are preempted by a higher-prio user-space task which got
SMT-delayed by an even higher-priority task running on a sibling CPU).

Fix this for now by only doing the SMT-nice optimization if the
to-be-delayed task is the only runnable task.  (This should cover most of
the real-life cases anyway.)

This bug has been in the SMT scheduler since 2.6.17 or so, but has only
been noticed now by the active check in the dynticks code.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ps3: introduce CONFIG_PS3_ADVANCED
Geert Uytterhoeven [Thu, 1 Mar 2007 04:13:38 +0000 (20:13 -0800)]
[PATCH] ps3: introduce CONFIG_PS3_ADVANCED

ps3: Introduce CONFIG_PS3_ADVANCED, as suggested by Roman Zippel, and use
it to control questions about PS3 subsystems that may not be obvious for
the casual user.

This gets rid of the following warning on non-powerpc platforms: |
drivers/video/Kconfig:1604:warning: 'select' used by config symbol 'FB_PS3'
refer to undefined symbol 'PS3_PS3AV'

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ext[34]: EA block reference count racing fix
Mingming Cao [Thu, 1 Mar 2007 04:13:35 +0000 (20:13 -0800)]
[PATCH] ext[34]: EA block reference count racing fix

There are race issues around ext[34] xattr block release code.

ext[34]_xattr_release_block() checks the reference count of xattr block
(h_refcount) and frees that xattr block if it is the last one reference it.
 Unlike ext2, the check of this counter is unprotected by any lock.
ext[34]_xattr_release_block() will free the mb_cache entry before freeing
that xattr block.  There is a small window between the check for the re
h_refcount ==1 and the call to mb_cache_entry_free().  During this small
window another inode might find this xattr block from the mbcache and reuse
it, racing a refcount updates.  The xattr block will later be freed by the
first inode without notice other inode is still use it.  Later if that
block is reallocated as a datablock for other file, then more serious
problem might happen.

We need put a lock around places checking the refount as well to avoid
racing issue.  Another place need this kind of protection is in
ext3_xattr_block_set(), where it will modify the xattr block content in-
the-fly if the refcount is 1 (means it's the only inode reference it).

This will also fix another issue: the xattr block may not get freed at all
if no lock is to protect the refcount check at the release time.  It is
possible that the last two inodes could release the shared xattr block at
the same time.  But both of them think they are not the last one so only
decreased the h_refcount without freeing xattr block at all.

We need to call lock_buffer() after ext3_journal_get_write_access() to
avoid deadlock (because the later will call lock_buffer()/unlock_buffer
() as well).

Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Cc: Andreas Gruenbacher <agruen@suse.de>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: pte_mkread fix
Jeff Dike [Thu, 1 Mar 2007 04:13:33 +0000 (20:13 -0800)]
[PATCH] uml: pte_mkread fix

Fix the fact that pte_mkread set _PAGE_RW instead of _PAGE_USER (the logic is
copied from i386 in most place, so it is really as bad as you're thinking).

Thus currently page tables are more permissive than they should.

Such a change may trigger other latent bugs, so be careful with this.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: host VDSO fix
Jeff Dike [Thu, 1 Mar 2007 04:13:31 +0000 (20:13 -0800)]
[PATCH] uml: host VDSO fix

This fixes a problem seen by a number of people running UML on newer host
kernels.  init would hang with an infinite segfault loop.

It turns out that the host kernel was providing a AT_SYSINFO_EHDR of
0xffffe000, which faked UML into believing that the host VDSO page could be
reused.  However, AT_SYSINFO pointed into the middle of the address space, and
was unmapped as a result.  Because UML was providing AT_SYSINFO_EHDR and
AT_SYSINFO to its own processes, these would branch to nowhere when trying to
use the VDSO.

The fix is to also check the location of AT_SYSINFO when deciding whether to
use the host's VDSO.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: enable RAW
Allan Graves [Thu, 1 Mar 2007 04:13:29 +0000 (20:13 -0800)]
[PATCH] uml: enable RAW

Add the RAW device driver options to the UML Kconfig.char file so that you may
use them in UML.

Signed-off-by: Allan Graves<allan.graves@gmail.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] FRV: Missing error defs
David Howells [Thu, 1 Mar 2007 04:13:26 +0000 (20:13 -0800)]
[PATCH] FRV: Missing error defs

linux/irq.h uses EINVAL but does not #include linux/errno.h.  This results in
the compiler spitting out errors on some files.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] throttle_vm_writeout(): don't loop on GFP_NOFS and GFP_NOIO allocations
Andrew Morton [Thu, 1 Mar 2007 04:13:21 +0000 (20:13 -0800)]
[PATCH] throttle_vm_writeout(): don't loop on GFP_NOFS and GFP_NOIO allocations

throttle_vm_writeout() is designed to wait for the dirty levels to subside.
But if the caller holds IO or FS locks, we might be holding up that writeout.

So change it to take a single nap to give other devices a chance to clean some
memory, then return.

Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] ACPI: make bay depend on dock
Kristen Carlson Accardi [Thu, 1 Mar 2007 04:13:17 +0000 (20:13 -0800)]
[PATCH] ACPI: make bay depend on dock

Since the bay driver depends on the dock driver for proper notification,
make this driver depend on the dock driver.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Acked-by: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Bug in MM_RB debugging
David Miller [Thu, 1 Mar 2007 04:13:13 +0000 (20:13 -0800)]
[PATCH] Bug in MM_RB debugging

The code is seemingly trying to make sure that rb_next() brings us to
successive increasing vma entries.

But the two variables, prev and pend, used to perform these checks, are
never advanced.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Andrea Arcangeli <andrea@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: add back accidentally removed error
Jeff Dike [Thu, 1 Mar 2007 04:13:11 +0000 (20:13 -0800)]
[PATCH] uml: add back accidentally removed error

In the 2.6.20 hang patch, I accidentally threw out an error message.
This puts it back.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] uml: fix host LDT lookup initialization locking, try 2
Jeff Dike [Thu, 1 Mar 2007 04:13:06 +0000 (20:13 -0800)]
[PATCH] uml: fix host LDT lookup initialization locking, try 2

Add some locking to host_ldt_entries to prevent racing when reading LDT
information from the host.

The locking is somewhat more careful than my previous attempt.  Now, only
the check of host_ldt_entries is locked.  The lock is dropped immediately
afterwards, and if the LDT needs initializing, that (and the memory
allocations needed) proceed outside the lock.

Also fixed some style violations.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] drivers/isdn/gigaset: build asyncdata.o into the gigaset module (fix)
Tilman Schmidt [Thu, 1 Mar 2007 04:13:01 +0000 (20:13 -0800)]
[PATCH] drivers/isdn/gigaset: build asyncdata.o into the gigaset module (fix)

a) Remove #define acrobatics that have become unnecessary by the move of
   asyncdata.o into the common part.

b) Correct the rule for building the common part into the kernel when
   some or all hardware specific parts are built as modules.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: no path_release() after path_lookup() error
Michael Halcrow [Thu, 1 Mar 2007 04:12:57 +0000 (20:12 -0800)]
[PATCH] eCryptfs: no path_release() after path_lookup() error

Dmitriy Monakhov wrote:
> if path_lookup() return non zero code we don't have to worry about
> 'nd' parameter, but ecryptfs_read_super does path_release(&nd) after
> path_lookup has failed, and dentry counter becomes negative

Do not do a path_release after a path_lookup error.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Dmitriy Monakhov <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: remove unnecessary flush_dcache_page()
Michael Halcrow [Thu, 1 Mar 2007 04:12:52 +0000 (20:12 -0800)]
[PATCH] eCryptfs: remove unnecessary flush_dcache_page()

Remove unnecessary flush_dcache_page() call. Thanks to Dmitriy
Monakhov for pointing this out.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Dmitriy Monakhov <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: set O_LARGEFILE when opening lower file
Michael Halcrow [Thu, 1 Mar 2007 04:12:47 +0000 (20:12 -0800)]
[PATCH] eCryptfs: set O_LARGEFILE when opening lower file

O_LARGEFILE should be set here when opening the lower file.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Cc: Dmitriy Monakhov <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] rtc_cmos oops fix
David Brownell [Thu, 1 Mar 2007 04:12:40 +0000 (20:12 -0800)]
[PATCH] rtc_cmos oops fix

Fix an oops on the rtc_device_unregister() path by waiting until the last
moment before nulling the rtc->ops vector.  Fix some potential oopses by
having the rtc_class_open()/rtc_class_close() interface increase the RTC's
reference count while an RTC handle is available outside the RTC framework.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] MAINTAINERS: Update email address
Antonino A. Daplas [Thu, 1 Mar 2007 04:12:37 +0000 (20:12 -0800)]
[PATCH] MAINTAINERS: Update email address

adaplas@pol.net is still alive, but is choking on the traffic.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] add -mm testing in SubmitChecklist
Randy Dunlap [Thu, 1 Mar 2007 04:12:35 +0000 (20:12 -0800)]
[PATCH] add -mm testing in SubmitChecklist

Add -mm testing to SubmitChecklist.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] fix section mismatch warning in lockdep
Sam Ravnborg [Thu, 1 Mar 2007 04:12:31 +0000 (20:12 -0800)]
[PATCH] fix section mismatch warning in lockdep

lockdep_init() is marked __init but used in several places
outside __init code. This causes following warnings:
$ scripts/mod/modpost kernel/lockdep.o
WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.lockdep_init_map after 'lockdep_init_map' (at offset 0x105)
WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.lockdep_reset_lock after 'lockdep_reset_lock' (at offset 0x35)
WARNING: kernel/built-in.o - Section mismatch: reference to .init.text:lockdep_init from .text.__lock_acquire after '__lock_acquire' (at offset 0xb2)

The warnings are less obviously due to heavy inlining by gcc - this is not
altered.

Fix the section mismatch warnings by removing the __init marking, which
seems obviously wrong.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Rename PG_checked to PG_owner_priv_1
Nick Piggin [Thu, 1 Mar 2007 04:12:27 +0000 (20:12 -0800)]
[PATCH] Rename PG_checked to PG_owner_priv_1

Rename PG_checked to PG_owner_priv_1 to reflect its availablilty as a
private flag for use by the owner/allocator of the page.  In the case of
pagecache pages (which might be considered to be owned by the mm),
filesystems may use the flag.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] fix the SYSCTL=n compilation
Adrian Bunk [Thu, 1 Mar 2007 04:12:23 +0000 (20:12 -0800)]
[PATCH] fix the SYSCTL=n compilation

/home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/kernel/sysctl.c:1411: error: conflicting types for 'register_sysctl_table'
/home/bunk/linux/kernel-2.6/linux-2.6.20-mm2/include/linux/sysctl.h:1042: error: previous declaration of 'register_sysctl_table' was here
make[2]: *** [kernel/sysctl.o] Error 1

Caused by commit 0b4d414714f0d2f922d39424b0c5c82ad900a381.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Fix posix-cpu-timer breakage caused by stale p->last_ran value
Thomas Gleixner [Thu, 1 Mar 2007 04:12:19 +0000 (20:12 -0800)]
[PATCH] Fix posix-cpu-timer breakage caused by stale p->last_ran value

Problem description at:
http://bugzilla.kernel.org/show_bug.cgi?id=8048

Commit b18ec80396834497933d77b81ec0918519f4e2a7
    [PATCH] sched: improve migration accuracy
optimized the scheduler time calculations, but broke posix-cpu-timers.

The problem is that the p->last_ran value is not updated after a context
switch.  So a subsequent call to current_sched_time() calculates with a
stale p->last_ran value, i.e.  accounts the full time, which the task was
scheduled away.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] eCryptfs: resolve lower page unlocking problem
Michael Halcrow [Thu, 1 Mar 2007 04:12:16 +0000 (20:12 -0800)]
[PATCH] eCryptfs: resolve lower page unlocking problem

eCryptfs lower file handling code has several issues:
  - Retval from prepare_write()/commit_write() wasn't checked to equality
    to AOP_TRUNCATED_PAGE.
  - In some places page wasn't unmapped and unlocked after error.

Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kernel-doc fixes for 2.6.20-git15 (non-drivers)
Randy Dunlap [Thu, 1 Mar 2007 04:12:13 +0000 (20:12 -0800)]
[PATCH] kernel-doc fixes for 2.6.20-git15 (non-drivers)

Fix kernel-doc warnings in 2.6.20-git15 (lib/, mm/, kernel/, include/).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] kernel-doc: allow space after __attribute__
Randy Dunlap [Thu, 1 Mar 2007 04:12:10 +0000 (20:12 -0800)]
[PATCH] kernel-doc: allow space after __attribute__

Allow space(s) between "__attribute__" and "((blah))" so that
kernel-doc does not complain like:

Warning(/tester/linsrc/linux-2.6.20-git15//kernel/timer.c:939): No description found for parameter 'read_persistent_clock(void'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] update timekeeping_is_continuous comment
Daniel Walker [Thu, 1 Mar 2007 04:12:07 +0000 (20:12 -0800)]
[PATCH] update timekeeping_is_continuous comment

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] FRV: Add some missng lazy MMU hooks for NOMMU mode
David Howells [Thu, 1 Mar 2007 04:12:03 +0000 (20:12 -0800)]
[PATCH] FRV: Add some missng lazy MMU hooks for NOMMU mode

Add some missing lazy MMU hooks for NOMMU mode.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] FRV: No ZONE_DMA
David Howells [Thu, 1 Mar 2007 04:11:58 +0000 (20:11 -0800)]
[PATCH] FRV: No ZONE_DMA

FRV does not require a ZONE_DMA, so all DMA'able pages that aren't highmem
should be in ZONE_NORMAL.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] md: add support for reshape of a raid6
NeilBrown [Thu, 1 Mar 2007 04:11:53 +0000 (20:11 -0800)]
[PATCH] md: add support for reshape of a raid6

i.e. one or more drives can be added and the array will re-stripe
while on-line.

Most of the interesting work was already done for raid5.  This just extends it
to raid6.

mdadm newer than 2.6 is needed for complete safety, however any version of
mdadm which support raid5 reshape will do a good enough job in almost all
cases (an 'echo repair > /sys/block/mdX/md/sync_action' is recommended after a
reshape that was aborted and had to be restarted with an such a version of
mdadm).

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] md: restart a (raid5) reshape that has been aborted due to a read/write error
NeilBrown [Thu, 1 Mar 2007 04:11:48 +0000 (20:11 -0800)]
[PATCH] md: restart a (raid5) reshape that has been aborted due to a read/write error

An error always aborts any resync/recovery/reshape on the understanding that
it will immediately be restarted if that still makes sense.  However a reshape
currently doesn't get restarted.  With this patch it does.

To avoid restarting when it is not possible to do work, we call into the
personality to check that a reshape is ok, and strengthen raid5_check_reshape
to fail if there are too many failed devices.

We also break some code out into a separate function: remove_and_add_spares as
the indent level for that code was getting crazy.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] md: clean out unplug and other queue function on md shutdown
NeilBrown [Thu, 1 Mar 2007 04:11:42 +0000 (20:11 -0800)]
[PATCH] md: clean out unplug and other queue function on md shutdown

The mddev and queue might be used for another array which does not set these,
so they need to be cleared.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] md: move warning about creating a raid array on partitions of the one device
NeilBrown [Thu, 1 Mar 2007 04:11:35 +0000 (20:11 -0800)]
[PATCH] md: move warning about creating a raid array on partitions of the one device

md tries to warn the user if they e.g.  create a raid1 using two partitions of
the same device, as this does not provide true redundancy.

However it also warns if a raid0 is created like this, and there is nothing
wrong with that.

At the place where the warning is currently printer, we don't necessarily know
what level the array will be, so move the warning from the point where the
device is added to the point where the array is started.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] md: RAID6: clean up CPUID and FPU enter/exit code
H. Peter Anvin [Thu, 1 Mar 2007 04:11:25 +0000 (20:11 -0800)]
[PATCH] md: RAID6: clean up CPUID and FPU enter/exit code

- Use kernel_fpu_begin() and kernel_fpu_end()
- Use boot_cpu_has() for feature testing even in userspace

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] md: fix raid10 recovery problem.
NeilBrown [Thu, 1 Mar 2007 04:11:18 +0000 (20:11 -0800)]
[PATCH] md: fix raid10 recovery problem.

There are two errors that can lead to recovery problems with raid10
when used in 'far' more (not the default).

Due to a '>' instead of '>=' the wrong block is located which would result in
garbage being written to some random location, quite possible outside the
range of the device, causing the newly reconstructed device to fail.

The device size calculation had some rounding errors (it didn't round when it
should) and so recovery would go a few blocks too far which would again cause
a write to a random block address and probably a device error.

The code for working with device sizes was fairly confused and spread out, so
this has been tided up a bit.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] Fix failure paths in modules init in umem.c
NeilBrown [Thu, 1 Mar 2007 04:11:12 +0000 (20:11 -0800)]
[PATCH] Fix failure paths in modules init in umem.c

If register_blkdev() or alloc-disk fail in mm_init() after
pci_register_driver() succeeds, then mm_pci_driver is not unregistered
properly:

Cc: Philip Guo <pg@cs.stanford.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] drivers/video/sm501fb.c: make 4 functions static
Adrian Bunk [Thu, 1 Mar 2007 04:11:06 +0000 (20:11 -0800)]
[PATCH] drivers/video/sm501fb.c: make 4 functions static

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] mm/{,tiny-}shmem.c cleanups
Adrian Bunk [Thu, 1 Mar 2007 04:11:03 +0000 (20:11 -0800)]
[PATCH] mm/{,tiny-}shmem.c cleanups

shmem_{nopage,mmap} are no longer used in ipc/shm.c

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] make ipc/shm.c:shm_nopage() static
Adrian Bunk [Thu, 1 Mar 2007 04:11:01 +0000 (20:11 -0800)]
[PATCH] make ipc/shm.c:shm_nopage() static

shm_nopage() can become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] arch/arm26/kernel/entry.S: remove dead code
Adrian Bunk [Thu, 1 Mar 2007 04:10:58 +0000 (20:10 -0800)]
[PATCH] arch/arm26/kernel/entry.S: remove dead code

CONFIG_ALIGNMENT_TRAP is never set on arm26.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] x86_64/i386 irq: Fix !CONFIG_SMP compilation
Eric W. Biederman [Tue, 27 Feb 2007 07:27:41 +0000 (00:27 -0700)]
[PATCH] x86_64/i386 irq: Fix !CONFIG_SMP compilation

When removing set_native_irq I missed the fact that it was
called in a couple of places that were compiled even when
SMP support is disabled.  And since the irq_desc[].affinity
field only exists in SMP things broke.

Thanks to Simon Arlott <simon@arlott.org> for spotting this.

There are a couple of ways to fix this but the simplest one
is to just remove the assignments.  The affinity field is only
used to display a value to the user, and nothing on either i386
or x86_64 reads it or depends on it being any particlua value,
so skipping the assignment is safe.  The assignment that
is being removed is just for the initial affinity value before
the user explicitly sets it.  The irq_desc array initializes
this field to CPU_MASK_ALL so the field is initialized to
a reasonable value in the SMP case without being set.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoLinux 2.6.21-rc2
Linus Torvalds [Wed, 28 Feb 2007 04:59:12 +0000 (20:59 -0800)]
Linux 2.6.21-rc2

Too many changes for comfort since -rc1.  Some missed merges, and some
just annoyingly big fixes since.  This is not how an -rc2 should look.
Need to really calm things down!

17 years ago[SPARC64]: Fix PCI interrupts on E450 et al.
David S. Miller [Mon, 26 Feb 2007 22:55:06 +0000 (14:55 -0800)]
[SPARC64]: Fix PCI interrupts on E450 et al.

When the PCI controller OBP node lacks an interrupt-map
and interrupt-map-mask property, we need to form the
INO by hand.  The PCI swizzle logic was not doing that
properly.

This was a regression added by the of_device code.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
Linus Torvalds [Tue, 27 Feb 2007 15:45:09 +0000 (07:45 -0800)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart

* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] fix compile errors

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 27 Feb 2007 15:39:04 +0000 (07:39 -0800)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (52 commits)
  netxen: do_rom_fast_write error handling
  natsemi: Fix detection of vanilla natsemi cards
  net: remove a collection of unneeded #undef REALLY_SLOW_IO stuff
  chelsio: Fix non-NAPI compile
  cxgb3 - Feed Rx free list with pages
  cxgb3 - Recovery from HW starvation of response queue entries.
  cxgb3 - Unmap offload packets when they are freed
  cxgb3 - FW version update
  cxgb3 - private ioctl cleanup
  cxgb3 - manage sysfs attributes per port
  S2IO: Restoring the mac address in s2io_reset
  S2IO: Avoid printing the Enhanced statistics for Xframe I card.
  S2IO: Making LED off during LINK_DOWN notification.
  S2IO: Added a loadable parameter to enable or disable vlan stripping in frame.
  S2IO: Optimized the delay to wait for command completion
  S2IO: Fixes for MSI and MSIX
  qla3xxx: Bumping driver version number
  qla3xxx: Kernic Panic on pSeries under stress conditions
  qla3xxx: bugfix tx reset after stress conditions.
  qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue(), ql_alloc_large_buffers(), and ql3xxx_send()
  ...

17 years agoMerge branch 'jffs-maint' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Tue, 27 Feb 2007 15:38:40 +0000 (07:38 -0800)]
Merge branch 'jffs-maint' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6

* 'jffs-maint' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  remove the jffs MAINTAINERS entry

17 years agonetxen: do_rom_fast_write error handling
Stephen Hemminger [Mon, 26 Feb 2007 22:51:56 +0000 (14:51 -0800)]
netxen: do_rom_fast_write error handling

Compiler warning spots real error!

The function do_rom_fast_read called in do_rom_fast_write can fail
and leave data1 unset. This causes a compile warning.
The correct thing is to propagate the error out.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoremove the jffs MAINTAINERS entry
Adrian Bunk [Sun, 25 Feb 2007 00:08:47 +0000 (01:08 +0100)]
remove the jffs MAINTAINERS entry

This patch removes the MAINTAINERS entry for the removed jffs
filesystem.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agonatsemi: Fix detection of vanilla natsemi cards
Mark Brown [Sun, 25 Feb 2007 15:37:27 +0000 (15:37 +0000)]
natsemi: Fix detection of vanilla natsemi cards

Bob Tracy <rct@gherkin.frus.com> reported that the addition of support
for Aculab E1/T1 cPCI carrier cards broke detection of vanilla natsemi
cards.  This patch fixes that: the problem is that the driver-specific
ta in the PCI device table is an index into a second table and this
had not been updated for the vanilla cards.

This patch fixes the problem minimally.

Signed-Off-By: Mark Brown <broonie@sirena.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agonet: remove a collection of unneeded #undef REALLY_SLOW_IO stuff
Alan [Tue, 20 Feb 2007 18:08:57 +0000 (18:08 +0000)]
net: remove a collection of unneeded #undef REALLY_SLOW_IO stuff

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agochelsio: Fix non-NAPI compile
Roland Dreier [Mon, 26 Feb 2007 22:58:49 +0000 (14:58 -0800)]
chelsio: Fix non-NAPI compile

Chelsio without NAPI enabled has been broken (won't compile) since
3de00b89 ("chelsio: NAPI speed improvement"):

    drivers/net/chelsio/sge.c: In function `t1_interrupt`:
    drivers/net/chelsio/sge.c:1716: error: `Q` undeclared (first use in this function)

The change below seems to add back in the declaration and
initialization of `Q` that was removed by mistake, and at least makes
the driver compile for me, although I have no hardware and hence no
way to test whether this actually works.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - Feed Rx free list with pages
Divy Le Ray [Sun, 25 Feb 2007 00:44:17 +0000 (16:44 -0800)]
cxgb3 - Feed Rx free list with pages

Populate Rx free list with pages.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - Recovery from HW starvation of response queue entries.
Divy Le Ray [Sun, 25 Feb 2007 00:44:12 +0000 (16:44 -0800)]
cxgb3 - Recovery from HW starvation of response queue entries.

Improve the traffic recovery after the HW ran out of response queue entries.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - Unmap offload packets when they are freed
Divy Le Ray [Sun, 25 Feb 2007 00:44:06 +0000 (16:44 -0800)]
cxgb3 - Unmap offload packets when they are freed

Offload packets may be DMAed long after their SGE Tx descriptors are done
so they must remain mapped until they are freed rather than until their
descriptors are freed.  Unmap such packets through an skb destructor.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - FW version update
Divy Le Ray [Mon, 26 Feb 2007 00:32:37 +0000 (16:32 -0800)]
cxgb3 - FW version update

Update FW version to 3.2

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - private ioctl cleanup
Divy Le Ray [Sun, 25 Feb 2007 00:43:56 +0000 (16:43 -0800)]
cxgb3 - private ioctl cleanup

Clean up some private ioctls.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - manage sysfs attributes per port
Divy Le Ray [Sun, 25 Feb 2007 00:43:50 +0000 (16:43 -0800)]
cxgb3 - manage sysfs attributes per port

sysfs attributes are now managed per port, no longer per adapter.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoS2IO: Restoring the mac address in s2io_reset
Sivakumar Subramani [Sat, 24 Feb 2007 07:04:24 +0000 (02:04 -0500)]
S2IO: Restoring the mac address in s2io_reset

- Restore in s2io_reset, the mac address assigned during s2io_open.
  Earlier, it was getting overwritten to the factory default (read from the
  eeprom) and subsequently dropping received frames.

- Fixed the typo in calling rtnl_unlock in s2io_set_link function.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoS2IO: Avoid printing the Enhanced statistics for Xframe I card.
Sivakumar Subramani [Sat, 24 Feb 2007 07:03:22 +0000 (02:03 -0500)]
S2IO: Avoid printing the Enhanced statistics for Xframe I card.

- Enhanced Statistics are supported only for Xframe II (Herculas) card. Add
  condition check such Enhanced statistics will included only in the case of
  Xframe II card.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoS2IO: Making LED off during LINK_DOWN notification.
Sivakumar Subramani [Sat, 24 Feb 2007 07:01:31 +0000 (02:01 -0500)]
S2IO: Making LED off during LINK_DOWN notification.

- Turning off LED for LINK_DOWN notification
- Return from rxd_owner_bit_reset function if call to set_rxd_buffer_pointer
  fails with ENOMEM

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoS2IO: Added a loadable parameter to enable or disable vlan stripping in frame.
Sivakumar Subramani [Sat, 24 Feb 2007 06:59:39 +0000 (01:59 -0500)]
S2IO: Added a loadable parameter to enable or disable vlan stripping in frame.

- Added code to not to strip vlan tag when driver is in promiscuous mode
- Added module loadable parameter 'vlan_tag_strip" through which user can
  enable or disable vlan stripping irrespective of mode
  ( promiscuous or non-promiscuous ).

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoS2IO: Optimized the delay to wait for command completion
Sivakumar Subramani [Sat, 24 Feb 2007 06:57:32 +0000 (01:57 -0500)]
S2IO: Optimized the delay to wait for command completion

- Optimized delay to wait for command completion so as to reduce the
  initialization wait time.
- Disable differentiated services steering. By default RMAC is configured to
  steer traffic with certain DS codes to other queues. Driver must initialize
  the DS memory to 0 to make sure that DS steering will not be used by default.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoS2IO: Fixes for MSI and MSIX
Sivakumar Subramani [Sat, 24 Feb 2007 06:51:50 +0000 (01:51 -0500)]
S2IO: Fixes for MSI and MSIX

- Added debug statements to print a debug message if the MSI/MSI-X vector (or)
  data is zero.

- This patch removes the code that will enable NAPI for the case of single
  ring and MSI-X / MSI case. There are some issue in the enabling NAPI with
  MSI/MSI-X.  So we are turning off NAPI in the case of MSI/MSI-X.

Signed-off-by: Sivakumar Subramani <sivakumar.subramani@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Bumping driver version number
Benjamin Li [Mon, 26 Feb 2007 19:06:43 +0000 (11:06 -0800)]
qla3xxx: Bumping driver version number

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Kernic Panic on pSeries under stress conditions
Benjamin Li [Mon, 26 Feb 2007 19:06:42 +0000 (11:06 -0800)]
qla3xxx: Kernic Panic on pSeries under stress conditions

To reproduce this panic consistently, we run an intensive network
application like 'netperf'. After waiting for a couple of seconds,
you will see a stack trace and a kernel panic where we are calling
pci_unmap_single() in ql_poll().

Changes:
1)  Check the flags on the Response MAC IO Control block to check for
errors
2)  Ensure that if we are on the 4022 we only use one segment
3)  Before, we were reading the memory mapped producer index register
everytime we iterated in the loop when clearing the queue.  We should
only be iterating to a known point, not as the producer index
is being updated.

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: bugfix tx reset after stress conditions.
Ron Mercer [Mon, 26 Feb 2007 19:06:41 +0000 (11:06 -0800)]
qla3xxx: bugfix tx reset after stress conditions.

To Reproduce the Problem:
To reproduce this panic consistently, we run an intensive network
application like 'netperf' and then switch to a different console.
After waiting for a couple of seconds, you will see a tx reset has occured.

Reason:
We enable interrupts even if we were not running.

Solution:
Now we will enable interrupts only after we are ready to give up the poll
routine.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list...
Benjamin Li [Mon, 26 Feb 2007 19:06:40 +0000 (11:06 -0800)]
qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue(), ql_alloc_large_buffers(), and ql3xxx_send()

pci_map_single() could fail.  We need to properly check the return
code from pci_map_single().  If we can not properly map this address,
then we should cleanup and return the proper return code.

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: bugfix: Fixed jumbo frame handling for 3032 chip.
Ron Mercer [Mon, 26 Feb 2007 19:06:39 +0000 (11:06 -0800)]
qla3xxx: bugfix: Fixed jumbo frame handling for 3032 chip.

The scatter/gather lists were not being build correctly.  When
large frames spanned several buffers the chip would panic.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Clean up receive process.
Ron Mercer [Mon, 26 Feb 2007 19:06:38 +0000 (11:06 -0800)]
qla3xxx: Clean up receive process.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Dynamically size the rx buffer queue based on the MTU.
Ron Mercer [Mon, 26 Feb 2007 19:06:37 +0000 (11:06 -0800)]
qla3xxx: Dynamically size the rx buffer queue based on the MTU.

This change removes use of constants for rx buffer queue size
and instead calculates the queue length based on what he MTU
is set to.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Remove API to change MTU.
Ron Mercer [Mon, 26 Feb 2007 19:06:36 +0000 (11:06 -0800)]
qla3xxx: Remove API to change MTU.

This network device driver shares the same hardware as the qla4xxx
iSCSI driver. Changing the MTU via the device interface will
cause qla4xxx to crash as there is no way to make notification.
Users wishing to change the MTU must do so using an iSCSI
utility such as Qlogic SanSurfer. This forces the user to
unload/reload this network device driver after the MTU
value has been changed in flash.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Fix deadlock issue on error paths
Benjamin Li [Mon, 26 Feb 2007 19:06:35 +0000 (11:06 -0800)]
qla3xxx: Fix deadlock issue on error paths

1) Fix deadlock issue when in QL_RESET_ACTIVE state and traversing
   through the Link State Machine
2) Fix deadlock issue when ethtool would call ql_get_settings()
3) Fix deadlock issue when adaptor is ifup'ed but adaptor fails to initialize

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Changed to use netdev_alloc_skb() from dev_alloc_skb
Benjamin Li [Mon, 26 Feb 2007 19:06:33 +0000 (11:06 -0800)]
qla3xxx: Changed to use netdev_alloc_skb() from dev_alloc_skb

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Remove unnecessary memset() in qla3xxx_send()
Benjamin Li [Mon, 26 Feb 2007 19:06:32 +0000 (11:06 -0800)]
qla3xxx: Remove unnecessary memset() in qla3xxx_send()

We do not need to zero out the 64 byte MAC request I/O control block.
  By zeroing out the control block and setting it to proper fields is
redundant work.  This is because in the qla3xxx_send() function we will
already set the proper fields in this structure.  The unused fields are
not looked at by the hardware and do not need to be zeroed out.

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: Return proper error codes when the 4022/4032 is being probed
Benjamin Li [Mon, 26 Feb 2007 19:06:31 +0000 (11:06 -0800)]
qla3xxx: Return proper error codes when the 4022/4032 is being probed

The return code was not properly set when when allocating memory or mapping
memory failed.  Depending on the stack, the return code would sometimes
return 0, which indicates everything was ok, when in fact there was an error.
  This would cause trouble when the module was removed.  Now, we will pass
back the proper return code when an error occurs during the PCI probe.

Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoAlignment in mv643xx_eth
Ralf Baechle [Mon, 26 Feb 2007 19:52:06 +0000 (19:52 +0000)]
Alignment in mv643xx_eth

The driver contains this little piece of candy:

#if defined(CONFIG_DMA_NONCOHERENT) || defined(CONFIG_NOT_COHERENT_CACHE)
#define ETH_DMA_ALIGN           L1_CACHE_BYTES
#else
#define ETH_DMA_ALIGN           8
#endif

Any reason why we're not using dma_get_cache_alignment() instead?

  Ralf

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosgiseeq: Don't include unnecessary headerfiles.
Ralf Baechle [Mon, 26 Feb 2007 01:50:34 +0000 (01:50 +0000)]
sgiseeq: Don't include unnecessary headerfiles.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoucc_geth: use of_get_mac_address()
Timur Tabi [Wed, 21 Feb 2007 20:40:12 +0000 (14:40 -0600)]
ucc_geth: use of_get_mac_address()

Update ucc_geth_probe() to use function of_get_mac_address() to obtain the MAC
address.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoskge: comma consistency
Stephen Hemminger [Fri, 23 Feb 2007 22:04:54 +0000 (14:04 -0800)]
skge: comma consistency

Use comma's consistently.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoskge: fix transmitter flow control
Stephen Hemminger [Fri, 23 Feb 2007 22:03:00 +0000 (14:03 -0800)]
skge: fix transmitter flow control

It looks like the skge driver inherited another bug from the sk98lin code.
If I send from 1000mbit port to a machine on 100mbit port, the switch should
be doing hardware flow control, but no pause frames show up in the statistics.

This is the analog of the recent sky2 fixes. The device needs to listen
for multicast pause frames and then not discard them.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agomyri10ge: workaround buggy adopted firmwares
Brice Goglin [Wed, 21 Feb 2007 17:05:17 +0000 (18:05 +0100)]
myri10ge: workaround buggy adopted firmwares

Work around a bug which occurs when adopting firmware versions
1.4.4 though 1.4.11 where broadcasts are filtered as if they
were multicasts.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoNetXen: Driver ifconfig fix
Amit S. Kale [Wed, 21 Feb 2007 14:54:06 +0000 (06:54 -0800)]
NetXen: Driver ifconfig fix

Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoNetXen: Driver unload fixes
Amit S. Kale [Wed, 21 Feb 2007 14:37:06 +0000 (06:37 -0800)]
NetXen: Driver unload fixes

Signed-off-by: Amit S. Kale <amitkale@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: maintainership
Linas Vepstas [Tue, 20 Feb 2007 22:45:27 +0000 (16:45 -0600)]
spidernet: maintainership

Update driver support contact info.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: janitorial, typos
Linas Vepstas [Tue, 20 Feb 2007 22:42:59 +0000 (16:42 -0600)]
spidernet: janitorial, typos

Janitorial patch. Undo long lines, fix typo in err msg.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: transmit race
Linas Vepstas [Tue, 20 Feb 2007 22:41:59 +0000 (16:41 -0600)]
spidernet: transmit race

Multiple threads performing a transmit can race into
the spidernet tx ring cleanup code. This puts the
relevant check under a lock.

Signed-off-by: Linas Vepstas <lins@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: fix racy double-free of skb
Linas Vepstas [Tue, 20 Feb 2007 22:41:03 +0000 (16:41 -0600)]
spidernet: fix racy double-free of skb

It appears that under certain circumstances, a race will result
in a double-free of an skb. This patch null's out the skb pointer
upon the skb free, avoiding the inadvertent deref of bogus data.
The next patch fixes the actual race.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: separate hardware state from driver state.
Linas Vepstas [Tue, 20 Feb 2007 22:40:06 +0000 (16:40 -0600)]
spidernet: separate hardware state from driver state.

This patch separates the hardware descriptor state from the
driver descriptor state, per (old) suggestion from Ben Herrenschmidt.
This compiles and boots and seems to work.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Jens Osterkamp <Jens.Osterkamp@de.ibm.com>
Cc: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>