]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
14 years agosfc: Wait for the link to stay up before running loopback selftest
Steve Hodgson [Tue, 1 Jun 2010 11:18:28 +0000 (11:18 +0000)]
sfc: Wait for the link to stay up before running loopback selftest

It's been observed that some phys (such as the qt2025c) can
do down-up-down-up transitions, presumably as pcs block lock
settles down.

The loopback selftest will start sending data immediately
after the link comes up. Work around this by waiting for
the link state to stay up for two consecutive polls, rather
than one.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Synchronise link_advertising and wanted_fc on Siena
Steve Hodgson [Tue, 1 Jun 2010 11:18:08 +0000 (11:18 +0000)]
sfc: Synchronise link_advertising and wanted_fc on Siena

All of the ethtool code paths keep them in sync, but we need
to ensure they are sync'd at start of day. Matches the sft9001
driver.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Workaround flush failures on Falcon B0
Steve Hodgson [Tue, 1 Jun 2010 11:17:51 +0000 (11:17 +0000)]
sfc: Workaround flush failures on Falcon B0

Under certain conditions a PHY may backpressure Falcon B0
in such a way that flushes timeout. In normal circumstances
the phy poller would fix the PHY, and the flush could complete.

But efx_nic_flush_queues() is always called after efx_stop_all(),
so the poller has been stopped. Even if this weren't the case,
how long would we have to wait for the poller to fix this? And
several callers of efx_nic_flush_queues() are about to reset
the device anyway - so we don't need to do anything.

Work around this bug by scheduling a reset. Ensure that the
MAC is never rewired back into the datapath before the reset
runs (we already ignore all rx events anyway).

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Reschedule any resets scheduled inside efx_pm_freeze()
Steve Hodgson [Tue, 1 Jun 2010 11:17:24 +0000 (11:17 +0000)]
sfc: Reschedule any resets scheduled inside efx_pm_freeze()

efx_pm_freeze() sets efx->state = STATE_FINI, which means
efx_reset_work() will abort any scheduled resets.

efx_pm_thaw() should reschedule efx_reset_work() again,
since a freeze/thaw will not have reset the hardware.

This bug was spotted by inspection - there is no real world example of
this happening.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosfc: Rename struct efx_mcdi_phy_cfg to efx_mcdi_phy_data
Ben Hutchings [Tue, 1 Jun 2010 11:17:06 +0000 (11:17 +0000)]
sfc: Rename struct efx_mcdi_phy_cfg to efx_mcdi_phy_data

Most of its members are constant capabilities, not configuration.  The
new name is also consistent with the name of the pointer to it in
struct efx_nic and the names of structures used by other PHY drivers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: fix dialog token allocator
Johannes Berg [Mon, 31 May 2010 10:00:12 +0000 (12:00 +0200)]
mac80211: fix dialog token allocator

The dialog token allocator has apparently been broken
since b83f4e15 ("mac80211: fix deadlock in sta->lock")
because it got moved out under the spinlock. Fix it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix blockack-req processing
Johannes Berg [Sun, 30 May 2010 12:52:58 +0000 (14:52 +0200)]
mac80211: fix blockack-req processing

Daniel reported that the paged RX changes had
broken blockack request frame processing due
to using data that wasn't really part of the
skb data.

Fix this using skb_copy_bits() for the needed
data. As a side effect, this adds a check on
processing too short frames, which previously
this code could do.

Reported-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: wake queues on reset
Bruno Randolf [Wed, 19 May 2010 01:30:49 +0000 (10:30 +0900)]
ath5k: wake queues on reset

We can wake all queues after a chip reset since everything should be set up and
we are ready to transmit. If we don't do that we might end up starting up with
stopped queues, not beeing able to transmit. (This started to happen after
"ath5k: clean up queue manipulation" but since periodic calibration also
stopped and started the queues this effect was hidden most of the time).

This way we can also get rid of the superfluous ath5k_reset_wake() function.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoatl1c: Add AR8151 v2 support and change L0s/L1 routine
Jie Yang [Tue, 1 Jun 2010 07:28:12 +0000 (00:28 -0700)]
atl1c: Add AR8151 v2 support and change L0s/L1 routine

Add AR8151 v2.0 Gigabit 1000 support
Change jumbo frame size to 6K
Update L0s/L1 rountine
        when link speed is 100M or 1G, set L1 link timer to 4 for l1d_2 and l2c_b2
        set L1 link timer to 7 for l2c_b, set L1 link timer to 0xF for others.
Update atl1c_suspend routine
just refactory the function, add atl1c_phy_power_saving routine,
when Wake On Lan enable, this func will be called to save power,
it will reautoneg PHY to 10/100M speed depend on the link
partners link capability.
Update atl1c_configure_des_ring
        do not use l2c_b default SRAM configuration.

Signed-off-by: Jie Yang <Jie.Yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: get rid of ipip6_prl_lock
Eric Dumazet [Tue, 1 Jun 2010 07:26:58 +0000 (00:26 -0700)]
ipv6: get rid of ipip6_prl_lock

As noticed by Julia Lawall, ipip6_tunnel_add_prl() incorrectly calls
kzallloc(..., GFP_KERNEL) while a spinlock is held. She provided
a patch to use GFP_ATOMIC instead.

One possibility would be to convert this spinlock to a mutex, or
preallocate the thing before taking the lock.

After RCU conversion, it appears we dont need this lock, since
caller already holds RTNL

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/isdn/hardware/mISDN: Use GFP_ATOMIC when a lock is held
Julia Lawall [Tue, 1 Jun 2010 07:26:06 +0000 (00:26 -0700)]
drivers/isdn/hardware/mISDN: Use GFP_ATOMIC when a lock is held

The function inittiger is only called from nj_init_card, where a lock is held.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@gfp exists@
identifier fn;
position p;
@@

fn(...) {
 ... when != spin_unlock_irqrestore
     when any
 GFP_KERNEL@p
 ... when any
}

@locked@
identifier gfp.fn;
@@

spin_lock_irqsave(...)
...  when != spin_unlock_irqrestore
fn(...)

@depends on locked@
position gfp.p;
@@

- GFP_KERNEL@p
+ GFP_ATOMIC
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoksz884x: Add missing validate_addr hook
Denis Kirjanov [Mon, 31 May 2010 00:26:21 +0000 (00:26 +0000)]
ksz884x: Add missing validate_addr hook

Add missing validate_addr hook

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoksz884x: convert to netdev_tx_t
Denis Kirjanov [Mon, 31 May 2010 00:24:49 +0000 (00:24 +0000)]
ksz884x: convert to netdev_tx_t

Convert TX hook to netdev_tx_t type

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovirtio-net: pass gfp to add_buf
Michael S. Tsirkin [Mon, 31 May 2010 01:10:01 +0000 (01:10 +0000)]
virtio-net: pass gfp to add_buf

virtio-net bounces buffer allocations off to
a thread if it can't allocate buffers from the atomic
pool. However, if posting buffers still requires atomic
buffers, this is unlikely to succeed.
Fix by passing in the proper gfp_t parameter.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: convert hdr.timeout in be_cmd_loopback_test() to le32
Sathya Perla [Tue, 1 Jun 2010 07:19:33 +0000 (00:19 -0700)]
be2net: convert hdr.timeout in be_cmd_loopback_test() to le32

The current code fails on ppc as hdr.timeout is not being converted
to le32.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixp4xx: Support the all multicast flag on the NPE devices.
Richard Cochran [Tue, 1 Jun 2010 07:16:53 +0000 (00:16 -0700)]
ixp4xx: Support the all multicast flag on the NPE devices.

This patch adds support for the IFF_ALLMULTI flag. Previously only the
IFF_PROMISC flag was supported.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Acked-By: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/ipv6/mcast.c: Remove unnecessary kmalloc casts
Joe Perches [Mon, 31 May 2010 17:23:22 +0000 (17:23 +0000)]
net/ipv6/mcast.c: Remove unnecessary kmalloc casts

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/ipv4/igmp.c: Remove unnecessary kmalloc casts
Joe Perches [Mon, 31 May 2010 17:23:21 +0000 (17:23 +0000)]
net/ipv4/igmp.c: Remove unnecessary kmalloc casts

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/tulip/eeprom.c: Remove unnecessary kmalloc casts
Joe Perches [Mon, 31 May 2010 17:23:13 +0000 (17:23 +0000)]
drivers/net/tulip/eeprom.c: Remove unnecessary kmalloc casts

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/gianfar.c: Remove unnecessary kmalloc casts
Joe Perches [Mon, 31 May 2010 17:23:12 +0000 (17:23 +0000)]
drivers/net/gianfar.c: Remove unnecessary kmalloc casts

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: replace udelay() with schedule_timeout() in mbox polling
Sathya Perla [Sun, 30 May 2010 23:34:14 +0000 (23:34 +0000)]
be2net: replace udelay() with schedule_timeout() in mbox polling

As mbox polling is done only in process context, it is better to
use schedule_timeout() instead of udelay().

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: cleanup in case of error in be_open()
Sathya Perla [Sun, 30 May 2010 23:33:45 +0000 (23:33 +0000)]
be2net: cleanup in case of error in be_open()

This patch adds cleanup code (things like unregistering irq,
disabling napi etc) to be_open() when an error occurs inside the
routine.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip: implement wake-on-lan support
Steven Walter [Mon, 31 May 2010 12:34:43 +0000 (12:34 +0000)]
tulip: implement wake-on-lan support

Based on a patch from http://simon.baatz.info/wol-support-for-an983b/

Tested to resume from suspend by magic packet.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotulip: explicity set to D0 power state during init
Steven Walter [Mon, 31 May 2010 17:11:53 +0000 (17:11 +0000)]
tulip: explicity set to D0 power state during init

During the first suspend the chip would refuse to enter D3.  Subsequent
suspends worked okay.  During resume the chip is commanded into D0.
Doing so during initialization fixes the initial suspend.

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor6040: bump version to 0.26 and date to 30 May 2010
Florian Fainelli [Mon, 31 May 2010 09:19:04 +0000 (09:19 +0000)]
r6040: bump version to 0.26 and date to 30 May 2010

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor6040: implement phylib
Florian Fainelli [Mon, 31 May 2010 09:18:57 +0000 (09:18 +0000)]
r6040: implement phylib

This patch adds support for using phylib and adds the required mdiobus driver
stubs. This allows for less code to be present in the driver and removes
the PHY status specific timer which is now handled by phylib directly.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: mpc5xxx_can.c: Fix build failure
Anatolij Gustschin [Mon, 31 May 2010 08:56:03 +0000 (08:56 +0000)]
can: mpc5xxx_can.c: Fix build failure

Fixes build error caused by the OF device_node pointer
being moved into struct device.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/ipv4/tcp_input.c: fix compilation breakage when FASTRETRANS_DEBUG > 1
Joe Perches [Tue, 1 Jun 2010 06:48:19 +0000 (23:48 -0700)]
net/ipv4/tcp_input.c: fix compilation breakage when FASTRETRANS_DEBUG > 1

Commit: c720c7e8383aff1cb219bddf474ed89d850336e3 missed these.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
David S. Miller [Tue, 1 Jun 2010 06:44:57 +0000 (23:44 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6

14 years agonet: sock_queue_err_skb() dont mess with sk_forward_alloc
Eric Dumazet [Tue, 1 Jun 2010 06:44:05 +0000 (23:44 -0700)]
net: sock_queue_err_skb() dont mess with sk_forward_alloc

Correct sk_forward_alloc handling for error_queue would need to use a
backlog of frames that softirq handler could not deliver because socket
is owned by user thread. Or extend backlog processing to be able to
process normal and error packets.

Another possibility is to not use mem charge for error queue, this is
what I implemented in this patch.

Note: this reverts commit 29030374
(net: fix sk_forward_alloc corruptions), since we dont need to lock
socket anymore.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetfilter: xtables: stackptr should be percpu
Eric Dumazet [Mon, 31 May 2010 14:41:35 +0000 (16:41 +0200)]
netfilter: xtables: stackptr should be percpu

commit f3c5c1bfd4 (netfilter: xtables: make ip_tables reentrant)
introduced a performance regression, because stackptr array is shared by
all cpus, adding cache line ping pongs. (16 cpus share a 64 bytes cache
line)

Fix this using alloc_percpu()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-By: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agonetfilter: don't xt_jumpstack_alloc twice in xt_register_table
Xiaotian Feng [Mon, 31 May 2010 14:41:09 +0000 (16:41 +0200)]
netfilter: don't xt_jumpstack_alloc twice in xt_register_table

In xt_register_table, xt_jumpstack_alloc is called first, later
xt_replace_table is used. But in xt_replace_table, xt_jumpstack_alloc
will be used again. Then the memory allocated by previous xt_jumpstack_alloc
will be leaked. We can simply remove the previous xt_jumpstack_alloc because
there aren't any users of newinfo between xt_jumpstack_alloc and
xt_replace_table.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jan Engelhardt <jengelh@medozas.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Acked-By: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
14 years agogreth: Fix build after OF device conversions.
David S. Miller [Mon, 31 May 2010 12:47:32 +0000 (05:47 -0700)]
greth: Fix build after OF device conversions.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of /home/davem/src/GIT/linux-2.6/
David S. Miller [Mon, 31 May 2010 12:46:45 +0000 (05:46 -0700)]
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/

14 years agodrivers/net/arcnet/capmode.c: clean up code
Daniel Mack [Mon, 31 May 2010 07:35:13 +0000 (00:35 -0700)]
drivers/net/arcnet/capmode.c: clean up code

 - shuffle around functions to get rid of forward declarations
 - fix some CodingStyle and indentation issues
 - last but not least, get rid of the following CONFIG_MODULE=n warning:

drivers/net/arcnet/capmode.c:52: warning: ‘capmode_proto’ defined but not used

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Fix NETDEV_NOTIFY_PEERS to not conflict with NETDEV_BONDING_DESLAVE.
David S. Miller [Mon, 31 May 2010 07:28:35 +0000 (00:28 -0700)]
net: Fix NETDEV_NOTIFY_PEERS to not conflict with NETDEV_BONDING_DESLAVE.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor8169: remove unnecessary cast of readl()'s return value
Junchang Wang [Sun, 30 May 2010 02:26:07 +0000 (02:26 +0000)]
r8169: remove unnecessary cast of readl()'s return value

readl() returns a 32-bit integer on all platforms.
There is no need to cast its return value.

Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago8139too: remove unnecessary cast of ioread32()'s return value
Junchang Wang [Sun, 30 May 2010 02:22:14 +0000 (02:22 +0000)]
8139too: remove unnecessary cast of ioread32()'s return value

ioread32() returns a 32-bit integer on all platforms.
There is no need to cast its return value.

Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatm: [he] rewrite buffer handling in receive path
chas williams - CONTRACTOR [Sat, 29 May 2010 09:05:33 +0000 (09:05 +0000)]
atm: [he] rewrite buffer handling in receive path

Instead of a fixed list of buffers, use the buffer pool correctly and
keep track of the outstanding buffer indexes using a fixed table.
Resolves reported HBUF_ERR's -- failures due to lack of receive buffers.

Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatm: [he] remove small buffer allocation/handling code
chas williams - CONTRACTOR [Sat, 29 May 2010 09:04:59 +0000 (09:04 +0000)]
atm: [he] remove small buffer allocation/handling code

Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatm: [nicstar] remove virt_to_bus() and support 64-bit platforms
chas williams - CONTRACTOR [Sat, 29 May 2010 09:04:25 +0000 (09:04 +0000)]
atm: [nicstar] remove virt_to_bus() and support 64-bit platforms

Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatm: [nicstar] reformatted with Lindent
chas williams - CONTRACTOR [Sat, 29 May 2010 09:03:44 +0000 (09:03 +0000)]
atm: [nicstar] reformatted with Lindent

Signed-off-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomlx4_en: use net_device dev_id to indicate port number
Eli Cohen [Wed, 26 May 2010 19:56:24 +0000 (19:56 +0000)]
mlx4_en: use net_device dev_id to indicate port number

Today, there are no means to know which port of a hardware device a netdev
interface uses. struct net_device conatins a field, dev_id, that can be used
for that. Use this field to save the port number in ConnectX that is being used
by the net device; port numbers are zero based.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxen: netfront: explicitly generate arp_notify event after migration.
Ian Campbell [Wed, 26 May 2010 00:09:43 +0000 (00:09 +0000)]
xen: netfront: explicitly generate arp_notify event after migration.

Use newly introduced netif_notify_peers() method to ensure a gratuitous ARP is
generated after a migration.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: xen-devel@lists.xensource.com
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoarp_notify: allow drivers to explicitly request a notification event.
Ian Campbell [Wed, 26 May 2010 00:09:42 +0000 (00:09 +0000)]
arp_notify: allow drivers to explicitly request a notification event.

Currently such notifications are only generated when the device comes up or the
address changes. However one use case for these notifications is to enable
faster network recovery after a virtual machine migration (by causing switches
to relearn their MAC tables). A migration appears to the network stack as a
temporary loss of carrier and therefore does not trigger either of the current
conditions. Rather than adding carrier up as a trigger (which can cause issues
when interfaces a flapping) simply add an interface which the driver can use
to explicitly trigger the notification.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoarp_notify: document that a gratuitous ARP request is sent when this option is enabled
Ian Campbell [Wed, 26 May 2010 00:09:41 +0000 (00:09 +0000)]
arp_notify: document that a gratuitous ARP request is sent when this option is enabled

This option causes a gratuitous ARP request, not a reply as the documentation
currently suggests.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocaif: cleanup: remove duplicate checks
Dan Carpenter [Mon, 24 May 2010 06:29:34 +0000 (06:29 +0000)]
caif: cleanup: remove duplicate checks

"phyinfo" can never be null here because we assigned it an address, so I
removed both the assert and the second check inside the if statement.  I
removed the "phyinfo->phy_layer != NULL" check as well because that was
asserted earlier.

Walter Harms suggested I move the "phyinfo->phy_ref_count++;" outside
the if condition for readability, so I have done that.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocaif: remove unneeded null check in caif_connect()
Dan Carpenter [Sat, 22 May 2010 10:43:42 +0000 (10:43 +0000)]
caif: remove unneeded null check in caif_connect()

We already dereferenced uaddr towards the start of the function when we
checked that "uaddr->sa_family != AF_CAIF".  Both the check here and the
earlier check were added in bece7b2398d0: "caif: Rewritten socket
implementation".  Before that patch, we assumed that we recieved a valid
pointer for uaddr, and based on that, I have removed this check.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/isdn: Use memdup_user
Julia Lawall [Fri, 21 May 2010 22:26:42 +0000 (22:26 +0000)]
drivers/isdn: Use memdup_user

Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wan: Use memdup_user
Julia Lawall [Fri, 21 May 2010 22:26:04 +0000 (22:26 +0000)]
drivers/net/wan: Use memdup_user

Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/dccp: Use memdup_user
Julia Lawall [Fri, 21 May 2010 22:25:19 +0000 (22:25 +0000)]
net/dccp: Use memdup_user

Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/wan: Use memdup_user
Julia Lawall [Fri, 21 May 2010 22:20:26 +0000 (22:20 +0000)]
drivers/net/wan: Use memdup_user

Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net/cxgb3: Use memdup_user
Julia Lawall [Fri, 21 May 2010 22:20:10 +0000 (22:20 +0000)]
drivers/net/cxgb3: Use memdup_user

Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: Use memdup_user
Julia Lawall [Fri, 21 May 2010 22:18:59 +0000 (22:18 +0000)]
drivers/net: Use memdup_user

Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet/can: Use memdup_user
Julia Lawall [Fri, 21 May 2010 22:18:34 +0000 (22:18 +0000)]
net/can: Use memdup_user

Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: tcp_md5_hash_skb_data() frag_list handling
Eric Dumazet [Mon, 17 May 2010 20:40:51 +0000 (20:40 +0000)]
tcp: tcp_md5_hash_skb_data() frag_list handling

tcp_md5_hash_skb_data() should handle skb->frag_list, and eventually
recurse.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: remove zap_completion_queue
Eric Dumazet [Wed, 19 May 2010 23:16:03 +0000 (23:16 +0000)]
net: remove zap_completion_queue

netpoll does an interesting work in zap_completion_queue(), but this was
before we did skb orphaning before delivering packets to device.

It now makes sense to add a test in dev_kfree_skb_irq() to not queue a
skb if already orphaned, and to remove netpoll zap_completion_queue() as
a bonus.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Use __this_cpu_inc() in fast path
Eric Dumazet [Wed, 19 May 2010 22:07:23 +0000 (22:07 +0000)]
net: Use __this_cpu_inc() in fast path

This patch saves 224 bytes of text on my machine.

__this_cpu_inc() generates a single instruction, using no scratch
registers :

  65 ff 04 25 a8 30 01 00      incl   %gs:0x130a8

instead of :

  48 c7 c2 80 30 01 00         mov    $0x13080,%rdx
  65 48 8b 04 25 88 ea 00 00   mov    %gs:0xea88,%rax
  83 44 10 28 01               addl   $0x1,0x28(%rax,%rdx,1)

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocleanup: remove MIN_FRAG_SIZE definition.
Rami Rosen [Tue, 25 May 2010 10:00:46 +0000 (10:00 +0000)]
cleanup: remove MIN_FRAG_SIZE definition.

 - This patch removes MIN_FRAG_SIZE definition in
drivers/net/ppp_generic.c as it is unneeded.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Mon, 31 May 2010 07:10:35 +0000 (00:10 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

14 years agoLinux 2.6.35-rc1
Linus Torvalds [Sun, 30 May 2010 20:21:02 +0000 (13:21 -0700)]
Linux 2.6.35-rc1

.. and thus endeth the merge window.

14 years agoMerge branch 'slub/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Sun, 30 May 2010 19:46:17 +0000 (12:46 -0700)]
Merge branch 'slub/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6

* 'slub/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  SLUB: Allow full duplication of kmalloc array for 390
  slub: move kmem_cache_node into it's own cacheline

14 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 30 May 2010 19:35:15 +0000 (12:35 -0700)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/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:
  mutex: Fix optimistic spinning vs. BKL

14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 30 May 2010 19:35:01 +0000 (12:35 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf tui: Fix last use_browser problem related to .perfconfig
  perf symbols: Add the build id cache to the vmlinux path
  perf tui: Reset use_browser if stdout is not a tty
  ring-buffer: Move zeroing out excess in page to ring buffer code
  ring-buffer: Reset "real_end" when page is filled

14 years agoia64: revert __node_random addition
Linus Torvalds [Sun, 30 May 2010 17:08:03 +0000 (10:08 -0700)]
ia64: revert __node_random addition

This partially reverts commit 4ec37de89d8c758ee8115e0e64b3f994910789ee
("[IA64] Fix build breakage"), since the commit that made it necessary
got reverted earlier (see commit 35926ff5fba8, 'Revert "cpusets:
randomize node rotor used in cpuset_mem_spread_node()"')

Even if we ever re-introduce this, there is no reason to make
__node_random be some architecture-specific function.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
Linus Torvalds [Sun, 30 May 2010 16:16:14 +0000 (09:16 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  mm: export generic_pipe_buf_*() to modules
  fuse: support splice() reading from fuse device
  fuse: allow splice to move pages
  mm: export remove_from_page_cache() to modules
  mm: export lru_cache_add_*() to modules
  fuse: support splice() writing to fuse device
  fuse: get page reference for readpages
  fuse: use get_user_pages_fast()
  fuse: remove unneeded variable

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
Linus Torvalds [Sun, 30 May 2010 16:13:43 +0000 (09:13 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-kconfig:
  kconfig: Hide error output in find command in streamline_config.pl
  kconfig: Fix typo in comment in streamline_config.pl
  kconfig: Make a variable local in streamline_config.pl

14 years agoMerge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Linus Torvalds [Sun, 30 May 2010 16:13:08 +0000 (09:13 -0700)]
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (47 commits)
  mfd: Rename twl5031 sih modules
  mfd: Storage class for timberdale should be before const qualifier
  mfd: Remove unneeded and dangerous clearing of clientdata
  mfd: New AB8500 driver
  gpio: Fix inverted rdc321x gpio data out registers
  mfd: Change rdc321x resources flags to IORESOURCE_IO
  mfd: Move pcf50633 irq related functions to its own file.
  mfd: Use threaded irq for pcf50633
  mfd: pcf50633-adc: Fix potential race in pcf50633_adc_sync_read
  mfd: Fix pcf50633 bitfield logic in interrupt handler
  gpio: rdc321x needs to select MFD_CORE
  mfd: Use menuconfig for quicker config editing
  ARM: AB3550 board configuration and irq for U300
  mfd: AB3550 core driver
  mfd: AB3100 register access change to abx500 API
  mfd: Renamed ab3100.h to abx500.h
  gpio: Add TC35892 GPIO driver
  mfd: Add Toshiba's TC35892 MFD core
  mfd: Delay to mask tsc irq in max8925
  mfd: Remove incorrect wm8350 kfree
  ...

14 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Sun, 30 May 2010 16:12:43 +0000 (09:12 -0700)]
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx:
  DMAENGINE: DMA40 U8500 platform configuration
  DMA: PL330: Add dma api driver

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Sun, 30 May 2010 16:12:16 +0000 (09:12 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/qib: Remove DCA support until feature is finished
  IB/qib: Use a single txselect module parameter for serdes tuning
  IB/qib: Don't rely on (undefined) order of function parameter evaluation
  IB/ucm: Use memdup_user()
  IB/qib: Fix undefined symbol error when CONFIG_PCI_MSI=n

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Sun, 30 May 2010 16:11:11 +0000 (09:11 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
  quota: Convert quota statistics to generic percpu_counter
  ext3 uses rb_node = NULL; to zero rb_root.
  quota: Fixup dquot_transfer
  reiserfs: Fix resuming of quotas on remount read-write
  pohmelfs: Remove dead quota code
  ufs: Remove dead quota code
  udf: Remove dead quota code
  quota: rename default quotactl methods to dquot_
  quota: explicitly set ->dq_op and ->s_qcop
  quota: drop remount argument to ->quota_on and ->quota_off
  quota: move unmount handling into the filesystem
  quota: kill the vfs_dq_off and vfs_dq_quota_on_remount wrappers
  quota: move remount handling into the filesystem
  ocfs2: Fix use after free on remount read-only

Fix up conflicts in fs/ext4/super.c and fs/ufs/file.c

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 30 May 2010 16:06:13 +0000 (09:06 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/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:
  x86, cpufeature: Unbreak compile with gcc 3.x
  x86, pat: Fix memory leak in free_memtype
  x86, k8: Fix section mismatch for powernowk8_exit()
  lib/atomic64_test: fix missing include of linux/kernel.h
  x86: remove last traces of quicklist usage
  x86, setup: Phoenix BIOS fixup is needed on Dell Inspiron Mini 1012
  x86: "nosmp" command line option should force the system into UP mode
  arch/x86/pci: use kasprintf
  x86, apic: ack all pending irqs when crashed/on kexec

14 years agoCPU: Avoid using unititialized error variable in disable_nonboot_cpus()
Rafael J. Wysocki [Thu, 27 May 2010 20:16:22 +0000 (22:16 +0200)]
CPU: Avoid using unititialized error variable in disable_nonboot_cpus()

If there's only one CPU online when disable_nonboot_cpus() is called,
the error variable will not be initialized and that may lead to
erroneous behavior.  Fix this issue by initializing error in
disable_nonboot_cpus() as appropriate.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agorapidio: fix new kernel-doc warnings
Randy Dunlap [Fri, 28 May 2010 22:08:08 +0000 (15:08 -0700)]
rapidio: fix new kernel-doc warnings

Fix a bunch of new rapidio kernel-doc warnings:

Warning(include/linux/rio.h:123): No description found for parameter 'comp_tag'
Warning(include/linux/rio.h:123): No description found for parameter 'phys_efptr'
Warning(include/linux/rio.h:123): No description found for parameter 'em_efptr'
Warning(include/linux/rio.h:123): No description found for parameter 'pwcback'
Warning(include/linux/rio.h:247): No description found for parameter 'set_domain'
Warning(include/linux/rio.h:247): No description found for parameter 'get_domain'
Warning(drivers/rapidio/rio-scan.c:1133): No description found for parameter 'rdev'
Warning(drivers/rapidio/rio-scan.c:1133): Excess function parameter 'port' description in 'rio_init_em'
Warning(drivers/rapidio/rio.c:349): No description found for parameter 'rdev'
Warning(drivers/rapidio/rio.c:349): Excess function parameter 'mport' description in 'rio_request_inb_pwrite'
Warning(drivers/rapidio/rio.c:393): No description found for parameter 'port'
Warning(drivers/rapidio/rio.c:393): No description found for parameter 'local'
Warning(drivers/rapidio/rio.c:393): No description found for parameter 'destid'
Warning(drivers/rapidio/rio.c:393): No description found for parameter 'hopcount'
Warning(drivers/rapidio/rio.c:393): Excess function parameter 'rdev' description in 'rio_mport_get_physefb'
Warning(drivers/rapidio/rio.c:845): Excess function parameter 'local' description in 'rio_std_route_clr_table'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
Linus Torvalds [Sun, 30 May 2010 16:02:02 +0000 (09:02 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  parisc: Call pagefault_disable/pagefault_enable in kmap_atomic/kunmap_atomic
  parisc: Remove unnecessary macros from entry.S
  parisc: LWS fixes for syscall.S
  parisc: Delete unnecessary nop's in entry.S
  parisc: Avoid interruption in critical region in entry.S
  parisc: invoke oom-killer from page fault
  parisc: clear floating point exception flag on SIGFPE signal
  parisc: Use of align_frame provides stack frame.

14 years agoRevert "cpusets: randomize node rotor used in cpuset_mem_spread_node()"
Linus Torvalds [Sun, 30 May 2010 16:00:03 +0000 (09:00 -0700)]
Revert "cpusets: randomize node rotor used in cpuset_mem_spread_node()"

This reverts commit 0ac0c0d0f837c499afd02a802f9cf52d3027fa3b, which
caused cross-architecture build problems for all the wrong reasons.
IA64 already added its own version of __node_random(), but the fact is,
there is nothing architectural about the function, and the original
commit was just badly done. Revert it, since no fix is forthcoming.

Requested-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Sun, 30 May 2010 15:56:39 +0000 (08:56 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: clean up on forwarded aborted mds request
  ceph: fix leak of osd authorizer
  ceph: close out mds, osd connections before stopping auth
  ceph: make lease code DN specific
  fs/ceph: Use ERR_CAST
  ceph: renew auth tickets before they expire
  ceph: do not resend mon requests on auth ticket renewal
  ceph: removed duplicated #includes
  ceph: avoid possible null dereference
  ceph: make mds requests killable, not interruptible
  sched: add wait_for_completion_killable_timeout

14 years agoSLUB: Allow full duplication of kmalloc array for 390
Christoph Lameter [Thu, 27 May 2010 14:17:17 +0000 (09:17 -0500)]
SLUB: Allow full duplication of kmalloc array for 390

Commit 756dee75872a2a764b478e18076360b8a4ec9045 ("SLUB: Get rid of dynamic DMA
kmalloc cache allocation") makes S390 run out of kmalloc caches.  Increase the
number of kmalloc caches to a safe size.

Cc: <stable@kernel.org> [ .33 and .34 ]
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Tested-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
14 years agoparisc: Call pagefault_disable/pagefault_enable in kmap_atomic/kunmap_atomic
John David Anglin [Sun, 11 Apr 2010 16:36:14 +0000 (16:36 +0000)]
parisc: Call pagefault_disable/pagefault_enable in kmap_atomic/kunmap_atomic

Based on the generic implementation of kmap_atomic and kunmap_atomic,
we should call pagefault_disable and pagefault_enable in our PA8000
implementation.

The define for kmap_atomic_prot was also missing, and I updated
kmap_atomic_pfn to use the generic implementation because of the
change to kmap_atomic.

I believe that this change is needed to fix the fork copy-on-write
bug.

Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
14 years agoparisc: Remove unnecessary macros from entry.S
John David Anglin [Sun, 11 Apr 2010 17:03:54 +0000 (17:03 +0000)]
parisc: Remove unnecessary macros from entry.S

The EXTR, DEP and DEPI macros are unnecessary.  There are PA 1.X
pneumonics available with the same functionality, and the DEP and DEPI
macros conflict with assembler pneumonics.

Tested on a variety of 32 and 64-bit systems.

Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
14 years agoparisc: LWS fixes for syscall.S
John David Anglin [Sun, 11 Apr 2010 17:26:34 +0000 (17:26 +0000)]
parisc: LWS fixes for syscall.S

1) Gate immediately and save a branch.
2) Fix off by one error in checking entry number.
3) Use sr7 instead of sr3 in error return path as sr3 might not
   contain correct value.
4) Enable locking on UP systems to prevent incorrect operation of
   the cas_action critical region on page faults.

Tested on several systems, including UP c3750 with 2.6.33.2 kernel.

Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
14 years agoparisc: Delete unnecessary nop's in entry.S
John David Anglin [Sun, 11 Apr 2010 17:08:51 +0000 (17:08 +0000)]
parisc: Delete unnecessary nop's in entry.S

Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
14 years agoparisc: Avoid interruption in critical region in entry.S
John David Anglin [Sun, 11 Apr 2010 17:12:56 +0000 (17:12 +0000)]
parisc: Avoid interruption in critical region in entry.S

Signed-off-by: John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
14 years agoparisc: invoke oom-killer from page fault
Nick Piggin [Thu, 22 Apr 2010 16:06:23 +0000 (16:06 +0000)]
parisc: invoke oom-killer from page fault

As explained in commit 1c0fe6e3bd, we want to call the architecture independent
oom killer when getting an unexplained OOM from handle_mm_fault, rather than
simply killing current.

Cc: linux-parisc@vger.kernel.org
Cc: linux-arch@vger.kernel.org
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
14 years agoparisc: clear floating point exception flag on SIGFPE signal
Helge Deller [Mon, 3 May 2010 20:44:21 +0000 (20:44 +0000)]
parisc: clear floating point exception flag on SIGFPE signal

Clear the floating point exception flag before returning to
user space. This is needed, else the libc trampoline handler
may hit the same SIGFPE again while building up a trampoline
to a signal handler.

Fixes debian bug #559406.

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
14 years agoparisc: Use of align_frame provides stack frame.
Carlos O'Donell [Wed, 31 Mar 2010 20:42:33 +0000 (20:42 +0000)]
parisc: Use of align_frame provides stack frame.

Any assembly constant generated with the use of
align_frame includes size for a full stack frame.

Signed-off-by: Carlos O'Donell <carlos@systemhalted.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sat, 29 May 2010 22:31:57 +0000 (15:31 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (26 commits)
  ALSA: snd-usb-caiaq: Bump version number to 1.3.21
  ALSA: Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ"
  ALSA: snd-usb-caiaq: Simplify single case to an 'if'
  ALSA: snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ
  ALSA: hda: Use LPIB for a Shuttle device
  ALSA: hda: Add support for another Lenovo ThinkPad Edge in conexant codec
  ALSA: hda: Use LPIB for Sony VPCS11V9E
  ALSA: usb-audio: fix feature unit parser for UAC2
  ALSA: asihpi - Minor code cleanup
  ALSA: asihpi - Add support for new ASI8800 family
  ALSA: asihpi - Fix bug preventing outstream_write preload from happening
  ALSA: asihpi - Fix imbalanced lock path in hw_message
  ALSA: asihpi - Remove support for old ASI8800 family
  ALSA: asihpi - Add hd radio blend functions
  ALSA: asihpi - Remove unused io map functions
  ALSA: usb-audio: add support for UAC2 pitch control
  ALSA: usb-audio: parse UAC2 endpoint descriptors correctly
  ALSA: usb-audio: fix return values
  ALSA: usb-audio: parse more format descriptors with structs
  sound: Add missing spin_unlock
  ...

14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Sat, 29 May 2010 19:50:36 +0000 (21:50 +0200)]
Merge branch 'fix/hda' into for-linus

14 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Sat, 29 May 2010 19:50:33 +0000 (21:50 +0200)]
Merge branch 'fix/misc' into for-linus

14 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Sat, 29 May 2010 19:50:27 +0000 (21:50 +0200)]
Merge branch 'fix/asoc' into for-linus

14 years agoALSA: snd-usb-caiaq: Bump version number to 1.3.21
Mark Hills [Sat, 29 May 2010 15:53:26 +0000 (16:53 +0100)]
ALSA: snd-usb-caiaq: Bump version number to 1.3.21

Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ"
Mark Hills [Sat, 29 May 2010 15:53:25 +0000 (16:53 +0100)]
ALSA: Revert "ALSA: snd-usb-caiaq: Set default input mode of A4DJ"

Do not explicity set the default input mode. Use the hardware default
of mode 0 ('Control vinyl'), which is now available.

This reverts commit e3ca4c9.

Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: snd-usb-caiaq: Simplify single case to an 'if'
Mark Hills [Sat, 29 May 2010 15:53:24 +0000 (16:53 +0100)]
ALSA: snd-usb-caiaq: Simplify single case to an 'if'

After removing code, only one case remains. So use an 'if' instead.

Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ
Mark Hills [Sat, 29 May 2010 15:53:23 +0000 (16:53 +0100)]
ALSA: snd-usb-caiaq: Restore 'Control vinyl' input mode on A4DJ

This feature was undocumented on early A4DJ units. It is indicated
by lighting both the 'line' and 'phono' lamps at the same time.
Newer units document this and the newer Windows drivers enable this
for all units, so restore the functionality.

This patch simplifies the code and changes the mode mapping to match
the A8DJ, favouring simpler code and consistency over keeping the
existing mapping.

Both 'Control vinyl' and 'Phono' input modes enable the hardware
preamp. The difference is the input impedance.

This reverts commit 9a9527e.

Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda: Use LPIB for a Shuttle device
Daniel T Chen [Sat, 29 May 2010 15:04:11 +0000 (11:04 -0400)]
ALSA: hda: Use LPIB for a Shuttle device

BugLink: https://launchpad.net/bugs/551949
Symptom: On the reporter's Shuttle device, using PulseAudio in Ubuntu
10.04 LTS results in "popping clicking" audio with the PA crashing
shortly thereafter.

Test case: Using Ubuntu 10.04 LTS (Linux 2.6.32.12), Linux 2.6.33, or
Linux 2.6.34, adjust the HDA device's volume with PulseAudio.

Resolution: add SSID for this machine to the position_fix quirk table,
explicitly specifying the LPIB method.

Reported-and-Tested-By: Christian Mehlis <mehlis@inf.fu-berlin.de>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoceph: clean up on forwarded aborted mds request
Sage Weil [Fri, 28 May 2010 23:43:16 +0000 (16:43 -0700)]
ceph: clean up on forwarded aborted mds request

If an mds request is aborted (timeout, SIGKILL), it is left registered to
keep our state in sync with the mds.  If we get a forward notification,
though, we know the request didn't succeed and we can unregister it
safely.  We were trying to resend it, but then bailing out (and not
unregistering) in __do_request.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: fix leak of osd authorizer
Sage Weil [Thu, 27 May 2010 21:15:49 +0000 (14:15 -0700)]
ceph: fix leak of osd authorizer

Release the ceph_authorizer when releasing osd state.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: close out mds, osd connections before stopping auth
Sage Weil [Sat, 29 May 2010 16:41:23 +0000 (09:41 -0700)]
ceph: close out mds, osd connections before stopping auth

The auth module (part of the mon_client) is needed to free any
ceph_authorizer(s) used by the mds and osd connections.  Flush the msgr
workqueue before stopping monc to ensure that the destroy_authorizer
auth op is available when those connections are closed out.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agoceph: make lease code DN specific
Sage Weil [Tue, 25 May 2010 23:45:25 +0000 (16:45 -0700)]
ceph: make lease code DN specific

The lease code includes a mask in the CEPH_LOCK_* namespace, but that
namespace is changing, and only one mask (formerly _DN == 1) is used, so
hard code for that value for now.

If we ever extend this code to handle leases over different data types we
can extend it accordingly.

Signed-off-by: Sage Weil <sage@newdream.net>
14 years agofs/ceph: Use ERR_CAST
Julia Lawall [Sat, 22 May 2010 10:01:14 +0000 (12:01 +0200)]
fs/ceph: Use ERR_CAST

Use ERR_CAST(x) rather than ERR_PTR(PTR_ERR(x)).  The former makes more
clear what is the purpose of the operation, which otherwise looks like a
no-op.

In the case of fs/ceph/inode.c, ERR_CAST is not needed, because the type of
the returned value is the same as the type of the enclosing function.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
T x;
identifier f;
@@

T f (...) { <+...
- ERR_PTR(PTR_ERR(x))
+ x
 ...+> }

@@
expression x;
@@

- ERR_PTR(PTR_ERR(x))
+ ERR_CAST(x)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Sage Weil <sage@newdream.net>