cascardo/linux.git
14 years agoMerge branch 'master' of git://git.infradead.org/users/dwmw2/solos-2.6
David S. Miller [Tue, 22 Sep 2009 22:18:59 +0000 (15:18 -0700)]
Merge branch 'master' of git://git.infradead.org/users/dwmw2/solos-2.6

14 years agofec: Add FEC support for MX25 processor
Fabio Estevam [Mon, 21 Sep 2009 14:41:21 +0000 (14:41 +0000)]
fec: Add FEC support for MX25 processor

Add FEC support for MX25 processor.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocnic: Shutdown iSCSI ring during uio_close.
Michael Chan [Mon, 21 Sep 2009 15:39:37 +0000 (15:39 +0000)]
cnic: Shutdown iSCSI ring during uio_close.

The iSCSI ring should be shutdown during uio_close instead of uio_open
for proper operations.  This fixes the problem of the ring getting
stuck intermittently.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoat91_can: add driver for Atmel's CAN controller on AT91SAM9263
Marc Kleine-Budde [Tue, 22 Sep 2009 21:46:57 +0000 (14:46 -0700)]
at91_can: add driver for Atmel's CAN controller on AT91SAM9263

This patch add the driver for the SoC CAN controller in Atmel's
AT91SAM9263.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoat91sam9263ek: activate at91 CAN controller
Marc Kleine-Budde [Wed, 16 Sep 2009 23:37:33 +0000 (23:37 +0000)]
at91sam9263ek: activate at91 CAN controller

This patch activates the at91 CAN controller for the at91sam9263ek
development board.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Andrew Victor <linux@maxim.org.za>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoat91sam9263: add at91_can device to generic device definition
Marc Kleine-Budde [Wed, 16 Sep 2009 23:37:32 +0000 (23:37 +0000)]
at91sam9263: add at91_can device to generic device definition

This patch adds the device definition for the at91_can device to
the generic device definiton file for the at91sam9263.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc95xx: fix transmission where ZLP is expected
Steve Glendinning [Tue, 22 Sep 2009 04:00:27 +0000 (04:00 +0000)]
smsc95xx: fix transmission where ZLP is expected

Usbnet framework assumes USB hardware doesn't handle zero length
packets, but SMSC LAN95xx requires these to be sent for correct
operation.

This patch fixes an easily reproducible tx lockup when sending a frame
that results in exactly 512 bytes in a USB transmission (e.g. a UDP
frame with 458 data bytes, due to IP headers and our USB headers).  It
adds an extra flag to usbnet for the hardware driver to indicate that
it can handle and requires the zero length packets.

This patch should not affect other usbnet users, please also consider
for -stable.

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotun: Return -EINVAL if neither IFF_TUN nor IFF_TAP is set.
Kusanagi Kouichi [Wed, 16 Sep 2009 21:36:13 +0000 (21:36 +0000)]
tun: Return -EINVAL if neither IFF_TUN nor IFF_TAP is set.

After commit 2b980dbd77d229eb60588802162c9659726b11f4
("lsm: Add hooks to the TUN driver") tun_set_iff doesn't
return -EINVAL though neither IFF_TUN nor IFF_TAP is set.

Signed-off-by: Kusanagi Kouichi <slash@ma.neweb.ne.jp>
Reviewed-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago8139cp: fix duplicate loglevel in module load message
Alan Jenkins [Tue, 22 Sep 2009 04:05:39 +0000 (04:05 +0000)]
8139cp: fix duplicate loglevel in module load message

This was introduced by b93d58 "8139*: convert printk() to pr_<foo>()":

2256252443 ] <6>8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)

The "version" string is printed using pr_info(), so it doesn't need to
include a loglevel.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
CC: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoax25: Fix SIOCAX25GETINFO ioctl
Eric Dumazet [Sun, 20 Sep 2009 06:32:55 +0000 (06:32 +0000)]
ax25: Fix SIOCAX25GETINFO ioctl

rcv_q & snd_q initializations were reversed in commit
31e6d363abcd0d05766c82f1a9c905a4c974a199
(net: correct off-by-one write allocations reports)

Signed-off-by: Jan Rafaj <jr+netfilter-devel@cedric.unob.cz>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatm: dereference of he_dev->rbps_virt in he_init_group()
roel kluin [Sun, 20 Sep 2009 07:11:28 +0000 (07:11 +0000)]
atm: dereference of he_dev->rbps_virt in he_init_group()

he_dev->rbps_virt or he_dev->rbpl_virt allocation may fail, s
them. Make sure that he_init_group() cleans up after errors.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: Set SKY2_HW_RAM_BUFFER in sky2_init
Mike McCormack [Mon, 21 Sep 2009 04:08:52 +0000 (04:08 +0000)]
sky2: Set SKY2_HW_RAM_BUFFER in sky2_init

The SKY2_HW_RAM_BUFFER bit in hw->flags was checked in sky2_mac_init(),
 before being set later in sky2_up().

Setting SKY2_HW_RAM_BUFFER in sky2_init() where other hw->flags are set
 should avoid this problem recurring.

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatl1c:remove compiling warning
jie.yang@atheros.com [Sun, 20 Sep 2009 19:01:58 +0000 (19:01 +0000)]
atl1c:remove compiling warning

Set wol_ctrl_data to value 0, to remove compiling warning.

Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: remove duplicate structure field initialization
Julia Lawall [Sat, 19 Sep 2009 09:48:41 +0000 (09:48 +0000)]
drivers/net: remove duplicate structure field initialization

The definitions of vnet_ops and ehea_netdev_ops have initializations of a
local function and eth_change_mtu for their respective ndo_change_mtu
fields.  This change uses only the local function.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@s@
identifier I, s, r.fld;
position r.p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@script:python@
p0 << r.p0;
fld << r.fld;
ps << s.p;
pr << r.p;
@@

if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column):
  cocci.print_main(fld,p0)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agokaweth: Fix memory leak in kaweth_control()
Kevin Cernekee [Sat, 19 Sep 2009 11:18:21 +0000 (11:18 +0000)]
kaweth: Fix memory leak in kaweth_control()

kaweth_control() never frees the buffer that it allocates for the USB
control message.  Test case:

while :; do ifconfig eth2 down ; ifconfig eth2 up ; done

This is a tiny buffer so it is a slow leak.  If you want to speed up the
process, you can change the allocation size to e.g. 16384 bytes, and it
will consume several megabytes within a few minutes.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc95xx: add additional USB product IDs
Steve Glendinning [Tue, 22 Sep 2009 05:13:02 +0000 (05:13 +0000)]
smsc95xx: add additional USB product IDs

Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agolib/vsprintf.c: Avoid possible unaligned accesses in %pI6c
Joe Perches [Fri, 18 Sep 2009 13:04:06 +0000 (13:04 +0000)]
lib/vsprintf.c: Avoid possible unaligned accesses in %pI6c

Jens Rosenboom noticed that a possibly unaligned const char*
is cast to a const struct in6_addr *.

Avoid this at the cost of a struct in6_addr copy on the stack.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: xilinx_emaclite: Fix problem with first incoming packet
Michal Simek [Tue, 22 Sep 2009 05:24:14 +0000 (05:24 +0000)]
net: xilinx_emaclite: Fix problem with first incoming packet

You can't ping the board or connect to it unless you send
any packet out from board.

Tested-by: John Williams <john.williams@petalogix.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: John Linn <john.linn@xilinx.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix firmware init after resume
Dhananjay Phadke [Sun, 20 Sep 2009 19:20:39 +0000 (19:20 +0000)]
netxen: fix firmware init after resume

After successful firmware init, return instead of
falling to error path (leading to detach) after
resuming to D0 state. This was broken in recent
firmware reset rehaul.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: fix minor tx timeout bug
Dhananjay Phadke [Sun, 20 Sep 2009 19:20:38 +0000 (19:20 +0000)]
netxen: fix minor tx timeout bug

Fix minor bug in netdev tx timeout handling which could
always lead to firmware reset instead of pci function reset.

netxen_nic_reset_context() requires __NX_RESETTING bit
cleared.

Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopcmcia: pcnet_cs.c removing useless condition
Jaswinder Singh Rajput [Sat, 12 Sep 2009 09:08:49 +0000 (09:08 +0000)]
pcmcia: pcnet_cs.c removing useless condition

'if (i < NR_INFO)' will only true if we breaks from 'for (i = 0; i < NR_INFO; i++)'
So removing useless 'if (i < NR_INFO)'

This also fixed following compilation warning :

  CC [M]  drivers/net/pcmcia/pcnet_cs.o
drivers/net/pcmcia/pcnet_cs.c: In function ‘get_hwinfo’:
drivers/net/pcmcia/pcnet_cs.c:321: warning: ‘base’ may be used uninitialized in this function

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: resolve namespacecheck warning for igb_hash_mc_addr
Alexander Duyck [Thu, 17 Sep 2009 14:52:29 +0000 (14:52 +0000)]
igb: resolve namespacecheck warning for igb_hash_mc_addr

This patch resolves a warning seen when doing namespace checking via
"make namespacecheck"

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: move rx queue RSC configuration to a separate function
Nelson, Shannon [Fri, 18 Sep 2009 09:46:27 +0000 (09:46 +0000)]
ixgbe: move rx queue RSC configuration to a separate function

Shorten ixgbe_configure_rx() and lessen indent depth.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Allow tx itr specific settings
Nelson, Shannon [Fri, 18 Sep 2009 09:46:06 +0000 (09:46 +0000)]
ixgbe: Allow tx itr specific settings

Allow the user to set Tx specific itr values.  This only makes sense
when there are separate vectors for Tx and Rx.  When the queues are
doubled up RxTx on the vectors, we still only use the rx itr value.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: fix sfp_timer clean up in ixgbe_down
Don Skidmore [Fri, 18 Sep 2009 09:45:43 +0000 (09:45 +0000)]
ixgbe: fix sfp_timer clean up in ixgbe_down

We weren't stoping the sfp_timer after the device was brought down.
This patch properly cleans up.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix CONFIG_NET=n build on sparc64
Andrew Morton [Fri, 18 Sep 2009 09:52:13 +0000 (09:52 +0000)]
net: fix CONFIG_NET=n build on sparc64

sparc64 allnoconfig:

arch/sparc/kernel/built-in.o(.text+0x134e0): In function `sys32_recvfrom':
: undefined reference to `compat_sys_recvfrom'
arch/sparc/kernel/built-in.o(.text+0x134e4): In function `sys32_recvfrom':
: undefined reference to `compat_sys_recvfrom'

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface
Sebastian Haas [Wed, 16 Sep 2009 02:04:20 +0000 (02:04 +0000)]
ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface

This patch adds support for one channel CAN/USB interace CPC-USB/ARM7 from
EMS Dr. Thomas Wuensche (http://www.ems-wuensche.com).

Signed-off-by: Sebastian Haas <haas@ems-wuensche.com>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocpc-usb: Removed driver from staging tree
Sebastian Haas [Wed, 16 Sep 2009 02:04:15 +0000 (02:04 +0000)]
cpc-usb: Removed driver from staging tree

This patch prepares replacing the staging driver cpc-usb with the new
developed ems_usb CAN driver.

Signed-off-by: Sebastian Haas <haas@ems-wuensche.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocpmac: fix compilation errors against undeclared BUS_ID_SIZE
Florian Fainelli [Tue, 15 Sep 2009 21:44:22 +0000 (21:44 +0000)]
cpmac: fix compilation errors against undeclared BUS_ID_SIZE

With the removal of BUS_ID_SIZE, cpmac was not fully
converted to use MII_BUS_ID_SIZE as it ought to. This
patch fixes the following cpmac build failure:
 CC      drivers/net/cpmac.o
drivers/net/cpmac.c: In function 'cpmac_start_xmit':
drivers/net/cpmac.c:563: warning: comparison of distinct pointer types lacks a cast
drivers/net/cpmac.c: In function 'cpmac_probe':
drivers/net/cpmac.c:1112: error: 'BUS_ID_SIZE' undeclared (first use in this function)
drivers/net/cpmac.c:1112: error: (Each undeclared identifier is reported only once
drivers/net/cpmac.c:1112: error: for each function it appears in.)

Reported-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: fix some cmds to use mccq instead of mbox
Sathya Perla [Thu, 17 Sep 2009 17:30:13 +0000 (10:30 -0700)]
be2net: fix some cmds to use mccq instead of mbox

All cmds issued to BE after the creation of mccq must now use the mcc-q
(and not mbox) to avoid a hw issue that results in mbox poll timeout.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoatl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA
Jie Yang [Thu, 17 Sep 2009 17:27:28 +0000 (10:27 -0700)]
atl1e: fix 2.6.31-git4 -- ATL1E 0000:03:00.0: DMA-API: device driver frees DMA

use the wrong API when free dma. So when map dma use a flag to
demostrate whether it is 'pci_map_single' or 'pci_map_page'. When free
the dma, check the flags to select the right APIs('pci_unmap_single'
or 'pci_unmap_page').

set the flags type to u16  instead of unsigned long  on David's comments.

Signed-off-by: Jie Yang <jie.yang@atheros.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopkt_sched: Fix qstats.qlen updating in dump_stats
Jarek Poplawski [Thu, 17 Sep 2009 17:26:07 +0000 (10:26 -0700)]
pkt_sched: Fix qstats.qlen updating in dump_stats

Some classful qdiscs miss qstats.qlen updating with q.qlen of their
child qdiscs in dump_stats methods.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Log the affected address when DAD failure occurs
Jens Rosenboom [Thu, 17 Sep 2009 17:24:24 +0000 (10:24 -0700)]
ipv6: Log the affected address when DAD failure occurs

If an interface has multiple addresses, the current message for DAD
failure isn't really helpful, so this patch adds the address itself to
the printk.

Signed-off-by: Jens Rosenboom <me@jayr.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agowl12xx: Fix print_mac() conversion.
David S. Miller [Thu, 17 Sep 2009 17:18:30 +0000 (10:18 -0700)]
wl12xx: Fix print_mac() conversion.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_iucv: fix race when queueing skbs on the backlog queue
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:28 +0000 (04:37 +0000)]
af_iucv: fix race when queueing skbs on the backlog queue

iucv_sock_recvmsg() and iucv_process_message()/iucv_fragment_skb race
for dequeuing an skb from the backlog queue.

If iucv_sock_recvmsg() dequeues first, iucv_process_message() calls
sock_queue_rcv_skb() with an skb that is NULL.

This results in the following kernel panic:

<1>Unable to handle kernel pointer dereference at virtual kernel address (null)
<4>Oops: 0004 [#1] PREEMPT SMP DEBUG_PAGEALLOC
<4>Modules linked in: af_iucv sunrpc qeth_l3 dm_multipath dm_mod vmur qeth ccwgroup
<4>CPU: 0 Not tainted 2.6.30 #4
<4>Process client-iucv (pid: 4787, task: 0000000034e75940, ksp: 00000000353e3710)
<4>Krnl PSW : 0704000180000000 000000000043ebca (sock_queue_rcv_skb+0x7a/0x138)
<4>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0 EA:3
<4>Krnl GPRS: 0052900000000000 000003e0016e0fe8 0000000000000000 0000000000000000
<4>           000000000043eba8 0000000000000002 0000000000000001 00000000341aa7f0
<4>           0000000000000000 0000000000007800 0000000000000000 0000000000000000
<4>           00000000341aa7f0 0000000000594650 000000000043eba8 000000003fc2fb28
<4>Krnl Code: 000000000043ebbea7840006            brc     8,43ebca
<4>           000000000043ebc25930c23c            c       %r3,572(%r12)
<4>           000000000043ebc6a724004c            brc     2,43ec5e
<4>          >000000000043ebcae3c0b0100024        stg     %r12,16(%r11)
<4>           000000000043ebd0a7190000            lghi    %r1,0
<4>           000000000043ebd4e310b0200024        stg     %r1,32(%r11)
<4>           000000000043ebdac010ffffdce9        larl    %r1,43a5ac
<4>           000000000043ebe0e310b0800024        stg     %r1,128(%r11)
<4>Call Trace:
<4>([<000000000043eba8>] sock_queue_rcv_skb+0x58/0x138)
<4> [<000003e0016bcf2a>] iucv_process_message+0x112/0x3cc [af_iucv]
<4> [<000003e0016bd3d4>] iucv_callback_rx+0x1f0/0x274 [af_iucv]
<4> [<000000000053a21a>] iucv_message_pending+0xa2/0x120
<4> [<000000000053b5a6>] iucv_tasklet_fn+0x176/0x1b8
<4> [<000000000014fa82>] tasklet_action+0xfe/0x1f4
<4> [<0000000000150a56>] __do_softirq+0x116/0x284
<4> [<0000000000111058>] do_softirq+0xe4/0xe8
<4> [<00000000001504ba>] irq_exit+0xba/0xd8
<4> [<000000000010e0b2>] do_extint+0x146/0x190
<4> [<00000000001184b6>] ext_no_vtime+0x1e/0x22
<4> [<00000000001fbf4e>] kfree+0x202/0x28c
<4>([<00000000001fbf44>] kfree+0x1f8/0x28c)
<4> [<000000000044205a>] __kfree_skb+0x32/0x124
<4> [<000003e0016bd8b2>] iucv_sock_recvmsg+0x236/0x41c [af_iucv]
<4> [<0000000000437042>] sock_aio_read+0x136/0x160
<4> [<0000000000205e50>] do_sync_read+0xe4/0x13c
<4> [<0000000000206dce>] vfs_read+0x152/0x15c
<4> [<0000000000206ed0>] SyS_read+0x54/0xac
<4> [<0000000000117c8e>] sysc_noemu+0x10/0x16
<4> [<00000042ff8def3c>] 0x42ff8def3c

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_iucv: do not call iucv_sock_kill() twice
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:27 +0000 (04:37 +0000)]
af_iucv: do not call iucv_sock_kill() twice

For non-accepted sockets on the accept queue, iucv_sock_kill()
is called twice (in iucv_sock_close() and iucv_sock_cleanup_listen()).
This typically results in a kernel oops as shown below.

Remove the duplicate call to iucv_sock_kill() and set the SOCK_ZAPPED
flag in iucv_sock_close() only.

The iucv_sock_kill() function frees a socket only if the socket is zapped
and orphaned (sk->sk_socket == NULL):
  - Non-accepted sockets are always orphaned and, thus, iucv_sock_kill()
    frees the socket twice.
  - For accepted sockets or sockets created with iucv_sock_create(),
    sk->sk_socket is initialized. This caused the first call to
    iucv_sock_kill() to return immediately. To free these sockets,
    iucv_sock_release() uses sock_orphan() before calling iucv_sock_kill().

<1>Unable to handle kernel pointer dereference at virtual kernel address 000000003edd3000
<4>Oops: 0011 [#1] PREEMPT SMP DEBUG_PAGEALLOC
<4>Modules linked in: af_iucv sunrpc qeth_l3 dm_multipath dm_mod qeth vmur ccwgroup
<4>CPU: 0 Not tainted 2.6.30 #4
<4>Process iucv_sock_close (pid: 2486, task: 000000003aea4340, ksp: 000000003b75bc68)
<4>Krnl PSW : 0704200180000000 000003e00168e23a (iucv_sock_kill+0x2e/0xcc [af_iucv])
<4>           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
<4>Krnl GPRS: 0000000000000000 000000003b75c000 000000003edd37f0 0000000000000001
<4>           000003e00168ec62 000000003988d960 0000000000000000 000003e0016b0608
<4>           000000003fe81b20 000000003839bb58 00000000399977f0 000000003edd37f0
<4>           000003e00168b000 000003e00168f138 000000003b75bcd0 000000003b75bc98
<4>Krnl Code: 000003e00168e22ac0c0ffffe6eb larl %r12,3e00168b000
<4>           000003e00168e230b90400b2 lgr %r11,%r2
<4>           000003e00168e234e3e0f0980024 stg %r14,152(%r15)
<4>          >000003e00168e23ae310225e0090 llgc %r1,606(%r2)
<4>           000003e00168e240a7110001 tmll %r1,1
<4>           000003e00168e244a7840007 brc 8,3e00168e252
<4>           000003e00168e248d507d00023c8 clc 0(8,%r13),968(%r2)
<4>           000003e00168e24ea7840009 brc 8,3e00168e260
<4>Call Trace:
<4>([<000003e0016b0608>] afiucv_dbf+0x0/0xfffffffffffdea20 [af_iucv])
<4> [<000003e00168ec6c>] iucv_sock_close+0x130/0x368 [af_iucv]
<4> [<000003e00168ef02>] iucv_sock_release+0x5e/0xe4 [af_iucv]
<4> [<0000000000438e6c>] sock_release+0x44/0x104
<4> [<0000000000438f5e>] sock_close+0x32/0x50
<4> [<0000000000207898>] __fput+0xf4/0x250
<4> [<00000000002038aa>] filp_close+0x7a/0xa8
<4> [<00000000002039ba>] SyS_close+0xe2/0x148
<4> [<0000000000117c8e>] sysc_noemu+0x10/0x16
<4> [<00000042ff8deeac>] 0x42ff8deeac

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_iucv: handle non-accepted sockets after resuming from suspend
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:26 +0000 (04:37 +0000)]
af_iucv: handle non-accepted sockets after resuming from suspend

After resuming from suspend, all af_iucv sockets are disconnected.
Ensure that iucv_accept_dequeue() can handle disconnected sockets
which are not yet accepted.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_iucv: fix race in __iucv_sock_wait()
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:25 +0000 (04:37 +0000)]
af_iucv: fix race in __iucv_sock_wait()

Moving prepare_to_wait before the condition to avoid a race between
schedule_timeout and wake up.
The race can appear during iucv_sock_connect() and iucv_callback_connack().

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiucv: use correct output register in iucv_query_maxconn()
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:24 +0000 (04:37 +0000)]
iucv: use correct output register in iucv_query_maxconn()

The iucv_query_maxconn() function uses the wrong output register and
stores the size of the interrupt buffer instead of the maximum number
of connections.

According to the QUERY IUCV function, general register 1 contains the
maximum number of connections.

If the maximum number of connections is not set properly, the following
warning is displayed:

Badness at /usr/src/kernel-source/2.6.30-39.x.20090806/net/iucv/iucv.c:1808
Modules linked in: netiucv fsm af_iucv sunrpc qeth_l3 dm_multipath dm_mod vmur qeth ccwgroup
CPU: 0 Tainted: G        W  2.6.30 #4
Process seq (pid: 16925, task: 0000000030e24a40, ksp: 000000003033bd98)
Krnl PSW : 0404200180000000 000000000053b270 (iucv_external_interrupt+0x64/0x224)
           R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:2 PM:0 EA:3
Krnl GPRS: 00000000011279c2 00000000014bdb70 0029000000000000 0000000000000029
           000000000053b236 000000000001dba4 0000000000000000 0000000000859210
           0000000000a67f68 00000000008a6100 000000003f83fb90 0000000000004000
           000000003f8c7bc8 00000000005a2250 000000000053b236 000000003fc2fe08
Krnl Code: 000000000053b262e33010000021 clg %r3,0(%r1)
           000000000053b268a7440010 brc 4,53b288
           000000000053b26ca7f40001 brc 15,53b26e
          >000000000053b270c03000184134 larl %r3,8434d8
           000000000053b276eb220030000c srlg %r2,%r2,48
           000000000053b27ceb6ff0a00004 lmg %r6,%r15,160(%r15)
           000000000053b282c0f4fffff6a7 brcl 15,539fd0
           000000000053b2884310a003 ic %r1,3(%r10)
Call Trace:
([<000000000053b236>] iucv_external_interrupt+0x2a/0x224)
 [<000000000010e09e>] do_extint+0x132/0x190
 [<00000000001184b6>] ext_no_vtime+0x1e/0x22
 [<0000000000549f7a>] _spin_unlock_irqrestore+0x96/0xa4
([<0000000000549f70>] _spin_unlock_irqrestore+0x8c/0xa4)
 [<00000000002101d6>] pipe_write+0x3da/0x5bc
 [<0000000000205d14>] do_sync_write+0xe4/0x13c
 [<0000000000206a7e>] vfs_write+0xae/0x15c
 [<0000000000206c24>] SyS_write+0x54/0xac
 [<0000000000117c8e>] sysc_noemu+0x10/0x16
 [<00000042ff8defcc>] 0x42ff8defcc

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiucv: fix iucv_buffer_cpumask check when calling IUCV functions
Hendrik Brueckner [Wed, 16 Sep 2009 04:37:23 +0000 (04:37 +0000)]
iucv: fix iucv_buffer_cpumask check when calling IUCV functions

Prior to calling IUCV functions, the DECLARE BUFFER function must have been
called for at least one CPU to receive IUCV interrupts.

With commit "iucv: establish reboot notifier" (6c005961), a check has been
introduced to avoid calling IUCV functions if the current CPU does not have
an interrupt buffer declared.
Because one interrupt buffer is sufficient, change the condition to ensure
that one interrupt buffer is available.

In addition, checking the buffer on the current CPU creates a race with
CPU up/down notifications: before checking the buffer, the IUCV function
might be interrupted by an smp_call_function() that retrieves the interrupt
buffer for the current CPU.
When the IUCV function continues, the check fails and -EIO is returned. If a
buffer is available on any other CPU, the IUCV function call must be invoked
(instead of failing with -EIO).

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoiucv: suspend/resume error msg for left over pathes
Ursula Braun [Wed, 16 Sep 2009 04:37:22 +0000 (04:37 +0000)]
iucv: suspend/resume error msg for left over pathes

During suspend IUCV exploiters have to close their IUCV connections.
When restoring an image, it can be checked if all IUCV pathes had
been closed before the Linux instance was suspended. If not, an
error message is issued to indicate a problem in one of the
used programs exploiting IUCV communication.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lowpan...
David S. Miller [Thu, 17 Sep 2009 03:55:28 +0000 (20:55 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/lowpan/lowpan

14 years agowl12xx: switch to %pM to print the mac address
Jean-Christophe PLAGNIOL-VILLARD [Wed, 16 Sep 2009 14:07:38 +0000 (14:07 +0000)]
wl12xx: switch to %pM to print the mac address

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agob44: the poll handler b44_poll must not enable IRQ unconditionally
Dongdong Deng [Wed, 16 Sep 2009 16:10:47 +0000 (16:10 +0000)]
b44: the poll handler b44_poll must not enable IRQ unconditionally

net/core/netpoll.c::netpoll_send_skb() calls the poll handler when
it is available. As netconsole can be used from almost any context,
IRQ must not be enabled blindly in the NAPI handler of the driver
which supports netpoll.

Call trace:
netpoll_send_skb()
{
local_irq_save(flags)
  -> netpoll_poll()
    -> poll_napi()
      -> poll_one_napi()
        -> napi->poll()
            -> b44_poll()
local_irq_restore(flags)
}

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: Ignore route option with ROUTER_PREF_INVALID
Jens Rosenboom [Thu, 10 Sep 2009 06:25:11 +0000 (06:25 +0000)]
ipv6: Ignore route option with ROUTER_PREF_INVALID

RFC4191 says that "If the Reserved (10) value is received, the Route
Information Option MUST be ignored.", so this patch makes us conform
to the RFC. This is different to the usage of the Default Router
Preference, where an invalid value must indeed be treated as
PREF_MEDIUM.

Signed-off-by: Jens Rosenboom <me@jayr.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: make ab_arp select active slaves as other modes
Jiri Pirko [Mon, 31 Aug 2009 11:09:38 +0000 (11:09 +0000)]
bonding: make ab_arp select active slaves as other modes

When I was implementing primary_passive option (formely named primary_lazy) I've
run into troubles with ab_arp. This is the only mode which is not using
bond_select_active_slave() function to select active slave and instead it
selects it itself. This seems to be not the right behaviour and it would be
better to do it in bond_select_active_slave() for all cases. This patch makes
this happen. Please review.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.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/linville/wirel...
David S. Miller [Thu, 17 Sep 2009 00:01:24 +0000 (17:01 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agocfg80211: fix SME connect
Johannes Berg [Wed, 16 Sep 2009 16:04:26 +0000 (09:04 -0700)]
cfg80211: fix SME connect

There's a check saying
/* we're good if we have both BSSID and channel */
if (wdev->conn->params.bssid && wdev->conn->params.channel) {

but that isn't true -- we need the BSS struct. This leads
to errors such as

    Trying to associate with 00:1b:53:11:dc:40 (SSID='TEST' freq=2412 MHz)
    ioctl[SIOCSIWFREQ]: No such file or directory
    ioctl[SIOCSIWESSID]: No such file or directory
    Association request to the driver failed
    Associated with 00:1b:53:11:dc:40

in wpa_supplicant, as reported by Holger.

Instead, we really need to have the BSS struct, and if we
don't, then we need to initiate a scan for it. But we may
already have the BSS struct here, so hang on to it if we
do and scan if we don't.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agorc80211_minstrel: fix contention window calculation
Pavel Roskin [Wed, 16 Sep 2009 02:24:30 +0000 (22:24 -0400)]
rc80211_minstrel: fix contention window calculation

The contention window is supposed to be a power of two minus one, i.e.
15, 31, 63, 127...  minstrel_rate_init() forgets to subtract 1, so the
sequence becomes 15, 32, 66, 134...

Bug reported by Dan Halperin <dhalperi@cs.washington.edu>

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb/sdio: fix printk format warnings
Randy Dunlap [Tue, 15 Sep 2009 21:52:40 +0000 (14:52 -0700)]
ssb/sdio: fix printk format warnings

Fix printk format warnings:

drivers/ssb/sdio.c:336: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'
drivers/ssb/sdio.c:443: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54usb: add Zcomax XG-705A usbid
Christian Lamparter [Mon, 14 Sep 2009 21:08:43 +0000 (23:08 +0200)]
p54usb: add Zcomax XG-705A usbid

This patch adds a new usbid for Zcomax XG-705A to the device table.

Cc: stable@kernel.org
Reported-by: Jari Jaakola <jari.jaakola@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoRxRPC: Use uX/sX rather than uintX_t/intX_t types
David Howells [Wed, 16 Sep 2009 07:01:13 +0000 (00:01 -0700)]
RxRPC: Use uX/sX rather than uintX_t/intX_t types

Use uX rather than uintX_t types for consistency.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomlx4: Fix access to freed memory
Vitaliy Gusev [Wed, 16 Sep 2009 07:00:21 +0000 (00:00 -0700)]
mlx4: Fix access to freed memory

catas_reset() uses pointer to mlx4_priv, but mlx4_priv is not valid
after call mlx4_restart_one().

Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Acked-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()
Robert Varga [Wed, 16 Sep 2009 06:49:21 +0000 (23:49 -0700)]
tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()

I have recently came across a preemption imbalance detected by:

<4>huh, entered ffffffff80644630 with preempt_count 00000102, exited with 00000101?
<0>------------[ cut here ]------------
<2>kernel BUG at /usr/src/linux/kernel/timer.c:664!
<0>invalid opcode: 0000 [1] PREEMPT SMP

with ffffffff80644630 being inet_twdr_hangman().

This appeared after I enabled CONFIG_TCP_MD5SIG and played with it a
bit, so I looked at what might have caused it.

One thing that struck me as strange is tcp_twsk_destructor(), as it
calls tcp_put_md5sig_pool() -- which entails a put_cpu(), causing the
detected imbalance. Found on 2.6.23.9, but 2.6.31 is affected as well,
as far as I can tell.

Signed-off-by: Robert Varga <nite@hq.alert.sk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopkt_sched: Fix qdisc_create on stab error handling
Jarek Poplawski [Wed, 16 Sep 2009 06:42:05 +0000 (23:42 -0700)]
pkt_sched: Fix qdisc_create on stab error handling

If qdisc_get_stab returns error in qdisc_create there is skipped qdisc
ops->destroy, which is necessary because it's after ops->init at the
moment, so memory leaks are quite probable.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoieee802154: add locking for seq numbers
Dmitry Eremin-Solenikov [Thu, 10 Sep 2009 14:02:30 +0000 (18:02 +0400)]
ieee802154: add locking for seq numbers

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agoaf_ieee802154: setsockopt optlen arg isn't __user
Dmitry Eremin-Solenikov [Tue, 15 Sep 2009 13:54:43 +0000 (17:54 +0400)]
af_ieee802154: setsockopt optlen arg isn't __user

Remove __user annotation from optlen arg as it's bogus.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
14 years agopkt_sched: Fix tx queue selection in tc_modify_qdisc
Jarek Poplawski [Tue, 15 Sep 2009 09:53:07 +0000 (02:53 -0700)]
pkt_sched: Fix tx queue selection in tc_modify_qdisc

After the recent mq change there is the new select_queue qdisc class
method used in tc_modify_qdisc, but it works OK only for direct child
qdiscs of mq qdisc. Grandchildren always get the first tx queue, which
would give wrong qdisc_root etc. results (e.g. for sch_htb as child of
sch_prio). This patch fixes it by using parent's dev_queue for such
grandchildren qdiscs. The select_queue method's return type is changed
BTW.

With feedback from: Patrick McHardy <kaber@trash.net>

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: Make sure both ports initialize correctly
Stephen Hemminger [Mon, 14 Sep 2009 06:22:29 +0000 (06:22 +0000)]
sky2: Make sure both ports initialize correctly

Sorry Mike, I sent you off the wrong way. The following is simpler and the
second port is diffrent enough in setup (because of NAPI), that the
following is simpler.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: transmit ring accounting
Stephen Hemminger [Mon, 14 Sep 2009 06:12:55 +0000 (06:12 +0000)]
sky2: transmit ring accounting

Be more accurate about number of transmit list elements required.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoRxRPC: Parse security index 5 keys (Kerberos 5)
David Howells [Mon, 14 Sep 2009 01:17:46 +0000 (01:17 +0000)]
RxRPC: Parse security index 5 keys (Kerberos 5)

Parse RxRPC security index 5 type keys (Kerberos 5 tokens).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoRxRPC: Allow RxRPC keys to be read
David Howells [Mon, 14 Sep 2009 01:17:40 +0000 (01:17 +0000)]
RxRPC: Allow RxRPC keys to be read

Allow RxRPC keys to be read.  This is to allow pioctl() to be implemented in
userspace.  RxRPC keys are read out in XDR format.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoRxRPC: Allow key payloads to be passed in XDR form
David Howells [Mon, 14 Sep 2009 01:17:35 +0000 (01:17 +0000)]
RxRPC: Allow key payloads to be passed in XDR form

Allow add_key() and KEYCTL_INSTANTIATE to accept key payloads in XDR form as
described by openafs-1.4.10/src/auth/afs_token.xg.  This provides a way of
passing kaserver, Kerberos 4, Kerberos 5 and GSSAPI keys from userspace, and
allows for future expansion.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoRxRPC: Declare the security index constants symbolically
David Howells [Mon, 14 Sep 2009 01:17:30 +0000 (01:17 +0000)]
RxRPC: Declare the security index constants symbolically

Declare the security index constants symbolically rather than just referring
to them numerically.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopcnet_cs: add cis of Linksys multifunction pcmcia card
Ken Kawasaki [Tue, 15 Sep 2009 09:42:25 +0000 (02:42 -0700)]
pcnet_cs: add cis of Linksys multifunction pcmcia card

pcnet_cs,serial_cs:

add cis of Linksys lan&modem mulitifunction pcmcia card
and some modem card(MT5634ZLX, RS-COM-2P).

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years ago[PATCH] net: kmemcheck annotation in struct socket
Eric Dumazet [Tue, 15 Sep 2009 09:39:20 +0000 (02:39 -0700)]
[PATCH] net: kmemcheck annotation in struct socket

struct socket has a 16 bit hole that triggers kmemcheck warnings.

As suggested by Ingo, use kmemcheck annotations

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobonding: remap muticast addresses without using dev_close() and dev_open()
Moni Shoua [Tue, 15 Sep 2009 09:37:40 +0000 (02:37 -0700)]
bonding: remap muticast addresses without using dev_close() and dev_open()

This patch fixes commit e36b9d16c6a6d0f59803b3ef04ff3c22c3844c10. The approach
there is to call dev_close()/dev_open() whenever the device type is changed in
order to remap the device IP multicast addresses to HW multicast addresses.
This approach suffers from 2 drawbacks:

*. It assumes tha the device is UP when calling dev_close(), or otherwise
   dev_close() has no affect. It is worth to mention that initscripts (Redhat)
   and sysconfig (Suse) doesn't act the same in this matter.
*. dev_close() has other side affects, like deleting entries from the routing
   table, which might be unnecessary.

The fix here is to directly remap the IP multicast addresses to HW multicast
addresses for a bonding device that changes its type, and nothing else.

Reported-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Moni Shoua <monis@voltaire.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan: fix NOHZ local_softirq_pending 08 warning
Oliver Hartkopp [Tue, 15 Sep 2009 08:31:34 +0000 (01:31 -0700)]
can: fix NOHZ local_softirq_pending 08 warning

When using nanosleep() in an userspace application we get a ratelimit warning

NOHZ: local_softirq_pending 08

for 10 times.

The echo of CAN frames is done from process context and softirq context only.
Therefore the usage of netif_rx() was wrong (for years).

This patch replaces netif_rx() with netif_rx_ni() which has to be used from
process/softirq context. It also adds a missing comment that can_send() must
no be used from hardirq context.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotcp: fix ssthresh u16 leftover
Ilpo Järvinen [Tue, 15 Sep 2009 08:30:10 +0000 (01:30 -0700)]
tcp: fix ssthresh u16 leftover

It was once upon time so that snd_sthresh was a 16-bit quantity.
...That has not been true for long period of time. I run across
some ancient compares which still seem to trust such legacy.
Put all that magic into a single place, I hopefully found all
of them.

Compile tested, though linking of allyesconfig is ridiculous
nowadays it seems.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopkt_sched: Fix qdisc_graft WRT ingress qdisc
Jarek Poplawski [Sun, 13 Sep 2009 22:35:44 +0000 (22:35 +0000)]
pkt_sched: Fix qdisc_graft WRT ingress qdisc

After the recent mq change using ingress qdisc overwrites dev->qdisc;
there is also a wrong old qdisc pointer passed to notify_and_destroy.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: do not allow phy sw reset code to make calls to null pointers
Alexander Duyck [Mon, 14 Sep 2009 08:23:13 +0000 (08:23 +0000)]
igb: do not allow phy sw reset code to make calls to null pointers

In the case of fiber and serdes adapters we were seeing issues with ethtool
-t causing kernel panics due to null function pointers.  To prevent this we
need to exit out of the phy reset code in the event that we do not have a
valid phy.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: reset sgmii phy at start of init
Alexander Duyck [Mon, 14 Sep 2009 08:22:54 +0000 (08:22 +0000)]
igb: reset sgmii phy at start of init

Our SGMII phy code was incomplete in that it was not actually placing the
phy in SGMII mode and as a result the PHY was not able to establish a link
when connected to a non serdes link partner.  This patch updates the code
to combine the SGMII/serdes PCS init and to add the necessary reset.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Create separate media type for CX4 adapters
Peter P Waskiewicz Jr [Mon, 14 Sep 2009 07:48:10 +0000 (07:48 +0000)]
ixgbe: Create separate media type for CX4 adapters

Currently the media type detection for CX4 adapters lumps them into a
type of fiber.  This causes some strange fallout when firmware verification
is done on the NIC, and certain fiber NIC rules get enforced incorrectly.

This patch introduces a new media type for CX4, and puts both 82598 and
82599 CX4 adapters into this bucket.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Add support for 82599-based CX4 adapters
Peter P Waskiewicz Jr [Mon, 14 Sep 2009 07:47:49 +0000 (07:47 +0000)]
ixgbe: Add support for 82599-based CX4 adapters

This patch adds support for CX4 adapters based on 82599.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Properly disable packet split per-ring when globally disabled
Peter P Waskiewicz Jr [Mon, 14 Sep 2009 07:47:27 +0000 (07:47 +0000)]
ixgbe: Properly disable packet split per-ring when globally disabled

The packet split feature was recently moved out of the adapter-wide flags
feature field and into a per-Rx ring feature field.  In the process, packet
split isn't properly disabled in the Rx ring if the adapter has it globally
disabled, followed by a device reset.

This won't impact the driver today, since it's always in packet split mode.
However, this will prevent any pitfalls if someone disables packet split on
the adapter in the future and doesn't disable it in each ring.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocdc-phonet: remove noisy debug statement
Rémi Denis-Courmont [Mon, 14 Sep 2009 03:10:28 +0000 (03:10 +0000)]
cdc-phonet: remove noisy debug statement

From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: Netlink event for autoconfigured addresses
Rémi Denis-Courmont [Mon, 14 Sep 2009 03:10:27 +0000 (03:10 +0000)]
Phonet: Netlink event for autoconfigured addresses

From: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: constify remaining proto_ops
Alexey Dobriyan [Mon, 14 Sep 2009 12:23:23 +0000 (12:23 +0000)]
net: constify remaining proto_ops

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: constify struct inet6_protocol
Alexey Dobriyan [Mon, 14 Sep 2009 12:22:28 +0000 (12:22 +0000)]
net: constify struct inet6_protocol

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: constify struct net_protocol
Alexey Dobriyan [Mon, 14 Sep 2009 12:21:47 +0000 (12:21 +0000)]
net: constify struct net_protocol

Remove long removed "inet_protocol_base" declaration.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetdev: smc91x: drop Blackfin cruft
Michael Hennerich [Mon, 14 Sep 2009 08:03:42 +0000 (08:03 +0000)]
netdev: smc91x: drop Blackfin cruft

Now that all Blackfin boards are using the board resources, we don't need
to keep the arch/board specific crap in the driver header.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet-next-2.6 [PATCH 1/1] dccp: ccids whitespace-cleanup / CodingStyle
Gerrit Renker [Sat, 12 Sep 2009 07:47:01 +0000 (07:47 +0000)]
net-next-2.6 [PATCH 1/1] dccp: ccids whitespace-cleanup / CodingStyle

No code change, cosmetical changes only:

 * whitespace cleanup via scripts/cleanfile,
 * remove self-references to filename at top of files,
 * fix coding style (extraneous brackets),
 * fix documentation style (kernel-doc-nano-HOWTO).

Thanks are due to Ivo Augusto Calado who raised these issues by
submitting good-quality patches.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogenetlink: fix netns vs. netlink table locking
Johannes Berg [Sat, 12 Sep 2009 03:03:15 +0000 (03:03 +0000)]
genetlink: fix netns vs. netlink table locking

Since my commits introducing netns awareness into
genetlink we can get this problem:

BUG: scheduling while atomic: modprobe/1178/0x00000002
2 locks held by modprobe/1178:
 #0:  (genl_mutex){+.+.+.}, at: [<ffffffff8135ee1a>] genl_register_mc_grou
 #1:  (rcu_read_lock){.+.+..}, at: [<ffffffff8135eeb5>] genl_register_mc_g
Pid: 1178, comm: modprobe Not tainted 2.6.31-rc8-wl-34789-g95cb731-dirty #
Call Trace:
 [<ffffffff8103e285>] __schedule_bug+0x85/0x90
 [<ffffffff81403138>] schedule+0x108/0x588
 [<ffffffff8135b131>] netlink_table_grab+0xa1/0xf0
 [<ffffffff8135c3a7>] netlink_change_ngroups+0x47/0x100
 [<ffffffff8135ef0f>] genl_register_mc_group+0x12f/0x290

because I overlooked that netlink_table_grab() will
schedule, thinking it was just the rwlock. However,
in the contention case, that isn't actually true.

Fix this by letting the code grab the netlink table
lock first and then the RCU for netns protection.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoHave atalk_route_packet() return NET_RX_SUCCESS not NET_XMIT_SUCCESS
Mark Smith [Sat, 12 Sep 2009 20:48:43 +0000 (20:48 +0000)]
Have atalk_route_packet() return NET_RX_SUCCESS not NET_XMIT_SUCCESS

Have atalk_route_packet() return NET_RX_SUCCESS not NET_XMIT_SUCCESS

atalk_route_packet() returns NET_RX_DROP if it's call to
aarp_send_ddp() returns NET_XMIT_DROP. If aarp_send_ddp() returns
anything else atalk_route_packet() should return NET_RX_SUCCESS, not
NET_XMIT_SUCCESS.

Signed-off-by: Mark Smith <markzzzsmith@yahoo.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'osync_cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/jack...
Linus Torvalds [Mon, 14 Sep 2009 21:36:47 +0000 (14:36 -0700)]
Merge branch 'osync_cleanup' of git://git./linux/kernel/git/jack/linux-fs-2.6

* 'osync_cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
  fsync: wait for data writeout completion before calling ->fsync
  vfs: Remove generic_osync_inode() and sync_page_range{_nolock}()
  fat: Opencode sync_page_range_nolock()
  pohmelfs: Use new syncing helper
  xfs: Convert sync_page_range() to simple filemap_write_and_wait_range()
  ocfs2: Update syncing after splicing to match generic version
  ntfs: Use new syncing helpers and update comments
  ext4: Remove syncing logic from ext4_file_write
  ext3: Remove syncing logic from ext3_file_write
  ext2: Update comment about generic_osync_inode
  vfs: Introduce new helpers for syncing after writing to O_SYNC file or IS_SYNC inode
  vfs: Rename generic_file_aio_write_nolock
  ocfs2: Use __generic_file_aio_write instead of generic_file_aio_write_nolock
  pohmelfs: Use __generic_file_aio_write instead of generic_file_aio_write_nolock
  vfs: Remove syncing from generic_file_direct_write() and generic_file_buffered_write()
  vfs: Export __generic_file_aio_write() and add some comments
  vfs: Introduce filemap_fdatawait_range

14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2...
Linus Torvalds [Mon, 14 Sep 2009 21:35:56 +0000 (14:35 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/steve/gfs2-2.6-nmw

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw:
  GFS2: Whitespace fixes
  GFS2: Remove unused sysfs file
  GFS2: Be extra careful about deallocating inodes
  GFS2: Remove no_formal_ino generating code
  GFS2: Rename eattr.[ch] as xattr.[ch]
  GFS2: Clean up of extended attribute support
  GFS2: Add explanation of extended attr on-disk format
  GFS2: Add "-o errors=panic|withdraw" mount options
  GFS2: jumping to wrong label?
  GFS2: free disk inode which is deleted by remote node -V2
  GFS2: Add a document explaining GFS2's uevents
  GFS2: Add sysfs link to device
  GFS2: Replace assertion with proper error handling
  GFS2: Improve error handling in inode allocation
  GFS2: Add some more info to uevents
  GFS2: Add online uevent to GFS2

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
Linus Torvalds [Mon, 14 Sep 2009 21:35:07 +0000 (14:35 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jack/linux-udf-2.6

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
  udf: Fix possible corruption when close races with write
  udf: Perform preallocation only for regular files
  udf: Remove wrong assignment in udf_symlink
  udf: Remove dead code

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Mon, 14 Sep 2009 21:34:33 +0000 (14:34 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: (21 commits)
  fs/Kconfig: move nilfs2 outside misc filesystems
  nilfs2: convert nilfs_bmap_lookup to an inline function
  nilfs2: allow btree code to directly call dat operations
  nilfs2: add update functions of virtual block address to dat
  nilfs2: remove individual gfp constants for each metadata file
  nilfs2: stop zero-fill of btree path just before free it
  nilfs2: remove unused btree argument from btree functions
  nilfs2: remove nilfs_dat_abort_start and nilfs_dat_abort_free
  nilfs2: shorten freeze period due to GC in write operation v3
  nilfs2: add more check routines in mount process
  nilfs2: An unassigned variable is assigned to a never used structure member
  nilfs2: use GFP_NOIO for bio_alloc instead of GFP_NOWAIT
  nilfs2: stop using periodic write_super callback
  nilfs2: clean up nilfs_write_super
  nilfs2: fix disorder of nilfs_write_super in nilfs_sync_fs
  nilfs2: remove redundant super block commit
  nilfs2: implement nilfs_show_options to display mount options in /proc/mounts
  nilfs2: always lookup disk block address before reading metadata block
  nilfs2: use semaphore to protect pointer to a writable FS-instance
  nilfs2: fix format string compile warning (ino_t)
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Mon, 14 Sep 2009 21:33:13 +0000 (14:33 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: consolidate reconnect logic in smb_init routines
  cifs: Replace wrtPending with a real reference count
  cifs: protect GlobalOplock_Q with its own spinlock
  cifs: use tcon pointer in cifs_show_options
  cifs: send IPv6 addr in upcall with colon delimiters
  [CIFS] Fix checkpatch warnings
  PATCH] cifs: fix broken mounts when a SSH tunnel is used (try #4)
  [CIFS] Memory leak in ntlmv2 hash calculation
  [CIFS] potential NULL dereference in parse_DFS_referrals()

14 years agossb: Fix error when V1 SPROM extraction is forced
Larry Finger [Sun, 13 Sep 2009 20:55:13 +0000 (15:55 -0500)]
ssb: Fix error when V1 SPROM extraction is forced

When an SPROM revision is not recognized, the code falls back to a V1
SPROM; however, that revision is not forced in the appropriate structure.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: disable powersave for 4965
Johannes Berg [Fri, 11 Sep 2009 17:50:37 +0000 (10:50 -0700)]
iwlwifi: disable powersave for 4965

There's a bug in 4965 powersave that appears to
be related to the way it keeps track of its data
during sleep, but we haven't found it yet. Due to
that, using powersave may spontaneously cause the
device to SYSASSERT when transitioning from sleep
to wake. Therefore, disable powersave for 4965,
until (if ever, unfortunately) we can identify
and fix the problem.

Cf. http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=1982
which was closed, but now has re-appeared with
IDLE mode, which probably means we never really
fixed it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: find the correct first antenna
Wey-Yi Guy [Fri, 11 Sep 2009 17:38:18 +0000 (10:38 -0700)]
iwlwifi: find the correct first antenna

We can not assume antenna "A" is the first valid anttena for
all the NIC. Need to make sure choice the correct antenna based on
h/w configuration for transmit to avoid sending frame on invalid
antenna

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix potential rx buffer loss
Reinette Chatre [Fri, 11 Sep 2009 17:38:12 +0000 (10:38 -0700)]
iwlwifi: fix potential rx buffer loss

RX handling maintains a few lists that keep track of the RX buffers.
Buffers move from one list to the other as they are used, replenished, and
again made available for usage. In one such instance, when a buffer is used
it enters the "rx_used" list. When buffers are replenished an skb is
attached to the buffer and it is moved to the "rx_free" list. The problem
here is that the buffer is first removed from the "rx_used" list _before_ the
skb is allocated. Thus, if the skb allocation fails this buffer remains
removed from the "rx_used" list and is thus lost for future usage.

Fix this by first allocating the skb before trying to attach it to a list.
We add an additional check to not do this unnecessarily.

Reported-by: Rick Farrington <rickdic@hotmail.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix HT operation in 2.4 GHz band
Daniel C Halperin [Fri, 11 Sep 2009 17:38:08 +0000 (10:38 -0700)]
iwlwifi: fix HT operation in 2.4 GHz band

When we cleaned up the driver to properly tell mac80211 about HT rates
("iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriate"), we broke
internal rate indexing in 2.4 GHz band.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Tested-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Fix resume failure
Michael Buesch [Fri, 11 Sep 2009 16:31:32 +0000 (18:31 +0200)]
b43: Fix resume failure

This fixes a resume failure where a signal is pending on resume
so the firmware upload fails.
This removes the interruptible sleep, because we don't really need it.
In the worst case (with broken firmware) the sleep loop will take 1 second.
In the common case (working firmware), it will only take a few milliseconds.
So we don't really need to be interruptible.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agossb: Disable verbose SDIO coreswitch
Michael Buesch [Fri, 11 Sep 2009 14:08:06 +0000 (16:08 +0200)]
ssb: Disable verbose SDIO coreswitch

Disable SDIO coreswitch debugging.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: default CONFIG_WLAN to y
Luis R. Rodriguez [Fri, 11 Sep 2009 08:43:29 +0000 (04:43 -0400)]
wireless: default CONFIG_WLAN to y

When this was added no defaults were set and it seems
this implies n. Default this to y.

Reported-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: minimal error handling for wext-compat freq scanning
Holger Schurig [Fri, 11 Sep 2009 08:13:55 +0000 (10:13 +0200)]
cfg80211: minimal error handling for wext-compat freq scanning

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: use cfg80211_wext_freq() for freq conversion
Holger Schurig [Fri, 11 Sep 2009 08:13:53 +0000 (10:13 +0200)]
cfg80211: use cfg80211_wext_freq() for freq conversion

WEXT's "struct iw_freq" can also be used to handle a channel. This patch now
uses cfg80211_wext_freq() instead of hand-converting the frequency. That
allows user-space to specify channels as well, like with SIOCSIWFREQ.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix bug in ANI channel handling
Sujith [Fri, 11 Sep 2009 03:00:03 +0000 (08:30 +0530)]
ath9k: Fix bug in ANI channel handling

When processing MIB interrupts, OFDM and CCK error
handling routines for low RSSI values have to be invoked
only when the channel mode is 11G/11B. Since HT channels
will also fall under the bands 2Ghz/5Ghz, check appropriately.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>