platform/upstream/kernel-adaptation-pc.git
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
Linus Torvalds [Fri, 25 Apr 2008 19:32:10 +0000 (12:32 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/x86/linux-2.6-xen-next

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-xen-next: (52 commits)
  xen: add balloon driver
  xen: allow compilation with non-flat memory
  xen: fold xen_sysexit into xen_iret
  xen: allow set_pte_at on init_mm to be lockless
  xen: disable preemption during tlb flush
  xen pvfb: Para-virtual framebuffer, keyboard and pointer driver
  xen: Add compatibility aliases for frontend drivers
  xen: Module autoprobing support for frontend drivers
  xen blkfront: Delay wait for block devices until after the disk is added
  xen/blkfront: use bdget_disk
  xen: Make xen-blkfront write its protocol ABI to xenstore
  xen: import arch generic part of xencomm
  xen: make grant table arch portable
  xen: replace callers of alloc_vm_area()/free_vm_area() with xen_ prefixed one
  xen: make include/xen/page.h portable moving those definitions under asm dir
  xen: add resend_irq_on_evtchn() definition into events.c
  Xen: make events.c portable for ia64/xen support
  xen: move events.c to drivers/xen for IA64/Xen support
  xen: move features.c from arch/x86/xen/features.c to drivers/xen
  xen: add missing definitions in include/xen/interface/vcpu.h which ia64/xen needs
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 25 Apr 2008 19:29:55 +0000 (12:29 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Wrap SMP IPIs with irq_enter()/irq_exit().
  [SPARC64]: Fix args to 64-bit sys_semctl() via sys_ipc().

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 25 Apr 2008 19:28:28 +0000 (12:28 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (48 commits)
  net: Fix wrong interpretation of some copy_to_user() results.
  xfrm: alg_key_len & alg_icv_len should be unsigned
  [netdrvr] tehuti: move ioctl perm check closer to function start
  ipv6: Fix typo in net/ipv6/Kconfig
  via-velocity: fix vlan receipt
  tg3: sparse cleanup
  forcedeth: realtek phy crossover detection
  ibm_newemac: Increase MDIO timeouts
  gianfar: Fix skb allocation strategy
  netxen: reduce stack usage of netxen_nic_flash_print
  smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}
  net drivers: fix platform driver hotplug/coldplug
  forcedeth: new backoff implementation
  ehea: make things static
  phylib: Add support for board-level PHY fixups
  [netdrvr] atlx: code movement: move atl1 parameter parsing
  atlx: remove flash vendor parameter
  korina: misc cleanup
  korina: fix misplaced return statement
  WAN: Fix confusing insmod error code for C101 too.
  ...

16 years agoUpdate .gitignore files
Matthew Wilcox [Fri, 25 Apr 2008 10:21:11 +0000 (04:21 -0600)]
Update .gitignore files

Add some autogenerated files to various .gitignore files

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Fri, 25 Apr 2008 19:25:48 +0000 (12:25 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6: (82 commits)
  [MTD] m25p80: Add Support for ATMEL AT25DF641 64-Megabit SPI Flash
  [MTD] m25p80: add FAST_READ access support to M25Pxx
  [MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed.
  [MTD] [NAND] at91_nand: control NCE signal
  [MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260
  [MTD] [NAND] Hardware ECC controller on at91sam9263 / at91sam9260
  [JFFS2] Introduce dbg_readinode2 log level, use it to shut read_dnode() up
  [JFFS2] Fix jffs2_reserve_space() when all blocks are pending erasure.
  [JFFS2] Add erase_checking_list to hold blocks being marked.
  UBI: add a message
  [JFFS2] Return values of jffs2_block_check_erase error paths
  [MTD] Clean up AR7 partition map support
  [MTD] [NOR] Fix Intel CFI driver for collie flash
  [JFFS2] Finally remove redundant ref->__totlen field.
  [JFFS2] Honour TEST_TOTLEN macro in debugging code. ref->__totlen is going!
  [JFFS2] Add paranoia debugging for superblock counts
  [JFFS2] Fix free space leak with in-band cleanmarkers
  [JFFS2] Self-sufficient #includes in jffs2_fs_i.h: include <linux/mutex.h>
  [MTD] [NAND] Verify probe by retrying to checking the results match
  [MTD] [NAND] S3C2410 Allow ECC disable to be specified by the board
  ...

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux...
Linus Torvalds [Fri, 25 Apr 2008 19:25:03 +0000 (12:25 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mingo/linux-2.6-sched-fixes2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-fixes2:
  sched: use alloc_bootmem() instead of alloc_bootmem_low()

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Fri, 25 Apr 2008 19:24:06 +0000 (12:24 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  ieee1394: silence defined but not used warning in non-modular builds
  ieee1394: rawiso: requeue packet for transmission after skipped cycle

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Fri, 25 Apr 2008 19:06:46 +0000 (12:06 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild:
  kbuild: fix depmod comment
  kbuild: Add new Kbuild variable KBUILD_EXTRA_SYMBOLS
  kbuild: support loading extra symbols in modpost
  Add option to enable -Wframe-larger-than= on gcc 4.4
  kbuild: add kconfig symbols to tags output
  kbuild: fix some minor typoes
  kbuild: error out on missing MODULE_LICENSE

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux...
Linus Torvalds [Fri, 25 Apr 2008 19:03:36 +0000 (12:03 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mingo/linux-2.6-x86-fixes4

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-x86-fixes4:
  x86: harden kernel code patching
  x86: clean up text_poke()
  x86: fix text_poke()
  x86: remove set_fixmap() warning
  x86: make __set_fixmap() non-init
  x86: make clear_fixmap() available on 64-bit as well

16 years agokbuild: fix depmod comment
Uwe Kleine-König [Wed, 5 Mar 2008 14:57:04 +0000 (15:57 +0100)]
kbuild: fix depmod comment

Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: trivial@kernel.org
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agoMerge branch 'for-linus' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Fri, 25 Apr 2008 18:45:40 +0000 (11:45 -0700)]
Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux

* 'for-linus' of git://linux-nfs.org/~bfields/linux:
  nfsd: don't allow setting ctime over v4
  Update to NFS/RDMA documentation
  locks: don't call ->copy_lock methods on return of conflicting locks
  lockd: unlock lockd locks held for a certain filesystem
  lockd: unlock lockd locks associated with a given server ip
  leases: remove unneeded variable from fcntl_setlease().
  leases: move lock allocation earlier in generic_setlease()
  leases: when unlocking, skip locking-related steps
  leases: fix a return-value mixup

16 years agokbuild: Add new Kbuild variable KBUILD_EXTRA_SYMBOLS
Richard Hacker [Thu, 28 Feb 2008 08:40:58 +0000 (09:40 +0100)]
kbuild: Add new Kbuild variable KBUILD_EXTRA_SYMBOLS

This patch adds a new (Kbuild) Makefile variable KBUILD_EXTRA_SYMBOLS.
The space separated list of file names assigned to KBUILD_EXTRA_SYMBOLS
is used when calling scripts/mod/modpost during stage 2 of the Kbuild
process for non-kernel-tree modules.

Signed-off-by: Richard Hacker <lerichi@gmx.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agokbuild: support loading extra symbols in modpost
Richard Hacker [Thu, 28 Feb 2008 08:40:52 +0000 (09:40 +0100)]
kbuild: support loading extra symbols in modpost

This patch adds a new command line option -E to modpost, expecting a symbol
file as an argument which is read prior to symbol processing. -E can be
supplied multiple times for as many files as is needed.

When building kernel modules that depend on other modules not in the main
kernel tree, modpost complains about undefined symbols:
# make -C /path/to/linux/kernel M=/path/to/my/module
...
Building modules, stage 2.
....
WARNING: "rt_copy_buf" [/home/rich/osc_etl_rtw/osc_kmod.ko] undefined!
...etc

This situation occurs when modpost processes the new module's symbols. When
it finds symbols not exported by the mainline kernel, it issues this warning.

The patch adds a new command line option -e to modpost which expects a symbol
file as an argument. The symbols listed in this file are added to modpost's
symbol tables during startup. -e can be supplied as often as required.

This patch works together with the second patch. It introduces a new make
variable, KBUILD_EXTRA_SYMBOLS, which is used when calling modpost.

Signed-off-by: Richard Hacker <lerichi@gmx.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agoAdd option to enable -Wframe-larger-than= on gcc 4.4
Andi Kleen [Fri, 22 Feb 2008 14:15:03 +0000 (15:15 +0100)]
Add option to enable -Wframe-larger-than= on gcc 4.4

Add option to enable -Wframe-larger-than= on gcc 4.4

gcc mainline (upcoming 4.4) added a new -Wframe-larger-than=...
option to warn at build time about too large stack frames. Add a config
option to enable this warning, since this very useful for the kernel.

I choose (somewhat arbitarily) 2048 as default warning threshold for 64bit
and 1024 as default for 32bit architectures.  With some research and
fixing all the code for smaller values these defaults should be probably
lowered.

With the default allyesconfigs have some new warnings, but I think
that is all code that should be just fixed.

At some point (when gcc 4.4 is released and widely used) this should
obsolete make checkstack

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agokbuild: add kconfig symbols to tags output
Alexey Dobriyan [Fri, 22 Feb 2008 12:02:33 +0000 (15:02 +0300)]
kbuild: add kconfig symbols to tags output

Steps to reproduce:

vi -t NETFILTER

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agokbuild: fix some minor typoes
Robert P. J. Day [Mon, 18 Feb 2008 09:48:20 +0000 (04:48 -0500)]
kbuild: fix some minor typoes

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
16 years agokbuild: error out on missing MODULE_LICENSE
Sam Ravnborg [Fri, 25 Apr 2008 18:13:30 +0000 (20:13 +0200)]
kbuild: error out on missing MODULE_LICENSE

Adrian Bunk suggested a build time check for
missing MODULE_LICENSE annotation in modules.
The build time check is fatal as we really
want this fixed for all modules.
In-tree modules should all have been fixed up by now.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Adrian Bunk <bunk@kernel.org>
16 years agoDocument seq_path_root()
Jonathan Corbet [Fri, 25 Apr 2008 17:56:37 +0000 (11:56 -0600)]
Document seq_path_root()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agox86: harden kernel code patching
Ingo Molnar [Fri, 25 Apr 2008 15:07:03 +0000 (17:07 +0200)]
x86: harden kernel code patching

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: clean up text_poke()
Mathieu Desnoyers [Thu, 24 Apr 2008 15:03:33 +0000 (11:03 -0400)]
x86: clean up text_poke()

Clean up the codepath, remove alignment restrictions and do sanity
checking of the end result, to make sure we patched the right site.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix text_poke()
Jiri Slaby [Mon, 28 Apr 2008 00:51:23 +0000 (02:51 +0200)]
x86: fix text_poke()

kernel_text_address returns true even for modules which is not wanted
in text_poke. Use core_kernel_text instead.

This is a regression introduced in e587cadd8f47e202a30712e2906a65a0606d5865
which caused occasionaly crashes after suspend/resume.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
CC: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
CC: Andi Kleen <andi@firstfloor.org>
CC: pageexec@freemail.hu
CC: H. Peter Anvin <hpa@zytor.com>
CC: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: remove set_fixmap() warning
Ingo Molnar [Fri, 25 Apr 2008 16:05:57 +0000 (18:05 +0200)]
x86: remove set_fixmap() warning

set_fixmap()+clear_fixmap() is safe.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: make __set_fixmap() non-init
Ingo Molnar [Fri, 25 Apr 2008 16:28:21 +0000 (18:28 +0200)]
x86: make __set_fixmap() non-init

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: make clear_fixmap() available on 64-bit as well
Ingo Molnar [Fri, 25 Apr 2008 16:25:25 +0000 (18:25 +0200)]
x86: make clear_fixmap() available on 64-bit as well

Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agoVarious fixes to Documentation/HOWTO
Jonathan Corbet [Fri, 25 Apr 2008 17:23:56 +0000 (11:23 -0600)]
Various fixes to Documentation/HOWTO

Fix a number of things which have gone somewhat out-of-date over the last
few months.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agonfsd: don't allow setting ctime over v4
J. Bruce Fields [Thu, 24 Apr 2008 20:59:30 +0000 (16:59 -0400)]
nfsd: don't allow setting ctime over v4

Presumably this is left over from earlier drafts of v4, which listed
TIME_METADATA as writeable.  It's read-only in rfc 3530, and shouldn't
be modifiable anyway.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoUpdate to NFS/RDMA documentation
James Lentini [Thu, 24 Apr 2008 19:57:43 +0000 (15:57 -0400)]
Update to NFS/RDMA documentation

Update to the NFS/RDMA documentation to clarify how to configure the
exports file.

Signed-off-by: James Lentini <jlentini@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agolocks: don't call ->copy_lock methods on return of conflicting locks
J. Bruce Fields [Thu, 24 Apr 2008 14:08:22 +0000 (10:08 -0400)]
locks: don't call ->copy_lock methods on return of conflicting locks

The file_lock structure is used both as a heavy-weight representation of
an active lock, with pointers to reference-counted structures, etc., and
as a simple container for parameters that describe a file lock.

The conflicting lock returned from __posix_lock_file is an example of
the latter; so don't call the filesystem or lock manager callbacks when
copying to it.  This also saves the need for an unnecessary
locks_init_lock in the nfsv4 server.

Thanks to Trond for pointing out the error.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
16 years agolockd: unlock lockd locks held for a certain filesystem
Wendy Cheng [Thu, 17 Jan 2008 16:10:12 +0000 (11:10 -0500)]
lockd: unlock lockd locks held for a certain filesystem

Add /proc/fs/nfsd/unlock_filesystem, which allows e.g.:

shell> echo /mnt/sfs1 > /proc/fs/nfsd/unlock_filesystem

so that a filesystem can be unmounted before allowing a peer nfsd to
take over nfs service for the filesystem.

Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
Cc: Lon Hohberger <lhh@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
 fs/lockd/svcsubs.c          |   66 +++++++++++++++++++++++++++++++++++++++-----
 fs/nfsd/nfsctl.c            |   65 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/lockd/lockd.h |    7 ++++
 3 files changed, 131 insertions(+), 7 deletions(-)

16 years agolockd: unlock lockd locks associated with a given server ip
Wendy Cheng [Thu, 17 Jan 2008 16:10:12 +0000 (11:10 -0500)]
lockd: unlock lockd locks associated with a given server ip

For high-availability NFS service, we generally need to be able to drop
file locks held on the exported filesystem before moving clients to a
new server.  Currently the only way to do that is by shutting down lockd
entirely, which is often undesireable (for example, if you want to
continue exporting other filesystems).

This patch allows the administrator to release all locks held by clients
accessing the client through a given server ip address, by echoing that
address to a new file, /proc/fs/nfsd/unlock_ip, as in:

shell> echo 10.1.1.2 > /proc/fs/nfsd/unlock_ip

The expected sequence of events can be:
1. Tear down the IP address
2. Unexport the path
3. Write IP to /proc/fs/nfsd/unlock_ip to unlock files
4. Signal peer to begin take-over.

For now we only support IPv4 addresses and NFSv2/v3 (NFSv4 locks are not
affected).

Also, if unmounting the filesystem is required, we assume at step 3 that
clients using the given server ip are the only clients holding locks on
the given filesystem; otherwise, an additional patch is required to
allow revoking all locks held by lockd on a given filesystem.

Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
Cc: Lon Hohberger <lhh@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
 fs/lockd/svcsubs.c          |   66 +++++++++++++++++++++++++++++++++++++++-----
 fs/nfsd/nfsctl.c            |   65 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/lockd/lockd.h |    7 ++++
 3 files changed, 131 insertions(+), 7 deletions(-)

16 years agoleases: remove unneeded variable from fcntl_setlease().
David M. Richter [Wed, 23 Apr 2008 20:29:02 +0000 (16:29 -0400)]
leases: remove unneeded variable from fcntl_setlease().

fcntl_setlease() has a struct dentry* that is used only once; this patch
removes it.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoleases: move lock allocation earlier in generic_setlease()
David M. Richter [Wed, 23 Apr 2008 20:29:01 +0000 (16:29 -0400)]
leases: move lock allocation earlier in generic_setlease()

In generic_setlease(), the struct file_lock is allocated after tests for the
presence of conflicting readers/writers is done, despite the fact that the
allocation might block; this patch moves the allocation earlier.  A subsequent
set of patches will rely on this behavior to properly serialize between a
modified __break_lease() and generic_setlease().

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoleases: when unlocking, skip locking-related steps
David M. Richter [Wed, 23 Apr 2008 20:29:00 +0000 (16:29 -0400)]
leases: when unlocking, skip locking-related steps

In generic_setlease(), we don't need to allocate a new struct file_lock
or check for readers or writers when called with F_UNLCK.

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoleases: fix a return-value mixup
David M. Richter [Wed, 23 Apr 2008 20:28:59 +0000 (16:28 -0400)]
leases: fix a return-value mixup

Fixes a return-value mixup from 85c59580b30c82aa771aa33b37217a6b6851bc14
"locks: Fix potential OOPS in generic_setlease()", in which -ENOMEM replaced
what had been intended to stay -EAGAIN in the variable "error".

Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoieee1394: silence defined but not used warning in non-modular builds
Tony Breeds [Thu, 24 Apr 2008 07:02:04 +0000 (09:02 +0200)]
ieee1394: silence defined but not used warning in non-modular builds

Currently the kernel will issue the following warning:
drivers/ieee1394/raw1394.c:2938: warning: 'raw1394_id_table' defined but not used
Add #ifdef MODULE guards around the declaration.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Ditto with dv1394_id_table and video1394_id_table.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoieee1394: rawiso: requeue packet for transmission after skipped cycle
Pieter Palmers [Wed, 19 Mar 2008 21:10:59 +0000 (22:10 +0100)]
ieee1394: rawiso: requeue packet for transmission after skipped cycle

As it seems, some host controllers have issues that can cause them to
skip cycles now and then when using large packets. I suspect that this
is due to DMA not succeeding in time. If the transmit fifo can't contain
more than one packet (big packets), the DMA should provide a new packet
each cycle (125us). I am under the impression that my current PCI
express test system can't guarantee this.

In any case, the patch tries to provide a workaround as follows:
The DMA program descriptors are modified such that when an error occurs,
the DMA engine retries the descriptor the next cycle instead of
stalling. This way no data is lost. The side effect of this is that
packets are sent with one cycle delay. This however might not be that
much of a problem for certain protocols (e.g. AM824). If they use
padding packets for e.g. rate matching they can drop one of those to
resync the streams.

The amount of skips between two userspace wakeups is counted. This
number is then propagated to userspace through the upper 16 bits of the
'dropped' parameter. This allows unmodified userspace applications due
to the following:
1) libraw simply passes this dropped parameter to the user application
2) the meaning of the dropped parameter is: if it's nonzero, something
bad has happened. The actual value of the parameter at this moment does
not have a specific meaning.

A libraw client can then retrieve the number of skipped cycles and
account for them if needed.

Signed-off-by: Pieter Palmers <pieterp@joow.be>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years ago[SPARC64]: Wrap SMP IPIs with irq_enter()/irq_exit().
David S. Miller [Fri, 25 Apr 2008 10:11:37 +0000 (03:11 -0700)]
[SPARC64]: Wrap SMP IPIs with irq_enter()/irq_exit().

Otherwise all sorts of bad things can happen, including
spurious softlockup reports.

Other platforms have this same bug, in one form or
another, just don't see the issue because they
don't sleep as long as sparc64 can in NOHZ.

Thanks to some brilliant debugging by Peter Zijlstra.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SPARC64]: Fix args to 64-bit sys_semctl() via sys_ipc().
David S. Miller [Fri, 25 Apr 2008 09:12:05 +0000 (02:12 -0700)]
[SPARC64]: Fix args to 64-bit sys_semctl() via sys_ipc().

Second and third arguments were swapped for whatever reason.

Reported by Tom Callaway.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Fix wrong interpretation of some copy_to_user() results.
Pavel Emelyanov [Fri, 25 Apr 2008 08:49:48 +0000 (01:49 -0700)]
net: Fix wrong interpretation of some copy_to_user() results.

I found some places, that erroneously return the value obtained from
the copy_to_user() call: if some amount of bytes were not able to get
to the user (this is what this one returns) the proper behavior is to
return the -EFAULT error, not that number itself.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[MTD] m25p80: Add Support for ATMEL AT25DF641 64-Megabit SPI Flash
Michael Hennerich [Fri, 25 Apr 2008 04:07:33 +0000 (12:07 +0800)]
[MTD] m25p80: Add Support for ATMEL AT25DF641 64-Megabit SPI Flash

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] m25p80: add FAST_READ access support to M25Pxx
Bryan Wu [Fri, 25 Apr 2008 04:07:32 +0000 (12:07 +0800)]
[MTD] m25p80: add FAST_READ access support to M25Pxx

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed.
Michael Hennerich [Fri, 25 Apr 2008 04:07:31 +0000 (12:07 +0800)]
[MTD] [NAND] bf5xx_nand: Avoid crash if bfin_mac is installed.

http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=4053

Singed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years ago[MTD] [NAND] at91_nand: control NCE signal
Atsushi Nemoto [Thu, 24 Apr 2008 14:51:29 +0000 (23:51 +0900)]
[MTD] [NAND] at91_nand: control NCE signal

This driver did not control NCE signal during normal operations (only
enable NCE on probing and disable NCE on removing).  This patch make
NCE signal inactive on idle state.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years agosched: use alloc_bootmem() instead of alloc_bootmem_low()
David Miller [Fri, 25 Apr 2008 03:46:20 +0000 (20:46 -0700)]
sched: use alloc_bootmem() instead of alloc_bootmem_low()

There is no guarantee that there is physical ram below 4GB, and in
fact many boxes don't have exactly that.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years ago[MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260
Richard Genoud [Fri, 25 Apr 2008 07:32:26 +0000 (09:32 +0200)]
[MTD] [NAND] AT91 hardware ECC compile fix for at91sam9263 / at91sam9260

The sam926x docs allegedly don't list an "ECC_PARITY" field, and the
header files in the upstream kernel don't have it either.

Masking with it was useless anyway, so just remove it.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years agoMerge branch 'upstream-davem' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Fri, 25 Apr 2008 07:31:07 +0000 (00:31 -0700)]
Merge branch 'upstream-davem' of /linux/kernel/git/jgarzik/netdev-2.6

16 years agoxfrm: alg_key_len & alg_icv_len should be unsigned
Eric Dumazet [Fri, 25 Apr 2008 07:29:00 +0000 (00:29 -0700)]
xfrm: alg_key_len & alg_icv_len should be unsigned

In commit ba749ae98d5aa9d2ce9a7facde0deed454f92230 ([XFRM]: alg_key_len
should be unsigned to avoid integer divides
<http://git2.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=ba749ae98d5aa9d2ce9a7facde0deed454f92230>)
alg_key_len field of struct xfrm_algo was converted to unsigned int to
avoid integer divides.

Then Herbert in commit 1a6509d991225ad210de54c63314fd9542922095
([IPSEC]: Add support for combined mode algorithms) added a new
structure xfrm_algo_aead, that resurrected a signed int for alg_key_len
and re-introduce integer divides.

This patch avoids these divides and saves 64 bytes of text on i386.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[netdrvr] tehuti: move ioctl perm check closer to function start
Jeff Garzik [Fri, 25 Apr 2008 07:11:31 +0000 (03:11 -0400)]
[netdrvr] tehuti: move ioctl perm check closer to function start

Noticed by davem.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipv6: Fix typo in net/ipv6/Kconfig
Michael Beasley [Fri, 25 Apr 2008 06:50:30 +0000 (23:50 -0700)]
ipv6: Fix typo in net/ipv6/Kconfig

Two is used in the wrong context here, as you are connecting to an
IPv6 network over IPv4; not connecting two IPv6 networks to an IPv4
one.

Signed-off-by: Michael Beasley <youvegotmoxie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agovia-velocity: fix vlan receipt
Francois Romieu [Thu, 24 Apr 2008 21:32:33 +0000 (23:32 +0200)]
via-velocity: fix vlan receipt

- vlans were using a single CAM register (see mac_set_vlan_cam)
- setting the address filtering registers for vlans is not
  needed when there is no vlan

The non-tagged interface is filtered out as soon as a tagged
(!= 0) interface is created. Its traffic appears again when an
zero-tagged interface is created.

Tested on Via Epia SN (VT6130 chipset) with several vlans whose
tag was above or beyond 255.

Signed-off-by: Séguier Régis <rseguier@e-teleport.net>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotg3: sparse cleanup
Eric Dumazet [Fri, 25 Apr 2008 06:33:06 +0000 (23:33 -0700)]
tg3: sparse cleanup

Fix the following sparse warning :

drivers/net/tg3.c:4025:3: warning: context imbalance in 'tg3_restart_hw'
- unexpected unlock

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoforcedeth: realtek phy crossover detection
Ayaz Abdulla [Wed, 23 Apr 2008 18:37:30 +0000 (14:37 -0400)]
forcedeth: realtek phy crossover detection

This patch fixes an issue seen with the realtek 8201 phy. This phy has a
problem with crossover detection and it needs to be disabled. The
problem only arises on certain switches. Therefore, a module parameter
has been added to allow enabling crossover detection if needed. The
default will be set to disabled.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: Increase MDIO timeouts
Benjamin Herrenschmidt [Wed, 23 Apr 2008 05:17:14 +0000 (15:17 +1000)]
ibm_newemac: Increase MDIO timeouts

This patch doubles the MDIO timeouts in EMAC as there are field
cases where they are two short to communicate with some PHYs.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agogianfar: Fix skb allocation strategy
Andy Fleming [Tue, 22 Apr 2008 22:18:29 +0000 (17:18 -0500)]
gianfar: Fix skb allocation strategy

gianfar was unable to handle failed skb allocation for rx buffers, so
we were spinning until it succeeded.  Actually, it was worse--we were
spinning for a long time, and then silently failing.  Instead, we take
Stephen Hemminger's suggestion to try the allocation earlier, and drop the
packet if it failed.

We also make a couple of tweaks to how buffer descriptors are set up.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agonetxen: reduce stack usage of netxen_nic_flash_print
Harvey Harrison [Tue, 22 Apr 2008 18:48:35 +0000 (11:48 -0700)]
netxen: reduce stack usage of netxen_nic_flash_print

Don't need to keep a struct netxen_new_user_info on the stack
when we only are interested in printing the serial_num.  Change
to only reading the serial_num.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosmc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}
Roel Kluin [Fri, 18 Apr 2008 20:50:48 +0000 (13:50 -0700)]
smc911x: test after postfix decrement fails in smc911x_{reset,drop_pkt}

When timeout reaches 0 the postfix decrement still subtracts, so the test
fails.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agonet drivers: fix platform driver hotplug/coldplug
Kay Sievers [Fri, 18 Apr 2008 20:50:44 +0000 (13:50 -0700)]
net drivers: fix platform driver hotplug/coldplug

Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias is
prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable network
platform drivers, to re-enable auto loading.

NOTE: didn't change drivers/net/fs_enet/fs_enet-main.c "old binding" support.
That looks problematic in the first place (it even uses the ancient "struct
device_driver" binding scheme for platform_bus!) and I suspect it will vanish
soonish when arch/powerpc rules the world.  Also, drivers/net/ne.c would have
needed more thought to sort out.

[akpm@linux-foundation.org: fix sgiseeq.c]
[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Vitaly Bordug <vitb@kernel.crashing.org>
Cc: Dale Farnsworth <dale@farnsworth.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Andrew Victor <andrew@sanpeople.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoforcedeth: new backoff implementation
Ayaz Abdulla [Fri, 18 Apr 2008 20:50:43 +0000 (13:50 -0700)]
forcedeth: new backoff implementation

This patch adds support for a new backoff algorithm for half duplex supported
in newer hardware.  The old method is will be designated as legacy mode.

Re-seeding random values for the backoff algorithms are performed when a
transmit has failed due to a maximum retry count (1 to 15, where max is
considered the wraparound case of 0).

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoehea: make things static
Andrew Morton [Fri, 18 Apr 2008 20:50:39 +0000 (13:50 -0700)]
ehea: make things static

ehea_flush_sq() and ehea_purge_sq() should be static.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Thomas Klein <osstklei@de.ibm.com>
Cc: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agophylib: Add support for board-level PHY fixups
Andy Fleming [Fri, 18 Apr 2008 22:29:54 +0000 (17:29 -0500)]
phylib: Add support for board-level PHY fixups

Sometimes the specific interaction between the platform and the PHY
requires special handling.  For instance, to change where the PHY's
clock input is, or to add a delay to account for latency issues in the
data path.  We add a mechanism for registering a callback with the PHY
Lib to be called on matching PHYs when they are brought up, or reset.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] atlx: code movement: move atl1 parameter parsing
Chris Snook [Sat, 19 Apr 2008 01:51:53 +0000 (21:51 -0400)]
[netdrvr] atlx: code movement: move atl1 parameter parsing

Move some code from atlx.c to atl1.c to prevent build conflict with
the upcoming atl2 code.  No changes, just movement.

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoatlx: remove flash vendor parameter
Chris Snook [Sat, 19 Apr 2008 01:47:41 +0000 (21:47 -0400)]
atlx: remove flash vendor parameter

There's no good reason to manually set the flash vendor in a module
parameter, outside of an Atheros hardware lab.  Remove it, so nobody
accidentally bricks their board using it incorrectly.

Signed-off-by: Chris Snook <csnook@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agokorina: misc cleanup
Francois Romieu [Sun, 20 Apr 2008 16:06:13 +0000 (18:06 +0200)]
korina: misc cleanup

- useless initialization (korina_ope / korina_restart)
- use a single variable for the status code in korina_probe
  and propagate the error status code from below
- useless checks in korina_remove : the variables are
  necessarily set when korina_probe succeeds

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agokorina: fix misplaced return statement
Francois Romieu [Sun, 20 Apr 2008 16:05:31 +0000 (18:05 +0200)]
korina: fix misplaced return statement

The driver takes the error unwind path without condition.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoWAN: Fix confusing insmod error code for C101 too.
Krzysztof Halasa [Sun, 20 Apr 2008 17:10:56 +0000 (19:10 +0200)]
WAN: Fix confusing insmod error code for C101 too.

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoRemoving dead code in drivers/net/wan/hdlc_fr.c
Cédric Augonnet [Sun, 20 Apr 2008 17:15:51 +0000 (19:15 +0200)]
Removing dead code in drivers/net/wan/hdlc_fr.c

The local variable "prefix" is never used anymore, and the content of
this string appears a bit later, directly in a call to "alloc_netdev"
after doing exactly the same if/else test. So there seems to be no
point keeping those 4 lines anymore.

Signed-off-by: Cédric Augonnet <cedric.augonnet@ens-lyon.org>
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agotehuti: check register size
Francois Romieu [Sun, 20 Apr 2008 17:32:34 +0000 (19:32 +0200)]
tehuti: check register size

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] typhoon: typhoon_resume - remove call to start_queue
Grant Grundler [Mon, 21 Apr 2008 04:44:15 +0000 (22:44 -0600)]
[netdrvr] typhoon: typhoon_resume - remove call to start_queue

While trying to fix http://bugzilla.kernel.org/show_bug.cgi?id=8952
I looked at a few other drivers to figure out what drivers _should_
be doing for suspend/resume. I noticed typhoon driver is likely doing
more than it needs to.  Patch below is untested since I don't have the HW.

Suspend/resume code across NIC drivers is fairly inconsistent.
And I couldn't find any documentation on what the canonical sequence
NICs need to do for suspend or resume.  Is there any?

Barring contrary advice, I'm going model the tulip suspend/resume
fixes after tg3.c since a number of "modern" (< 5 years old) laptops
have that and I'm silly enough to assume it works.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround
Valentine Barshak [Tue, 22 Apr 2008 00:46:48 +0000 (10:46 +1000)]
ibm_newemac: PowerPC 440EP/440GR EMAC PHY clock workaround

This patch adds ibm_newemac PHY clock workaround for 440EP/440GR EMAC
attached to a PHY which doesn't generate RX clock if there is no link.
The code is based on the previous ibm_emac driver stuff. The 440EP/440GR
allows controlling each EMAC clock separately as opposed to global clock
selection for 440GX.

BenH: Made that #ifdef CONFIG_PPC_DCR_NATIVE for now as dcri_* stuff doesn't
exist for MMIO type DCRs like Cell. Some future rework & improvements of the
DCR infrastructure will make that cleaner but for now, this makes it work.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: PowerPC 440GX EMAC PHY clock workaround
Valentine Barshak [Tue, 22 Apr 2008 00:46:46 +0000 (10:46 +1000)]
ibm_newemac: PowerPC 440GX EMAC PHY clock workaround

The PowerPC 440GX Taishan board fails to reset EMAC3 (reset timeout
error) if there's no link. Because of that it fails to find PHY
chip. The older ibm_emac driver had a workaround for that: the
EMAC_CLK_INTERNAL/EMAC_CLK_EXTERNAL macros, which toggle the Ethernet
Clock Select bit in the SDR0_MFR register. This patch does the same for
"ibm,emac-440gx" compatible chips. The workaround forces clock on -all-
EMACs, so we select clock under global emac_phy_map_lock.

BenH: Made that #ifdef CONFIG_PPC_DCR_NATIVE for now as dcri_* stuff
doesn't exist for MMIO type DCRs like Cell. Some future rework &
improvements of the DCR infrastructure will make that cleaner but
for now, this makes it work.

Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac Use status property for unused/unwired EMACs
Josh Boyer [Tue, 22 Apr 2008 00:46:44 +0000 (10:46 +1000)]
ibm_newemac Use status property for unused/unwired EMACs

Convert ibm_newemac to use the of_device_is_available function when checking
for unused/unwired EMACs.  We leave the current check for an "unused" property
to maintain backwards compatibility for older device trees.  Newer device
trees should simply use the standard "status" property in the EMAC node.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: Fix section mismatch warnings
Josh Boyer [Tue, 22 Apr 2008 00:46:43 +0000 (10:46 +1000)]
ibm_newemac: Fix section mismatch warnings

This patch fixes several section mismatch warnings in the
ibm_newemac driver similar to:

WARNING: vmlinux.o(.devinit.text+0x3a04): Section mismatch in reference from the function emac_probe() to the function .devexit.text:tah_detach()
The function __devinit emac_probe() references
a function __devexit tah_detach().

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: Add support for 460EX/GT-type MAL rx-channel handling
Stefan Roese [Tue, 22 Apr 2008 00:46:42 +0000 (10:46 +1000)]
ibm_newemac: Add support for 460EX/GT-type MAL rx-channel handling

On some 4xx PPC's (e.g. 460EX/GT), the rx channel number is a multiple
of 8 (e.g. 8 for EMAC1, 16 for EMAC2), but enabling in MAL_RXCASR needs
the divided by 8 value for the bitmask.

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoibm_newemac: Fix problem with jumbo frame support and EMAC V4.patch
Stefan Roese [Tue, 22 Apr 2008 00:46:42 +0000 (10:46 +1000)]
ibm_newemac: Fix problem with jumbo frame support and EMAC V4.patch

This fixes the jumbo frame support on EMAC V4 systems. Now the correct
bit is set depending on the EMAC version configured.

Tested on Kilauea (405EX) and Canyonlands (460EX).

Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: Increment version to 0.2.1
Jesse Brandeburg [Wed, 23 Apr 2008 18:09:39 +0000 (11:09 -0700)]
e1000e: Increment version to 0.2.1

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoigb: save and restore pcie/msi state to support EEH recovery
Auke Kok [Wed, 23 Apr 2008 18:09:34 +0000 (11:09 -0700)]
igb: save and restore pcie/msi state to support EEH recovery

To enable EEH support for pci-express network adapters, pcie/msi state
needs to be saved and restored for that adapter.

[after similar patches for ixgbe and e1000e from Wendy Xiong]

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: Wendy Xiong <wendyx@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: save and restore pcie/msi state to support EEH recovery
Wendy Xiong [Wed, 23 Apr 2008 18:09:29 +0000 (11:09 -0700)]
e1000e: save and restore pcie/msi state to support EEH recovery

To enable EEH support for pci-express network adapters, pcie/msi state
needs to be saved and restored for that adapter.

Tested this EEH patch with 2ports and 4ports pci-express e1000e
adapters.

Signed-off-by: Wendy Xiong <wendyx@us.ibm.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoixgbe: save and restore pcie/msi state to support EEH recovery
Wendy Xiong [Wed, 23 Apr 2008 18:09:24 +0000 (11:09 -0700)]
ixgbe: save and restore pcie/msi state to support EEH recovery

To enable EEH support for pci-express network adapters, pcie/msi state
needs to be saved and restored for that adapter.

Tested this EEH patch with Intel 10G pci-express ixgbe adapter.

Signed-off-by: Wendy Xiong <wendyx@us.ibm.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: lower ring minimum size to 64
Auke Kok [Wed, 23 Apr 2008 18:09:19 +0000 (11:09 -0700)]
e1000e: lower ring minimum size to 64

The lower limit of 80 descriptors in the ring is only valid for
one older 8254x chipset. All e1000e devices can use as low as
64 descriptors.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: Fix HW Error on es2lan, ARP capture issue by BMC
David Graham [Wed, 23 Apr 2008 18:09:14 +0000 (11:09 -0700)]
e1000e: Fix HW Error on es2lan, ARP capture issue by BMC

Several components to this complex fix. The es2lan cards occasionally
gave a "HW Error" especially when forcing speed. Some users also
reported that the BMC stole ARP packets.

The fixes include setting the proper SW_FW bits to tell the BMC
that we're active and not do any un-initialization at all, so the
setup routine is largely changed.

Signed-off-by: David Graham <david.graham@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: Add interrupt moderation run-time ethtool interface
Auke Kok [Wed, 23 Apr 2008 18:09:08 +0000 (11:09 -0700)]
e1000e: Add interrupt moderation run-time ethtool interface

The ethtool -c / -C interface can now be used to modify the
irq moderation algorithm. This change does not require an
adapter reset and can thus be used at all times. The adapter
only supports changing/reading rx-usecs which has special
values for 0, 1 and 3:

0 - no irq moderation whatsoever
1 - normal moderation favoring regular mixed traffic (default)
3 - best attempt at low latency possible at cost of CPU

For values between 10 and 10000 the rx-usecs defines "the minimum
time between successive irqs" in usec, unlike the module parameter.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoe1000e: cleanup several stats issues
Bruce Allan [Wed, 23 Apr 2008 18:09:00 +0000 (11:09 -0700)]
e1000e: cleanup several stats issues

Several stats registers are completely unused and we just waste pci
bus time reading them. We also omit using the high 32 bits of the GORC/
GOTC counters. We can just read clear them and only read the low registers.

Mii-tool can also break es2lan if it executes a MII PHY register
ioctl while the device is in autonegotiation. Unfortunately it seems
that several applications and installations still perform this ioctl
call periodically and especially in this crucial startup time. We
can fool the ioctl by providing fail safe information that mimics
the "down" link state and only perform the dangerous PHY reads once
after link comes up to fill in the real values. As long as link
stays up the information will not change.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Removed rx_lock and put_lock
Sreenivasa Honnur [Wed, 23 Apr 2008 17:31:33 +0000 (13:31 -0400)]
S2io: Removed rx_lock and put_lock

- Removed rx_lock and put_lock as the buffer replenishment and
  receive completion is handled serially.

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 <jgarzik@redhat.com>
16 years agoS2io: Removed receive buffer replenishment tasklet
Sreenivasa Honnur [Wed, 23 Apr 2008 17:29:42 +0000 (13:29 -0400)]
S2io: Removed receive buffer replenishment tasklet

- Removed receive buffer replenishment tasklet s2io_tasklet and instead
  allocating the receive buffers in either the interrupt handler (no napi)
  or the napi handler (napi enabled).

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 <jgarzik@redhat.com>
16 years agoS2io: Version update for memory leak fix during free_tx_buffers
Sreenivasa Honnur [Wed, 23 Apr 2008 17:28:58 +0000 (13:28 -0400)]
S2io: Version update for memory leak fix during free_tx_buffers

- Updated version number.

Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoS2io: Fix memory leak during free_tx_buffers
Sreenivasa Honnur [Wed, 23 Apr 2008 17:28:08 +0000 (13:28 -0400)]
S2io: Fix memory leak during free_tx_buffers

- Fix the memory leak during free_tx_buffers.

Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoucc_geth: Fix sneaky merge conflict regarding bus_id
Andy Fleming [Wed, 23 Apr 2008 21:56:17 +0000 (16:56 -0500)]
ucc_geth: Fix sneaky merge conflict regarding bus_id

The patch that changed mdio_bus to a string didn't conflict strongly enough
with the patch that added fixed PHY support to UCC.  Gather it back into
the fold.

Fixes this error:
...
 CC      drivers/net/ucc_geth.o
 'ucc_geth_probe':
 /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/net/ucc_geth.c:3935: error:
 incompatible types in assignment
 make[3]: *** [drivers/net/ucc_geth.o] Error 1

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoipv6 RAW: Disallow IPPROTO_IPV6-level IPV6_CHECKSUM socket option on ICMPv6 sockets.
YOSHIFUJI Hideaki [Fri, 25 Apr 2008 04:30:38 +0000 (21:30 -0700)]
ipv6 RAW: Disallow IPPROTO_IPV6-level IPV6_CHECKSUM socket option on ICMPv6 sockets.

RFC3542 tells that IPV6_CHECKSUM socket option in the IPPROTO_IPV6
level is not allowed on ICMPv6 sockets.  IPPROTO_RAW level
IPV6_CHECKSUM socket option (a Linux extension) is still allowed.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: tcp_probe buffer overflow and incorrect return value
Tom Quetchenbach [Fri, 25 Apr 2008 04:11:58 +0000 (21:11 -0700)]
tcp: tcp_probe buffer overflow and incorrect return value

tcp_probe has a bounds-checking bug that causes many programs (less,
python) to crash reading /proc/net/tcp_probe. When it outputs a log
line to the reader, it only checks if that line alone will fit in the
reader's buffer, rather than that line and all the previous lines it
has already written.

tcpprobe_read also returns the wrong value if copy_to_user fails--it
just passes on the return value of copy_to_user (number of bytes not
copied), which makes a failure look like a success.

This patch fixes the buffer overflow and sets the return value to
-EFAULT if copy_to_user fails.

Patch is against latest net-2.6; tested briefly and seems to fix the
crashes in less and python.

Signed-off-by: Tom Quetchenbach <virtualphtn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoniu: Add support for Neptune FEM/NEM cards for C10 server blades
Matheos Worku [Fri, 25 Apr 2008 04:09:20 +0000 (21:09 -0700)]
niu: Add support for Neptune FEM/NEM cards for C10 server blades

[ Minor coding style and whitespace corrections, also bump
  driver version and release date. -DaveM ]

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoniu: Determine the # of ports from the card's VPD data
Matheos Worku [Fri, 25 Apr 2008 04:02:37 +0000 (21:02 -0700)]
niu: Determine the # of ports from the card's VPD data

[ Fix minor whitespace and coding style stuff... -DaveM ]

Signed-off-by: Matheos Worku <matheos.worku@sun.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoethtool: EEPROM dump no longer works for tg3 and natsemi
Mandeep Singh Baines [Fri, 25 Apr 2008 03:55:56 +0000 (20:55 -0700)]
ethtool: EEPROM dump no longer works for tg3 and natsemi

In the ethtool user-space application, tg3 and natsemi over-ride the
default implementation of dump_eeprom(). In both tg3_dump_eeprom() and
natsemi_dump_eeprom(), there is a magic number check which is not
present in the default implementation.

Commit b131dd5d ("[ETHTOOL]: Add support for large eeproms") snipped
the code which copied the ethtool_eeprom structure back to
user-space. tg3 and natsemi are over-writing the magic number field
and then checking it in user-space. With the ethtool_eeprom copy
removed, the check is failing.

The fix is simple. Add the ethtool_eeprom copy back.

Signed-off-by: Mandeep Singh Baines <msb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoaf_key: Fix af_key.c compiler warning
Brian Haley [Fri, 25 Apr 2008 03:38:31 +0000 (20:38 -0700)]
af_key: Fix af_key.c compiler warning

net/key/af_key.c: In function ‘pfkey_spddelete’:
net/key/af_key.c:2359: warning: ‘pol_ctx’ may be used uninitialized in
this function

When CONFIG_SECURITY_NETWORK_XFRM isn't set,
security_xfrm_policy_alloc() is an inline that doesn't set pol_ctx, so
this seemed like the easiest fix short of using *uninitialized_var(pol_ctx).

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoxen: add balloon driver
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:13 +0000 (10:54 -0700)]
xen: add balloon driver

The balloon driver allows memory to be dynamically added or removed from the domain,
in order to allow host memory to be balanced between multiple domains.

This patch introduces the Xen balloon driver, though it currently only
allows a domain to be shrunk from its initial size (and re-grown back to
that size).  A later patch will add the ability to grow a domain beyond
its initial size.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: allow compilation with non-flat memory
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:12 +0000 (10:54 -0700)]
xen: allow compilation with non-flat memory

There's no real reason we can't support sparsemem/discontigmem, so do so.
This is mostly useful to support hotplug memory.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: fold xen_sysexit into xen_iret
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:11 +0000 (10:54 -0700)]
xen: fold xen_sysexit into xen_iret

xen_sysexit and xen_iret were doing essentially the same thing.  Rather
than having a separate implementation for xen_sysexit, we can just strip
the stack back to an iret frame and jump into xen_iret.  This removes
a lot of code and complexity - specifically, another critical region.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: allow set_pte_at on init_mm to be lockless
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:10 +0000 (10:54 -0700)]
xen: allow set_pte_at on init_mm to be lockless

The usual pagetable locking protocol doesn't seem to apply to updates
to init_mm, so don't rely on preemption being disabled in xen_set_pte_at
on init_mm.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: disable preemption during tlb flush
Jeremy Fitzhardinge [Wed, 2 Apr 2008 17:54:09 +0000 (10:54 -0700)]
xen: disable preemption during tlb flush

Various places in the kernel flush the tlb even though preemption doens't
guarantee the tlb flush is happening on any particular CPU.  In many cases
this doesn't seem to matter, so don't make a fuss about it.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen pvfb: Para-virtual framebuffer, keyboard and pointer driver
Markus Armbruster [Wed, 2 Apr 2008 17:54:07 +0000 (10:54 -0700)]
xen pvfb: Para-virtual framebuffer, keyboard and pointer driver

This is a pair of Xen para-virtual frontend device drivers:
drivers/video/xen-fbfront.c provides a framebuffer, and
drivers/input/xen-kbdfront provides keyboard and mouse.

The backends run in dom0 user space.

The two drivers are not in two separate patches, because the
intermediate step (one driver, not the other) is somewhat problematic:
the backend in dom0 needs both drivers, and will refuse to complete
device initialization unless they're both present.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agoxen: Add compatibility aliases for frontend drivers
Mark McLoughlin [Wed, 2 Apr 2008 17:54:06 +0000 (10:54 -0700)]
xen: Add compatibility aliases for frontend drivers

Before getting merged, xen-blkfront was xenblk and
xen-netfront was xennet.

Temporarily adding compatibility module aliases
eases upgrades from older versions by e.g. allowing
mkinitrd to find the new version of the module.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>