]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years ago[NET]: Return more appropriate error from eth_validate_addr().
Patrick McHardy [Mon, 14 Apr 2008 05:45:40 +0000 (22:45 -0700)]
[NET]: Return more appropriate error from eth_validate_addr().

Paul Bolle wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=9923 would have been much easier to
> track down if eth_validate_addr() would somehow complain aloud if an address
> is invalid. Shouldn't it make at least some noise?

I guess it should return -EADDRNOTAVAIL similar to eth_mac_addr()
when validation fails.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[ISDN]: Do not validate ISDN net device address prior to interface-up
Paul Bolle [Mon, 14 Apr 2008 05:44:20 +0000 (22:44 -0700)]
[ISDN]: Do not validate ISDN net device address prior to interface-up

Commit bada339 (Validate device addr prior to interface-up) caused a regression
in the ISDN network code, see: http://bugzilla.kernel.org/show_bug.cgi?id=9923
The trivial fix is to remove the pointer to eth_validate_addr() in the
net_device struct in isdn_net_init().

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Fix kernel-doc for skb_segment
Ben Hutchings [Mon, 14 Apr 2008 04:52:48 +0000 (21:52 -0700)]
[NET]: Fix kernel-doc for skb_segment

The kernel-doc comment for skb_segment is clearly wrong.  This states
what it actually does.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SOCK] sk_stamp: should be initialized to ktime_set(-1L, 0)
Eric Dumazet [Mon, 14 Apr 2008 04:39:26 +0000 (21:39 -0700)]
[SOCK] sk_stamp: should be initialized to ktime_set(-1L, 0)

Problem spotted by Andrew Brampton

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: check for underlength tap writes
Rusty Russell [Sun, 13 Apr 2008 01:49:30 +0000 (18:49 -0700)]
net: check for underlength tap writes

If the user gives a packet under 14 bytes, we'll end up reading off the end
of the skb (not oopsing, just reading off the end).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Max Krasnyanskiy <maxk@qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: make struct tun_struct private to tun.c
Rusty Russell [Sun, 13 Apr 2008 01:48:58 +0000 (18:48 -0700)]
net: make struct tun_struct private to tun.c

There's no reason for this to be in the header, and it just hurts
recompile time.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Max Krasnyanskiy <maxk@qualcomm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: IPv4 vs IPv6 addresses mess in sctp_inet[6]addr_event.
Pavel Emelyanov [Sun, 13 Apr 2008 01:40:38 +0000 (18:40 -0700)]
[SCTP]: IPv4 vs IPv6 addresses mess in sctp_inet[6]addr_event.

All IP addresses that are present in a system are duplicated on
struct sctp_sockaddr_entry. They are linked in the global list
called sctp_local_addr_list. And this struct unions IPv4 and IPv6
addresses.

So, there can be rare case, when a sockaddr_in.sin_addr coincides
with the corresponding part of the sockaddr_in6 and the notifier
for IPv4 will carry away an IPv6 entry.

The fix is to check the family before comparing the addresses.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Fix compiler warning about const qualifiers
Vlad Yasevich [Sun, 13 Apr 2008 01:40:06 +0000 (18:40 -0700)]
[SCTP]: Fix compiler warning about const qualifiers

Fix 3 warnings about discarding const qualifiers:

net/sctp/ulpevent.c:862: warning: passing argument 1 of 'sctp_event2skb' discards qualifiers from pointer target type
net/sctp/sm_statefuns.c:4393: warning: passing argument 1 of 'SCTP_ASOC' discards qualifiers from pointer target type
net/sctp/socket.c:5874: warning: passing argument 1 of 'cmsg_nxthdr' discards qualifiers from pointer target type

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Fix protocol violation when receiving an error lenght INIT-ACK
Gui Jianfeng [Sun, 13 Apr 2008 01:39:34 +0000 (18:39 -0700)]
[SCTP]: Fix protocol violation when receiving an error lenght INIT-ACK

When receiving an error length INIT-ACK during COOKIE-WAIT,
a 0-vtag ABORT will be responsed. This action violates the
protocol apparently. This patch achieves the following things.
1 If the INIT-ACK contains all the fixed parameters, use init-tag
  recorded from INIT-ACK as vtag.
2 If the INIT-ACK doesn't contain all the fixed parameters,
  just reflect its vtag.

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SCTP]: Add check for hmac_algo parameter in sctp_verify_param()
Wei Yongjun [Sun, 13 Apr 2008 01:39:19 +0000 (18:39 -0700)]
[SCTP]: Add check for hmac_algo parameter in sctp_verify_param()

RFC 4890 has the following text:

  The HMAC algorithm based on SHA-1 MUST be supported and
  included in the HMAC-ALGO parameter.

As a result, we need to check in sctp_verify_param() that HMAC_SHA1 is
present in the list.  If not, we should probably treat this as a
protocol violation.

It should also be a protocol violation if the HMAC parameter is empty.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET_SCHED] cls_u32: refcounting fix for u32_delete()
Jarek Poplawski [Sun, 13 Apr 2008 01:37:13 +0000 (18:37 -0700)]
[NET_SCHED] cls_u32: refcounting fix for u32_delete()

Deleting of nonroot hnodes mostly doesn't work in u32_delete():
refcnt == 1 is expected, but such hnodes' refcnts are initialized
with 0 and charged only with "link" nodes. Now they'll start with
1 like usual. Thanks to Patrick McHardy for an improving suggestion.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[DCCP]: Fix skb->cb conflicts with IP
Patrick McHardy [Sun, 13 Apr 2008 01:35:41 +0000 (18:35 -0700)]
[DCCP]: Fix skb->cb conflicts with IP

dev_queue_xmit() and the other IP output functions expect to get a skb
with clear or properly initialized skb->cb. Unlike TCP and UDP, the
dccp_skb_cb doesn't contain a struct inet_skb_parm at the beginning,
so the DCCP-specific data is interpreted by the IP output functions.
This can cause false negatives for the conditional POST_ROUTING hook
invocation, making the packet bypass the hook.

Add a inet_skb_parm/inet6_skb_parm union to the beginning of
dccp_skb_cb to avoid clashes. Also add a BUILD_BUG_ON to make
sure it fits in the cb.

[ Combined with patch from Gerrit Renker to remove two now unnecessary
  memsets of IPCB(skb)->opt ]

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[AX25]: Potential ax25_uid_assoc-s leaks on module unload.
Pavel Emelyanov [Sun, 13 Apr 2008 01:33:50 +0000 (18:33 -0700)]
[AX25]: Potential ax25_uid_assoc-s leaks on module unload.

The ax25_uid_free call walks the ax25_uid_list and releases entries
from it. The problem is that after the fisrt call to hlist_del_init
the hlist_for_each_entry (which hides behind the ax25_uid_for_each)
will consider the current position to be the last and will return.

Thus, the whole list will be left not freed.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotg3: fix MMIO for PPC 44x platforms
Sergei Shtylyov [Sun, 13 Apr 2008 01:30:58 +0000 (18:30 -0700)]
tg3: fix MMIO for PPC 44x platforms

The driver stores the PCI resource addresses into 'unsigned long' variable
before calling ioremap_nocache() on them. This warrants kernel oops when the
registers are accessed on PPC 44x platforms which (being 32-bit) have PCI
memory space mapped beyond 4 GB.

The arch/ppc/ kernel has a fixup in ioremap() that creates an illusion that
the PCI memory resource is mapped below 4 GB, but arch/powerpc/ code got rid
of this trick, having instead CONFIG_RESOURCES_64BIT enabled.

[ Bump driver version and release date -DaveM ]

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMark generic HDLC + PPP as broken.
Krzysztof Halasa [Sat, 12 Apr 2008 08:10:40 +0000 (10:10 +0200)]
Mark generic HDLC + PPP as broken.

PPP support in generic HDLC in Linux 2.6.25 is broken and will cause
a kernel panic when a device configured in PPP mode is activated.

It will be replaced by new PPP implementation after Linux 2.6.25 is
released.

This affects only PPP support in generic HDLC (mostly Hitachi SCA
and SCA-II based drivers, wanxl, and few others). Standalone syncppp
and async PPP support are not affected.

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoehea: Fix DLPAR memory add support
Thomas Klein [Fri, 4 Apr 2008 13:04:53 +0000 (15:04 +0200)]
ehea: Fix DLPAR memory add support

This patch fixes two weaknesses in send/receive packet handling which may
lead to kernel panics during DLPAR memory add operations.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosc92031: sysfs link missing
Stephen Hemminger [Fri, 11 Apr 2008 04:30:38 +0000 (21:30 -0700)]
sc92031: sysfs link missing

Add missing sysfs device association. Compile tested only -ENOHW.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=10380

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Cesar Eduardo Barros <cesarb@cesarb.net>
Cc: <tom@sharkbay.at>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosmc91x driver: fix bug: print warning only in interrupt mode
Sonic Zhang [Fri, 11 Apr 2008 04:30:37 +0000 (21:30 -0700)]
smc91x driver: fix bug: print warning only in interrupt mode

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

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoforcedeth: mac address fix
Ayaz Abdulla [Fri, 11 Apr 2008 04:30:35 +0000 (21:30 -0700)]
forcedeth: mac address fix

This critical patch fixes a mac address issue recently introduced.  If the
device's mac address was in correct order and the flag
NVREG_TRANSMITPOLL_MAC_ADDR_REV was set, during nv_remove the flag would get
cleared.  During next load, the mac address would get reversed because the
flag is missing.

As it has been indicated previously, the flag is cleared across a low power
transition.  Therefore, the driver should set the mac address back into the
reversed order when clearing the flag.

Also, the driver should set back the flag after a low power transition to
protect against kexec command calling nv_probe a second time.

Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Cc: "Yinghai Lu" <yhlu.kernel@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agomacb: Use semicolon instead of comma for statement
Atsushi Nemoto [Fri, 11 Apr 2008 15:58:14 +0000 (00:58 +0900)]
macb: Use semicolon instead of comma for statement

It seems no good reason to use comma here.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agomacb: Call phy_disconnect on removing
Atsushi Nemoto [Thu, 10 Apr 2008 14:30:07 +0000 (23:30 +0900)]
macb: Call phy_disconnect on removing

Call phy_disconnect() on remove routine.  Otherwise the phy timer
causes a kernel crash when unloading.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoucc_geth: fix non-functional fixed phy support
Joakim Tjernlund [Thu, 10 Apr 2008 22:54:43 +0000 (00:54 +0200)]
ucc_geth: fix non-functional fixed phy support

The new Fixed PHY method, fixed-link property, isn't
impl. for ucc_geth which makes fixed PHYs non functional.
Add support for the new method to restore the Fixed PHY
functionality.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agofs_enet: Don't call NAPI functions when NAPI is not used.
Laurent Pinchart [Fri, 11 Apr 2008 12:05:50 +0000 (14:05 +0200)]
fs_enet: Don't call NAPI functions when NAPI is not used.

fs_enet_close() calls napi_disable() unconditionally. This patch skips the
call when use_napi isn't set.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosky2: missing chip name for Yukon Supreme
Stephen Hemminger [Thu, 10 Apr 2008 20:06:14 +0000 (15:06 -0500)]
sky2: missing chip name for Yukon Supreme

Any usage of sky2 on new Yukon Supreme would cause a NULL dereference.
The chip is very new, so the support is still untested; vendor has
not sent any eval hardware.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[libata] make ali_atapi_dma static
Adrian Bunk [Fri, 11 Apr 2008 17:28:27 +0000 (20:28 +0300)]
[libata] make ali_atapi_dma static

This patch makes the needlessly global ali_atapi_dma static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[libata] sata_svw: fix reversed port count
Jeff Garzik [Sat, 12 Apr 2008 04:11:35 +0000 (00:11 -0400)]
[libata] sata_svw: fix reversed port count

According to Broadcom, two chips have their port counts flipped.  The proper
count is:

0x241 is 8 ports
0x242 is 4 ports

Reported by Yohei Honda on kernel bz 10424.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoMerge current mainline tree into linux-omap tree
Tony Lindgren [Sat, 12 Apr 2008 00:32:10 +0000 (17:32 -0700)]
Merge current mainline tree into linux-omap tree

Merge branches 'master' and 'linus'

16 years agoLinux 2.6.25-rc9 v2.6.25-rc9
Linus Torvalds [Fri, 11 Apr 2008 20:32:29 +0000 (13:32 -0700)]
Linux 2.6.25-rc9

16 years agoMerge branch 'docs' of git://git.lwn.net/linux-2.6
Linus Torvalds [Fri, 11 Apr 2008 20:24:16 +0000 (13:24 -0700)]
Merge branch 'docs' of git://git.lwn.net/linux-2.6

* 'docs' of git://git.lwn.net/linux-2.6:
  Add additional examples in Documentation/spinlocks.txt
  Move sched-rt-group.txt to scheduler/
  Documentation: move rpc-cache.txt to filesystems/
  Documentation: move nfsroot.txt to filesystems/
  Spell out behavior of atomic_dec_and_lock() in kerneldoc
  Fix a typo in highres.txt
  Fixes to the seq_file document
  Fill out information on patch tags in SubmittingPatches
  Add the seq_file documentation

16 years agoARM: OMAP: USB: Fix potential resource overlap due to incorrect end address
Anand Gadiyar [Tue, 8 Apr 2008 12:07:59 +0000 (17:37 +0530)]
ARM: OMAP: USB: Fix potential resource overlap due to incorrect end address

The end address for the USB memory resources were incorrectly defined as
(<start> + <size>) instead of (<start> + <size - 1>) resulting in a
potential overlap with the start address of other resources.

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Nishant Kamat <nskamat@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: Add non-CORE DPLL rate set code and M,N programming
Paul Walmsley [Tue, 8 Apr 2008 06:27:27 +0000 (00:27 -0600)]
OMAP2/3 clock: Add non-CORE DPLL rate set code and M,N programming

Add non-CORE DPLL rate set code and M,N programming for OMAP3.
Connect it to OMAP34xx DPLLs 1, 2, 4, 5 via the clock framework.

You may see some warnings on rate sets from the freqsel code.  The
table that TI presented in the 3430 TRM Rev F does not cover Fint <
750000, which definitely occurs in practice.  However, the lack of this
freqsel case does not appear to impair the DPLL rate change.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoOMAP2/3 clock: new OMAP2/3 DPLL rate rounding algorithm
Paul Walmsley [Tue, 8 Apr 2008 06:27:26 +0000 (00:27 -0600)]
OMAP2/3 clock: new OMAP2/3 DPLL rate rounding algorithm

This patch adds a new rate rounding algorithm for DPLL clocks on the
OMAP2/3 architecture.

For a desired DPLL target rate, there may be several
multiplier/divider (M, N) values which will generate a sufficiently
close rate.  Lower N values result in greater power economy.  However,
lower N values can cause the difference between the rounded rate and
the target rate ("rate error") to be larger than it would be with a
higher N.  This can cause downstream devices to run more slowly than
they otherwise would.

This DPLL rate rounding algorithm:

- attempts to find the lowest possible N (DPLL divider) to reach the
  target_rate (since, according to Richard Woodruff <r-woodruff@ti.com>,
  lower N values save more power than higher N values).

- allows developers to set an upper bound on the error between the
  rounded rate and the desired target rate ("rate tolerance"), so an
  appropriate balance between rate fidelity and power savings can be
  set.  This maximum rate error tolerance is set via
  omap2_set_dpll_rate_tolerance().

- never returns a rounded rate higher than the target rate.

The rate rounding algorithm caches the last rounded M, N, and rate
computation to avoid rounding the rate twice for each clk_set_rate()
call.  (This patch does not yet implement set_rate for DPLLs; that
follows in a future patch.)

The algorithm trades execution speed for rate accuracy.  It will find
the (M, N) set that results in the least rate error, within a
specified rate tolerance.  It does this by evaluating each divider
setting - on OMAP3, this involves 128 steps.  Another approach to DPLL
rate rounding would be to bail out as soon as a valid rate is found
within the rate tolerance, which would trade rate accuracy for
execution speed.  Alternate implementations welcome.

This code is not yet used by the OMAP24XX DPLL clock, since it
is currently defined as a composite clock, fusing the DPLL M,N and the
M2 output divider.  This patch also renames the existing OMAP24xx DPLL
programming functions to highlight that they program both the DPLL and
the DPLL's output multiplier.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TWL4030: Kconfig and Makefile changes
Mikko Ylinen [Wed, 2 Apr 2008 17:55:31 +0000 (20:55 +0300)]
I2C: TWL4030: Kconfig and Makefile changes

Put madc driver into kbuild.

Signed-off-by: Mikko Ylinen <mikko.k.ylinen@nokia.com>
Updated help text on Kconfig for TWL4030 MADC driver.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TWL4030: Introduce twl4030 madc driver
Mikko Ylinen [Mon, 7 Apr 2008 11:55:15 +0000 (14:55 +0300)]
I2C: TWL4030: Introduce twl4030 madc driver

Introduce twl4030 madc driver.

Signed-off-by: Mikko Ylinen <mikko.k.ylinen@nokia.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoAdd additional examples in Documentation/spinlocks.txt
Mark Fasheh [Thu, 10 Apr 2008 20:55:21 +0000 (13:55 -0700)]
Add additional examples in Documentation/spinlocks.txt

Checkpatch will throw an error if code doesn't use the correct initializers
for static spinlocks:

ERROR: Use of SPIN_LOCK_UNLOCKED is deprecated: see Documentation/spinlocks.txt

This is fine, but Documentation/spinlocks.txt isn't very clear on how to
_use_ the new initializers for static variables. To save people time in the
future, I added two small examples of how to fix old-style static
initializers to be more lockdep friendly.

Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoMove sched-rt-group.txt to scheduler/
J. Bruce Fields [Mon, 7 Apr 2008 20:39:38 +0000 (16:39 -0400)]
Move sched-rt-group.txt to scheduler/

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoDocumentation: move rpc-cache.txt to filesystems/
J. Bruce Fields [Mon, 7 Apr 2008 19:59:04 +0000 (15:59 -0400)]
Documentation: move rpc-cache.txt to filesystems/

This file is nfs-related.  (Maybe Documentation/filesystems/ would
benefit from a separate nfs/ directory at some point.)

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoDocumentation: move nfsroot.txt to filesystems/
J. Bruce Fields [Mon, 7 Apr 2008 19:59:03 +0000 (15:59 -0400)]
Documentation: move nfsroot.txt to filesystems/

Documentation/ is a little large, and filesystems/ seems an obvious
place for this file.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoSpell out behavior of atomic_dec_and_lock() in kerneldoc
J. Bruce Fields [Mon, 7 Apr 2008 19:59:05 +0000 (15:59 -0400)]
Spell out behavior of atomic_dec_and_lock() in kerneldoc

A little more detail here wouldn't hurt.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
16 years agoI2C: TWL4030: General cleanup in twl4030's driver
Felipe Balbi [Thu, 10 Apr 2008 12:40:37 +0000 (15:40 +0300)]
I2C: TWL4030: General cleanup in twl4030's driver

TWL4030's Kconfig entries was a bit mixed.
Fix some missing '\n'
Add missing space in two-lined printks

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TWL4030: Fix wrong variable warning
Felipe Balbi [Fri, 11 Apr 2008 11:51:36 +0000 (14:51 +0300)]
I2C: TWL4030: Fix wrong variable warning

twl4030_i2c_write_u8 expects a u8 variable.
Change ctrl to be u8 in power_companion_init().

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TWL4030: sparse fixes for twl4030 driver
Felipe Balbi [Fri, 11 Apr 2008 10:59:17 +0000 (13:59 +0300)]
I2C: TWL4030: sparse fixes for twl4030 driver

Get rid of some sparse warnings in twl4030 driver.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: sparse fixes to musb_hdrc driver
Felipe Balbi [Fri, 11 Apr 2008 10:59:16 +0000 (13:59 +0300)]
USB: MUSB: sparse fixes to musb_hdrc driver

Get rid of some sparse warnings in musb_hdrc driver.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to musb_debug.h
Felipe Balbi [Fri, 11 Apr 2008 08:28:36 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to musb_debug.h

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixed to musb_regs.h
Felipe Balbi [Fri, 11 Apr 2008 08:28:35 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixed to musb_regs.h

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to musb_io.h
Felipe Balbi [Fri, 11 Apr 2008 08:28:34 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to musb_io.h

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to musb_core.h
Felipe Balbi [Fri, 11 Apr 2008 08:28:33 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to musb_core.h

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to davinci.h
Felipe Balbi [Fri, 11 Apr 2008 08:28:32 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to davinci.h

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to tusb6010_omap.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:31 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to tusb6010_omap.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to tusb6010.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:30 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to tusb6010.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to omap2430.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:29 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to omap2430.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to musbhsdma.c
Felipe Balbi [Fri, 11 Apr 2008 09:59:22 +0000 (12:59 +0300)]
USB: MUSB: checkpatch.pl fixes to musbhsdma.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to musb_virthub.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:27 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to musb_virthub.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixed to musb_procfs.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:26 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixed to musb_procfs.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixed to musb_host.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:25 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixed to musb_host.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixed to musb_gadget_ep0.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:24 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixed to musb_gadget_ep0.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to musb_gadget.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:23 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to musb_gadget.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixed to musb_core.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:22 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixed to musb_core.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to davinci.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:21 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to davinci.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoUSB: MUSB: checkpatch.pl fixes to cppi_dma.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:20 +0000 (11:28 +0300)]
USB: MUSB: checkpatch.pl fixes to cppi_dma.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TWL4030: checkpatch.pl fixes to rtc-twl4030.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:19 +0000 (11:28 +0300)]
I2C: TWL4030: checkpatch.pl fixes to rtc-twl4030.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TLW4030: checkpatch.pl fixes to tlw4030-rtc.h
Felipe Balbi [Fri, 11 Apr 2008 08:28:18 +0000 (11:28 +0300)]
I2C: TLW4030: checkpatch.pl fixes to tlw4030-rtc.h

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TWL4030: checkpatch.pl fixes to tlw4030.h
Felipe Balbi [Fri, 11 Apr 2008 08:28:17 +0000 (11:28 +0300)]
I2C: TWL4030: checkpatch.pl fixes to tlw4030.h

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TWL4030: checkpatch.pl fixes for twl4030-gpio.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:16 +0000 (11:28 +0300)]
I2C: TWL4030: checkpatch.pl fixes for twl4030-gpio.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TWL4030: checkpatch.pl fixes for twl4030-usb.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:15 +0000 (11:28 +0300)]
I2C: TWL4030: checkpatch.pl fixes for twl4030-usb.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoI2C: TWL4030: checkpatch.pl fixes for twl4030-core.c
Felipe Balbi [Fri, 11 Apr 2008 08:28:14 +0000 (11:28 +0300)]
I2C: TWL4030: checkpatch.pl fixes for twl4030-core.c

Misc cleanup patch.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
16 years agoFix "$(AS) -traditional" compile breakage caused by asmlinkage_protect
Heiko Carstens [Fri, 11 Apr 2008 11:46:54 +0000 (13:46 +0200)]
Fix "$(AS) -traditional" compile breakage caused by asmlinkage_protect

git commit 54a015104136974262afa4b8ddd943ea70dec8a2 ("asmlinkage_protect
replaces prevent_tail_call") causes this build failure on s390:

    AS      arch/s390/kernel/entry64.o
  In file included from arch/s390/kernel/entry64.S:14:
  include/linux/linkage.h:34: error: syntax error in macro parameter list
  make[1]: *** [arch/s390/kernel/entry64.o] Error 1
  make: *** [arch/s390/kernel] Error 2

and some other architectures.  The reason is that some architectures add
the "-traditional" flag to the invocation of $(AS), which disables
variadic macro argument support.

So just surround the new define with an #ifndef __ASSEMBLY__ to prevent
any side effects on asm code.

Cc: Roland McGrath <roland@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Fri, 11 Apr 2008 15:10:51 +0000 (08:10 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c-tiny-usb: New VID/PID pair
  i2c-davinci: Fix lost interrupt
  i2c-ibm_iic: Fast mode parm desc fixup

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 11 Apr 2008 15:10:24 +0000 (08:10 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  [NETNS][IPV6] tcp - assign the netns for timewait sockets
  [IPV4]: Fix byte value boundary check in do_ip_getsockopt().
  BNX2X: Correct bringing chip out of reset
  [NETFILTER]: nf_nat: autoload IPv4 connection tracking
  [NETFILTER]: xt_hashlimit: fix mask calculation
  [XFRM]: xfrm_user: fix selector family initialization
  rt61pci: rt61pci_beacon_update do not free skb twice
  ssb-mipscore: Fix interrupt vectors
  ssb-pcicore: Fix IRQ TPS flag handling
  mac80211: use short_preamble mode from capability if ERP IE not present
  [NET]: Undo code bloat in hot paths due to print_mac().
  [TCP]: Don't allow FRTO to take place while MTU is being probed
  [TCP]: tcp_simple_retransmit can cause S+L
  [TCP]: Fix NewReno's fast rexmit/recovery problems with GSOed skb
  [TCP]: Restore 2.6.24 mark_head_lost behavior for newreno/fack
  nl80211: fix STA AID bug
  b43legacy: fix bcm4303 crash
  iwlwifi: fix n-band association problem
  ipw2200: set MAC address on radiotap interface
  libertas: fix mode initialization problem

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Fri, 11 Apr 2008 15:09:57 +0000 (08:09 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Fix several regset and ptrace bugs.

16 years agosignalfd: fix for incorrect SI_QUEUE user data reporting
Davide Libenzi [Fri, 11 Apr 2008 04:29:29 +0000 (21:29 -0700)]
signalfd: fix for incorrect SI_QUEUE user data reporting

Michael Kerrisk found out that signalfd was not reporting back user data
pushed using sigqueue:

  http://groups.google.com/group/linux.kernel/msg/9397cab8551e3123

The following patch makes signalfd report back the ssi_ptr and ssi_int members
of the signalfd_siginfo structure.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Acked-by: Michael Kerrisk <mtk.manpages@googlemail.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopnp: increase number of devices supported per protocol
Bjorn Helgaas [Fri, 11 Apr 2008 04:29:28 +0000 (21:29 -0700)]
pnp: increase number of devices supported per protocol

Increase the PNP "number of devices" limit.  We currently use an unsigned
char, which limits us to 256 devices per protocol.  This patch changes that to
an unsigned int.

Not all backends can take advantage of this: we limit ISAPNP to 10 devices in
isapnp_cfg_begin(), and PNPBIOS is limited to 256 devices because the BIOS
interfaces use a one-byte device node number.

But there is no limit on the number of PNPACPI devices we may have.  Large HP
Integrity machines have more than 256, which causes the current "unsigned char
number" to wrap around.  This causes errors like this:

    pnp: PnP ACPI init
    kobject_add failed for 00:00 with -EEXIST, don't try to register things with the same name in the same directory.

    Call Trace:
     [<a000000100010720>] show_stack+0x40/0xa0
     [<a0000001000107b0>] dump_stack+0x30/0x60
     [<a0000001001dbdf0>] kobject_add+0x290/0x2c0
     [<a0000001002bfd40>] device_add+0x160/0x860
     [<a0000001002c0470>] device_register+0x30/0x60
     [<a00000010026ba70>] __pnp_add_device+0x130/0x180
     [<a00000010026bb70>] pnp_add_device+0xb0/0xe0
     [<a0000001007f2730>] pnpacpi_add_device+0x510/0x5a0
     [<a0000001007f2810>] pnpacpi_add_device_handler+0x50/0x80

This patch increases the limit to fix this PNPACPI problem.  It should not
have any adverse effect on ISAPNP or PNPBIOS because their limits are still
enforced in the backends.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agomd: close a livelock window in handle_parity_checks5
Dan Williams [Fri, 11 Apr 2008 04:29:27 +0000 (21:29 -0700)]
md: close a livelock window in handle_parity_checks5

If a failure is detected after a parity check operation has been initiated,
but before it completes handle_parity_checks5 will never quiesce operations on
the stripe.

Explicitly handle this case by "canceling" the parity check, i.e.  clear the
STRIPE_OP_CHECK flags and queue the stripe on the handle list again to refresh
any non-uptodate blocks.

Kernel versions >= 2.6.23 are susceptible.

Cc: <stable@kernel.org>
Cc: NeilBrown <neilb@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocciss: error: implicit declaration of function 'sg_init_table'
Mike Pagano [Fri, 11 Apr 2008 04:29:26 +0000 (21:29 -0700)]
cciss: error: implicit declaration of function 'sg_init_table'

This patch adds the missing include directive <linux/scatterlist.h> to the
cciss.c source file.    This was discovered by our release team when building
the kernel for the Alpha architecture.

Errors were found as references to functions 'sg_init_table' and 'sg_page' do
not exist without the include for Alpha.

Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: <mike.miller@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc: fix platform driver hotplug/coldplug
Kay Sievers [Fri, 11 Apr 2008 04:29:25 +0000 (21:29 -0700)]
rtc: fix platform driver hotplug/coldplug

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

[dbrownell@users.sourceforge.net: more drivers, minor fix]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agowatchdog: fix platform driver hotplug/coldplug
Kay Sievers [Fri, 11 Apr 2008 04:29:23 +0000 (21:29 -0700)]
watchdog: fix platform driver hotplug/coldplug

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

[dbrownell@users.sourceforge.net: more drivers; registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agousb host: fix platform driver hotplug/coldplug
Kay Sievers [Fri, 11 Apr 2008 04:29:22 +0000 (21:29 -0700)]
usb host: fix platform driver hotplug/coldplug

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

[dbrownell@users.sourceforge.net: more drivers; registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agousb gadget: fix platform driver hotplug/coldplug
Kay Sievers [Fri, 11 Apr 2008 04:29:21 +0000 (21:29 -0700)]
usb gadget: fix platform driver hotplug/coldplug

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

[dbrownell@users.sourceforge.net: registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospi: fix platform driver hotplug/coldplug
Kay Sievers [Fri, 11 Apr 2008 04:29:20 +0000 (21:29 -0700)]
spi: fix platform driver hotplug/coldplug

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

[dbrownell@users.sourceforge.net: more drivers: registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoeventfd/kaio integration fix
Davide Libenzi [Fri, 11 Apr 2008 04:29:19 +0000 (21:29 -0700)]
eventfd/kaio integration fix

Jeff Roberson discovered a race when using kaio eventfd based notifications.
When it occurs it can lead tomissed wakeups and hung userspace.

This patch fixes the race by moving the notification inside the spinlocked
section of kaio.  The operation is safe since eventfd spinlock and kaio one
are unrelated.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Jeff Roberson <jroberson@chesapeake.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agortc: rtc-s35390a.c needs the bitreverse library
Randy Dunlap [Fri, 11 Apr 2008 04:29:18 +0000 (21:29 -0700)]
rtc: rtc-s35390a.c needs the bitreverse library

rtc-s35390a uses BITREVERSE functions so it needs to select that config symbol
to ensure that the functions are built.

  drivers/built-in.o: In function `s35390a_set_datetime':
  linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:144: undefined reference to `byte_rev_table'
  drivers/built-in.o: In function `s35390a_get_datetime':
  linux-2.6.25-rc8-git7/drivers/rtc/rtc-s35390a.c:163: undefined reference to `byte_rev_table'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocgroups: include hierarchy ids in /proc/<pid>/cgroup
Paul Menage [Fri, 11 Apr 2008 04:29:16 +0000 (21:29 -0700)]
cgroups: include hierarchy ids in /proc/<pid>/cgroup

Extend the /proc/<pid>/cgroup file to include the appropriate hierarchy ID on
each line.

Currently this ID isn't really needed since a hierarchy can be completely
identified by the set of subsystems bound to it, but this is likely to change
in the near future in order to support stateless subsystems and
merging/rebinding of subsystems.  Getting this change into 2.6.25 reduces the
need for an API change later.

Signed-off-by: Paul Menage <menage@google.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoi2c-tiny-usb: New VID/PID pair
Till Harbaum [Fri, 11 Apr 2008 10:07:05 +0000 (12:07 +0200)]
i2c-tiny-usb: New VID/PID pair

I have recently bought some USB PIDs from EZPrototypes for my USB projects
and one will be for the i2c-tiny-usb. I have not yet started to use the new
one in the official i2c-tiny-usb firmware since i think it makes sense to get
the change into the kernel before releasing a modified firmware.

This patch adds support for the EZPrototypes USB vid/pid pair used in later
i2c-tiny-usb firmware versions (avrusb v1.06 and up, usbtiny v2.06 and up).

Signed-off-by: Till Harbaum <Till@Harbaum.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-davinci: Fix lost interrupt
Troy Kisky [Fri, 11 Apr 2008 10:07:05 +0000 (12:07 +0200)]
i2c-davinci: Fix lost interrupt

DAVINCI_I2C_STR_REG is a write 1 to clear register,
so don't use a read/modify/write cycle.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-ibm_iic: Fast mode parm desc fixup
Paul Mundt [Fri, 11 Apr 2008 10:07:04 +0000 (12:07 +0200)]
i2c-ibm_iic: Fast mode parm desc fixup

Noticed this when grepping for fast mode module params, the i2c-ibm_iic
driver was using a non-existent variable for MODULE_PARM_DESC. Fix it up
to reflect what it's actually supposed to be describing.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years ago[NETNS][IPV6] tcp - assign the netns for timewait sockets
Daniel Lezcano [Fri, 11 Apr 2008 03:53:10 +0000 (20:53 -0700)]
[NETNS][IPV6] tcp - assign the netns for timewait sockets

Copy the network namespace from the socket to the timewait socket.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: Mark Lord <mlord@pobox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoAdd commentary about the new "asmlinkage_protect()" macro
Linus Torvalds [Fri, 11 Apr 2008 00:35:23 +0000 (17:35 -0700)]
Add commentary about the new "asmlinkage_protect()" macro

It's really a pretty ugly thing to need, and some day it will hopefully
be obviated by teaching gcc about the magic calling conventions for the
low-level system call code, but in the meantime we can at least add big
honking comments about why we need these insane and strange macros.

I took my comments from my version of the macro, but I ended up deciding
to just pick Roland's version of the actual code instead (with his
prettier syntax that uses vararg macros).  Thus the previous two commits
that actually implement it.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoasmlinkage_protect sys_io_getevents
Roland McGrath [Thu, 10 Apr 2008 22:38:45 +0000 (15:38 -0700)]
asmlinkage_protect sys_io_getevents

Use asmlinkage_protect in sys_io_getevents, because GCC for i386 with
CONFIG_FRAME_POINTER=n can decide to clobber an argument word on the
stack, i.e. the user struct pt_regs.  Here the problem is not a tail
call, but just the compiler's use of the stack when it inlines and
optimizes the body of the called function.  This seems to avoid it.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoasmlinkage_protect replaces prevent_tail_call
Roland McGrath [Thu, 10 Apr 2008 22:37:38 +0000 (15:37 -0700)]
asmlinkage_protect replaces prevent_tail_call

The prevent_tail_call() macro works around the problem of the compiler
clobbering argument words on the stack, which for asmlinkage functions
is the caller's (user's) struct pt_regs.  The tail/sibling-call
optimization is not the only way that the compiler can decide to use
stack argument words as scratch space, which we have to prevent.
Other optimizations can do it too.

Until we have new compiler support to make "asmlinkage" binding on the
compiler's own use of the stack argument frame, we have work around all
the manifestations of this issue that crop up.

More cases seem to be prevented by also keeping the incoming argument
variables live at the end of the function.  This makes their original
stack slots attractive places to leave those variables, so the compiler
tends not clobber them for something else.  It's still no guarantee, but
it handles some observed cases that prevent_tail_call() did not.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: Simplify cpu_idle_wait
Venki Pallipadi [Thu, 10 Apr 2008 16:49:58 +0000 (09:49 -0700)]
x86: Simplify cpu_idle_wait

This patch also resolves hangs on boot:
http://lkml.org/lkml/2008/2/23/263
http://bugzilla.kernel.org/show_bug.cgi?id=10093

The bug was causing once-in-few-reboots 10-15 sec wait during boot on
certain laptops.

Earlier commit 40d6a146629b98d8e322b6f9332b182c7cbff3df added
smp_call_function in cpu_idle_wait() to kick cpus that are in tickless
idle.  Looking at cpu_idle_wait code at that time, code seemed to be
over-engineered for a case which is rarely used (while changing idle
handler).

Below is a simplified version of cpu_idle_wait, which just makes a dummy
smp_call_function to all cpus, to make them come out of old idle handler
and start using the new idle handler.  It eliminates code in the idle
loop to handle cpu_idle_wait.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agolzo: fix typo in decompressor
Harvey Harrison [Thu, 10 Apr 2008 20:38:23 +0000 (13:38 -0700)]
lzo: fix typo in decompressor

Shift of a LE value seems strange, probably meant to shift the cpu-order
variable as in the prvious section of the switch statement.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFRV: Don't make smp_{r, w, }mb() interpolate MEMBAR when CONFIG_SMP=n [try #2]
David Howells [Thu, 10 Apr 2008 15:11:05 +0000 (16:11 +0100)]
FRV: Don't make smp_{r, w, }mb() interpolate MEMBAR when CONFIG_SMP=n [try #2]

Don't make smp_{r,w,}mb() interpolate a MEMBAR instruction when CONFIG_SMP=n as
SMP memory barries on UP systems should interpolate a compiler barrier only.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFRV: Make NOMMU-mode work with base addresses other than 0xC0000000 [try #2]
David Howells [Thu, 10 Apr 2008 15:11:00 +0000 (16:11 +0100)]
FRV: Make NOMMU-mode work with base addresses other than 0xC0000000 [try #2]

Make NOMMU-mode work with base addresses other than 0xC0000000 by:

 (1) Giving the code that sets up the protection registers the right address
     in __sdram_base.  Rather than being hard coded to 0xC0000000, the value
     of __page_offset is obtained from the linker script.

 (2) Eliminate the check in __switch_to() that verifies the current thread
     info is in the 0xCxxxxxxx region.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFRV: Add support for emulation of userspace atomic ops [try #2]
David Howells [Thu, 10 Apr 2008 15:10:55 +0000 (16:10 +0100)]
FRV: Add support for emulation of userspace atomic ops [try #2]

Use traps 120-126 to emulate atomic cmpxchg32, xchg32, and XOR-, OR-, AND-, SUB-
and ADD-to-memory operations for userspace.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFRV: Move STACK_TOP_MAX up [try #2]
David Howells [Thu, 10 Apr 2008 15:10:50 +0000 (16:10 +0100)]
FRV: Move STACK_TOP_MAX up [try #2]

Move STACK_TOP_MAX up so that we don't try moving the stack above it as that
causes setup_arg_pages() to malfunction.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFRV: Handle update_mmu_cache() being called when current->mm is NULL [try #2]
David Howells [Thu, 10 Apr 2008 15:10:45 +0000 (16:10 +0100)]
FRV: Handle update_mmu_cache() being called when current->mm is NULL [try #2]

Handle update_mmu_cache() being called when current->mm is NULL.

We cache static TLB mappings for the current page table in DAMPR4 and DAMPR5
on the theory that the next data lookup is likely to be in the same general
region, and thus is likely to be mapped by the same page table.  However, we
can't get this information if we can't access the appropriate mm_struct.

If current->mm is NULL, we just clear the cache in the knowledge that the TLB
miss handlers will load it.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
Linus Torvalds [Thu, 10 Apr 2008 20:39:29 +0000 (13:39 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
  [XFS] Ensure "both" features2 slots are consistent
  [XFS] Fix superblock features2 field alignment problem
  [XFS] remove shouting-indirection macros from xfs_sb.h

16 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Thu, 10 Apr 2008 20:39:07 +0000 (13:39 -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:
  cfq-iosched: do not leak ioc_data across iosched switches
  splice: fix infinite loop in generic_file_splice_read()

16 years agoHFS+: fix unlink of links
Roman Zippel [Wed, 9 Apr 2008 15:44:07 +0000 (17:44 +0200)]
HFS+: fix unlink of links

Some time ago while attempting to handle invalid link counts, I botched
the unlink of links itself, so this patch fixes this now correctly, so
that only the link count of nodes that don't point to links is ignored.
Thanks to Vlado Plaga <rechner@vlado-do.de> to notify me of this
problem.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[IPV4]: Fix byte value boundary check in do_ip_getsockopt().
David S. Miller [Thu, 10 Apr 2008 08:29:36 +0000 (01:29 -0700)]
[IPV4]: Fix byte value boundary check in do_ip_getsockopt().

This fixes kernel bugzilla 10371.

As reported by M.Piechaczek@osmosys.tv, if we try to grab a
char sized socket option value, as in:

  unsigned char ttl = 255;
  socklen_t     len = sizeof(ttl);
  setsockopt(socket, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, &len);

  getsockopt(socket, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, &len);

The ttl returned will be wrong on big-endian, and on both little-
endian and big-endian the next three bytes in userspace are written
with garbage.

It's because of this test in do_ip_getsockopt():

if (len < sizeof(int) && len > 0 && val>=0 && val<255) {

It should allow a 'val' of 255 to pass here, but it doesn't so it
copies a full 'int' back to userspace.

On little-endian that will write the correct value into the location
but it spams on the next three bytes in userspace.  On big endian it
writes the wrong value into the location and spams the next three
bytes.

Signed-off-by: David S. Miller <davem@davemloft.net>