platform/upstream/kernel-adaptation-pc.git
17 years agoknfsd: fix spurious EINVAL errors on first access of new filesystem
J. Bruce Fields [Mon, 12 Nov 2007 21:05:02 +0000 (16:05 -0500)]
knfsd: fix spurious EINVAL errors on first access of new filesystem

The v2/v3 acl code in nfsd is translating any return from fh_verify() to
nfserr_inval.  This is particularly unfortunate in the case of an
nfserr_dropit return, which is an internal error meant to indicate to
callers that this request has been deferred and should just be dropped
pending the results of an upcall to mountd.

Thanks to Roland <devzero@web.de> for bug report and data collection.

Cc: Roland <devzero@web.de>
Acked-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Reviewed-By: NeilBrown <neilb@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRevert "Bias the placement of kernel pages at lower PFNs"
Linus Torvalds [Mon, 12 Nov 2007 22:14:44 +0000 (14:14 -0800)]
Revert "Bias the placement of kernel pages at lower PFNs"

This reverts commit 5adc5be7cd1bcef6bb64f5255d2a33f20a3cf5be.

Alexey Dobriyan reports that it causes huge slowdowns under some loads,
in his case a "mkfs.ext2" on a 30G partition.  With the placement bias,
the mkfs took over four minutes, with it reverted it's back to about ten
seconds for Alexey.

Reported-and-tested-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
Linus Torvalds [Mon, 12 Nov 2007 19:13:54 +0000 (11:13 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/avi/kvm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: SVM: Intercept the 'invd' and 'wbinvd' instructions
  KVM: x86 emulator: invd instruction
  KVM: SVM: Defer nmi processing until switch to host state is complete
  KVM: SVM: Fix SMP with kernel apic
  KVM: x86 emulator: fix 'push imm8' emulation

17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
Linus Torvalds [Mon, 12 Nov 2007 19:13:31 +0000 (11:13 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rusty/linux-2.6-virtio

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio:
  virtio: Force use of power-of-two for descriptor ring sizes
  lguest: Fix lguest virtio-blk backend size computation
  virtio: Fix used_idx wrap-around
  virtio: more fallout from scatterlist changes.
  virtio: fix vring_init for 64 bits

17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 12 Nov 2007 19:12:06 +0000 (11:12 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/davem/net-2.6

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (39 commits)
  [INET]: Small possible memory leak in FIB rules
  [NETNS]: init dev_base_lock only once
  [UNIX]: The unix_nr_socks limit can be exceeded
  [AF_UNIX]: Convert socks to unix_socks in scan_inflight, not in callbacks
  [AF_UNIX]: Make unix_tot_inflight counter non-atomic
  [AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded
  ssb: Fix PCMCIA-host lowlevel bus access
  mac80211: fix MAC80211_RCSIMPLE Kconfig
  mac80211: make "decrypt failed" messages conditional upon MAC80211_DEBUG
  mac80211: use IW_AUTH_PRIVACY_INVOKED rather than IW_AUTH_KEY_MGMT
  mac80211: remove unused driver ops
  mac80211: remove ieee80211_common.h
  softmac: MAINTAINERS update
  rfkill: Fix sparse warning
  rfkill: Use mutex_lock() at register and add sanity check
  iwlwifi: select proper rate control algorithm
  mac80211: allow driver to ask for a rate control algorithm
  mac80211: don't allow registering the same rate control twice
  rfkill: Use subsys_initcall
  mac80211: make simple rate control algorithm built-in
  ...

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Mon, 12 Nov 2007 19:11:39 +0000 (11:11 -0800)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (21 commits)
  [CIFS] fix oops on second mount to same server when null auth is used
  [CIFS] Fix stale mode after readdir when cifsacl specified
  [CIFS] add mode to acl conversion helper function
  [CIFS] Fix incorrect mode when ACL had deny access control entries
  [CIFS] Add uid to key description so krb can handle user mounts
  [CIFS] Fix walking out end of cifs dacl
  [CIFS] Add upcall files for cifs to use spnego/kerberos
  [CIFS] add OIDs for KRB5 and MSKRB5 to ASN1 parsing routines
  [CIFS] Register and unregister cifs_spnego_key_type on module init/exit
  [CIFS] implement upcalls for SPNEGO blob via keyctl API
  [CIFS] allow cifs_calc_signature2 to deal with a zero length iovec
  [CIFS] If no Access Control Entries, set mode perm bits to zero
  [CIFS] when mount helper missing fix slash wrong direction in share
  [CIFS] Don't request too much permission when reading an ACL
  [CIFS] enable get mode from ACL when cifsacl mount option specified
  [CIFS] ACL support part 8
  [CIFS] acl support part 7
  [CIFS] acl support part 6
  [CIFS] acl support part 6
  [CIFS] remove unused funtion compile warning when experimental off
  ...

17 years agox86: fix taking DNA during 64bit sigreturn
Siddha, Suresh B [Sun, 11 Nov 2007 19:27:59 +0000 (11:27 -0800)]
x86: fix taking DNA during 64bit sigreturn

restore sigcontext is taking a DNA exception while restoring FP context
from the user stack, during the sigreturn.  Appended patch fixes it by
doing clts() if the app doesn't touch FP during the signal handler
execution.  This will stop generating a DNA, during the fxrstor in the
sigreturn.

This improves 64-bit lat_sig numbers by ~30% on my core2 platform.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoSLUB: killed the unused "end" variable
Denis Cheng [Mon, 12 Nov 2007 16:49:42 +0000 (00:49 +0800)]
SLUB: killed the unused "end" variable

Since the macro "for_each_object" introduced, the "end" variable becomes unused anymore.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocore dump: remain dumpable
Roland McGrath [Mon, 12 Nov 2007 03:13:43 +0000 (19:13 -0800)]
core dump: remain dumpable

The coredump code always calls set_dumpable(0) when it starts (even
if RLIMIT_CORE prevents any core from being dumped).  The effect of
this (via task_dumpable) is to make /proc/pid/* files owned by root
instead of the user, so the user can no longer examine his own
process--in a case where there was never any privileged data to
protect.  This affects e.g. auxv, environ, fd; in Fedora (execshield)
kernels, also maps.  In practice, you can only notice this when a
debugger has requested PTRACE_EVENT_EXIT tracing.

set_dumpable was only used in do_coredump for synchronization and not
intended for any security purpose.  (It doesn't secure anything that wasn't
already unsecured when a process dies by SIGTERM instead of SIGQUIT.)

This changes do_coredump to check the core_waiters count as the means of
synchronization, which is sufficient.  Now we leave the "dumpable" bits alone.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agovirtio: Force use of power-of-two for descriptor ring sizes
Rusty Russell [Mon, 12 Nov 2007 02:39:18 +0000 (13:39 +1100)]
virtio: Force use of power-of-two for descriptor ring sizes

The virtio descriptor rings of size N-1 were nicely set up to be
aligned to an N-byte boundary.  But as Anthony Liguori points out, the
free-running indices used by virtio require that the sizes be a power
of 2, otherwise we get problems on wrap (demonstrated with lguest).

So we replace the clever "2^n-1" scheme with a simple "align to page
boundary" scheme: this means that all virtio rings take at least two
pages, but it's safer than guessing cache alignment.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agolguest: Fix lguest virtio-blk backend size computation
Anthony Liguori [Fri, 9 Nov 2007 03:13:44 +0000 (21:13 -0600)]
lguest: Fix lguest virtio-blk backend size computation

This seems like an obvious typo but it's worked in the past because the virtio
blk frontend just ignores the length field on completion.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agovirtio: Fix used_idx wrap-around
Anthony Liguori [Wed, 7 Nov 2007 21:49:24 +0000 (15:49 -0600)]
virtio: Fix used_idx wrap-around

The more_used() function compares the vq->vring.used->idx with last_used_idx.
Since vq->vring.used->idx is a 16-bit integer, and last_used_idx is an
unsigned int, this results in unpredictable behavior when vq->vring.used->idx
wraps around.

This patch corrects this by changing last_used_idx to the correct type.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agovirtio: more fallout from scatterlist changes.
Rusty Russell [Wed, 7 Nov 2007 05:34:49 +0000 (16:34 +1100)]
virtio: more fallout from scatterlist changes.

This fixes OOPS in network driver when CONFIG_DEBUG_SG=y.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years agovirtio: fix vring_init for 64 bits
Anthony Liguori [Wed, 7 Nov 2007 05:31:52 +0000 (16:31 +1100)]
virtio: fix vring_init for 64 bits

This patch fixes a typo in vring_init().  This happens to work today in lguest
because the sizeof(struct vring_desc) is 16 and struct vring contains 3
pointers and an unsigned int so on 32-bit
sizeof(struct vring_desc) == sizeof(struct vring).  However, this is no longer
true on 64-bit where the bug is exposed.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
17 years ago[INET]: Small possible memory leak in FIB rules
Denis V. Lunev [Sun, 11 Nov 2007 06:12:03 +0000 (22:12 -0800)]
[INET]: Small possible memory leak in FIB rules

This patch fixes a small memory leak. Default fib rules can be deleted by
the user if the rule does not carry FIB_RULE_PERMANENT flag, f.e. by
ip rule flush

Such a rule will not be freed as the ref-counter has 2 on start and becomes
clearly unreachable after removal.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETNS]: init dev_base_lock only once
Alexey Dobriyan [Sun, 11 Nov 2007 06:09:25 +0000 (22:09 -0800)]
[NETNS]: init dev_base_lock only once

* it already statically initialized
* reinitializing live global spinlock every time netns is
  setup is also wrong

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[UNIX]: The unix_nr_socks limit can be exceeded
Pavel Emelyanov [Sun, 11 Nov 2007 06:08:30 +0000 (22:08 -0800)]
[UNIX]: The unix_nr_socks limit can be exceeded

The unix_nr_socks value is limited with the 2 * get_max_files() value,
as seen from the unix_create1(). However, the check and the actual
increment are separated with the GFP_KERNEL allocation, so this limit
can be exceeded under a memory pressure - task may go to sleep freeing
the pages and some other task will be allowed to allocate a new sock
and so on and so forth.

So make the increment before the check (similar thing is done in the
sock_kmalloc) and go to kmalloc after this.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_UNIX]: Convert socks to unix_socks in scan_inflight, not in callbacks
Pavel Emelyanov [Sun, 11 Nov 2007 06:07:13 +0000 (22:07 -0800)]
[AF_UNIX]: Convert socks to unix_socks in scan_inflight, not in callbacks

The scan_inflight() routine scans through the unix sockets and calls
some passed callback. The fact is that all these callbacks work with
the unix_sock objects, not the sock ones, so make this conversion in
the scan_inflight() before calling the callbacks.

This removes one unneeded variable from the inc_inflight_move_tail().

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_UNIX]: Make unix_tot_inflight counter non-atomic
Pavel Emelyanov [Sun, 11 Nov 2007 06:06:01 +0000 (22:06 -0800)]
[AF_UNIX]: Make unix_tot_inflight counter non-atomic

This counter is _always_ modified under the unix_gc_lock spinlock,
so its atomicity can be provided w/o additional efforts.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded
Peter P Waskiewicz Jr [Sun, 11 Nov 2007 06:03:25 +0000 (22:03 -0800)]
[AF_PACKET]: Allow multicast traffic to be caught by ORIGDEV when bonded

The socket option for packet sockets to return the original ifindex instead
of the bonded ifindex will not match multicast traffic.  Since this socket
option is the most useful for layer 2 traffic and multicast traffic, make
the option multicast-aware.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agossb: Fix PCMCIA-host lowlevel bus access
Michael Buesch [Wed, 7 Nov 2007 18:03:35 +0000 (19:03 +0100)]
ssb: Fix PCMCIA-host lowlevel bus access

This fixes the lowlevel bus access routines for
PCMCIA based devices.

There are still a few issues with register access sideeffects after
this patch. This will be addressed in a later patch.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: fix MAC80211_RCSIMPLE Kconfig
Johannes Berg [Wed, 7 Nov 2007 15:41:13 +0000 (16:41 +0100)]
mac80211: fix MAC80211_RCSIMPLE Kconfig

I meant for this to be selectable only with EMBEDDED, not enabled only
with EMBEDDED. This does it that way. Sorry.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: make "decrypt failed" messages conditional upon MAC80211_DEBUG
John W. Linville [Tue, 6 Nov 2007 22:12:31 +0000 (17:12 -0500)]
mac80211: make "decrypt failed" messages conditional upon MAC80211_DEBUG

Make "decrypt failed" and "have no key" debugging messages compile
conditionally upon CONFIG_MAC80211_DEBUG.  They have been useful for
finding certain problems in the past, but in many cases they just
clutter a user's logs.

A typical example is an enviornment where multiple SSIDs are using a
single BSSID but with different protection schemes or different keys
for each SSID.  In such an environment these messages are just noise.
Let's just leave them for those interested enough to turn-on debugging.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: use IW_AUTH_PRIVACY_INVOKED rather than IW_AUTH_KEY_MGMT
Johannes Berg [Sat, 3 Nov 2007 13:11:10 +0000 (13:11 +0000)]
mac80211: use IW_AUTH_PRIVACY_INVOKED rather than IW_AUTH_KEY_MGMT

In the long bug-hunt for why dynamic WEP networks didn't work it
turned out that mac80211 incorrectly uses IW_AUTH_KEY_MGMT while
it should use IW_AUTH_PRIVACY_INVOKED to determine whether to
associate to protected networks or not.

This patch changes the behaviour to be that way and clarifies the
existing code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: remove unused driver ops
Johannes Berg [Tue, 30 Oct 2007 14:58:18 +0000 (15:58 +0100)]
mac80211: remove unused driver ops

The driver operations set_ieee8021x(), set_port_auth() and
set_privacy_invoked() are not used by any drivers, except
set_privacy_invoked() they aren't even used by mac80211.
Remove them at least until we need to support drivers with
mac80211 that require getting this information.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: remove ieee80211_common.h
Johannes Berg [Tue, 6 Nov 2007 10:23:29 +0000 (11:23 +0100)]
mac80211: remove ieee80211_common.h

Robert pointed out that I missed this file when removing the management
interface. Do it now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agosoftmac: MAINTAINERS update
Johannes Berg [Mon, 5 Nov 2007 13:32:35 +0000 (14:32 +0100)]
softmac: MAINTAINERS update

This patch marks softmac as obsolete in MAINTAINERS and removes Joe and
myself as maintainers, we're no longer using it nor interested in the
code in any way. Also remove the website reference because I took it
offline. Hopefully the code will go away in 2.6.25.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Joseph Jezak <josejx@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agorfkill: Fix sparse warning
Michael Buesch [Fri, 2 Nov 2007 19:18:11 +0000 (20:18 +0100)]
rfkill: Fix sparse warning

Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agorfkill: Use mutex_lock() at register and add sanity check
Michael Buesch [Sun, 28 Oct 2007 14:16:50 +0000 (15:16 +0100)]
rfkill: Use mutex_lock() at register and add sanity check

Replace mutex_lock_interruptible() by mutex_lock() in rfkill_register(),
as interruptible doesn't make sense there.

Add a sanity check for rfkill->type, as that's used for an unchecked dereference
in an array and might cause hard to debug crashes if the driver sets this
to an invalid value.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: select proper rate control algorithm
Johannes Berg [Sun, 28 Oct 2007 13:53:36 +0000 (14:53 +0100)]
iwlwifi: select proper rate control algorithm

Prior to this patch, iwlwifi would always use the first
registered rate control algorithm which, depending on system
setup, could be anything. After the mac80211 patch to make
the simple algorithm built-in, it would always be simple.

This has always been a bug in iwlwifi.

This fixes it by requesting that mac80211 selects the right
rate control algorithm.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: allow driver to ask for a rate control algorithm
Johannes Berg [Sun, 28 Oct 2007 13:51:05 +0000 (14:51 +0100)]
mac80211: allow driver to ask for a rate control algorithm

This allows a driver to ask for a specific rate control algorithm.
The rate control algorithm asked for must be registered and be
available as a module or built-in.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: don't allow registering the same rate control twice
Johannes Berg [Sun, 28 Oct 2007 13:49:33 +0000 (14:49 +0100)]
mac80211: don't allow registering the same rate control twice

Previously, mac80211 would allow registering the same rate control
algorithm twice. This is a programming error in the registration
and should not happen; additionally the second version could never
be selected. Disallow this and warn about it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agorfkill: Use subsys_initcall
Michael Buesch [Sun, 28 Oct 2007 13:39:02 +0000 (14:39 +0100)]
rfkill: Use subsys_initcall

We must use subsys_initcall, because we must initialize before a
driver calls rfkill_register().

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: make simple rate control algorithm built-in
Johannes Berg [Sun, 28 Oct 2007 13:17:44 +0000 (14:17 +0100)]
mac80211: make simple rate control algorithm built-in

Too frequently people do not have module autoloading enabled
or fail to install the rate control module correctly, hence
their hardware probing fails due to no rate control algorithm
being available. This makes the 'simple' algorithm built into
the mac80211 module unless EMBEDDED is enabled in which case
it can be disabled (eg. if the wanted driver requires another
rate control algorithm.)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agorfkill: Register LED triggers before registering switch
Michael Buesch [Sun, 28 Oct 2007 12:07:54 +0000 (13:07 +0100)]
rfkill: Register LED triggers before registering switch

Registering the switch triggers a LED event, so we must register
LED triggers before the switch.
This has a potential to fix a crash, depending on how the device
driver initializes the rfkill data structure.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agossb: Fix initcall ordering
Michael Buesch [Sat, 27 Oct 2007 13:14:39 +0000 (15:14 +0200)]
ssb: Fix initcall ordering

ssb must init after PCI but before the ssb drivers.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Christian Casteyde <casteyde.christian@free.fr>
Fixes-bug: #9219
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agosoftmac: fix wext MLME request reason code endianness
Johannes Berg [Thu, 25 Oct 2007 20:16:23 +0000 (22:16 +0200)]
softmac: fix wext MLME request reason code endianness

The MLME request reason code is host-endian and our passing
it to the low level functions is host-endian as well since
they do the swapping. I noticed that the reason code 768 was
sent (0x300) rather than 3 when wpa_supplicant terminates.
This removes the superfluous cpu_to_le16() call.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PKT_SCHED] CLS_U32: Use ffs() instead of C code on hash mask to get first set bit.
Radu Rendec [Sun, 11 Nov 2007 05:54:50 +0000 (21:54 -0800)]
[PKT_SCHED] CLS_U32: Use ffs() instead of C code on hash mask to get first set bit.

Computing the rank of the first set bit in the hash mask (for using later
in u32_hash_fold()) was done with plain C code. Using ffs() instead makes
the code more readable and improves performance (since ffs() is better
optimized in assembler).

Using the conditional operator on hash mask before applying ntohl() also
saves one ntohl() call if mask is 0.

Signed-off-by: Radu Rendec <radu.rendec@ines.ro>
Signed-off-by: Jarek Poplawski <jarkao2@o2.pl>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Fix skb_truesize_check() assertion
Chuck Lever [Sun, 11 Nov 2007 05:53:30 +0000 (21:53 -0800)]
[NET]: Fix skb_truesize_check() assertion

The intent of the assertion in skb_truesize_check() is to check
for skb->truesize being decremented too much by other code,
resulting in a wraparound below zero.

The type of the right side of the comparison causes the compiler to
promote the left side to an unsigned type, despite the presence of an
explicit type cast.  This defeats the check for negativity.

Ensure both sides of the comparison are a signed type to prevent the
implicit type conversion.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[VLAN]: Allow setting mac address while device is up
Patrick McHardy [Sun, 11 Nov 2007 05:52:35 +0000 (21:52 -0800)]
[VLAN]: Allow setting mac address while device is up

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[VLAN]: Don't synchronize addresses while the vlan device is down
Patrick McHardy [Sun, 11 Nov 2007 05:51:40 +0000 (21:51 -0800)]
[VLAN]: Don't synchronize addresses while the vlan device is down

While the VLAN device is down, the unicast addresses are not configured
on the underlying device, so we shouldn't attempt to sync them.

Noticed by Dmitry Butskoy <buc@odusz.so-cdu.ru>

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Cleanup the xfrm4_tunnel_(un)register
Pavel Emelyanov [Sun, 11 Nov 2007 05:48:54 +0000 (21:48 -0800)]
[INET]: Cleanup the xfrm4_tunnel_(un)register

Both check for the family to select an appropriate tunnel list.
Consolidate this check and make the for() loop more readable.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Add missed tunnel64_err handler
Pavel Emelyanov [Sun, 11 Nov 2007 05:47:39 +0000 (21:47 -0800)]
[INET]: Add missed tunnel64_err handler

The tunnel64_protocol uses the tunnel4_protocol's err_handler and
thus calls the tunnel4_protocol's handlers.

This is not very good, as in case of (icmp) error the wrong error
handlers will be called (e.g. ipip ones instead of sit) and this
won't be noticed at all, because the error is not reported.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPX]: Use existing sock refcnt debugging infrastructure
Pavel Emelyanov [Sun, 11 Nov 2007 05:39:26 +0000 (21:39 -0800)]
[IPX]: Use existing sock refcnt debugging infrastructure

Just like in the af_packet.c, the ipx_sock_nr variable is used
for debugging purposes.

Switch to using existing infrastructure. Thanks to Arnaldo for
pointing this out.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[PACKET]: Use existing sock refcnt debugging infrastructure
Pavel Emelyanov [Sun, 11 Nov 2007 05:38:48 +0000 (21:38 -0800)]
[PACKET]: Use existing sock refcnt debugging infrastructure

The packet_socks_nr variable is used purely for debugging
the number of sockets.

As Arnaldo pointed out, there's already an infrastructure
for this purposes, so switch to using it.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Fix infinite loop in dev_mc_unsync().
Joe Perches [Sun, 11 Nov 2007 05:36:04 +0000 (21:36 -0800)]
[NET]: Fix infinite loop in dev_mc_unsync().

From: Joe Perches <joe@perches.com>

Based upon an initial patch and report by Luis R. Rodriguez.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NET]: Make helper to get dst entry and "use" it
Pavel Emelyanov [Sun, 11 Nov 2007 05:28:34 +0000 (21:28 -0800)]
[NET]: Make helper to get dst entry and "use" it

There are many places that get the dst entry, increase the
__use counter and set the "lastuse" time stamp.

Make a helper for this.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[IPV4]: Remove bugus goto-s from ip_route_input_slow
Pavel Emelyanov [Sun, 11 Nov 2007 05:26:41 +0000 (21:26 -0800)]
[IPV4]: Remove bugus goto-s from ip_route_input_slow

Both places look like

        if (err == XXX)
               goto yyy;
   done:

while both yyy targets look like

        err = XXX;
        goto done;

so this is ok to remove the above if-s.

yyy labels are used in other places and are not removed.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Split SACK FRTO flag clearing (fixes FRTO corner case bug)
Ilpo Järvinen [Sun, 11 Nov 2007 05:24:19 +0000 (21:24 -0800)]
[TCP]: Split SACK FRTO flag clearing (fixes FRTO corner case bug)

In case we run out of mem when fragmenting, the clearing of
FLAG_ONLY_ORIG_SACKED might get missed which then feeds FRTO
with false information. Move clearing outside skb processing
loop so that it will get executed even if the skb loop
terminates prematurely due to out-of-mem.

Besides, now the core of the loop truly deals with a single
skb only, which also enables creation a more self-contained
of tcp_sacktag_one later on.

In addition, small reorganization of if branches was made.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Add unlikely() to sacktag out-of-mem in fragment case
Ilpo Järvinen [Sun, 11 Nov 2007 05:23:08 +0000 (21:23 -0800)]
[TCP]: Add unlikely() to sacktag out-of-mem in fragment case

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Fix reord detection due to snd_una covered holes
Ilpo Järvinen [Sun, 11 Nov 2007 05:22:18 +0000 (21:22 -0800)]
[TCP]: Fix reord detection due to snd_una covered holes

Fixes subtle bug like the one with fastpath_cnt_hint happening
due to the way the GSO and hints interact. Because hints are not
reset when just a GSOed skb is partially ACKed, there's no
guarantee that the relevant part of the write queue is going to
be processed in sacktag at all (skbs below snd_una) because
fastpath hint can fast forward the entrypoint.

This was also on the way of future reductions in sacktag's skb
processing. Also future cleanups in sacktag can be made after
this (in 2.6.25).

This may make reordering update in tcp_try_undo_partial
redundant but I'm not too sure so I left it there.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[TCP]: Consider GSO while counting reord in sacktag
Ilpo Järvinen [Sun, 11 Nov 2007 05:20:59 +0000 (21:20 -0800)]
[TCP]: Consider GSO while counting reord in sacktag

Reordering detection fails to take account that the reordered
skb may have pcount larger than 1. In such case the lowest of
them had the largest reordering, the old formula used the
highest of them which is pcount - 1 packets less reordered.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[INET]: Add a missing include <linux/vmalloc.h> to inet_hashtables.h
Eric Dumazet [Sun, 11 Nov 2007 05:18:39 +0000 (21:18 -0800)]
[INET]: Add a missing include <linux/vmalloc.h> to inet_hashtables.h

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoACPI: add documentation for deprecated /proc/acpi/battery in ACPI_PROCFS
Jerome Pinot [Sat, 10 Nov 2007 18:01:10 +0000 (03:01 +0900)]
ACPI: add documentation for deprecated /proc/acpi/battery in ACPI_PROCFS

Add documentation in Kconfig help about the move of /proc/acpi/battery
to /sys/class/power_supply when selecting ACPI_PROCFS.  This will impact
a lot of users and should be documented.

Signed-off-by: Jerome Pinot <ngc891@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Sat, 10 Nov 2007 22:27:19 +0000 (14:27 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/drzeus/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
  Add missing "\n" to log message

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Sat, 10 Nov 2007 22:26:04 +0000 (14:26 -0800)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata: Don't fail device revalidation for bad _GTF methods
  libata: port and host should be stopped before hardware resources are released
  libata: skip 0xff polling for PATA controllers
  libata: pata_platform: Support polling-mode configuration.
  libata: Support PIO polling-only hosts.
  libata sata_qstor conversion to new error handling (EH).
  libata sata_qstor workaround for spurious interrupts
  libata sata_qstor nuke idle state
  nv_hardreset: update dangling reference to bugzilla entry
  ata_piix: add SATELLITE PRO U200 to broken suspend list

17 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Sat, 10 Nov 2007 22:23:56 +0000 (14:23 -0800)]
Merge branch 'upstream-linus' of /linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (40 commits)
  r8169: prevent bit sign expansion error in mdio_write
  r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (bis repetita)
  sky2: new pci id's
  ax88796: add superh to kconfig dependencies
  qla3xxx: bugfix: Fix bad logical operation in link state machine.
  qla3xxx: bugfix: Move link state machine into a worker thread
  pasemi_mac: Fix CRC checks
  pasemi_mac: Don't set replace-source-address descriptor bits
  bonding: don't validate address at device open
  bonding: fix rtnl locking merge error
  sky2: netpoll on port 0 only
  b43: Fix kconfig dependencies for rfkill and leds
  b43legacy: Fix sparse warning
  b43: properly request pcmcia IRQ
  b43legacy: fix shared IRQ race condition
  b43: fix shared IRQ race condition
  b43legacy: add me as maintainer and fix URLs
  b43legacy: fix possible buffer overrun in debugfs
  b43: Rewrite and fix rfkill init
  b43: debugfs SHM read buffer overrun fix
  ...

17 years agoRevert "[ARM] 4642/2: netX: default config for netx based boards"
Linus Torvalds [Sat, 10 Nov 2007 22:22:46 +0000 (14:22 -0800)]
Revert "[ARM] 4642/2: netX: default config for netx based boards"

This reverts commit f33bac8dd4573428b94c67149c5607be489092d1, which was
totally bogus.

The arm/configs/netx_defconfig file already existed - in the right
place. Namely under "arch".

Noticed-by: Paul Mundt <lethal@linux-sh.org>
Acked-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoAdd missing "\n" to log message
Rolf Eike Beer [Fri, 2 Nov 2007 14:22:30 +0000 (15:22 +0100)]
Add missing "\n" to log message

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
17 years agor8169: prevent bit sign expansion error in mdio_write
Francois Romieu [Thu, 8 Nov 2007 22:23:21 +0000 (23:23 +0100)]
r8169: prevent bit sign expansion error in mdio_write

Oops.

The current code does not like being given an u16 with the highest
bit set as an argument to mdio_write. Let's enforce a correct range of
values for both the register address and value (resp. 5 and 16 bits).

The callers are currently left as-is.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (bis repetita)
Mark Lord [Thu, 8 Nov 2007 21:29:07 +0000 (22:29 +0100)]
r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (bis repetita)

RTL_GIGA_MAC_VER_17 breaks as well.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agosky2: new pci id's
Stephen Hemminger [Thu, 8 Nov 2007 16:20:17 +0000 (08:20 -0800)]
sky2: new pci id's

Found a couple of more chips in the latest version of the vendor driver.
They are minor variations on existing chips.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoax88796: add superh to kconfig dependencies
Magnus Damm [Thu, 8 Nov 2007 07:31:05 +0000 (16:31 +0900)]
ax88796: add superh to kconfig dependencies

ax88796: add superh to kconfig dependencies

This patch adds sh architecture support to the ax88796 kconfig.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: bugfix: Fix bad logical operation in link state machine.
Ron Mercer [Wed, 7 Nov 2007 21:59:07 +0000 (13:59 -0800)]
qla3xxx: bugfix: Fix bad logical operation in link state machine.

Luckily, this wasn't reported or reproduced. The logical operation for
setting duplex had wrong grouping.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: bugfix: Move link state machine into a worker thread
Ron Mercer [Wed, 7 Nov 2007 21:59:06 +0000 (13:59 -0800)]
qla3xxx: bugfix: Move link state machine into a worker thread

The link state machine requires access to some resources that
are shared with the iSCSI function on the chip.  (See iSCSI
driver at drivers/scsi/qla4xxx)  If the interface is being
up/downed at a rapid pace this driver may need to sleep
waiting to get access to the common resources. For this we
are moving the state machine to run as a work thread.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopasemi_mac: Fix CRC checks
Olof Johansson [Wed, 7 Nov 2007 04:21:38 +0000 (22:21 -0600)]
pasemi_mac: Fix CRC checks

Make sure we don't feed packets with bad CRC up the network stack,
and discount the packet length as reported from the MAC for the CRC
field.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agopasemi_mac: Don't set replace-source-address descriptor bits
Olof Johansson [Wed, 7 Nov 2007 04:20:39 +0000 (22:20 -0600)]
pasemi_mac: Don't set replace-source-address descriptor bits

Don't use the "replace source address with local MAC address" bits, since
it causes problems on some variations of the hardware due to an erratum.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agobonding: don't validate address at device open
Jay Vosburgh [Tue, 6 Nov 2007 21:33:29 +0000 (13:33 -0800)]
bonding: don't validate address at device open

The standard validate_addr handler refuses to accept the all zeroes address
as valid.  However, it's common historical practice for the bonding
master to be configured up prior to having any slaves, at which time the
master will have a MAC address of all zeroes.

Resolved by setting the dev->validate_addr to NULL.  The master still can't
end up with an invalid address, as the set_mac_address function tests
for validity.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agobonding: fix rtnl locking merge error
Jay Vosburgh [Tue, 6 Nov 2007 21:33:28 +0000 (13:33 -0800)]
bonding: fix rtnl locking merge error

Looks like I incorrectly merged one of the rtnl lock changes,
so that one function, bonding_show_active_slave, held rtnl but didn't
release it, and another, bonding_store_active_slave, never held rtnl but
did release it.

Fixed so the first function doesn't mess with rtnl, and the
second correctly acquires and releases rtnl.

Bug reported by Moni Shoua <monis@voltaire.com>

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: netpoll on port 0 only
Stephen Hemminger [Tue, 6 Nov 2007 19:45:40 +0000 (11:45 -0800)]
sky2: netpoll on port 0 only

Netpoll will only work on port 0 because of the restrictive
relationship between NAPI and netpoll.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agob43: Fix kconfig dependencies for rfkill and leds
Michael Buesch [Wed, 7 Nov 2007 20:24:07 +0000 (21:24 +0100)]
b43: Fix kconfig dependencies for rfkill and leds

Fix dependencies for built-in b43.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43legacy: Fix sparse warning
Michael Buesch [Wed, 7 Nov 2007 20:21:55 +0000 (21:21 +0100)]
b43legacy: Fix sparse warning

Fix a sparse warning about a nonstatic function.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43: properly request pcmcia IRQ
Michael Buesch [Wed, 7 Nov 2007 18:08:26 +0000 (19:08 +0100)]
b43: properly request pcmcia IRQ

PCMCIA needs an additional step to request the IRQ.

No need to add code to release the IRQ here, as that's done
automatically in pcmcia_disable_device().

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43legacy: fix shared IRQ race condition
Stefano Brivio [Wed, 7 Nov 2007 17:33:37 +0000 (18:33 +0100)]
b43legacy: fix shared IRQ race condition

Fix an IRQ race condition in b43legacy. If we call
b43legacy_wireless_core_stop(), it will set the status of the device to
INITIALIZED and the IRQ handler won't care any longer about IRQs, thus the
kernel will disable the IRQ if it's shared (unless we boot it with the
'irqpoll' option). So we must disable IRQs before changing the device
status.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43: fix shared IRQ race condition
Stefano Brivio [Wed, 7 Nov 2007 17:16:11 +0000 (18:16 +0100)]
b43: fix shared IRQ race condition

Fix an IRQ race condition in b43. If we call b43_stop_wireless_core(), it
will set the status of the device to INITIALIZED and the IRQ handler won't
care any longer about IRQs, thus the kernel will disable the IRQ if it's
shared (unless we boot it with the 'irqpoll' option). So we must disable
IRQs before changing the device status.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43legacy: add me as maintainer and fix URLs
Stefano Brivio [Tue, 6 Nov 2007 21:48:56 +0000 (22:48 +0100)]
b43legacy: add me as maintainer and fix URLs

As b43legacy is going to be orphaned, add me as a maintainer. Fix URLs for
the related website and fix my e-mail address in MAINTAINERS file.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Cc: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43legacy: fix possible buffer overrun in debugfs
Stefano Brivio [Tue, 6 Nov 2007 21:48:36 +0000 (22:48 +0100)]
b43legacy: fix possible buffer overrun in debugfs

Fix possible buffer overrun.

The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to
b43legacy.

Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43: Rewrite and fix rfkill init
Michael Buesch [Sat, 3 Nov 2007 13:34:32 +0000 (14:34 +0100)]
b43: Rewrite and fix rfkill init

The rfkill subsystem doesn't like code like that
rfkill_allocate();
rfkill_register();
rfkill_unregister();
rfkill_register(); /* <- This will crash */

This sequence happens with
modprobe b43
ifconfig wlanX up
ifconfig wlanX down
ifconfig wlanX up

Fix this by always re-allocating the rfkill stuff before register.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43: debugfs SHM read buffer overrun fix
Michael Buesch [Fri, 2 Nov 2007 17:35:02 +0000 (18:35 +0100)]
b43: debugfs SHM read buffer overrun fix

Fix possible buffer overrun.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43: Fix rfkill callback deadlock
Michael Buesch [Sun, 28 Oct 2007 16:27:10 +0000 (17:27 +0100)]
b43: Fix rfkill callback deadlock

wl->mutex might already be locked on initialization.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agob43: pcmcia-host initialization bugfixes
Michael Buesch [Tue, 6 Nov 2007 15:36:41 +0000 (16:36 +0100)]
b43: pcmcia-host initialization bugfixes

Fix the initialization for PCMCIA devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoipw2100: fix postfix decrement errors
Roel Kluin [Mon, 5 Nov 2007 22:55:02 +0000 (23:55 +0100)]
ipw2100: fix postfix decrement errors

If i reaches zero, the loop ends, but the postfix decrement subtracts it to -1.
Testing for 'i == 0', later in the function, will not fulfill its purpose.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agohostap: fix section mismatch warning
Randy Dunlap [Mon, 29 Oct 2007 18:20:26 +0000 (11:20 -0700)]
hostap: fix section mismatch warning

Fix section mismatch warning:

WARNING: vmlinux.o(.data+0x36fcc): Section mismatch: reference to .init.data:prism2_pci_id_table (between 'prism2_pci_drv_id' and 'prism2_pci_funcs')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agort2x00: Block adhoc & master mode
Ivo van Doorn [Sun, 28 Oct 2007 13:39:52 +0000 (14:39 +0100)]
rt2x00: Block adhoc & master mode

rt2x00 is broken when it comes down to adhoc and master mode.
The main problem is the beaconing, which is completely failing.
Untill a solution has been found, both beacon requiring modes
must be disabled to prevent numerous bug reports.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agolibertas: properly account for queue commands
Marcelo Tosatti [Tue, 30 Oct 2007 14:52:46 +0000 (10:52 -0400)]
libertas: properly account for queue commands

Properly account for queue commands, this fixes a problem reported
by Holger Schurig when using the debugfs interface.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agolibertas: make if_sdio align packets
Pierre Ossman [Mon, 22 Oct 2007 17:05:32 +0000 (19:05 +0200)]
libertas: make if_sdio align packets

Incoming packets have to be aligned or the IP stack becomes upset.
Make sure to shift them two bytes to achieve this.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agolibertas: fixes for slow hardware
Holger Schurig [Tue, 9 Oct 2007 08:41:57 +0000 (10:41 +0200)]
libertas: fixes for slow hardware

Fixes for slow hardware.

Signed-off-by: Vitaly V. Bursov <vitalyvb@ukr.net>
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agohermes: clarify Intel reference in Kconfig help
John W. Linville [Fri, 2 Nov 2007 19:36:38 +0000 (15:36 -0400)]
hermes: clarify Intel reference in Kconfig help

The Intel device supported by the hermes driver core is the IPW2011.  The
"Intel PRO/Wireless" wording suggests the later Centrino devices and may
be confusing to some users.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agor8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly)
Mark Lord [Thu, 8 Nov 2007 00:03:04 +0000 (01:03 +0100)]
r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly)

Various symptoms depending on the .config options:
- the card stops working after some (short) time
- the card does not work at all
- the card disappears (nothing in lspci/dmesg)

A real power-off is needed to recover the card.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
17 years agor8169: do not enable the TBI for the 8168 and the 81x0
Francois Romieu [Tue, 6 Nov 2007 21:56:10 +0000 (22:56 +0100)]
r8169: do not enable the TBI for the 8168 and the 81x0

The 8168c and the 8100e choke on it. I have not seen an indication
nor received a report that the TBI is being actively used on the
remaining 8168b and 8110. Let's disable it for now until someone
complains.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Matthias Winkler <m.winkler@unicon-ka.de>
Cc: Maarten Vanraes <maarten.vanraes@gmail.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard
Ciaran McCreesh [Thu, 1 Nov 2007 21:48:15 +0000 (22:48 +0100)]
r8169: add PCI ID for the 8168 in the Abit Fatal1ty F-190HD motherboard

Signed-off-by: Ciaran McCreesh <ciaran.mccreesh@blueyonder.co.uk>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agoadd support for smc91x ethernet interface on zylonite
eric miao [Tue, 30 Oct 2007 01:48:41 +0000 (09:48 +0800)]
add support for smc91x ethernet interface on zylonite

This patch adds LAN91C111 ethernet interface support for zylonite
(a.k.a Marvell's PXA3xx Development Platform) with smc91x driver.

It would be better if a patch would support zylonite along with all
other PXA boards with a single binary of smc91x driver, but it looks
quite difficult for the moment, so ugly #ifdef is still used here.

Signed-off-by: Aleksey Makarov <amakarov@ru.mvista.com>
Acked-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: version 1.20
Stephen Hemminger [Mon, 5 Nov 2007 23:52:14 +0000 (15:52 -0800)]
sky2: version 1.20

Version update to 1.20

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: handle advanced error recovery config issues
Stephen Hemminger [Mon, 5 Nov 2007 23:52:13 +0000 (15:52 -0800)]
sky2: handle advanced error recovery config issues

The PCI AER support may not work for a couple of reasons.
It may not be configured into the kernel or there may be a BIOS
bug that prevents MMCONFIG from working.  If MMCONFIG doesn't work
then the PCI registers that control AER will not be accessible via
pci_read_config functions; luckly there is another window to access
PCI space in the device, so use that.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: remove unneeded mask update
Stephen Hemminger [Mon, 5 Nov 2007 23:52:12 +0000 (15:52 -0800)]
sky2: remove unneeded mask update

The IRQ's is already masked on shutdown, and on startup avoid
touching PHY until after phy_init().

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: dont change LED after autoneg
Stephen Hemminger [Mon, 5 Nov 2007 23:52:11 +0000 (15:52 -0800)]
sky2: dont change LED after autoneg

Don't need to change LED's after auto negotiation, the chip
sets them correctly.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: longer PHY delay
Stephen Hemminger [Mon, 5 Nov 2007 23:52:10 +0000 (15:52 -0800)]
sky2: longer PHY delay

Increse phy delay and handle I/O errors.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: status ring race fix
Stephen Hemminger [Mon, 5 Nov 2007 23:52:09 +0000 (15:52 -0800)]
sky2: status ring race fix

The D-Link PCI-X board (and maybe others) can lie about status
ring entries. It seems it will update the register for last status
index before completing the DMA for the ring entry. To avoid reading
stale data, zap the old entry and check.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: enable PCI config writes
Stephen Hemminger [Mon, 5 Nov 2007 23:52:08 +0000 (15:52 -0800)]
sky2: enable PCI config writes

On some boards, PCI configuration space access is turned off by default.
The 2.6.24 driver doesn't turn it on, and should have.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agolibata: Don't fail device revalidation for bad _GTF methods
Matthew Garrett [Thu, 8 Nov 2007 18:37:07 +0000 (18:37 +0000)]
libata: Don't fail device revalidation for bad _GTF methods

Experience suggests that the _GTF method may be bad. We currently fail
device revalidation in that case, which seems excessive.

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>