pandora-kernel.git
15 years agonet_sched: Add qdisc __NET_XMIT_BYPASS flag
Jarek Poplawski [Tue, 5 Aug 2008 05:39:11 +0000 (22:39 -0700)]
net_sched: Add qdisc __NET_XMIT_BYPASS flag

Patrick McHardy <kaber@trash.net> noticed that it would be nice to
handle NET_XMIT_BYPASS by NET_XMIT_SUCCESS with an internal qdisc flag
__NET_XMIT_BYPASS and to remove the mapping from dev_queue_xmit().

David Miller <davem@davemloft.net> spotted a serious bug in the first
version of this patch.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet_sched: Add qdisc __NET_XMIT_STOLEN flag
Jarek Poplawski [Tue, 5 Aug 2008 05:31:03 +0000 (22:31 -0700)]
net_sched: Add qdisc __NET_XMIT_STOLEN flag

Patrick McHardy <kaber@trash.net> noticed:
"The other problem that affects all qdiscs supporting actions is
TC_ACT_QUEUED/TC_ACT_STOLEN getting mapped to NET_XMIT_SUCCESS
even though the packet is not queued, corrupting upper qdiscs'
qlen counters."

and later explained:
"The reason why it translates it at all seems to be to not increase
the drops counter. Within a single qdisc this could be avoided by
other means easily, upper qdiscs would still increase the counter
when we return anything besides NET_XMIT_SUCCESS though.

This means we need a new NET_XMIT return value to indicate this to
the upper qdiscs. So I'd suggest to introduce NET_XMIT_STOLEN,
return that to upper qdiscs and translate it to NET_XMIT_SUCCESS
in dev_queue_xmit, similar to NET_XMIT_BYPASS."

David Miller <davem@davemloft.net> noticed:
"Maybe these NET_XMIT_* values being passed around should be a set of
bits. They could be composed of base meanings, combined with specific
attributes.

So you could say "NET_XMIT_DROP | __NET_XMIT_NO_DROP_COUNT"

The attributes get masked out by the top-level ->enqueue() caller,
such that the base meanings are the only thing that make their
way up into the stack. If it's only about communication within the
qdisc tree, let's simply code it that way."

This patch is trying to realize these ideas.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: eliminate refcounting in backlog queue
Stephen Hemminger [Mon, 4 Aug 2008 04:29:57 +0000 (21:29 -0700)]
net: eliminate refcounting in backlog queue

Avoid the overhead of atomic increment/decrement on each received packet.
This helps performance of non-NAPI devices (like loopback).
Use cleanup function to walk queue on each cpu and clean out any
left over packets.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Do not drop packet if skb->local_df is set to true
Wei Yongjun [Mon, 4 Aug 2008 04:15:59 +0000 (21:15 -0700)]
ipv6: Do not drop packet if skb->local_df is set to true

The old code will drop IPv6 packet if ipfragok is not set, since
ipfragok is obsoleted, will be instead by used skb->local_df, so this
check must be changed to skb->local_df.

This patch fix this problem and not drop packet if skb->local_df is
set to true.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Drop ipfargok in sctp_xmit function
Herbert Xu [Mon, 4 Aug 2008 04:15:08 +0000 (21:15 -0700)]
sctp: Drop ipfargok in sctp_xmit function

The ipfragok flag controls whether the packet may be fragmented
either on the local host on beyond.  The latter is only valid on
IPv4.

In fact, we never want to do the latter even on IPv4 when PMTU is
enabled.  This is because even though we can't fragment packets
within SCTP due to the prtocol's inherent faults, we can still
fragment it at IP layer.  By setting the DF bit we will improve
the PMTU process.

RFC 2960 only says that we SHOULD clear the DF bit in this case,
so we're compliant even if we set the DF bit.  In fact RFC 4960
no longer has this statement.

Once we make this change, we only need to control the local
fragmentation.  There is already a bit in the skb which controls
that, local_df.  So this patch sets that instead of using the
ipfragok argument.

The only complication is that there isn't a struct sock object
per transport, so for IPv4 we have to resort to changing the
pmtudisc field for every packet.  This should be safe though
as the protocol is single-threaded.

Note that after this patch we can remove ipfragok from the rest
of the stack too.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: Fix the return value of Set Hop-by-Hop options header with NULL data pointer
Yang Hongyang [Mon, 4 Aug 2008 01:16:15 +0000 (18:16 -0700)]
ipv6: Fix the return value of Set Hop-by-Hop options header with NULL data pointer

When Set Hop-by-Hop options header with NULL data
pointer and optlen is not zero use setsockopt(),
the kernel successfully return 0 instead of
return error EINVAL or EFAULT.

This patch fix the problem.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: syncookies: free reqsk on xfrm_lookup error
Florian Westphal [Mon, 4 Aug 2008 01:13:44 +0000 (18:13 -0700)]
ipv6: syncookies: free reqsk on xfrm_lookup error

cookie_v6_check() did not call reqsk_free() if xfrm_lookup() fails,
leaking the request sock.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: Add missing extra2 parameter for ip_default_ttl sysctl
Sven Wegener [Sun, 3 Aug 2008 21:06:44 +0000 (14:06 -0700)]
net: Add missing extra2 parameter for ip_default_ttl sysctl

Commit 76e6ebfb40a2455c18234dcb0f9df37533215461 ("netns: add namespace
parameter to rt_cache_flush") acceses the extra2 parameter of the
ip_default_ttl ctl_table, but it is never set to a meaningful
value. When e84f84f276473dcc673f360e8ff3203148bdf0e2 ("netns: place
rt_genid into struct net") is applied, we'll oops in
rt_cache_invalidate(). Set extra2 to init_net, to avoid that.

Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Tested-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: use software GSO for SG+CSUM capable netdevices
Lennert Buytenhek [Sun, 3 Aug 2008 08:23:10 +0000 (01:23 -0700)]
net: use software GSO for SG+CSUM capable netdevices

If a netdevice does not support hardware GSO, allowing the stack to
use GSO anyway and then splitting the GSO skb into MSS-sized pieces
as it is handed to the netdevice for transmitting is likely still
a win as far as throughput and/or CPU usage are concerned, since it
reduces the number of trips through the output path.

This patch enables the use of GSO on any netdevice that supports SG.
If a GSO skb is then sent to a netdevice that supports SG but does not
support hardware GSO, net/core/dev.c:dev_hard_start_xmit() will take
care of doing the necessary GSO segmentation in software.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: fix missing pneigh entries in the neighbor seq_file code
Chris Larson [Sun, 3 Aug 2008 08:10:55 +0000 (01:10 -0700)]
net: fix missing pneigh entries in the neighbor seq_file code

When pneigh entries exist, but the user's read buffer isn't sufficient to
hold them all, one of the pneigh entries will be missing from the results.

In neigh_get_idx_any, the number of elements which neigh_get_idx
encountered is not correctly subtracted from the position number before
the call to pneigh_get_idx.  neigh_get_idx reduces the position by 1 for
each call to neigh_get_next, but it does not reduce it by one for the
first element (neigh_get_first). The patch alters the neigh_get_idx and
pneigh_get_idx functions to subtract one from pos, for the first element,
when pos is non-zero.

Signed-off-by: Chris Larson <clarson@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: in the first call to neigh_seq_next, call neigh_get_first, not neigh_get_idx.
Chris Larson [Sun, 3 Aug 2008 08:02:41 +0000 (01:02 -0700)]
net: in the first call to neigh_seq_next, call neigh_get_first, not neigh_get_idx.

neigh_seq_next won't be called both with *pos > 0 && v ==
SEQ_START_TOKEN, so there's no point calling neigh_get_idx when we're
on the start token, just call neigh_get_first directly.

Signed-off-by: Chris Larson <clarson@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: Make sure RTNL is held in qdisc_root_lock().
David S. Miller [Sun, 3 Aug 2008 06:27:37 +0000 (23:27 -0700)]
pkt_sched: Make sure RTNL is held in qdisc_root_lock().

It is the only legal environment in which this can be
used.

Add some commentary explaining the situation.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agomac80211: Use queue_lock() in ieee80211_ht_agg_queue_remove().
David S. Miller [Sun, 3 Aug 2008 06:25:50 +0000 (23:25 -0700)]
mac80211: Use queue_lock() in ieee80211_ht_agg_queue_remove().

qdisc_root_lock() is only %100 safe to use when the RTNL
semaphore is held.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agopkt_sched: Use qdisc_lock() on already sampled root qdisc.
David S. Miller [Sun, 3 Aug 2008 03:02:43 +0000 (20:02 -0700)]
pkt_sched: Use qdisc_lock() on already sampled root qdisc.

Based upon a bug report by Jeff Kirsher.

Don't use qdisc_root_lock() in these cases as the root
qdisc could have been changed, and we'd thus lock the
wrong object.

Tested by Emil S Tantilov who confirms that this seems
to fix the problem.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agort2x00: Fix compile warning
Ivo van Doorn [Sat, 2 Aug 2008 08:31:09 +0000 (01:31 -0700)]
rt2x00: Fix compile warning

rt2x00usb_vendor_request_large_buff is write-only, so it is
safe to make the argument a const.

Fixes compile warning:
drivers/net/wireless/rt2x00/rt73usb.c: In function 'rt73usb_load_firmware':
drivers/net/wireless/rt2x00/rt73usb.c:916: warning: passing argument 5 of 'rt2x00usb_vendor_request_large_buff' discards qualifiers from pointer target typ

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Sat, 2 Aug 2008 05:08:51 +0000 (22:08 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Fri, 1 Aug 2008 21:59:11 +0000 (14:59 -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] Move include/asm-ia64 to arch/ia64/include/asm

15 years agoembedded: fix vc_translate operator precedence
Tim Bird [Fri, 1 Aug 2008 21:05:50 +0000 (14:05 -0700)]
embedded: fix vc_translate operator precedence

This fixes a bug in operator precedence in the newly introduced vc_translate
macro.  Without this fix, the translation of some characters on the
kernel console is garbled.

This patch was copied to the e-mail list previously for testing.  Now,
all reports confirm that it works, so this is an official post for
application.

Signed-off-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoRemove EXPORTS of follow_page & zap_page_range
Jack Steiner [Fri, 1 Aug 2008 20:08:15 +0000 (15:08 -0500)]
Remove EXPORTS of follow_page & zap_page_range

Delete 2 EXPORTs that were accidentally sent upstream.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodual license ftrace.txt
Steven Rostedt [Thu, 31 Jul 2008 16:40:52 +0000 (12:40 -0400)]
dual license ftrace.txt

I asked legal about the licensing of ftrace.txt, and they told me that,
unless the Documentation directory is specifically set up to handle non
GPL licenses (which it does not appear to be), then it would be best to
put ftrace.txt under the GPL.

This patch adds a dual license to ftrace.txt such that it is under both
the FDL and the GPL.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Wire up new system calls
David Howells [Thu, 31 Jul 2008 12:46:33 +0000 (13:46 +0100)]
FRV: Wire up new system calls

Wire up for FRV the system calls that were added in the last merge window.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMN10300: Wire up new system calls
David Howells [Thu, 31 Jul 2008 12:01:30 +0000 (13:01 +0100)]
MN10300: Wire up new system calls

Wire up system calls added in the last merge window for the MN10300 arch.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotry harder to load tty ldisc driver
Eugeniy Meshcheryakov [Thu, 31 Jul 2008 09:03:19 +0000 (10:03 +0100)]
try harder to load tty ldisc driver

Currently function tty_ldisc_get() tries to load an ldisc driver module
only when tty_ldisc_try_get() returns -EAGAIN. This happens only if
module is being unloaded. If ldisc module is not loaded
tty_ldisc_try_get() returns -EINVAL and this case is not handled in
tty_ldisc_get(), so request_module() is not called.

Attached patch fixes this by calling request_module() if
tty_ldisc_try_get() returned any error code.

I discovered this when my UMTS modem stopped working with 2.6.27-rc1
because module ppp_async was not loaded.

Signed-off-by: Eugeniy Meshcheryakov <eugen@debian.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 1 Aug 2008 19:48:16 +0000 (12:48 -0700)]
Merge branch 'kvm-updates-2.6.27' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: s390: Fix kvm on IBM System z10
  KVM: Advertise synchronized mmu support to userspace
  KVM: Synchronize guest physical memory map to host virtual memory map
  KVM: Allow browsing memslots with mmu_lock
  KVM: Allow reading aliases with mmu_lock

15 years agoMerge branch 'zero-len' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Fri, 1 Aug 2008 19:47:53 +0000 (12:47 -0700)]
Merge branch 'zero-len' of git://git./linux/kernel/git/jgarzik/misc-2.6

* 'zero-len' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  drivers/media, include/media: delete zero-length files

15 years agomm/hugetlb: don't crash when HPAGE_SHIFT is 0
Benjamin Herrenschmidt [Thu, 31 Jul 2008 07:07:30 +0000 (00:07 -0700)]
mm/hugetlb: don't crash when HPAGE_SHIFT is 0

Some platform decide whether they support huge pages at boot time.  On
these, such as powerpc, HPAGE_SHIFT is a variable, not a constant, and is
set to 0 when there is no such support.

The patches to introduce multiple huge pages support broke that causing
the kernel to crash at boot time on machines such as POWER3 which lack
support for multiple page sizes.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMissing symbol prefix on vmlinux.lds.h
Yoshinori Sato [Thu, 31 Jul 2008 07:07:29 +0000 (00:07 -0700)]
Missing symbol prefix on vmlinux.lds.h

ARCH=h8300:

init/main.c:781: undefined reference to `___early_initcall_end'

Same problem have
__start___bug_table
__stop___bug_table
__tracedata_start
__tracedata_end
__per_cpu_start
__per_cpu_end

When defining a symbol in vmlinux.lds, use the VMLINUX_SYMBOL macro.
VMLINUX_SYMBOL adds a prefix charactor.

You can't just use straight symbol names in common header files as they
dont take into consideration weird arch-specific ABI conventions.  in the
case of Blackfin/h8300, the ABI dictates that any C-visible symbols have
an underscore prefixed to them.  Thus all symbols in vmlinux.lds.h need to
be wrapped in VMLINUX_SYMBOL() so that each arch can put hide this magic
in their own files.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: "Mike Frysinger" <vapier.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoPNP: fix formatting of dbg_pnp_show_resources() output
Bjorn Helgaas [Thu, 31 Jul 2008 07:07:27 +0000 (00:07 -0700)]
PNP: fix formatting of dbg_pnp_show_resources() output

Each resource should be printed on its own line, so start snprintf'ing
at the beginning of the buffer every time through the loop.

Also, use scnprintf() rather than snprintf() when building up the
buffer to print.  scnprintf() returns the number of characters actually
written into the buffer (not including the trailing NULL).

snprintf() returns the number of characters that *would be* written,
assuming everything would fit in the buffer.  That's nice if we want to
resize the buffer to make sure everything fits, but in this case, I
just want to keep from overflowing the buffer, and it's OK if the
output is truncated.

Using snprintf() meant that my "len" could grow to be more than the
the buffer size, which makes "sizeof(buf) - len" negative, which causes
this alarming WARN_ON:
    http://marc.info/?l=linux-kernel&m=121736480005656&w=2

More useful snprintf/scnprintf discussion:
    http://lwn.net/Articles/69419/

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Reported-by: Pete Clements <clem@clem.clem-digital.net>
Cc: Rene Herman <rene.herman@keyaccess.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoRemove newline from the description of module parameters
Niels de Vos [Thu, 31 Jul 2008 07:07:23 +0000 (00:07 -0700)]
Remove newline from the description of module parameters

Some module parameters with only one line have the '\n' at the end of the
description.  This is not needed nor wanted as after the description the
type (i.e.  int) is followed by a newline.

Some modules contain a multi-line description, these are not affected
by this patch.

Signed-off-by: Niels de Vos <niels.devos@wincor-nixdorf.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Ed L. Cashin <ecashin@coraid.com>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Roland Dreier <rolandd@cisco.com>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 1 Aug 2008 19:41:29 +0000 (12:41 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata_it821x: Driver updates and reworking
  libata.h: replace __FUNCTION__ with __func__
  ata_piix: subsys 106b:00a3 is apple ich8m too
  libata-core: make sure that ata_force_tbl is freed in case of an error
  libata: update atapi disable handling
  pata_via: add VX800 flag; add function for fixing h/w bugs
  pata_ali: misplaced pci_dev_put()

15 years agoMerge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-pull
Linus Torvalds [Fri, 1 Aug 2008 19:39:09 +0000 (12:39 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-pull

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-pull: (64 commits)
  [XFS] Remove vn_revalidate calls in xfs.
  [XFS] Now that xfs_setattr is only used for attributes set from ->setattr
  [XFS] xfs_setattr currently doesn't just handle the attributes set through
  [XFS] fix use after free with external logs or real-time devices
  [XFS] A bug was found in xfs_bmap_add_extent_unwritten_real(). In a
  [XFS] fix compilation without CONFIG_PROC_FS
  [XFS] s/XFS_PURGE_INODE/IRELE/g s/VN_HOLD(XFS_ITOV())/IHOLD()/
  [XFS] fix mount option parsing in remount
  [XFS] Disable queue flag test in barrier check.
  [XFS] streamline init/exit path
  [XFS] Fix up problem when CONFIG_XFS_POSIX_ACL is not set and yet we still
  [XFS] Don't assert if trying to mount with blocksize > pagesize
  [XFS] Don't update mtime on rename source
  [XFS] Allow xfs_bmbt_split() to fallback to the lowspace allocator
  [XFS] Restore the lowspace extent allocator algorithm
  [XFS] use minleft when allocating in xfs_bmbt_split()
  [XFS] attrmulti cleanup
  [XFS] Check for invalid flags in xfs_attrlist_by_handle.
  [XFS] Fix CI lookup in leaf-form directories
  [XFS] Use the generic xattr methods.
  ...

15 years agoiwl3945: Fix statistics in monitor mode
Maxim Levitsky [Fri, 1 Aug 2008 09:54:27 +0000 (12:54 +0300)]
iwl3945: Fix statistics in monitor mode

iwl3945_rx_reply_rx was sending packets too early to
mac80211, before updating signal strength/quality.
This resulted in garbage power levels.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoprism54 - Use offsetof()
Takashi Iwai [Thu, 31 Jul 2008 17:03:10 +0000 (19:03 +0200)]
prism54 - Use offsetof()

Use the standard offsetof() macro to fix a compile warning below:
  CC [M]  drivers/net/wireless/prism54/isl_ioctl.o
drivers/net/wireless/prism54/isl_ioctl.c: In function 'prism2_ioctl_set_generic_element':
drivers/net/wireless/prism54/isl_ioctl.c:2658: warning: cast from pointer to integer of different size

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoipw2200 - Fix bad ipw_write8() macro
Takashi Iwai [Thu, 31 Jul 2008 17:02:06 +0000 (19:02 +0200)]
ipw2200 - Fix bad ipw_write8() macro

ipw_write8() can't be used alone with a loop because of a wrong definition.

  CC [M]  drivers/net/wireless/ipw2200.o
drivers/net/wireless/ipw2200.c: In function 'ipw_ethtool_set_eeprom':
drivers/net/wireless/ipw2200.c:10579: warning: array subscript is above array bounds
drivers/net/wireless/ipw2200.c: In function 'ipw_load':
drivers/net/wireless/ipw2200.c:2663: warning: array subscript is above array bounds

Add missing do {} while (0) to fix them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agortl8187: Fix lockups due to concurrent access to config routine
Larry Finger [Fri, 1 Aug 2008 00:30:48 +0000 (19:30 -0500)]
rtl8187: Fix lockups due to concurrent access to config routine

Some users of the RTL8187B have experienced difficulties since commit
49292d56352a6ab90d04c3448dd8b6106dfef2d6 that introduced the power
management wext hooks. This difficulty has not made much sense until
it was realized that it was possible for mac80211 to make a call to the
config routine while that routine was already being executed. On this
device, it is necessary to loopback the TX when changing channels. Unless
this is properly restored, the device will lockup. A mutex now protects
the device state, and the private data in several places.

The problem was found by Herton Ronaldo Krzesinski <herton@mandriva.com.br>,
who also suggested this type of fix.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2500pci: restoring missing line
Peter Chubb [Thu, 31 Jul 2008 00:56:34 +0000 (10:56 +1000)]
rt2500pci: restoring missing line

In kernel version 2.6.26-rc9 my wireless LAN card worked; but in the
released 2.6.26, my RaLink rt2500 card wouldn't associate.

Git-bisect led me to this patch:

61486e0f68d1f8966c09b734566a187d42d65c54
rt2x00: Remove ieee80211_tx_control argument from write_tx_desc()

I believe that there is a problem with that patch --- it
(inadvertantly) removes an extra line of code, that used to set the
DATABYTE_COUNT field.

This patch reinstates that line, and with it my card works again.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agolibertas: only enable rtap with mesh firmware
Dan Williams [Tue, 29 Jul 2008 17:50:39 +0000 (13:50 -0400)]
libertas: only enable rtap with mesh firmware

Since only mesh-enabled firmware has the CMD_802_11_MONITOR_MODE on
which the rtap functionality depends, only expose the rtap functionality
when mesh is also available.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Sequence counter should be protected in irqsave
Ivo van Doorn [Mon, 28 Jul 2008 08:21:16 +0000 (10:21 +0200)]
rt2x00: Sequence counter should be protected in irqsave

The sequence counter can be accessed in IRQ context,
which means the lock protecting the counter should
be irqsave. To prevent making the entire intf->lock irqsave
without reason, create a new lock which only protects
the sequence counter.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix VGC lower bound initialization
Ivo van Doorn [Mon, 28 Jul 2008 08:20:12 +0000 (10:20 +0200)]
rt2x00: Fix VGC lower bound initialization

When the EEPROM_BBPTUNE_VGC word is valid, we should
override EEPROM_BBPTUNE_VGCLOWER field with the BBP
value.

And we should _not_ do that when EEPROM_BBPTUNE_R17 is valid.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: rt61pci needs another millisecond after firmware upload
Ivo van Doorn [Sun, 27 Jul 2008 13:06:50 +0000 (15:06 +0200)]
rt2x00: rt61pci needs another millisecond after firmware upload

After the hardware has indicated the firmware upload has completed
and the device is ready, we should wait another millisecond to
make sure the device is really ready to continue.

Without this timout, bringing the interface down and up again will
fail due to incorrect register initialization.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix partial antenna configuration
Ivo van Doorn [Sun, 27 Jul 2008 13:06:21 +0000 (15:06 +0200)]
rt2x00: Fix partial antenna configuration

The if-statement to determine the new TX/RX antenna
configuration was incomplete. It lacks the general
else-clause when the antenna wasn't changed.

This is a correct event, since it can occur when only
one of the antenna's has been changed or when the new
configuration is being forced (like when the interface
has just been added).

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix access permissions on debugfs files
Ivo van Doorn [Sun, 27 Jul 2008 13:06:05 +0000 (15:06 +0200)]
rt2x00: Fix access permissions on debugfs files

Although most rt2x00 debugfs files don't contain
information which could compromise network security,
it is better to set the access permissions to root only.

This will be required when HW crypto is implemented,
because it could be possible to read the HW key from
the registers.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoRtl8187 PATCH add usb ID for asus wireless link
Andrea Merello [Fri, 25 Jul 2008 17:08:11 +0000 (19:08 +0200)]
Rtl8187 PATCH add usb ID for asus wireless link

This patch from Davide Cavalca adds a usb ID for an rtl8187L device.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoiwlwifi: don't stop queue in the middle of fragmented packet
Tomas Winkler [Thu, 24 Jul 2008 18:33:42 +0000 (21:33 +0300)]
iwlwifi: don't stop queue in the middle of fragmented packet

This patch avoids stopping queue in the middle of the fragmented packet.
It is required that there will be ~10 (max packet/min fragment) or 16
(4 bits of frag number) free tfds all the time.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: remove obsolete declaration of struct ieee80211_hw_mode
Helmut Schaa [Thu, 24 Jul 2008 16:22:55 +0000 (18:22 +0200)]
ath5k: remove obsolete declaration of struct ieee80211_hw_mode

Signed-off-by: Helmut Schaa <hschaa@suse.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: fix fragmentation kludge
Tomas Winkler [Thu, 24 Jul 2008 15:46:44 +0000 (18:46 +0300)]
mac80211: fix fragmentation kludge

This patch make mac80211 transmit correctly fragmented packet after
queue was stopped

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoAth5k: mask out unneeded interrupts
Jiri Slaby [Wed, 23 Jul 2008 11:17:34 +0000 (13:17 +0200)]
Ath5k: mask out unneeded interrupts

Mask out previously demanded interrupt flags because we set
new ones. Don't allow mixing them after switch from sta to
ibss and vice versa.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoRFKILL: set the status of the leds on activation.
Dmitry Baryshkov [Tue, 22 Jul 2008 10:21:59 +0000 (14:21 +0400)]
RFKILL: set the status of the leds on activation.

Provide default activate function to set the state of the led
when the led becomes bound to the trigger

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoRFKILL: allow one to specify led trigger name
Dmitry Baryshkov [Tue, 22 Jul 2008 10:17:37 +0000 (14:17 +0400)]
RFKILL: allow one to specify led trigger name

Allow the rfkill driver to specify led trigger name.
By default it still defaults to the name of rfkill switch.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agorfkill: query EV_SW states when rfkill-input (re)?connects to a input device
Henrique de Moraes Holschuh [Thu, 31 Jul 2008 13:53:57 +0000 (10:53 -0300)]
rfkill: query EV_SW states when rfkill-input (re)?connects to a input device

Every time a new input device that is capable of one of the
rfkill EV_SW events (currently only SW_RFKILL_ALL) is connected to
rfkill-input, we must check the states of the input EV_SW switches
and take action.  Otherwise, we will ignore the initial switch state.

We also need to re-check the states of the EV_SW switches after
a device that was under an exclusive grab is released back to us,
since we got no input events from that device while it was grabbed.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Update phy calibration functions
Nick Kossifidis [Sun, 20 Jul 2008 03:47:12 +0000 (06:47 +0300)]
ath5k: Update phy calibration functions

 * Enable I/Q calibration each time we have correction results (we
   were only enabling calibration during reset). If we don't we commit
   the same results each time calibration routine is called.
 * Add some documentation and a TODO on nf calibration
 * Return -EAGAIN on noise floor timeout/failure

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Update channel functions
Nick Kossifidis [Sun, 20 Jul 2008 03:44:43 +0000 (06:44 +0300)]
ath5k: Update channel functions

 * Add channel function for RF2425 (got this from decompiling binary
   HAL, i have no idea why there is a 5GHz section but i'm looking
   into it)
 * Update RF5112 channel function (also got this from decompiling binary HAL)
 * Set JAPAN setting for channel 14 on all PHY chips

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Add RF2425 initial rfgain values
Nick Kossifidis [Sun, 20 Jul 2008 03:42:47 +0000 (06:42 +0300)]
ath5k: Add RF2425 initial rfgain values

 * Add initial RF gain settings for RF2425

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Reorder calibration calls during reset and update hw_set_power
Nick Kossifidis [Sun, 20 Jul 2008 03:41:26 +0000 (06:41 +0300)]
ath5k: Reorder calibration calls during reset and update hw_set_power

 * Update ath5k_hw_reset and add some more documentation about PHY calibration
 * Fix ath5k_hw_set_power to use AR5K_SLEEP_CTL_SLE_ALLOW for Network sleep
 * Preserve sleep duration field while setting AR5K_SLEEP_CTL
   and reduce delays & checks for register's status (got this from
   decompiling & dumps, it works for me but it needs testing)

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Do ADC test during reset
Nick Kossifidis [Sun, 20 Jul 2008 03:38:16 +0000 (06:38 +0300)]
ath5k: Do ADC test during reset

 * Do an ADC test during reset to match recent regdumps

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Misc hw_reset updates
Nick Kossifidis [Sun, 20 Jul 2008 03:36:52 +0000 (06:36 +0300)]
ath5k: Misc hw_reset updates

 * Update hw_reset to calculate some of the values we were using as static
 * Increase activation to rx delay

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Misc hw_attach fixes
Nick Kossifidis [Sun, 20 Jul 2008 03:34:39 +0000 (06:34 +0300)]
ath5k: Misc hw_attach fixes

 * Correctly attach RF2425
 * Update SREV values for Radio chips
 * Update hw_attach to use new SPENDING values
 * Write a bit after POST for some chips

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Restore saved initval after POST
Nick Kossifidis [Sun, 20 Jul 2008 03:32:32 +0000 (06:32 +0300)]
ath5k: Restore saved initval after POST

 * Restore saved initial value after POST

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoath5k: Update register list
Nick Kossifidis [Wed, 30 Jul 2008 10:18:59 +0000 (13:18 +0300)]
ath5k: Update register list

* Update list of registers
* Use updated register macros inside hw.c, initvals.c and debug.c

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoadd reverse dependency of CONFIG_SGI_XP upon CONFIG_SGI_GRU
Dean Nelson [Fri, 1 Aug 2008 14:55:26 +0000 (09:55 -0500)]
add reverse dependency of CONFIG_SGI_XP upon CONFIG_SGI_GRU

Add a reverse dependency of CONFIG_SGI_XP upon CONFIG_SGI_GRU to Kconfig.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoadd dependency of CONFIG_SGI_XP upon CONFIG_NET
Dean Nelson [Fri, 1 Aug 2008 19:19:08 +0000 (14:19 -0500)]
add dependency of CONFIG_SGI_XP upon CONFIG_NET

Add a dependency of CONFIG_SGI_XP upon CONFIG_NET to Kconfig.

Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotracehook: fix exit_signal=0 case
Roland McGrath [Thu, 31 Jul 2008 09:04:09 +0000 (02:04 -0700)]
tracehook: fix exit_signal=0 case

My commit 2b2a1ff64afbadac842bbc58c5166962cf4f7664 introduced a regression
(sorry about that) for the odd case of exit_signal=0 (e.g. clone_flags=0).
This is not a normal use, but it's used by a case in the glibc test suite.

Dying with exit_signal=0 sends no signal, but it's supposed to wake up a
parent's blocked wait*() calls (unlike the delayed_group_leader case).
This fixes tracehook_notify_death() and its caller to distinguish a
"signal 0" wakeup from the delayed_group_leader case (with no wakeup).

Signed-off-by: Roland McGrath <roland@redhat.com>
Tested-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Fri, 1 Aug 2008 18:56:07 +0000 (11:56 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: raid10: wake up frozen array
  md: do not count blocked devices as spares
  md: do not progress the resync process if the stripe was blocked
  md: delay notification of 'active_idle' to the recovery thread
  md: fix merge error
  md: move async_tx_issue_pending_all outside spin_lock_irq

15 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Fri, 1 Aug 2008 18:54:05 +0000 (11:54 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  [PATCH] ocfs2: Release mutex in error handling code
  [PATCH] ocfs2: Fix oops when racing files truncates with writes into an mmap region
  [PATCH 2/2] ocfs2: Fix race between mount and recovery
  [PATCH 1/2] ocfs2: Add counter in struct ocfs2_dinode to track journal replays
  [PATCH] configfs: Convenience macros for attribute definition.
  [PATCH] configfs: Pin configfs subsystems separately from new config_items.
  [PATCH] configfs: Fix open directory making rmdir() fail
  [PATCH] configfs: Lock new directory inodes before removing on cleanup after failure
  [PATCH] configfs: Prevent userspace from creating new entries under attaching directories
  [PATCH] configfs: Fix failing symlink() making rmdir() fail
  [PATCH] configfs: Fix symlink() to a removing item
  [PATCH] configfs: Include linux/err.h in linux/configfs.h

15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 1 Aug 2008 18:52:39 +0000 (11:52 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  locking: fix mutex @key parameter kernel-doc notation

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Fri, 1 Aug 2008 18:50:21 +0000 (11:50 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: scripts/ver_linux: don't set PATH
  Kconfig/init: change help text to match default value
  kbuild: genksyms: Include extern information in dumps
  kbuild: genksyms parser: fix the __attribute__ rule
  kbuild: scripts/genksyms/lex.l: add %option noinput
  kconfig: scripts/kconfig/zconf.l: add %option noinput
  kbuild: fix O=... build of um

15 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Fri, 1 Aug 2008 18:46:00 +0000 (11:46 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  md: the bitmap code needs to use blk_plug_device_unlocked()
  block: add a blk_plug_device_unlocked() that grabs the queue lock

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
Linus Torvalds [Fri, 1 Aug 2008 18:45:09 +0000 (11:45 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jwessel/linux-2.6-kgdb

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
  kgdb: fix gdb serial thread queries
  kgdb: fix kgdb_validate_break_address to perform a mem write
  kgdb: remove the requirement for CONFIG_FRAME_POINTER

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 1 Aug 2008 18:44:24 +0000 (11:44 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ASoC: Export dapm_reg_event() fully
  ALSA: ASoC: Update Poodle to current ASoC API
  ALSA: asoc: restrict sample rate and size in Freescale MPC8610 sound drivers
  ALSA: sound/soc/pxa/tosa.c: removed duplicated include

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 1 Aug 2008 18:35:16 +0000 (11:35 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (46 commits)
  tcp: MD5: Fix IPv6 signatures
  skbuff: add missing kernel-doc for do_not_encrypt
  net/ipv4/route.c: fix build error
  tcp: MD5: Fix MD5 signatures on certain ACK packets
  ipv6: Fix ip6_xmit to send fragments if ipfragok is true
  ipvs: Move userspace definitions to include/linux/ip_vs.h
  netdev: Fix lockdep warnings in multiqueue configurations.
  netfilter: xt_hashlimit: fix race between htable_destroy and htable_gc
  netfilter: ipt_recent: fix race between recent_mt_destroy and proc manipulations
  netfilter: nf_conntrack_tcp: decrease timeouts while data in unacknowledged
  irda: replace __FUNCTION__ with __func__
  nsc-ircc: default to dongle type 9 on IBM hardware
  bluetooth: add quirks for a few hci_usb devices
  hysdn: remove the packed attribute from PofTimStamp_tag
  isdn: use the common ascii hex helpers
  tg3: adapt tg3 to use reworked PCI PM code
  atm: fix direct casts of pointers to u32 in the InterPhase driver
  atm: fix const assignment/discard warnings in the ATM networking driver
  net: use the common ascii hex helpers
  random32: seeding improvement
  ...

15 years agoMerge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Linus Torvalds [Fri, 1 Aug 2008 18:33:19 +0000 (11:33 -0700)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6

* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
  hwmon: needs new maintainer
  hwmon: (lm85) Simplify device initialization function
  hwmon: (lm85) Misc cleanups
  hwmon: (lm85) Don't write back cached values
  hwmon: (lm85) Drop dead code
  hwmon: (lm85) Coding-style cleanups
  hwmon: (lm75) add new-style driver binding
  hwmon: (lm75) cleanup/reorg
  hwmon: (adt7473) clarify an awkward bit of code
  hwmon: (adt7473) Remove unused defines
  hwmon: (dme1737) fix voltage scaling
  hwmon: (dme1737) probe all addresses
  hwmon: (dme1737) demacrofy for readability

15 years agomd: the bitmap code needs to use blk_plug_device_unlocked()
Jens Axboe [Fri, 1 Aug 2008 18:32:31 +0000 (20:32 +0200)]
md: the bitmap code needs to use blk_plug_device_unlocked()

It doesn't hold the queue lock, so it's both racey on the queue flags
and thus spews a warning.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoblock: add a blk_plug_device_unlocked() that grabs the queue lock
Jens Axboe [Fri, 1 Aug 2008 18:31:32 +0000 (20:31 +0200)]
block: add a blk_plug_device_unlocked() that grabs the queue lock

blk_plug_device() must be called with the queue lock held, so callers
often just grab and release the lock for that purpose. Add a helper
that does just that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
15 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Fri, 1 Aug 2008 18:29:54 +0000 (11:29 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6:
  [MTD] [NAND] drivers/mtd/nand/nandsim.c: fix printk warnings
  [MTD] [NAND] Blackfin NFC Driver: Cleanup the error exit path of bf5xx_nand_probe function
  [MTD] [NAND] Blackfin NFC Driver: use standard dev_err() rather than printk()
  [MTD] [NAND] Blackfin NFC Driver: enable Blackfin nand HWECC support by default
  [MTD] [NAND] Blackfin NFC Driver: add proper devinit/devexit markings to probe/remove functions
  [MTD] [NAND] Blackfin NFC Driver: add support for the ECC layout the Blackfin bootrom uses
  [MTD] [NAND] Blackfin NFC Driver: fix bug - hw ecc calc by making sure we extract 11 bits from each register instead of 10
  [MTD] [NAND] Blackfin NFC Driver: fix bug - do not clobber the status from the first 256 bytes if operating on 512 pages
  [MTD] [NAND] diskonchip.c fix sparse endian warnings
  [MTD] [NAND] drivers/mtd/nand/nandsim.c needs div64.h
  [JFFS2] Fix allocation of summary buffer
  Fix rename of at91_nand -> atmel_nand
  [MTD] [NOR] drivers/mtd/chips/jedec_probe.c: fix Am29DL800BB device ID
  [MTD] MTD_DEBUG always does compile-time typechecks
  [MTD] DataFlash: bugfix, binary page sizes now handled
  [MTD] [NAND] fsl_elbc_nand.c: fix printk warning
  [MTD] [NAND] nandsim: support random page read command
  [MTD] [NAND] fix subpage read for small page NAND

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
Linus Torvalds [Fri, 1 Aug 2008 18:26:51 +0000 (11:26 -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] pass struct path * to do_add_mount()
  [PATCH] switch mtd and dm-table to lookup_bdev()
  [patch 3/4] vfs: remove unused nameidata argument of may_create()
  [PATCH] devpts: switch to IDA
  [PATCH 2/2] proc: switch inode number allocation to IDA
  [PATCH 1/2] proc: fix inode number bogorithmetic
  [PATCH] fix bdev leak in block_dev.c do_open()
  [PATCH] fix races and leaks in vfs_quota_on() users
  [PATCH] clean dup2() up a bit
  [PATCH] merge locate_fd() and get_unused_fd()
  [PATCH] ipv4_static_sysctl_init() should be under CONFIG_SYSCTL
  Re: BUG at security/selinux/avc.c:883 (was: Re: linux-next: Tree

15 years agoMerge branch 'audit.b54' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Fri, 1 Aug 2008 18:23:09 +0000 (11:23 -0700)]
Merge branch 'audit.b54' of git://git./linux/kernel/git/viro/audit-current

* 'audit.b54' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] Fix the bug of using AUDIT_STATUS_RATE_LIMIT when set fail, no error output.
  [PATCH] Fix the kernel panic of audit_filter_task when key field is set
  Re: [PATCH] the loginuid field should be output in all AUDIT_CONFIG_CHANGE audit messages
  kernel/audit.c control character detection is off-by-one
  [PATCH] Audit: Collect signal info when SIGUSR2 is sent to auditd

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
Linus Torvalds [Fri, 1 Aug 2008 18:22:45 +0000 (11:22 -0700)]
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:
  au1xmmc: raise segment size limit.
  mmc_block: use proper sg iterators
  mmc: properly iterate over sg list in debug check
  mmc_test: Revert "mmc_test: test oversized sg lists"
  sdhci: check correct return value
  sdhci: disable DMA for req, not completely
  sdhci: handle bug in JMB38x for sizes < 4 bytes

15 years agoMerge branch 'reg-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg...
Linus Torvalds [Fri, 1 Aug 2008 17:56:40 +0000 (10:56 -0700)]
Merge branch 'reg-for-linus' of git://git./linux/kernel/git/lrg/voltage-2.6

* 'reg-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  regulator: TI bq24022 Li-Ion Charger driver
  regulator: maintainers - add maintainers for regulator framework.
  regulator: documentation - ABI
  regulator: documentation - machine
  regulator: documentation - regulator driver
  regulator: documentation - consumer interface
  regulator: documentation - overview
  regulator: core kbuild files
  regulator: regulator test harness
  regulator: add support for fixed regulators.
  regulator: regulator framework core
  regulator: fixed regulator interface
  regulator: machine driver interface
  regulator: regulator driver interface
  regulator: consumer device interface

15 years agoMerge branch 'hotfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Fri, 1 Aug 2008 17:55:57 +0000 (10:55 -0700)]
Merge branch 'hotfixes' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'hotfixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  SELinux: /proc/mounts should show what it can

15 years agoMerge git://git.infradead.org/battery-2.6
Linus Torvalds [Fri, 1 Aug 2008 17:55:07 +0000 (10:55 -0700)]
Merge git://git.infradead.org/battery-2.6

* git://git.infradead.org/battery-2.6:
  power_supply: Sharp SL-6000 (tosa) batteries support
  power_supply: fix up CHARGE_COUNTER output to be more precise
  power_supply: add CHARGE_COUNTER property and olpc_battery support for it
  power_supply: bump EC version check that we refuse to run with in olpc_battery
  power_supply: cleanup of the OLPC battery driver
  power_supply: add eeprom dump file to olpc_battery's sysfs
  power_supply: Support serial number in olpc_battery

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Fri, 1 Aug 2008 17:53:43 +0000 (10:53 -0700)]
Merge git://git./linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (28 commits)
  mm/hugetlb.c must #include <asm/io.h>
  video: Fix up hp6xx driver build regressions.
  sh: defconfig updates.
  sh: Kill off stray mach-rsk7203 reference.
  serial: sh-sci: Fix up SH7760/SH7780/SH7785 early printk regression.
  sh: Move out individual boards without mach groups.
  sh: Make sure AT_SYSINFO_EHDR is exposed to userspace in asm/auxvec.h.
  sh: Allow SH-3 and SH-5 to use common headers.
  sh: Provide common CPU headers, prune the SH-2 and SH-2A directories.
  sh/maple: clean maple bus code
  sh: More header path fixups for mach dir refactoring.
  sh: Move out the solution engine headers to arch/sh/include/mach-se/
  sh: I2C fix for AP325RXA and Migo-R
  sh: Shuffle the board directories in to mach groups.
  sh: dma-sh: Fix up dreamcast dma.h mach path.
  sh: Switch KBUILD_DEFCONFIG to shx3_defconfig.
  sh: Add ARCH_DEFCONFIG entries for sh and sh64.
  sh: Fix compile error of Solution Engine
  sh: Proper __put_user_asm() size mismatch fix.
  sh: Stub in a dummy ENTRY_OFFSET for uImage offset calculation.
  ...

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 1 Aug 2008 17:28:17 +0000 (10:28 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  generic, x86: fix add iommu_num_pages helper function
  x86: remove stray <6> in BogoMIPS printk
  x86: move dma32_reserve_bootmem() after reserve_crashkernel()

15 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Fri, 1 Aug 2008 17:27:10 +0000 (10:27 -0700)]
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] qeth: avoid use of include/asm-s390
  [S390] dont use kthread for smp_rescan_cpus().
  [S390] virtio console: fix section mismatch warning.
  [S390] cio: Include linux/string.h in schid.h.
  [S390] qdio: fix section mismatch bug.
  [S390] stp: fix section mismatch warning.
  [S390] Remove diag 0x260 call from memory detection.
  [S390] qdio: make sure qdr is aligned to page size
  [S390] Add support for memory hot-remove.
  [S390] Wire up new syscalls.
  [S390] cio: Memory allocation for idset changed.
  [S390] qeth: preallocated qeth header for hiper socket
  [S390] Optimize storage key operations for anon pages
  [S390] nohz/sclp: disable timer on synchronous waits.
  [S390] ipl: Reboot from alternate device does not work when booting from file
  [S390] dasd: Add support for enhanced VM UID
  [S390] Remove last P390 trace.

15 years ago[IA64] Move include/asm-ia64 to arch/ia64/include/asm
Tony Luck [Fri, 1 Aug 2008 17:13:32 +0000 (10:13 -0700)]
[IA64] Move include/asm-ia64 to arch/ia64/include/asm

After moving the the include files there were a few clean-ups:

1) Some files used #include <asm-ia64/xyz.h>, changed to <asm/xyz.h>

2) Some comments alerted maintainers to look at various header files to
make matching updates if certain code were to be changed. Updated these
comments to use the new include paths.

3) Some header files mentioned their own names in initial comments. Just
deleted these self references.

Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years agoau1xmmc: raise segment size limit.
Manuel Lauss [Tue, 29 Jul 2008 08:10:49 +0000 (10:10 +0200)]
au1xmmc: raise segment size limit.

Raise the DMA block size limit from 2048 bytes to the maximum supported
by the DMA controllers on the chip (64KB on Au1100, 4MB on Au1200).

This gives a very small performance boost and apparently fixes an oops
when MMC-DMA and network traffic are active at the same time.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc_block: use proper sg iterators
Pierre Ossman [Mon, 28 Jul 2008 23:23:24 +0000 (01:23 +0200)]
mmc_block: use proper sg iterators

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc: properly iterate over sg list in debug check
Pierre Ossman [Mon, 28 Jul 2008 23:09:37 +0000 (01:09 +0200)]
mmc: properly iterate over sg list in debug check

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agommc_test: Revert "mmc_test: test oversized sg lists"
Pierre Ossman [Mon, 28 Jul 2008 23:05:22 +0000 (01:05 +0200)]
mmc_test: Revert "mmc_test: test oversized sg lists"

This reverts commit 48b5352ea1891455eb8e824cf7d92f66931a090f. Oversized
sg lists are not allowed anymore, and the core even checks for them in
debug mode, so this test is entirely incorrect.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agosdhci: check correct return value
Pierre Ossman [Mon, 28 Jul 2008 22:53:20 +0000 (00:53 +0200)]
sdhci: check correct return value

Fix a copy-and-paste error.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agosdhci: disable DMA for req, not completely
Pierre Ossman [Mon, 28 Jul 2008 22:45:51 +0000 (00:45 +0200)]
sdhci: disable DMA for req, not completely

The wrong flag was manipulated when an invalid sg list was given, turning
off DMA on the next (and all subsequent) request instead of the current
one.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years agosdhci: handle bug in JMB38x for sizes < 4 bytes
Pierre Ossman [Mon, 28 Jul 2008 22:11:16 +0000 (00:11 +0200)]
sdhci: handle bug in JMB38x for sizes < 4 bytes

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
15 years ago[PATCH] Fix the bug of using AUDIT_STATUS_RATE_LIMIT when set fail, no error output.
zhangxiliang [Thu, 31 Jul 2008 02:11:19 +0000 (10:11 +0800)]
[PATCH] Fix the bug of using AUDIT_STATUS_RATE_LIMIT when set fail, no error output.

When the "status_get->mask" is "AUDIT_STATUS_RATE_LIMIT || AUDIT_STATUS_BACKLOG_LIMIT".
If "audit_set_rate_limit" fails and "audit_set_backlog_limit" succeeds, the "err" value
will be greater than or equal to 0. It will miss the failure of rate set.

Signed-off-by: Zhang Xiliang <zhangxiliang@cn.fujitsu.com>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] Fix the kernel panic of audit_filter_task when key field is set
zhangxiliang [Fri, 1 Aug 2008 11:15:47 +0000 (19:15 +0800)]
[PATCH] Fix the kernel panic of audit_filter_task when key field is set

When calling audit_filter_task(), it calls audit_filter_rules() with audit_context is NULL.
If the key field is set, the result in audit_filter_rules() will be set to 1 and
ctx->filterkey will be set to key.
But the ctx is NULL in this condition, so kernel will panic.

Signed-off-by: Zhang Xiliang <zhangxiliang@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoRe: [PATCH] the loginuid field should be output in all AUDIT_CONFIG_CHANGE audit...
zhangxiliang [Fri, 1 Aug 2008 01:47:01 +0000 (09:47 +0800)]
Re: [PATCH] the loginuid field should be output in all AUDIT_CONFIG_CHANGE audit messages

> shouldn't these be using the "audit_get_loginuid(current)"  and if we
> are going to output loginuid we also should be outputting sessionid

Thanks for your detailed explanation.
I have made a new patch for outputing "loginuid" and "sessionid" by audit_get_loginuid(current) and audit_get_sessionid(current).
If there are some deficiencies, please give me your indication.

Signed-off-by: Zhang Xiliang <zhangxiliang@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agokernel/audit.c control character detection is off-by-one
Vesa-Matti J Kari [Tue, 22 Jul 2008 21:06:13 +0000 (00:06 +0300)]
kernel/audit.c control character detection is off-by-one

Hello,

According to my understanding there is an off-by-one bug in the
function:

   audit_string_contains_control()

in:

  kernel/audit.c

Patch is included.

I do not know from how many places the function is called from, but for
example, SELinux Access Vector Cache tries to log untrusted filenames via
call path:

avc_audit()
     audit_log_untrustedstring()
         audit_log_n_untrustedstring()
             audit_string_contains_control()

If audit_string_contains_control() detects control characters, then the
string is hex-encoded. But the hex=0x7f dec=127, DEL-character, is not
detected.

I guess this could have at least some minor security implications, since a
user can create a filename with 0x7f in it, causing logged filename to
possibly look different when someone reads it on the terminal.

Signed-off-by: Vesa-Matti Kari <vmkari@cc.helsinki.fi>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] Audit: Collect signal info when SIGUSR2 is sent to auditd
Eric Paris [Mon, 7 Jul 2008 14:49:45 +0000 (10:49 -0400)]
[PATCH] Audit: Collect signal info when SIGUSR2 is sent to auditd

Makes the kernel audit subsystem collect information about the sending
process when that process sends SIGUSR2 to the userspace audit daemon.
SIGUSR2 is a new interesting signal to auditd telling auditd that it
should try to start logging to disk again and the error condition which
caused it to stop logging to disk (usually out of space) has been
rectified.

Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] pass struct path * to do_add_mount()
Al Viro [Fri, 1 Aug 2008 13:05:54 +0000 (09:05 -0400)]
[PATCH] pass struct path * to do_add_mount()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] switch mtd and dm-table to lookup_bdev()
Al Viro [Fri, 1 Aug 2008 09:00:11 +0000 (05:00 -0400)]
[PATCH] switch mtd and dm-table to lookup_bdev()

No need to open-code it...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[patch 3/4] vfs: remove unused nameidata argument of may_create()
Miklos Szeredi [Wed, 30 Jul 2008 13:08:48 +0000 (15:08 +0200)]
[patch 3/4] vfs: remove unused nameidata argument of may_create()

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] devpts: switch to IDA
Alexey Dobriyan [Sat, 26 Jul 2008 07:42:16 +0000 (11:42 +0400)]
[PATCH] devpts: switch to IDA

Devpts code wants just numbers for tty indexes.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>