safe/jmp/linux-2.6
16 years agoNFSD: Strip __KERNEL__ testing from unexported header files.
Robert P. J. Day [Wed, 2 Apr 2008 01:48:37 +0000 (21:48 -0400)]
NFSD: Strip __KERNEL__ testing from unexported header files.

Also, sort the Kbuild file.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agosunrpc: make token header values less confusing
Kevin Coffman [Mon, 31 Mar 2008 14:31:44 +0000 (10:31 -0400)]
sunrpc: make token header values less confusing

g_make_token_header() and g_token_size() add two too many, and
therefore their callers pass in "(logical_value - 2)" rather
than "logical_value" as hard-coded values which causes confusion.

This dates back to the original g_make_token_header which took an
optional token type (token_id) value and added it to the token.
This was removed, but the routine always adds room for the token_id
rather than not.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agogss_krb5: consistently use unsigned for seqnum
Kevin Coffman [Mon, 31 Mar 2008 14:31:33 +0000 (10:31 -0400)]
gss_krb5: consistently use unsigned for seqnum

Consistently use unsigned (u32 vs. s32) for seqnum.

In get_mic function, send the local copy of seq_send,
rather than the context version.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoNFSD: Remove NFSv4 dependency on NFSv3
Chuck Lever [Thu, 27 Mar 2008 20:34:54 +0000 (16:34 -0400)]
NFSD: Remove NFSv4 dependency on NFSv3

Clean up: Because NFSD_V4 "depends on" NFSD_V3, it appears as a child of
the NFSD_V3 menu entry, and is not visible if NFSD_V3 is unselected.

Replace the dependency on NFSD_V3 with a "select NFSD_V3".  This makes
NFSD_V4 look and work just like NFS_V3, while ensuring that NFSD_V3 is
enabled if NFSD_V4 is.

Sam Ravnborg adds:

"This use of select is questionable. In general it is bad to select
a symbol with dependencies.

In this case the dependencies of NFSD_V3 are duplicated for NFSD_V4
so we will not se erratic configurations but do you remember to
update NFSD_V4 when you add a depends on NFSD_V3?

But I see no other clean way to do it right now."

Later he said:

"My comment was more to say we have things to address in kconfig.
This is abuse in the acceptable range."

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoSUNRPC: Remove PROC_FS dependency
Chuck Lever [Thu, 27 Mar 2008 20:34:47 +0000 (16:34 -0400)]
SUNRPC: Remove PROC_FS dependency

Recently, commit 440bcc59 added a reverse dependency to fs/Kconfig to
ensure that PROC_FS was enabled if SUNRPC_GSS was enabled.

Apparently this isn't necessary because the auth_gss components under
net/sunrpc will build correctly even if PROC_FS is disabled, though
RPCSEC_GSS will not work without /proc.

It also violates the guideline in Documentation/kbuild/kconfig-language.txt
that states "In general use select only for non-visible symbols (no prompts
anywhere) and for symbols with no dependencies."

To address these issues, remove the dependency.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoNFSD: Use "depends on" for PROC_FS dependency
Chuck Lever [Thu, 27 Mar 2008 20:34:40 +0000 (16:34 -0400)]
NFSD: Use "depends on" for PROC_FS dependency

Recently, commit 440bcc59 added a reverse dependency to fs/Kconfig to
ensure that PROC_FS was enabled if NFSD_V4 was enabled.

There is a guideline in Documentation/kbuild/kconfig-language.txt that
states "In general use select only for non-visible symbols (no prompts
anywhere) and for symbols with no dependencies."

A quick grep around other Kconfig files reveals that no entry currently
uses "select PROC_FS" -- every one uses "depends on".  Thus CONFIG_NFSD_V4
should use "depends on PROC_FS" as well.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agonfsd: move most of fh_verify to separate function
J. Bruce Fields [Fri, 14 Mar 2008 21:51:12 +0000 (17:51 -0400)]
nfsd: move most of fh_verify to separate function

Move the code that actually parses the filehandle and looks up the
dentry and export to a separate function.  This simplifies the reference
counting a little and moves fh_verify() a little closer to the kernel
ideal of small, minimally-indentended functions.  Clean up a few other
minor style sins along the way.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Neil Brown <neilb@suse.de>
16 years agonet/sunrpc/svc.c: suppress unintialized var warning
Andrew Morton [Wed, 12 Mar 2008 21:04:25 +0000 (14:04 -0700)]
net/sunrpc/svc.c: suppress unintialized var warning

net/sunrpc/svc.c: In function '__svc_create_thread':
net/sunrpc/svc.c:587: warning: 'oldmask.bits[0u]' may be used uninitialized in this function

Cc: Neil Brown <neilb@suse.de>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Tom Tucker <tom@opengridcomputing.com>
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoRemove define for KRB5_CKSUM_LENGTH, which will become enctype-dependent
Kevin Coffman [Thu, 21 Feb 2008 18:44:27 +0000 (13:44 -0500)]
Remove define for KRB5_CKSUM_LENGTH, which will become enctype-dependent

cleanup: When adding new encryption types, the checksum length
can be different for each enctype.  Face the fact that the
current code only supports DES which has a checksum length of 8.

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoCorrect grammer/typos in dprintks
Kevin Coffman [Thu, 21 Feb 2008 18:44:12 +0000 (13:44 -0500)]
Correct grammer/typos in dprintks

cleanup:  Fix grammer/typos to use "too" instead of "to"

Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoSVCRDMA: Add check for XPT_CLOSE in svc_rdma_send
Tom Tucker [Tue, 11 Mar 2008 17:44:27 +0000 (12:44 -0500)]
SVCRDMA: Add check for XPT_CLOSE in svc_rdma_send

SVCRDMA: Add check for XPT_CLOSE in svc_rdma_send

The svcrdma transport can crash if a send is waiting for an
empty SQ slot and the connection is closed due to an asynchronous error.
The crash is caused when svc_rdma_send attempts to send on a deleted
QP.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agonfsd: initialize lease type in nfs4_open_delegation()
Felix Blyakher [Tue, 26 Feb 2008 18:54:36 +0000 (10:54 -0800)]
nfsd: initialize lease type in nfs4_open_delegation()

While lease is correctly checked by supplying the type argument to
vfs_setlease(), it's stored with fl_type uninitialized. This breaks the
logic when checking the type of the lease.  The fix is to initialize
fl_type.

The old code still happened to function correctly since F_RDLCK is zero,
and we only implement read delegations currently (nor write
delegations).  But that's no excuse for not fixing this.

Signed-off-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoDocumentation: NFS/RDMA instructions for 2.6.25-rc1
James Lentini [Mon, 25 Feb 2008 17:20:13 +0000 (12:20 -0500)]
Documentation: NFS/RDMA instructions for 2.6.25-rc1

Add some instructions for using the new NFS/RDMA features.

Signed-off-by: James Lentini <jlentini@netapp.com>
Cc: Roland Dreier <rdreier@cisco.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoNFS: convert nfs4 callback thread to kthread API
Jeff Layton [Wed, 20 Feb 2008 13:55:30 +0000 (08:55 -0500)]
NFS: convert nfs4 callback thread to kthread API

There's a general push to convert kernel threads to use the (much
cleaner) kthread API. This patch converts the NFSv4 callback kernel
thread to the kthread API. In addition to being generally cleaner this
also removes the dependency on signals when shutting down the thread.

Note that this patch depends on the recent patches to svc_recv() to
make it check kthread_should_stop() periodically. Those patches are
in Bruce's tree at the moment and are slated for 2.6.26 along with
the lockd conversion, so this conversion is probably also appropriate
for 2.6.26.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agonfsd: fix sparse warning in vfs.c
Harvey Harrison [Wed, 20 Feb 2008 20:49:02 +0000 (12:49 -0800)]
nfsd: fix sparse warning in vfs.c

fs/nfsd/vfs.c:991:27: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agonfsd: fix sparse warnings
Harvey Harrison [Wed, 20 Feb 2008 20:49:00 +0000 (12:49 -0800)]
nfsd: fix sparse warnings

Add extern to nfsd/nfsd.h
fs/nfsd/nfssvc.c:146:5: warning: symbol 'nfsd_nrthreads' was not declared. Should it be static?
fs/nfsd/nfssvc.c:261:5: warning: symbol 'nfsd_nrpools' was not declared. Should it be static?
fs/nfsd/nfssvc.c:269:5: warning: symbol 'nfsd_get_nrthreads' was not declared. Should it be static?
fs/nfsd/nfssvc.c:281:5: warning: symbol 'nfsd_set_nrthreads' was not declared. Should it be static?
fs/nfsd/export.c:1534:23: warning: symbol 'nfs_exports_op' was not declared. Should it be static?

Add include of auth.h
fs/nfsd/auth.c:27:5: warning: symbol 'nfsd_setuser' was not declared. Should it be static?

Make static, move forward declaration closer to where it's needed.
fs/nfsd/nfs4state.c:1877:1: warning: symbol 'laundromat_main' was not declared. Should it be static?

Make static, forward declaration was already marked static.
fs/nfsd/nfs4idmap.c:206:1: warning: symbol 'idtoname_parse' was not declared. Should it be static?
fs/nfsd/vfs.c:1156:1: warning: symbol 'nfsd_create_setattr' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agolockd: convert nsm_mutex to a spinlock
J. Bruce Fields [Wed, 20 Feb 2008 20:40:15 +0000 (15:40 -0500)]
lockd: convert nsm_mutex to a spinlock

There's no reason for a mutex here, except to allow an allocation under
the lock, which we can avoid with the usual trick of preallocating
memory for the new object and freeing it if it turns out to be
unnecessary.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agolockd: clean up __nsm_find()
J. Bruce Fields [Wed, 20 Feb 2008 20:27:31 +0000 (15:27 -0500)]
lockd: clean up __nsm_find()

Use list_for_each_entry().  Also, in keeping with kernel style, make the
normal case (kzalloc succeeds) unindented and handle the abnormal case
with a goto.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agolockd: fix race in nlm_release()
J. Bruce Fields [Wed, 20 Feb 2008 19:02:47 +0000 (14:02 -0500)]
lockd: fix race in nlm_release()

The sm_count is decremented to zero but left on the nsm_handles list.
So in the space between decrementing sm_count and acquiring nsm_mutex,
it is possible for another task to find this nsm_handle, increment the
use count and then enter nsm_release itself.

Thus there's nothing to prevent the nsm being freed before we acquire
nsm_mutex here.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agosunrpc: GSS integrity and decryption failures should return GARBAGE_ARGS
Harshula Jayasuriya [Tue, 19 Feb 2008 23:56:56 +0000 (10:56 +1100)]
sunrpc: GSS integrity and decryption failures should return GARBAGE_ARGS

In function svcauth_gss_accept() (net/sunrpc/auth_gss/svcauth_gss.c) the
code that handles GSS integrity and decryption failures should be
returning GARBAGE_ARGS as specified in RFC 2203, sections 5.3.3.4.2 and
5.3.3.4.3.

Reviewed-by: Greg Banks <gnb@sgi.com>
Signed-off-by: Harshula Jayasuriya <harshula@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agolockd: fix sparse warning in svcshare.c
Harvey Harrison [Mon, 18 Feb 2008 10:01:49 +0000 (02:01 -0800)]
lockd: fix sparse warning in svcshare.c

fs/lockd/svcshare.c:74:50: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agomake nfsd_create_setattr() static
Adrian Bunk [Wed, 13 Feb 2008 21:30:26 +0000 (23:30 +0200)]
make nfsd_create_setattr() static

This patch makes the needlessly global nfsd_create_setattr() static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoSUNRPC: allow svc_recv to break out of 500ms sleep when alloc_page fails
Jeff Layton [Tue, 12 Feb 2008 16:47:24 +0000 (11:47 -0500)]
SUNRPC: allow svc_recv to break out of 500ms sleep when alloc_page fails

svc_recv() calls alloc_page(), and if it fails it does a 500ms
uninterruptible sleep and then reattempts. There doesn't seem to be any
real reason for this to be uninterruptible, so change it to an
interruptible sleep. Also check for kthread_stop() and signalled() after
setting the task state to avoid races that might lead to sleeping after
kthread_stop() wakes up the task.

I've done some very basic smoke testing with this, but obviously it's
hard to test the actual changes since this all depends on an
alloc_page() call failing.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoNFSD: Remove redundant "select" clauses in fs/Kconfig
Chuck Lever [Mon, 11 Feb 2008 22:12:38 +0000 (17:12 -0500)]
NFSD: Remove redundant "select" clauses in fs/Kconfig

As far as I can tell, selecting the CRYPTO and CRYPTO_MD5 entries under
CONFIG_NFSD is redundant, since CONFIG_NFSD_V4 already selects
RPCSEC_GSS_KRB5, which selects these entries.

Testing with "make menuconfig" shows that the entries under CRYPTO still
properly reflect "Y" or "M" based on the setting of CONFIG_NFSD after this
change is applied.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoNFSD: Move "select NFSD_V2_ACL if NFSD_V3_ACL"
Chuck Lever [Mon, 11 Feb 2008 22:12:31 +0000 (17:12 -0500)]
NFSD: Move "select NFSD_V2_ACL if NFSD_V3_ACL"

Clean up: since NFSD_V2_ACL is a boolean, it can be selected safely
under the NFSD_V3_ACL entry (also a boolean).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoNFSD: Move "select FS_POSIX_ACL if NFSD_V4"
Chuck Lever [Mon, 11 Feb 2008 22:12:24 +0000 (17:12 -0500)]
NFSD: Move "select FS_POSIX_ACL if NFSD_V4"

Clean up: since FS_POSIX_ACL is a non-visible boolean entry, it can be
selected safely under the NFSD_V4 entry (also a boolean).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoNFSD: Update help text for CONFIG_NFSD
Chuck Lever [Mon, 11 Feb 2008 22:11:54 +0000 (17:11 -0500)]
NFSD: Update help text for CONFIG_NFSD

Clean up: refresh the help text for Kconfig items related to the NFS
server.  Remove obsolete URLs, and make the language consistent among
the options.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoNFSD: Remove NFSD_TCP kernel build option
Chuck Lever [Mon, 11 Feb 2008 22:11:39 +0000 (17:11 -0500)]
NFSD: Remove NFSD_TCP kernel build option

Likewise, distros usually leave CONFIG_NFSD_TCP enabled.

TCP support in the Linux NFS server is stable enough that we can leave it
on always.  CONFIG_NFSD_TCP adds about 10 lines of code, and defaults to
"Y" anyway.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agonfsd: clarify readdir/mountpoint-crossing code
J. Bruce Fields [Mon, 11 Feb 2008 20:48:47 +0000 (15:48 -0500)]
nfsd: clarify readdir/mountpoint-crossing code

The code here is difficult to understand; attempt to clarify somewhat by
pulling out one of the more mystifying conditionals into a separate
function.

While we're here, also add lease_time to the list of attributes that we
don't really need to cross a mountpoint to fetch.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Peter Staubach <staubach@redhat.com>
16 years agosvcrpc: move unused field from cache_deferred_req
J. Bruce Fields [Thu, 31 Jan 2008 21:14:54 +0000 (16:14 -0500)]
svcrpc: move unused field from cache_deferred_req

This field is set once and never used; probably some artifact of an
earlier implementation idea.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agonfsd4: kill unnecessary check in preprocess_stateid_op
J. Bruce Fields [Sun, 27 Jan 2008 04:36:48 +0000 (23:36 -0500)]
nfsd4: kill unnecessary check in preprocess_stateid_op

This condition is always true.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agonfsd4: simplify stateid sequencing checks
J. Bruce Fields [Sun, 27 Jan 2008 00:08:12 +0000 (19:08 -0500)]
nfsd4: simplify stateid sequencing checks

Pull this common code into a separate function.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agonfsd4: remove unnecessary CHECK_FH check in preprocess_seqid_op
J. Bruce Fields [Sat, 26 Jan 2008 19:58:45 +0000 (14:58 -0500)]
nfsd4: remove unnecessary CHECK_FH check in preprocess_seqid_op

Every caller sets this flag, so it's meaningless.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agonfs: remove unnecessary NFS_NEED_* defines
J. Bruce Fields [Sat, 19 Jan 2008 18:58:23 +0000 (13:58 -0500)]
nfs: remove unnecessary NFS_NEED_* defines

Thanks to Robert Day for pointing out that these two defines are unused.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Trond Myklebust <trond@netapp.com>Trond Myklebust <trond@netapp.com>
Cc: Neil Brown <neilb@suse.de>
Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
16 years agoIPv6 support for NFS server export caches
Aurélien Charbon [Fri, 18 Jan 2008 14:50:56 +0000 (15:50 +0100)]
IPv6 support for NFS server export caches

This adds IPv6 support to the interfaces that are used to express nfsd
exports.  All addressed are stored internally as IPv6; backwards
compatibility is maintained using mapped addresses.

Thanks to Bruce Fields, Brian Haley, Neil Brown and Hideaki Joshifuji
for comments

Signed-off-by: Aurelien Charbon <aurelien.charbon@bull.net>
Cc: Neil Brown <neilb@suse.de>
Cc: Brian Haley <brian.haley@hp.com>
Cc: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoNLM: Convert lockd to use kthreads
Jeff Layton [Thu, 7 Feb 2008 21:34:55 +0000 (16:34 -0500)]
NLM: Convert lockd to use kthreads

Have lockd_up start lockd using kthread_run. With this change,
lockd_down now blocks until lockd actually exits, so there's no longer
need for the waitqueue code at the end of lockd_down. This also means
that only one lockd can be running at a time which simplifies the code
within lockd's main loop.

This also adds a check for kthread_should_stop in the main loop of
nlmsvc_retry_blocked and after that function returns. There's no sense
continuing to retry blocks if lockd is coming down anyway.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoSUNRPC: have svc_recv() check kthread_should_stop()
Jeff Layton [Thu, 7 Feb 2008 21:34:54 +0000 (16:34 -0500)]
SUNRPC: have svc_recv() check kthread_should_stop()

When using kthreads that call into svc_recv, we want to make sure that
they do not block there for a long time when we're trying to take down
the kthread.

This patch changes svc_recv() to check kthread_should_stop() at the same
places that it checks to see if it's signalled(). Also check just before
svc_recv() tries to schedule(). By making sure that we check it just
after setting the task state we can avoid having to use any locking or
signalling to ensure it doesn't block for a long time.

There's still a chance of a 500ms sleep if alloc_page() fails, but
that should be a rare occurrence and isn't a terribly long time in
the context of a kthread being taken down.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoSUNRPC: export svc_sock_update_bufs
Jeff Layton [Thu, 7 Feb 2008 21:34:53 +0000 (16:34 -0500)]
SUNRPC: export svc_sock_update_bufs

Needed since the plan is to not have a svc_create_thread helper and to
have current users of that function just call kthread_run directly.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoknfsd: Remove NLM_HOST_MAX and associated logic.
NeilBrown [Fri, 8 Feb 2008 02:03:37 +0000 (13:03 +1100)]
knfsd: Remove NLM_HOST_MAX and associated logic.

Lockd caches information about hosts that have recently held locks to
expedite the taking of further locks.

It periodically discards this information for hosts that have not been
used for a few minutes.

lockd currently has a value NLM_HOST_MAX, and changes the 'garbage
collection' behaviour when the number of hosts exceeds this threshold.

However its behaviour is strange, and likely not what was intended.
When the number of hosts exceeds the max, it scans *less* often (every
2 minutes vs every minute) and allows unused host information to
remain around longer (5 minutes instead of 2).

Having this limit is of dubious value anyway, and we have not
suffered from the code not getting the limit right, so remove the
limit altogether.  We go with the larger values (discard 5 minute old
hosts every 2 minutes) as they are probably safer.

Maybe the periodic garbage collection should be replace to with
'shrinker' handler so we just respond to memory pressure....

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
16 years agoslab_err: Pass parameters correctly to slab_bug
Christoph Lameter [Wed, 23 Apr 2008 19:28:01 +0000 (12:28 -0700)]
slab_err: Pass parameters correctly to slab_bug

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Wed, 23 Apr 2008 19:24:19 +0000 (12:24 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [patch 7/7] vfs: mountinfo: show dominating group id
  [patch 6/7] vfs: mountinfo: add /proc/<pid>/mountinfo
  [patch 5/7] vfs: mountinfo: allow using process root
  [patch 4/7] vfs: mountinfo: add mount peer group ID
  [patch 3/7] vfs: mountinfo: add mount ID
  [patch 2/7] vfs: mountinfo: add seq_file_root()
  [patch 1/7] vfs: mountinfo: add dentry_path()
  [PATCH] remove unused label in xattr.c (noise from ro-bind)

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

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  iwlwifi: Fix built-in compilation of iwlcore
  net: Unexport move_addr_to_{kernel,user}
  rt2x00: Select LEDS_CLASS.
  iwlwifi: Select LEDS_CLASS.
  leds: Do not guard NEW_LEDS with HAS_IOMEM
  [IPSEC]: Fix catch-22 with algorithm IDs above 31
  time: Export set_normalized_timespec.
  tcp: Make use of before macro in tcp_input.c
  hamradio: Remove unneeded and deprecated cli()/sti() calls in dmascc.c
  [NETNS]: Remove empty ->init callback.
  [DCCP]: Convert do_gettimeofday() to getnstimeofday().
  [NETNS]: Don't initialize err variable twice.
  [NETNS]: The ip6_fib_timer can work with garbage on net namespace stop.
  [IPV4]: Convert do_gettimeofday() to getnstimeofday().
  [IPV4]: Make icmp_sk_init() static.
  [IPV6]: Make struct ip6_prohibit_entry_template static.
  tcp: Trivial fix to correct function name in a comment in net/ipv4/tcp.c
  [NET]: Expose netdevice dev_id through sysfs
  skbuff: fix missing kernel-doc notation
  [ROSE]: Fix soft lockup wrt. rose_node_list_lock

16 years agopnpacpi: fix potential corruption on "pnpacpi: exceeded the max number of IRQ resourc...
Len Brown [Wed, 23 Apr 2008 04:09:13 +0000 (00:09 -0400)]
pnpacpi: fix potential corruption on "pnpacpi: exceeded the max number of IRQ resources 2"

PNP_MAX_IRQ is 2
If a device invokes pnpacpi_parse_allocated_irqresource() 0, 1, or 2 times, we are happy.
The 3rd time, we will fail and print "pnpacpi: exceeded the max number of IRQ resources: 2"
The 4th and subsequent calls (if this ever happened) would silently scribble on
irq_resource[2], which doesn't actualy exist.

Found-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoiwlwifi: Fix built-in compilation of iwlcore
Tomas Winkler [Wed, 23 Apr 2008 10:48:57 +0000 (03:48 -0700)]
iwlwifi: Fix built-in compilation of iwlcore

This patch fixes problem in Makefile that prevented
built-in compilation of iwlcore

Commit that caused this problem: eadd3c4b ("iwlwifi: make Makefile
more concise")

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Yi Zhu <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: Unexport move_addr_to_{kernel,user}
Adrian Bunk [Wed, 23 Apr 2008 10:37:49 +0000 (03:37 -0700)]
net: Unexport move_addr_to_{kernel,user}

After the removal of the Solaris binary emulation the exports of
move_addr_to_{kernel,user} are no longer used.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agort2x00: Select LEDS_CLASS.
David S. Miller [Wed, 23 Apr 2008 10:34:50 +0000 (03:34 -0700)]
rt2x00: Select LEDS_CLASS.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoiwlwifi: Select LEDS_CLASS.
David S. Miller [Wed, 23 Apr 2008 10:34:31 +0000 (03:34 -0700)]
iwlwifi: Select LEDS_CLASS.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoleds: Do not guard NEW_LEDS with HAS_IOMEM
David S. Miller [Wed, 23 Apr 2008 10:33:32 +0000 (03:33 -0700)]
leds: Do not guard NEW_LEDS with HAS_IOMEM

The LEDS infrastructure itself does not require anything
that a platform dependant upon HAS_IOMEM.

The individual drivers do, but they are properly guarded
with the necessary platform dependencies.

One can even imagine a hypervisor based LED driver that
a platform without HAS_IOMEM might have.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[patch 7/7] vfs: mountinfo: show dominating group id
Miklos Szeredi [Thu, 27 Mar 2008 12:06:26 +0000 (13:06 +0100)]
[patch 7/7] vfs: mountinfo: show dominating group id

Show peer group ID of nearest dominating group that has intersection
with the mount's namespace.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 6/7] vfs: mountinfo: add /proc/<pid>/mountinfo
Ram Pai [Thu, 27 Mar 2008 12:06:25 +0000 (13:06 +0100)]
[patch 6/7] vfs: mountinfo: add /proc/<pid>/mountinfo

[mszeredi@suse.cz] rewrite and split big patch into managable chunks

/proc/mounts in its current form lacks important information:

 - propagation state
 - root of mount for bind mounts
 - the st_dev value used within the filesystem
 - identifier for each mount and it's parent

It also suffers from the following problems:

 - not easily extendable
 - ambiguity of mountpoints within a chrooted environment
 - doesn't distinguish between filesystem dependent and independent options
 - doesn't distinguish between per mount and per super block options

This patch introduces /proc/<pid>/mountinfo which attempts to address
all these deficiencies.

Code shared between /proc/<pid>/mounts and /proc/<pid>/mountinfo is
extracted into separate functions.

Thanks to Al Viro for the help in getting the design right.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 5/7] vfs: mountinfo: allow using process root
Miklos Szeredi [Thu, 27 Mar 2008 12:06:24 +0000 (13:06 +0100)]
[patch 5/7] vfs: mountinfo: allow using process root

Allow /proc/<pid>/mountinfo to use the root of <pid> to calculate
mountpoints.

 - move definition of 'struct proc_mounts' to <linux/mnt_namespace.h>
 - add the process's namespace and root to this structure
 - pass a pointer to 'struct proc_mounts' into seq_operations

In addition the following cleanups are made:

 - use a common open function for /proc/<pid>/{mounts,mountstat}
 - surround namespace.c part of these proc files with #ifdef CONFIG_PROC_FS
 - make the seq_operations structures const

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 4/7] vfs: mountinfo: add mount peer group ID
Miklos Szeredi [Thu, 27 Mar 2008 12:06:23 +0000 (13:06 +0100)]
[patch 4/7] vfs: mountinfo: add mount peer group ID

Add a unique ID to each peer group using the IDR infrastructure.  The
identifiers are reused after the peer group dissolves.

The IDR structures are protected by holding namepspace_sem for write
while allocating or deallocating IDs.

IDs are allocated when a previously unshared vfsmount becomes the
first member of a peer group.  When a new member is added to an
existing group, the ID is copied from one of the old members.

IDs are freed when the last member of a peer group is unshared.

Setting the MNT_SHARED flag on members of a subtree is done as a
separate step, after all the IDs have been allocated.  This way an
allocation failure can be cleaned up easilty, without affecting the
propagation state.

Based on design sketch by Al Viro.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 3/7] vfs: mountinfo: add mount ID
Miklos Szeredi [Wed, 26 Mar 2008 21:11:34 +0000 (22:11 +0100)]
[patch 3/7] vfs: mountinfo: add mount ID

Add a unique ID to each vfsmount using the IDR infrastructure.  The
identifiers are reused after the vfsmount is freed.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 2/7] vfs: mountinfo: add seq_file_root()
Miklos Szeredi [Thu, 27 Mar 2008 12:06:21 +0000 (13:06 +0100)]
[patch 2/7] vfs: mountinfo: add seq_file_root()

Add a new function:

  seq_file_root()

This is similar to seq_path(), but calculates the path relative to the
given root, instead of current->fs->root.  If the path was unreachable
from root, then modify the root parameter to reflect this.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[patch 1/7] vfs: mountinfo: add dentry_path()
Ram Pai [Thu, 27 Mar 2008 12:06:20 +0000 (13:06 +0100)]
[patch 1/7] vfs: mountinfo: add dentry_path()

[mszeredi@suse.cz] split big patch into managable chunks

Add the following functions:

  dentry_path()
  seq_dentry()

These are similar to d_path() and seq_path().  But instead of
calculating the path within a mount namespace, they calculate the path
from the root of the filesystem to a given dentry, ignoring mounts
completely.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] remove unused label in xattr.c (noise from ro-bind)
Al Viro [Wed, 23 Apr 2008 04:04:04 +0000 (00:04 -0400)]
[PATCH] remove unused label in xattr.c (noise from ro-bind)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Wed, 23 Apr 2008 01:27:56 +0000 (18:27 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [PATCH] get rid of __exit_files(), __exit_fs() and __put_fs_struct()
  [PATCH] proc_readfd_common() race fix
  [PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe()
  [PATCH] teach seq_file to discard entries
  [PATCH] umount_tree() will unhash everything itself
  [PATCH] get rid of more nameidata passing in namespace.c
  [PATCH] switch a bunch of LSM hooks from nameidata to path
  [PATCH] lock exclusively in collect_mounts() and drop_collected_mounts()
  [PATCH] move a bunch of declarations to fs/internal.h

16 years agoFix cardbus resource allocation
Linus Torvalds [Wed, 23 Apr 2008 01:16:30 +0000 (18:16 -0700)]
Fix cardbus resource allocation

Commit 884525655d07fdee9245716b998ecdc45cdd8007 ("PCI: clean up resource
alignment management") didn't set the alignment information for the
cardbus window resources, causing their subsequent allocations to fail
miserably with a message like

  yenta_cardbus 0000:15:00.0: device not available because of BAR 7 [100:1ff] collisions
  yenta_cardbus: probe of 0000:15:00.0 failed with error -16

or similar.

This fixes it and clarifies the code a bit too (we used to have to use
the insane PCI bridge alignment logic that put the alignment in the
"start" field, this makes it use the slightly easier-to-understand
size-based alignment, and allows us to set the resource start to zero
until it gets allocated).

Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agobus_remove_device: be more careful about incomplete initialization
Rafael J. Wysocki [Tue, 22 Apr 2008 20:57:50 +0000 (22:57 +0200)]
bus_remove_device: be more careful about incomplete initialization

Prevent bus_remove_device() from crashing if dev->knode_bus has not been
initialized before it's called.

This can happen if the device_add() ended up breaking out early due to
an error, for example.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoRelax check on adding children of suspended devices
Rafael J. Wysocki [Tue, 22 Apr 2008 22:48:23 +0000 (00:48 +0200)]
Relax check on adding children of suspended devices

Do not refuse to actually register children of suspended devices,
but still warn about attempts to do that.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[PATCH] get rid of __exit_files(), __exit_fs() and __put_fs_struct()
Al Viro [Tue, 22 Apr 2008 09:35:42 +0000 (05:35 -0400)]
[PATCH] get rid of __exit_files(), __exit_fs() and __put_fs_struct()

The only reason to have separated __...() for those was to keep them inlined
for local users in exit.c.  Since Alexey removed the inline on those, there's
no reason whatsoever to keep them around; just collapse with normal variants.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] proc_readfd_common() race fix
Al Viro [Tue, 22 Apr 2008 05:32:44 +0000 (01:32 -0400)]
[PATCH] proc_readfd_common() race fix

Since we drop the rcu_read_lock inside the loop, we can't assume
that files->fdt will remain unchanged (and not freed) between
iterations.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years ago[PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe()
Al Viro [Tue, 22 Apr 2008 23:51:27 +0000 (19:51 -0400)]
[PATCH] double-free of inode on alloc_file() failure exit in create_write_pipe()

Duh...  Fortunately, the bug is quite recent (post-2.6.25) and, embarrassingly,
mine ;-/

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Tue, 22 Apr 2008 23:47:54 +0000 (16:47 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] run drivers/misc/sgi-xp through scripts/checkpatch.pl
  [IA64] run rest drivers/misc/sgi-xp through scripts/Lindent
  [IA64] run some drivers/misc/sgi-xp through scripts/Lindent
  [IA64] move XP and XPC to drivers/misc/sgi-xp
  [IA64] minor irq handler cleanups
  [IA64] simplify notify hooks in mca.c
  [IA64] do notify DIE_MCA_MONARCH_PROCESS for each monarchs
  [IA64] disable interrupts on exit of ia64_trace_syscall

16 years agofs: use loff_t type instead of long long
David Sterba [Tue, 22 Apr 2008 13:09:22 +0000 (15:09 +0200)]
fs: use loff_t type instead of long long

Use offset type consistently.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Tue, 22 Apr 2008 22:15:48 +0000 (15:15 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  SELinux fixups needed for preemptable RCU from -rt
  SELinux: no BUG_ON(!ss_initialized) in selinux_clone_mnt_opts

16 years ago[IA64] run drivers/misc/sgi-xp through scripts/checkpatch.pl
Dean Nelson [Tue, 22 Apr 2008 19:50:17 +0000 (14:50 -0500)]
[IA64] run drivers/misc/sgi-xp through scripts/checkpatch.pl

Addressed issues raised by scripts/checkpatch.pl. Removed unnecessary curly
braces. Eliminated uses of volatiles and use of kernel_thread() and daemonize().

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] run rest drivers/misc/sgi-xp through scripts/Lindent
Dean Nelson [Tue, 22 Apr 2008 19:48:55 +0000 (14:48 -0500)]
[IA64] run rest drivers/misc/sgi-xp through scripts/Lindent

Ran patches through scripts/Lindent (part 2).

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] run some drivers/misc/sgi-xp through scripts/Lindent
Dean Nelson [Tue, 22 Apr 2008 19:48:01 +0000 (14:48 -0500)]
[IA64] run some drivers/misc/sgi-xp through scripts/Lindent

Ran patches through scripts/Lindent (part 1).

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] move XP and XPC to drivers/misc/sgi-xp
Dean Nelson [Tue, 22 Apr 2008 19:46:56 +0000 (14:46 -0500)]
[IA64] move XP and XPC to drivers/misc/sgi-xp

Move XPC and XPNET from arch/ia64/sn/kernel to drivers/misc/sgi-xp.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Tue, 22 Apr 2008 20:59:30 +0000 (13:59 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Fix platform driver hotplug/coldplug
  i2c: New driver for the SuperH Mobile I2C bus controller
  i2c/scx200_acb: Don't use 0 as NULL pointer
  i2c-bfin-twi: Fix mismatch in add timer and delete timer
  i2c-bfin-twi: Just let i2c-bfin-twi driver depends on BLACKFIN
  i2c-bfin-twi: Use simpler comment headers and strip out information that is maintained in the scm's log
  i2c-bfin-twi: Cleanup driver descriptions, versions and some module useful information
  i2c-bfin-twi: Add missing pin mux operation
  i2c-bfin-twi: Add platform_resource interface to support multi-port TWI controllers
  i2c-bfin-twi: Add repeat start feature to avoid break of a bundle of i2c master xfer operation
  i2c: Remove trailing whitespaces in busses/Kconfig
  i2c: Replace remaining __FUNCTION__ occurrences
  i2c: Renesas SH7760 I2C master driver
  i2c-dev: Split i2cdev_ioctl
  i2c-ibm_iic: Support building as an of_platform driver
  i2c-ibm_iic: Change the log levels
  i2c: Add platform driver on top of the new pca-algorithm
  i2c-algo-pca: Extend for future drivers
  i2c-algo-pca: Remove trailing whitespaces and unnecessary UTF
  i2c: Remove the algorithm drivers from the config menu

16 years agokernel-doc: fix sched.c missing parameter
Randy Dunlap [Tue, 22 Apr 2008 17:07:22 +0000 (10:07 -0700)]
kernel-doc: fix sched.c missing parameter

Add missing kernel-doc in kernel/sched.c:

Warning(linux-2.6.25-git3//kernel/sched.c:7044): No description found for parameter 'span'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Tue, 22 Apr 2008 20:44:23 +0000 (13:44 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: linux/{dlm,dlm_device}.h: cleanup for userspace
  dlm: common max length definitions
  dlm: move plock code from gfs2
  dlm: recover nodes that are removed and re-added
  dlm: save master info after failed no-queue request
  dlm: make dlm_print_rsb() static
  dlm: match signedness between dlm_config_info and cluster_set

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Tue, 22 Apr 2008 20:43:46 +0000 (13:43 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: Suppress hidinput for Samsung IR control
  HID: remove 60x GTCO devices from blacklist
  HID: export headers properly
  HID: WiseGroup 866 Dual Joypad needs output reports quirk
  HID: ThrustMaster FF driver is no longer experimental
  HID: Logitech diNovo Mini pad support
  HID: fix race between open() and disconnect() in usbhid
  HID: make hid_input_field and usbhid_modify_dquirk static
  HID: pass numbered reports properly to hidraw
  HID: fix misplaced rdesc quirk
  HID: force feedback driver for Logitech Rumblepad 2
  HID: move wait from hid to usbhid
  HID: make function from dbg_hid
  HID: fix sparse warnings
  HID: only dump report traffic with debug level 2
  HID: patch to add NOGET for DMI/Acomdata
  HID: Sunplus Wireless Desktop needs report descriptor fixup
  HID: quirk for MS Wireless Desktop Receiver (model 1028)
  HID: fixup fullspeed interval on highspeed Afatech DVB-T IR kbd
  HID: fix build failure in hiddev_ioctl with gcc 3.2

16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Tue, 22 Apr 2008 20:40:47 +0000 (13:40 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-udf-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6: (41 commits)
  udf: use crc_itu_t from lib instead of udf_crc
  udf: Fix compilation warnings when UDF debug is on
  udf: Fix bug in VAT mapping code
  udf: Add read-only support for 2.50 UDF media
  udf: Fix handling of multisession media
  udf: Mount filesystem read-only if it has pseudooverwrite partition
  udf: Handle VAT packed inside inode properly
  udf: Allow loading of VAT inode
  udf: Fix detection of VAT version
  udf: Silence warning about accesses beyond end of device
  udf: Improve anchor block detection
  udf: Cleanup anchor block detection.
  udf: Move processing of virtual partitions
  udf: Move filling of partition descriptor info into a separate function
  udf: Improve error recovery on mount
  udf: Cleanup volume descriptor sequence processing
  udf: fix anchor point detection
  udf: Remove declarations of arrays of size UDF_NAME_LEN (256 bytes)
  udf: Remove checking of existence of filename in udf_add_entry()
  udf: Mark udf_process_sequence() as noinline
  ...

16 years agofix brd allocation flags
Petr Tesarik [Tue, 22 Apr 2008 03:36:52 +0000 (05:36 +0200)]
fix brd allocation flags

While looking at the implementation of the Ram backed block device
driver, I stumbled across a write-only local variable, which makes
little sense, so I assume it should actually work like this:

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoi2c: Fix platform driver hotplug/coldplug
Kay Sievers [Tue, 22 Apr 2008 20:16:49 +0000 (22:16 +0200)]
i2c: Fix platform driver hotplug/coldplug

Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform
modalias is prefixed with "platform:". Add MODULE_ALIAS() to the
hotpluggable I2C platform drivers, to allow module auto loading.

[ db: add some more drivers ]

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: New driver for the SuperH Mobile I2C bus controller
Magnus Damm [Tue, 22 Apr 2008 20:16:49 +0000 (22:16 +0200)]
i2c: New driver for the SuperH Mobile I2C bus controller

This is V5 of the SuperH Mobile I2C Controller Driver. A simple Master
only driver for the I2C block included in processors such as sh7343,
sh7722 and sh7723. Tested on a sh7722 MigoR using a rs5c732b rtc.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c/scx200_acb: Don't use 0 as NULL pointer
Adrian Bunk [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)]
i2c/scx200_acb: Don't use 0 as NULL pointer

Don't use 0 as NULL pointer.

Spotted by sparse.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Fix mismatch in add timer and delete timer
Hans Schillstrom [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)]
i2c-bfin-twi: Fix mismatch in add timer and delete timer

Move init_completion to just before i2c transfer.
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3385

Signed-off-by: Hans Schillstrom <hans.schillstrom@shlsys.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Just let i2c-bfin-twi driver depends on BLACKFIN
Bryan Wu [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)]
i2c-bfin-twi: Just let i2c-bfin-twi driver depends on BLACKFIN

Simply use "depends on BLACKFIN" (which is technically correct) and just
document which machines have the device.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Use simpler comment headers and strip out information that is maintaine...
Mike Frysinger [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)]
i2c-bfin-twi: Use simpler comment headers and strip out information that is maintained in the scm's log

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Cleanup driver descriptions, versions and some module useful information
Bryan Wu [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)]
i2c-bfin-twi: Cleanup driver descriptions, versions and some module useful information

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Add missing pin mux operation
Bryan Wu [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)]
i2c-bfin-twi: Add missing pin mux operation

Blackfin TWI controller hardware pin should be requested from GPIO port controller
Before BF54x, there is no need to do this. But as long as BF54x and BF52x
are supported by this generic driver, the missing pin mux operation should be
added.

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Add platform_resource interface to support multi-port TWI controllers
Bryan Wu [Tue, 22 Apr 2008 20:16:48 +0000 (22:16 +0200)]
i2c-bfin-twi: Add platform_resource interface to support multi-port TWI controllers

 - Dynamic alloc the resource of TWI driver data according to board information
 - TWI register read/write accessor based on dynamic regs_base
 - Support TWI0/TWI1 for BF54x

Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-bfin-twi: Add repeat start feature to avoid break of a bundle of i2c master xfer...
Sonic Zhang [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)]
i2c-bfin-twi: Add repeat start feature to avoid break of a bundle of i2c master xfer operation

 - Create a new mode TWI_I2C_MODE_REPEAT.
 - No change to smbus operation.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Remove trailing whitespaces in busses/Kconfig
Wolfram Sang [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)]
i2c: Remove trailing whitespaces in busses/Kconfig

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Replace remaining __FUNCTION__ occurrences
Harvey Harrison [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)]
i2c: Replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Renesas SH7760 I2C master driver
Manuel Lauss [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)]
i2c: Renesas SH7760 I2C master driver

Driver for I2C interfaces in master mode on SH7760.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-dev: Split i2cdev_ioctl
Jean Delvare [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)]
i2c-dev: Split i2cdev_ioctl

Split the handling of the I2C_RDWR and I2C_SMBUS ioctls to their own
functions. This limits the stack usage, saves one level of indentation
and makes the code more readable.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-ibm_iic: Support building as an of_platform driver
Sean MacLennan [Tue, 22 Apr 2008 20:16:47 +0000 (22:16 +0200)]
i2c-ibm_iic: Support building as an of_platform driver

This patch allows the i2c-ibm_iic driver to be built either as an ocp
driver or an of_platform driver. This allows it to run under the powerpc
arch but maintains backward compatibility with the ppc arch.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-ibm_iic: Change the log levels
Sean MacLennan [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)]
i2c-ibm_iic: Change the log levels

Change the log levels based on feedback from linxppc-dev.

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Add platform driver on top of the new pca-algorithm
Wolfram Sang [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)]
i2c: Add platform driver on top of the new pca-algorithm

Tested on a blackfin.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-algo-pca: Extend for future drivers
Wolfram Sang [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)]
i2c-algo-pca: Extend for future drivers

The separation between algorithm and adapter was unsharp at places. This was
partly hidden by the fact, that the ISA-driver allowed just one instance and
had all private data in static variables. This patch makes neccessary
preparations to add a platform driver on top of the algorithm, while still
supporting ISA. Note: Due to lack of hardware, the ISA-driver could not be
tested except that it builds.

Concerning the core struct i2c_algo_pca_data:

- A private data field was added, all hardware dependant data may go here.
  Similar to other algorithms, now a pointer to this data is passed to the
  adapter's functions. In order to make as less changes as possible to the
  ISA-driver, it leaves the private data empty and still only uses its static
  variables.

- A "reset_chip" function pointer was added; such a functionality must come
  from the adapter, not the algorithm.

- use a variable "i2c_clock" instead of a function pointer "get_clock",
  allowing for write access to a default in case a wrong value was supplied.

In the algorithm-file:

- move "i2c-pca-algo.h" into "linux/i2c-algo-pca.h"
- now using per_instance timeout values (i2c_adap->timeout)
- error messages specify the device, not only the driver name
- restructure initialization to easily support "i2c_add_numbered_adapter"
- drop "retries" and "own" (i2c address) as they were unused

(The state-machine for I2C-communication was not touched.)

In the ISA-driver:

- adapt to new algorithm

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-algo-pca: Remove trailing whitespaces and unnecessary UTF
Wolfram Sang [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)]
i2c-algo-pca: Remove trailing whitespaces and unnecessary UTF

Remove trailing whitespaces to make further patches more readable.  Also remove
an unnecessary UTF-char for simplicity ("us" for microseconds is fine enough).

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Remove the algorithm drivers from the config menu
Jean Delvare [Tue, 22 Apr 2008 20:16:46 +0000 (22:16 +0200)]
i2c: Remove the algorithm drivers from the config menu

The algorithm drivers are helper drivers that are selected automatically
as needed. There's no point in listing them in the config menu, it can
only confuse users and waste their time.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years ago[IA64] minor irq handler cleanups
Jeff Garzik [Fri, 18 Apr 2008 23:22:58 +0000 (19:22 -0400)]
[IA64] minor irq handler cleanups

- remove unused 'irq' argument from pfm_do_interrupt_handler()

- remove pointless cast to void*

- add KERN_xxx prefix to printk()

- remove braces around singleton C statement

- in tioce_provider.c, start tioce_dma_consistent() and
  tioce_error_intr_handler() function declarations in column 0

This change's main purpose is to prepare for the patchset in
jgarzik/misc-2.6.git#irq-remove, that explores removal of the
never-used 'irq' argument in each interrupt handler.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] simplify notify hooks in mca.c
Hidetoshi Seto [Thu, 17 Apr 2008 08:00:37 +0000 (17:00 +0900)]
[IA64] simplify notify hooks in mca.c

There are many notify_die() and almost all take same style with
ia64_mca_spin().  This patch defines macros and replace them all,
to reduce lines and to improve readability.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] do notify DIE_MCA_MONARCH_PROCESS for each monarchs
Hidetoshi Seto [Thu, 17 Apr 2008 07:59:52 +0000 (16:59 +0900)]
[IA64] do notify DIE_MCA_MONARCH_PROCESS for each monarchs

There are 3 hooks in MCA handler, but this DIE_MCA_MONARCH_PROCESS
event does not notified other than for the first monarch.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
16 years ago[IA64] disable interrupts on exit of ia64_trace_syscall
Hidetoshi Seto [Mon, 21 Apr 2008 21:34:39 +0000 (14:34 -0700)]
[IA64] disable interrupts on exit of ia64_trace_syscall

While testing with CONFIG_VIRT_CPU_ACCOUNTING=y, I found that
I occasionally get very huge system time in some threads.

So I dug the issue and finally noticed that it was caused
because of an interrupt which interrupt in the following window:

> [arch/ia64/kernel/entry.S: (!CONFIG_PREEMPT && CONFIG_VIRT_CPU_ACCOUNTING)]
>
> ENTRY(ia64_leave_syscall)
>    :
> (pUStk) rsm psr.i
>         cmp.eq pLvSys,p0=r0,r0          // pLvSys=1: leave from syscall
> (pUStk) cmp.eq.unc p6,p0=r0,r0          // p6 <- pUStk
> .work_processed_syscall:
>         adds r2=PT(LOADRS)+16,r12
> (pUStk) mov.m r22=ar.itc                        // fetch time at leave
>         adds r18=TI_FLAGS+IA64_TASK_SIZE,r13
>         ;;
> <<< window: from here >>>
> (p6)    ld4 r31=[r18]  // load current_thread_info()->flags
>         ld8 r19=[r2],PT(B6)-PT(LOADRS)
>         adds r3=PT(AR_BSPSTORE)+16,r12
>         ;;
>         mov r16=ar.bsp
>         ld8 r18=[r2],PT(R9)-PT(B6)
> (p6)    and r15=TIF_WORK_MASK,r31  // any work other than TIF_SYSCALL_TRACE?
>         ;;
>         ld8 r23=[r3],PT(R11)-PT(AR_BSPSTORE)
> (p6)    cmp4.ne.unc p6,p0=r15, r0               // any special work pending?
> (p6)    br.cond.spnt .work_pending_syscall
>         ;;
>         ld8 r9=[r2],PT(CR_IPSR)-PT(R9)
>         ld8 r11=[r3],PT(CR_IIP)-PT(R11)
> (pNonSys) break 0 // bug check: we shouldn't be here if pNonSys is TRUE!
>         ;;
>         invala
> <<< window: to here >>>
>         rsm psr.i | psr.ic // turn off interrupts and interruption collection

If pUStk is true, it means we are going to return user mode, hence we fetch
ar.itc to get time at leave from system.
It seems that it is not possible to interrupt the window if pUStk is true,
because interrupts are disabled early.  And also disabling interrupt makes
sense because it is safe for referring current_thread_info()->flags.

However interrupting the window while pUStk is true was possible.
The route was:
ia64_trace_syscall
-> .work_pending_syscall_end
-> .work_processed_syscall
Only in case entering the window from this route, interrupts are enabled
during in the window even if pUStk is true.  I suppose interrupts must be
disabled here anyway if pUStk is true.
I'm not sure but afraid that what kind of bad effect were there, other
than crazy system time which I found.

FYI, there was a commit 6f6d75825dc49b082906b84537b4df28293c2977 that
points out a bug at same point(exit of ia64_trace_syscall) in 2006.
It can be said that there was an another bug.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>