safe/jmp/linux-2.6
14 years ago3c59x: Rework suspend and resume
Anton Vorontsov [Thu, 1 Oct 2009 03:11:11 +0000 (20:11 -0700)]
3c59x: Rework suspend and resume

As noticed by Alan Stern, there is still one issue with the driver:
we disable PCI IRQ on suspend, but other devices on the same IRQ
line might still need the IRQ enabled to suspend properly.

Nowadays, PCI core handles all power management work by itself, with
one condition though: if we use dev_pm_ops. So, rework the driver to
only quiesce 3c59x internal logic on suspend, while PCI core will
manage PCI device power state with IRQs disabled.

Suggested-by: Rafael J. Wysocki <rjw@sisk.pl>
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agodrivers/net: ks8851_mll ethernet network driver
Choi, David [Fri, 25 Sep 2009 14:42:12 +0000 (14:42 +0000)]
drivers/net: ks8851_mll ethernet network driver

This is the first registration of ks8851 network driver with
MLL(address/data multiplexed) interface.

Signed-off-by : David J. Choi <david.choi@micrel.com>

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoskge: Make sure both ports initialize correctly
Mike McCormack [Wed, 23 Sep 2009 03:50:36 +0000 (03:50 +0000)]
skge: Make sure both ports initialize correctly

If allocation of the second ports fails, make sure that hw->ports
 is not 2 otherwise we'll crash trying to access the second port.

This fix is copied from a similar fix in the sky2 driver (ca519274...),
but is untested, as I don't have a skge card.

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 agobcm63xx_enet: timeout off by one in do_mdio_op()
roel kluin [Mon, 21 Sep 2009 10:08:48 +0000 (10:08 +0000)]
bcm63xx_enet: timeout off by one in do_mdio_op()

`while (limit-- >= 0)' reaches -2 after the loop upon timeout.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix error exit for probe call.
Ron Mercer [Tue, 29 Sep 2009 08:39:25 +0000 (08:39 +0000)]
qlge: Fix error exit for probe call.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Protect reset recovery with rtnl_lock().
Ron Mercer [Tue, 29 Sep 2009 08:39:24 +0000 (08:39 +0000)]
qlge: Protect reset recovery with rtnl_lock().

Move the call to rtnl_lock() to before the internal call to
ql_adapter_down()/ql_adapter_up().  This prevents collisions that can
happen when recovering from an asic error.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix spin_lock warning.
Ron Mercer [Tue, 29 Sep 2009 08:39:23 +0000 (08:39 +0000)]
qlge: Fix spin_lock warning.

Remove the unnecessary locking around the call to ql_adapter_reset().

Sep 25 08:17:29 localhost kernel:    SOFTIRQ-ON-W at:
Sep 25 08:17:29 localhost kernel:                         [<c0000000000a2964>] .lock_acquire+0x10c/0x158
Sep 25 08:17:29 localhost kernel:                         [<c0000000004542e0>] ._spin_lock+0x34/0x58
Sep 25 08:17:29 localhost kernel:                         [<d000000006723070>] .ql_adapter_down+0x40c/0x4a0 [qlge]
Sep 25 08:17:29 localhost kernel:                         [<d0000000067256d8>] .qlge_close+0x38/0x58 [qlge]
Sep 25 08:17:29 localhost kernel:                         [<c0000000003ada6c>] .dev_close+0xdc/0x118
Sep 25 08:17:29 localhost kernel:                         [<c0000000003adb48>] .rollback_registered+0xa0/0x158
Sep 25 08:17:29 localhost kernel:                         [<c0000000003adc50>] .unregister_netdevice+0x50/0x7c
Sep 25 08:17:29 localhost kernel:                         [<c0000000003adca0>] .unregister_netdev+0x24/0x40
Sep 25 08:17:29 localhost kernel:                         [<d00000000672e0c0>] .qlge_remove+0x28/0x64 [qlge]
Sep 25 08:17:29 localhost kernel:                         [<c000000000253fdc>] .pci_device_remove+0x50/0x90
Sep 25 08:17:29 localhost kernel:                         [<c0000000002f5434>] .__device_release_driver+0x94/0xf8
Sep 25 08:17:29 localhost kernel:                         [<c0000000002f5560>] .driver_detach+0xc8/0xfc
Sep 25 08:17:29 localhost kernel:                         [<c0000000002f3fd8>] .bus_remove_driver+0xb4/0x114
Sep 25 08:17:29 localhost kernel:                         [<c0000000002f5d4c>] .driver_unregister+0x80/0xa4
Sep 25 08:17:29 localhost kernel:                         [<c00000000025421c>] .pci_unregister_driver+0x50/0xc8
Sep 25 08:17:29 localhost kernel:                         [<d00000000672e044>] .qlge_exit+0x1c/0x34 [qlge]
Sep 25 08:17:29 localhost kernel:                         [<c0000000000ac8b0>] .SyS_delete_module+0x234/0x2d0
Sep 25 08:17:29 localhost kernel:                         [<c000000000008554>] syscall_exit+0x0/0x40
Sep 25 08:17:29 localhost kernel:    INITIAL USE at:

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix out of sync hardware semaphore.
Ron Mercer [Tue, 29 Sep 2009 08:39:22 +0000 (08:39 +0000)]
qlge: Fix out of sync hardware semaphore.

ql_clear_routing_entries() takes/gives it's own hardware semaphore since
it is called from more than one place.  ql_route_initialize() should
make this call and THEN take it's own semaphore before doing it's work.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix bad bit definitions.
Ron Mercer [Tue, 29 Sep 2009 08:39:21 +0000 (08:39 +0000)]
qlge: Fix bad bit definitions.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Remove ATR computation for UDP traffic
Peter P Waskiewicz Jr [Wed, 30 Sep 2009 12:08:37 +0000 (12:08 +0000)]
ixgbe: Remove ATR computation for UDP traffic

ATR support for UDP on 82599 needs to be redesigned, since the
current model doesn't make much sense.  The fallout from having
it in though is it causes all UDP traffic to still compute the
ATR hashes on transmit, which are useless.  This removal will
return upwards of 10% of relative computational overhead in
forwarding tests.

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: David S. Miller <davem@davemloft.net>
14 years agoixgbe patch to provide NIC's tx/rx counters via ethtool
Ben Greear [Wed, 30 Sep 2009 12:08:16 +0000 (12:08 +0000)]
ixgbe patch to provide NIC's tx/rx counters via ethtool

When LRO is enabled, the received packet and byte counters represent the
LRO'd packets, not the packets/bytes on the wire.  The Intel 82599 NIC has
registers that keep count of the physical packets.  Add these counters to
the ethtool stats.  The byte counters are 36-bit, but the high 4 bits were
being ignored in the 2.6.31 ixgbe driver:  Read those as well to allow
longer time between polling the stats to detect wraps.

Signed-off-by: Ben Greear <greearb@candelatech.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: Bump driver version number
Peter P Waskiewicz Jr [Wed, 30 Sep 2009 12:07:57 +0000 (12:07 +0000)]
ixgbe: Bump driver version number

A number of changes have gone in since the last version bump.  Bump
it to reflect the changes.

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: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fix backplane flow control autoneg
Peter P Waskiewicz Jr [Wed, 30 Sep 2009 12:07:38 +0000 (12:07 +0000)]
ixgbe: Fix backplane flow control autoneg

Backplane flow control autonegotiation is currently broken for
ixgbe devices.  This patch fixes the flow control issues
with clause 37 autoneg.

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: David S. Miller <davem@davemloft.net>
14 years agoixgbe: Fix disabling of relaxed ordering with Tx DCA
Peter P Waskiewicz Jr [Wed, 30 Sep 2009 12:07:16 +0000 (12:07 +0000)]
ixgbe: Fix disabling of relaxed ordering with Tx DCA

82599 has a different register offset for the Tx DCA control registers.
We disable relaxed ordering of the descriptor writebacks for Tx head
writeback, but didn't disable it properly for 82599.  However, this
shouldn't be a visible issue, since ixgbe doesn't use Tx head writeback.
This patch just makes sure we're not doing blind writes to offsets we
don't expect.

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: David S. Miller <davem@davemloft.net>
14 years agoext4: fix a BUG_ON crash by checking that page has buffers attached to it
Theodore Ts'o [Thu, 1 Oct 2009 02:57:41 +0000 (22:57 -0400)]
ext4: fix a BUG_ON crash by checking that page has buffers attached to it

In ext4_num_dirty_pages() we were calling page_buffers() before
checking to see if the page actually had pages attached to it; this
would cause a BUG check crash in the inline function page_buffers().

Thanks to Markus Trippelsdorf for reporting this bug.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 1 Oct 2009 00:36:45 +0000 (17:36 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  ax25: Fix possible oops in ax25_make_new
  net: restore tx timestamping for accelerated vlans
  Phonet: fix mutex imbalance
  sit: fix off-by-one in ipip6_tunnel_get_prl
  net: Fix sock_wfree() race
  net: Make setsockopt() optlen be unsigned.

14 years agoax25: Fix possible oops in ax25_make_new
Jarek Poplawski [Sun, 27 Sep 2009 10:57:02 +0000 (10:57 +0000)]
ax25: Fix possible oops in ax25_make_new

In ax25_make_new, if kmemdup of digipeat returns an error, there would
be an oops in sk_free while calling sk_destruct, because sk_protinfo
is NULL at the moment; move sk->sk_destruct initialization after this.

BTW of reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: restore tx timestamping for accelerated vlans
Eric Dumazet [Wed, 30 Sep 2009 23:42:42 +0000 (16:42 -0700)]
net: restore tx timestamping for accelerated vlans

Since commit 9b22ea560957de1484e6b3e8538f7eef202e3596
( net: fix packet socket delivery in rx irq handler )

We lost rx timestamping of packets received on accelerated vlans.

Effect is that tcpdump on real dev can show strange timings, since it gets rx timestamps
too late (ie at skb dequeueing time, not at skb queueing time)

14:47:26.986871 IP 192.168.20.110 > 192.168.20.141: icmp 64: echo request seq 1
14:47:26.986786 IP 192.168.20.141 > 192.168.20.110: icmp 64: echo reply seq 1

14:47:27.986888 IP 192.168.20.110 > 192.168.20.141: icmp 64: echo request seq 2
14:47:27.986781 IP 192.168.20.141 > 192.168.20.110: icmp 64: echo reply seq 2

14:47:28.986896 IP 192.168.20.110 > 192.168.20.141: icmp 64: echo request seq 3
14:47:28.986780 IP 192.168.20.141 > 192.168.20.110: icmp 64: echo reply seq 3

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPhonet: fix mutex imbalance
Rémi Denis-Courmont [Wed, 30 Sep 2009 23:41:34 +0000 (16:41 -0700)]
Phonet: fix mutex imbalance

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

port_mutex was unlocked twice.

Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosit: fix off-by-one in ipip6_tunnel_get_prl
Sascha Hlusiak [Tue, 29 Sep 2009 11:27:05 +0000 (11:27 +0000)]
sit: fix off-by-one in ipip6_tunnel_get_prl

When requesting all prl entries (kprl.addr == INADDR_ANY) and there are
more prl entries than there is space passed from userspace, the existing
code would always copy cmax+1 entries, which is more than can be handled.

This patch makes the kernel copy only exactly cmax entries.

Signed-off-by: Sascha Hlusiak <contact@saschahlusiak.de>
Acked-By: Fred L. Templin <Fred.L.Templin@boeing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Fix sock_wfree() race
Eric Dumazet [Thu, 24 Sep 2009 10:49:24 +0000 (10:49 +0000)]
net: Fix sock_wfree() race

Commit 2b85a34e911bf483c27cfdd124aeb1605145dc80
(net: No more expensive sock_hold()/sock_put() on each tx)
opens a window in sock_wfree() where another cpu
might free the socket we are working on.

A fix is to call sk->sk_write_space(sk) while still
holding a reference on sk.

Reported-by: Jike Song <albcamus@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Make setsockopt() optlen be unsigned.
David S. Miller [Wed, 30 Sep 2009 23:12:20 +0000 (16:12 -0700)]
net: Make setsockopt() optlen be unsigned.

This provides safety against negative optlen at the type
level instead of depending upon (sometimes non-trivial)
checks against this sprinkled all over the the place, in
each and every implementation.

Based upon work done by Arjan van de Ven and feedback
from Linus Torvalds.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 30 Sep 2009 22:10:40 +0000 (15:10 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched_clock: Fix atomicity/continuity bug by using cmpxchg64()
  x86: Provide an alternative() based cmpxchg64()

14 years agosched_clock: Fix atomicity/continuity bug by using cmpxchg64()
Eric Dumazet [Wed, 30 Sep 2009 18:36:19 +0000 (20:36 +0200)]
sched_clock: Fix atomicity/continuity bug by using cmpxchg64()

Commit def0a9b2573 (sched_clock: Make it NMI safe) assumed
cmpxchg() of 64bit values was available on X86_32.

That is not so - and causes some subtle scheduler misbehavior due
to incorrect timestamps off to up by ~4 seconds.

Two symptoms are known right now:

 - interactivity problems seen by Arjan: up to 600 msecs
   latencies instead of the expected 20-40 msecs. These
   latencies are very visible on the desktop.

 - incorrect CPU stats: occasionally too high percentages in 'top',
   and crazy CPU usage stats.

Reported-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090930170754.0886ff2e@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agox86: Provide an alternative() based cmpxchg64()
Arjan van de Ven [Wed, 30 Sep 2009 15:07:54 +0000 (17:07 +0200)]
x86: Provide an alternative() based cmpxchg64()

cmpxchg64() today generates, to quote Linus, "barf bag" code.

cmpxchg64() is about to get used in the scheduler to fix a bug there,
but it's a prerequisite that cmpxchg64() first be made non-sucking.

This patch turns cmpxchg64() into an efficient implementation that
uses the alternative() mechanism to just use the raw instruction on
all modern systems.

Note: the fallback is NOT smp safe, just like the current fallback
is not SMP safe. (Interested parties with i486 based SMP systems
are welcome to submit fix patches for that.)

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
[ fixed asm constraint bug ]
Fixed-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20090930170754.0886ff2e@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Wed, 30 Sep 2009 20:46:56 +0000 (13:46 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  MIPS: Avoid spurious make includecheck message
  MIPS: VPE: Get rid of BKL.
  MIPS: VPE: Fix build after the credential changes a while ago.
  MIPS: Excite: Get rid of BKL.
  MIPS: Sibyte: Get rid of BKL.
  MIPS: BCM63xx: Add PCMCIA & Cardbus support.
  MIPS: MSP71xx: request_irq() failure ignored in msp_pcibios_config_access()
  MIPS: Decrease size of au1xxx_dbdma_pm_regs[][]
  MIPS: SMP: Inline arch_send_call_function_{single_ipi,ipi_mask}
  MIPS: SMP: Fix build.
  MIPS: MIPSxx SC: Avoid destructive invalidation on partial L2 cachelines.
  MIPS: Sibyte: Fix compilation error.
  MIPS: BCM1480: Re-apply patch lost due to bad resolution of merge conflict.
  MIPS: BCM63xx: Add serial driver for bcm63xx integrated UART.
  MIPS: Loongson2: Fix typo "enalbe" -> "enable"
  MIPS: SMTC: Remove duplicate structure field initialization
  MIPS: Remove duplicated #include
  MIPS: BCM63xx: Remove duplicated #include

14 years agoMIPS: Avoid spurious make includecheck message
Ralf Baechle [Tue, 29 Sep 2009 08:14:17 +0000 (10:14 +0200)]
MIPS: Avoid spurious make includecheck message

arch/mips/include/asm/unaligned.h: linux/unaligned/generic.h is included more than once.

Entirely legitimate but just noise.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: VPE: Get rid of BKL.
Ralf Baechle [Mon, 28 Sep 2009 23:52:27 +0000 (00:52 +0100)]
MIPS: VPE: Get rid of BKL.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: VPE: Fix build after the credential changes a while ago.
Ralf Baechle [Mon, 28 Sep 2009 23:19:20 +0000 (00:19 +0100)]
MIPS: VPE: Fix build after the credential changes a while ago.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Excite: Get rid of BKL.
Ralf Baechle [Mon, 28 Sep 2009 15:59:12 +0000 (16:59 +0100)]
MIPS: Excite: Get rid of BKL.

It's not obvious what good it was supposed to do here anyway.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Sibyte: Get rid of BKL.
Ralf Baechle [Mon, 28 Sep 2009 15:57:54 +0000 (16:57 +0100)]
MIPS: Sibyte: Get rid of BKL.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Add PCMCIA & Cardbus support.
Maxime Bizon [Mon, 28 Sep 2009 12:49:43 +0000 (14:49 +0200)]
MIPS: BCM63xx: Add PCMCIA & Cardbus support.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: MSP71xx: request_irq() failure ignored in msp_pcibios_config_access()
Roel Kluin [Fri, 18 Sep 2009 19:50:11 +0000 (12:50 -0700)]
MIPS: MSP71xx: request_irq() failure ignored in msp_pcibios_config_access()

Produce an error if request_irq() fails.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: "Ithamar R. Adema" <ithamar.adema@team-embedded.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Decrease size of au1xxx_dbdma_pm_regs[][]
Roel Kluin [Fri, 18 Sep 2009 19:50:10 +0000 (12:50 -0700)]
MIPS: Decrease size of au1xxx_dbdma_pm_regs[][]

There are 16 individual channels (NUM_DBDMA_CHANS) to save/restore plus the
global ddma block config (the +1).  The last register in a channel can be
skipped since it's read-only (at offset 0x18).

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: SMP: Inline arch_send_call_function_{single_ipi,ipi_mask}
Ralf Baechle [Fri, 25 Sep 2009 14:35:28 +0000 (15:35 +0100)]
MIPS: SMP: Inline arch_send_call_function_{single_ipi,ipi_mask}

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: SMP: Fix build.
Ralf Baechle [Fri, 25 Sep 2009 14:08:01 +0000 (15:08 +0100)]
MIPS: SMP: Fix build.

commit 48a048fed82a8e5fdd8618574f6d3de1a0d67a50
Author: Rusty Russell <rusty@rustcorp.com.au>
Date:   Thu Sep 24 09:34:44 2009 -0600

apparently only passed the "looks good" level of QA ;-)

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: MIPSxx SC: Avoid destructive invalidation on partial L2 cachelines.
Kevin Cernekee [Sat, 19 Sep 2009 02:12:45 +0000 (19:12 -0700)]
MIPS: MIPSxx SC: Avoid destructive invalidation on partial L2 cachelines.

This extends commit a8ca8b64e3fdfec17679cba0ca5ce6e3ffed092d to cover
MIPSxx-style board cache code.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Sibyte: Fix compilation error.
Mark Mason [Wed, 23 Sep 2009 20:35:09 +0000 (13:35 -0700)]
MIPS: Sibyte: Fix compilation error.

Build error introduced by d4f587c67fc39e0030ddd718675e252e208da4d7.

Signed-off-by: Mark Mason <mmason@upwardaccess.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM1480: Re-apply patch lost due to bad resolution of merge conflict.
Ralf Baechle [Wed, 23 Sep 2009 20:37:08 +0000 (21:37 +0100)]
MIPS: BCM1480: Re-apply patch lost due to bad resolution of merge conflict.

Patch 14275ccdb1e4b487cca745aba994699c426a31ee and
d5dedd4507d307eb3f35f21b6e16f336fdc0d82a are conflicting and the
conflict was resolved badly in merge
92241940be501f798cb21db344bbb3d1ec3c4f1c resulting in the BCM1480 changes
of 14275ccdb1e4b487cca745aba994699c426a31ee getting lost.  Sort out the
damage.

Reported and initial patch by Mark Mason <mmason@upwardaccess.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Add serial driver for bcm63xx integrated UART.
Maxime Bizon [Fri, 18 Sep 2009 11:04:58 +0000 (13:04 +0200)]
MIPS: BCM63xx: Add serial driver for bcm63xx integrated UART.

Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Loongson2: Fix typo "enalbe" -> "enable"
Uwe Kleine-König [Mon, 21 Sep 2009 08:40:37 +0000 (10:40 +0200)]
MIPS: Loongson2: Fix typo "enalbe" -> "enable"

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Yanhua <yanh@lemote.com>
Cc: Robert Richter <robert.richter@amd.com>
Acked-by: Wu Zhangjin <wuzj@lemote.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: SMTC: Remove duplicate structure field initialization
Julia Lawall [Mon, 21 Sep 2009 15:08:55 +0000 (17:08 +0200)]
MIPS: SMTC: Remove duplicate structure field initialization

The definition of the irq_ipi structure has two initializations of the
flags field.  This combines them.

[Ralf: The issue was originally introduced by commit
be4894196d79455f420dd7bb78be7dc73bec115c (linux-mips.org) rsp.
033890b084adfa367c544864451d7730552ce8bf (kernel.org).  The original
intention of the code was to initialize .flags with both flags ored together.
The broken C code as actually implemented will be compiled by an equally
broken gcc to use only the last initialization, that is IRQF_PERCPU
which means this turned into an SMTC bug for 2.6.23 and newer.]

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: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Remove duplicated #include
Huang Weiyi [Fri, 18 Sep 2009 07:14:35 +0000 (15:14 +0800)]
MIPS: Remove duplicated #include

Remove duplicated #include in arch/mips/kernel/smp.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: BCM63xx: Remove duplicated #include
Huang Weiyi [Fri, 18 Sep 2009 07:14:19 +0000 (15:14 +0800)]
MIPS: BCM63xx: Remove duplicated #include

Remove duplicated #include in arch/mips/bcm63xx/boards/board_bcm963xx.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Wed, 30 Sep 2009 16:42:24 +0000 (09:42 -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:
  nilfs2: fix missing initialization of i_dir_start_lookup member
  nilfs2: fix missing zero-fill initialization of btree node cache

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Wed, 30 Sep 2009 16:32:30 +0000 (09:32 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Fix time encoding with extra epoch bits
  ext4: Add a stub for mpage_da_data in the trace header
  jbd2: Use tracepoints for history file
  ext4: Use tracepoints for mb_history trace file
  ext4, jbd2: Drop unneeded printks at mount and unmount time
  ext4: Handle nested ext4_journal_start/stop calls without a journal
  ext4: Make sure ext4_dirty_inode() updates the inode in no journal mode
  ext4: Avoid updating the inode table bh twice in no journal mode
  ext4: EXT4_IOC_MOVE_EXT: Check for different original and donor inodes first
  ext4: async direct IO for holes and fallocate support
  ext4: Use end_io callback to avoid direct I/O fallback to buffered I/O
  ext4: Split uninitialized extents for direct I/O
  ext4: release reserved quota when block reservation for delalloc retry
  ext4: Adjust ext4_da_writepages() to write out larger contiguous chunks
  ext4: Fix hueristic which avoids group preallocation for closed files
  ext4: Use ext4_msg() for ext4_da_writepage() errors
  ext4: Update documentation about quota mount options

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6
Linus Torvalds [Wed, 30 Sep 2009 16:31:14 +0000 (09:31 -0700)]
Merge git://git./linux/kernel/git/hirofumi/fatfs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/hirofumi/fatfs-2.6:
  fat: Check s_dirt in fat_sync_fs()
  vfat: change the default from shortname=lower to shortname=mixed
  fat/nls: Fix handling of utf8 invalid char

14 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Wed, 30 Sep 2009 15:11:24 +0000 (08:11 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / yenta: Fix cardbus suspend/resume regression
  PM / PCMCIA: Drop second argument of pcmcia_socket_dev_suspend()

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 30 Sep 2009 15:07:12 +0000 (08:07 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (33 commits)
  sony-laptop: re-read the rfkill state when resuming from suspend
  sony-laptop: check for rfkill hard block at load time
  wext: add back wireless/ dir in sysfs for cfg80211 interfaces
  wext: Add bound checks for copy_from_user
  mac80211: improve/fix mlme messages
  cfg80211: always get BSS
  iwlwifi: fix 3945 ucode info retrieval after failure
  iwlwifi: fix memory leak in command queue handling
  iwlwifi: fix debugfs buffer handling
  cfg80211: don't set privacy w/o key
  cfg80211: wext: don't display BSSID unless associated
  net: Add explicit bound checks in net/socket.c
  bridge: Fix double-free in br_add_if.
  isdn: fix netjet/isdnhdlc build errors
  atm: dereference of he_dev->rbps_virt in he_init_group()
  ax25: Add missing dev_put in ax25_setsockopt
  Revert "sit: stateless autoconf for isatap"
  net: fix double skb free in dcbnl
  net: fix nlmsg len size for skb when error bit is set.
  net: fix vlan_get_size to include vlan_flags size
  ...

14 years agoMerge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Wed, 30 Sep 2009 15:03:00 +0000 (08:03 -0700)]
Merge branch 'drm-next' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (25 commits)
  drm/radeon/kms: Convert R520 to new init path and associated cleanup
  drm/radeon/kms: Convert RV515 to new init path and associated cleanup
  drm: fix radeon DRM warnings when !CONFIG_DEBUG_FS
  drm: fix drm_fb_helper warning when !CONFIG_MAGIC_SYSRQ
  drm/r600: fix memory leak introduced with 64k malloc avoidance fix.
  drm/kms: make fb helper work for all drivers.
  drm/radeon/r600: fix offset handling in CS parser
  drm/radeon/kms/r600: fix forcing pci mode on agp cards
  drm/radeon/kms: fix for the extra pages copying.
  drm/radeon/kms/r600: add support for vline relocs
  drm/radeon/kms: fix some bugs in vline reloc
  drm/radeon/kms/r600: clamp vram to aperture size
  drm/kms: protect against fb helper not being created.
  drm/r600: get values from the passed in IB not the copy.
  drm: create gitignore file for radeon
  drm/radeon/kms: remove unneeded master create/destroy functions.
  drm/kms: start adding command line interface using fb.
  fb: change rules for global rules match.
  drm/radeon/kms: don't require up to 64k allocations. (v2)
  drm/radeon/kms: enable dac load detection by default.
  ...

Trivial conflicts in drivers/gpu/drm/radeon/radeon_asic.h due to adding
'->vga_set_state' function pointers.

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Linus Torvalds [Wed, 30 Sep 2009 14:58:46 +0000 (07:58 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tj/percpu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu: make allocation failures more verbose
  percpu: make pcpu_setup_first_chunk() failures more verbose
  percpu: make embedding first chunk allocator check vmalloc space size
  sparc64: implement page mapping percpu first chunk allocator
  percpu: make pcpu_build_alloc_info() clear static buffers
  percpu: fix unit_map[] verification in pcpu_setup_first_chunk()

14 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 30 Sep 2009 14:58:25 +0000 (07:58 -0700)]
Merge branch 'omap-fixes-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  omap: Fix wrong condition check in while loop for mailbox and iommu2
  omap: rng: Use resource_size instead of manual calculation
  omap: Fix MMC gpio_wp for BeagleBoard C2 and above
  omap: Fix matrix_keymap_data usage
  omap: Fix a OMAP_MPUIO_VBASE typo for 850
  omap: Fix wrong jtag_id for 850
  omap: iovmm: Fix compiler warning
  omap: mailbox: Flush posted write when acking mailbox irq
  omap: mailbox: Execute softreset at startup
  omap: Add missing mux pin for EHCI phy reset line
  omap: Fix 44xx compile
  omap: Fix mcspi compile for 2420
  omap: Fix compile for arch/arm/mach-omap2

14 years agopty: reconnect the BSD TIOCSPTLCK handling to legacy ptys
Linus Torvalds [Wed, 30 Sep 2009 14:49:40 +0000 (07:49 -0700)]
pty: reconnect the BSD TIOCSPTLCK handling to legacy ptys

David Howells noticed (due to the compiler warning about an unused
'pty_ops_bsd' variable) that we haven't actually been using the code
that implements TIOCSPTLCK for legacy pty handling.  It's been that way
since 2.6.26, commit 3e8e88ca053150efdbecb45d8f481cf560ec808d to be
exact ("pty: prepare for tty->ops changes").

DavidH initially submitted a patch just removing the dead code entirely,
and since nobody has apparently ever complained, I'm not entirely sure
that wouldn't be the right thing to do.  But since the whole and only
point of the legacy pty code is to be compatible with legacy distros
that don't use the new unix98 pty model, let's just wire it up again.

And clean it up a bit while we're at it.

Acked-by: David Howells <dhowells@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoRevert "x86, mce: do not compile mcelog message on AMD"
Linus Torvalds [Wed, 30 Sep 2009 14:48:37 +0000 (07:48 -0700)]
Revert "x86, mce: do not compile mcelog message on AMD"

This reverts commit 22223c9b417be5fd0ab2cf9ad17eb7bd1e19f7b9, as
requested by Andi Kleen:

  "Obviously kernels compiled with AMD support can still run on non AMD
   systems, so messages like this can never be removed at compile time."

Requsted-by: Andi Kleen <andi@firstfloor.org>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoALSA: echoaudio - Re-enable the line-out control for the Mia card
Giuliano Pochini [Wed, 30 Sep 2009 06:26:45 +0000 (08:26 +0200)]
ALSA: echoaudio - Re-enable the line-out control for the Mia card

Mia has an undocumented line-out control, and it has to be exposed.

Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Resurrect input-source mixer of ALC268 model=acer
Takashi Iwai [Wed, 30 Sep 2009 06:13:44 +0000 (08:13 +0200)]
ALSA: hda - Resurrect input-source mixer of ALC268 model=acer

In the commit fdbc66266c21976027938642f60e0f047149a61a, I mistakenly
replaced the capture mixer array for ALC268_ACER to nosrc version
although this should be kept to alt_mixer.  Now fixed back.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoext4: Fix time encoding with extra epoch bits
Theodore Ts'o [Wed, 30 Sep 2009 05:13:55 +0000 (01:13 -0400)]
ext4: Fix time encoding with extra epoch bits

"Looking at ext4.h, I think the setting of extra time fields forgets to
mask the epoch bits so the epoch part overwrites nsec part. The second
change is only for coherency (2 -> EXT4_EPOCH_BITS)."

Thanks to Damien Guibouret for pointing out this problem.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Add a stub for mpage_da_data in the trace header
Josh Stone [Wed, 30 Sep 2009 04:51:22 +0000 (00:51 -0400)]
ext4: Add a stub for mpage_da_data in the trace header

The tracepoint ext4_da_write_pages has a struct mpage_da_data*
parameter, but that struct is only defined in fs/ext4/ext4.h.  This
patch adds a forward declaration for that struct, so this tracepoint
header can still be used by tools like SystemTap.

This is a continuation of the fix in commit 3661d286.

http://sourceware.org/bugzilla/show_bug.cgi?id=10703

Signed-off-by: Josh Stone <jistone@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agojbd2: Use tracepoints for history file
Theodore Ts'o [Wed, 30 Sep 2009 04:32:06 +0000 (00:32 -0400)]
jbd2: Use tracepoints for history file

The /proc/fs/jbd2/<dev>/history was maintained manually; by using
tracepoints, we can get all of the existing functionality of the /proc
file plus extra capabilities thanks to the ftrace infrastructure.  We
save memory as a bonus.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Use tracepoints for mb_history trace file
Theodore Ts'o [Wed, 30 Sep 2009 04:32:42 +0000 (00:32 -0400)]
ext4: Use tracepoints for mb_history trace file

The /proc/fs/ext4/<dev>/mb_history was maintained manually, and had a
number of problems: it required a largish amount of memory to be
allocated for each ext4 filesystem, and the s_mb_history_lock
introduced a CPU contention problem.

By ripping out the mb_history code and replacing it with ftrace
tracepoints, and we get more functionality: timestamps, event
filtering, the ability to correlate mballoc history with other ext4
tracepoints, etc.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoBtrfs: fix deadlock with free space handling and user transactions
Sage Weil [Tue, 29 Sep 2009 22:38:44 +0000 (18:38 -0400)]
Btrfs: fix deadlock with free space handling and user transactions

If an ioctl-initiated transaction is open, we can't force a commit during
the free space checks in order to free up pinned extents or else we
deadlock.  Just ENOSPC instead.

A more satisfying solution that reserves space for the entire user
transaction up front is forthcoming...

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: fix error cases for ioctl transactions
Sage Weil [Tue, 29 Sep 2009 22:38:44 +0000 (18:38 -0400)]
Btrfs: fix error cases for ioctl transactions

Fix leak of vfsmount write reference and open_ioctl_trans reference on
ENOMEM.  Clean up the error paths while we're at it.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoar9170: fix bug in iq-auto calibration value calculation
Christian Lamparter [Tue, 29 Sep 2009 18:47:25 +0000 (20:47 +0200)]
ar9170: fix bug in iq-auto calibration value calculation

This patch fixes a embarrassing bug which was introduced by:
"[PATCH] ar9170: implement frequency calibration for one-stage/openfw"

The phy_data variable initialization has to done outside the for-loop
scope. This is because the for-loop uses u32 phy_data variable more
like a 4-byte field. But in each run only a single byte is calculated.
Therefore phy_data content needs to stay the same for at least 3 more
iterations, before the complete set can be uploaded.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Thrustmaster FunAccess WIFI USB and rt73usb
Michal Szalata [Tue, 29 Sep 2009 13:37:53 +0000 (15:37 +0200)]
rt2x00: Thrustmaster FunAccess WIFI USB and rt73usb

Thrustmaster FunAccess WIFI USB works with rt73usb with little
modification of rt73usb.c.
Tested with version 2.3.0 of driver.

Signed-off-by: Michal Szalata <szalat@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211_hwsim: Fix initial beacon timer configuration
Jouni Malinen [Sat, 26 Sep 2009 19:30:15 +0000 (22:30 +0300)]
mac80211_hwsim: Fix initial beacon timer configuration

mac80211_hwsim does not start transmitting Beacon frames when hostapd
is started for the first time and restarting hostapd fixes this. The
issue is caused by the config() handler not being able to start
beacon_timer when beacon interval is not yet known and
bss_info_changed() handler not starting the timer. This can be fixed by
making the bss_info_changed() update the timer.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Always use block-I/O for the PIO data registers
Michael Buesch [Wed, 23 Sep 2009 16:51:21 +0000 (18:51 +0200)]
b43: Always use block-I/O for the PIO data registers

On SDIO the PIO data register seems to be hardwired to LE. So
the MACCTL bit has no effect on the endianness.
So also use block-I/O for the last word of the packet. block-I/O is always LE.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Albert Herranz <albert_herranz@yahoo.es>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Fix [re]association power saving issue on AP side
Igor Perminov [Mon, 21 Sep 2009 20:25:44 +0000 (00:25 +0400)]
mac80211: Fix [re]association power saving issue on AP side

Consider the following step-by step:
1. A STA authenticates and associates with the AP and exchanges
traffic.
2. The STA reports to the AP that it is going to PS state.
3. Some time later the STA device goes to the stand-by mode (not only
its wi-fi card, but the device itself) and drops the association state
without sending a disassociation frame.
4. The STA device wakes up and begins authentication with an
Auth frame as it hasn't been authenticated/associated previously.

At the step 4 the AP "remembers" the STA and considers it is still in
the PS state, so the AP buffers frames, which it has to send to the STA.
But the STA isn't actually in the PS state and so it neither checks
TIM bits nor reports to the AP that it isn't power saving.
Because of that authentication/[re]association fails.

To fix authentication/[re]association stage of this issue, Auth, Assoc
Resp and Reassoc Resp frames are transmitted disregarding of STA's power
saving state.

N.B. This patch doesn't fix further data frame exchange after
authentication/[re]association. A patch in hostapd is required to fix
that.

Signed-off-by: Igor Perminov <igor.perminov@inbox.ru>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoext4, jbd2: Drop unneeded printks at mount and unmount time
Theodore Ts'o [Tue, 29 Sep 2009 19:51:30 +0000 (15:51 -0400)]
ext4, jbd2: Drop unneeded printks at mount and unmount time

There are a number of kernel printk's which are printed when an ext4
filesystem is mounted and unmounted.  Disable them to economize space
in the system logs.  In addition, disabling the mballoc stats by
default saves a number of unneeded atomic operations for every block
allocation or deallocation.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoBtrfs: Use CONFIG_BTRFS_POSIX_ACL to enable ACL code
Chris Ball [Tue, 29 Sep 2009 17:51:05 +0000 (13:51 -0400)]
Btrfs: Use CONFIG_BTRFS_POSIX_ACL to enable ACL code

We've already defined CONFIG_BTRFS_POSIX_ACL in Kconfig, but we're
currently not using it and are testing CONFIG_FS_POSIX_ACL instead.
CONFIG_FS_POSIX_ACL states "Never use this symbol for ifdefs".

Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: introduce missing kfree
Julia Lawall [Tue, 29 Sep 2009 17:51:04 +0000 (13:51 -0400)]
Btrfs: introduce missing kfree

Error handling code following a kzalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoBtrfs: Fix setting umask when POSIX ACLs are not enabled
Chris Ball [Tue, 29 Sep 2009 17:51:04 +0000 (13:51 -0400)]
Btrfs: Fix setting umask when POSIX ACLs are not enabled

We currently set sb->s_flags |= MS_POSIXACL unconditionally, which is
incorrect -- it tells the VFS that it shouldn't set umask because we
will, yet we don't set it ourselves if we aren't using POSIX ACLs, so
the umask ends up ignored.

Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
14 years agoext4: Handle nested ext4_journal_start/stop calls without a journal
Curt Wohlgemuth [Tue, 29 Sep 2009 15:01:03 +0000 (11:01 -0400)]
ext4: Handle nested ext4_journal_start/stop calls without a journal

This patch fixes a problem with handling nested calls to
ext4_journal_start/ext4_journal_stop, when there is no journal present.

Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Make sure ext4_dirty_inode() updates the inode in no journal mode
Curt Wohlgemuth [Tue, 29 Sep 2009 20:06:01 +0000 (16:06 -0400)]
ext4: Make sure ext4_dirty_inode() updates the inode in no journal mode

This patch a problem that ext4_dirty_inode() was not calling
ext4_mark_inode_dirty() if the current_handle is not valid, which it
is the case in no journal mode.

It also removes a test for non-matching transaction which can never
happen.

Signed-off-by: Curt Wohlgemuth <curtw@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agoext4: Avoid updating the inode table bh twice in no journal mode
Frank Mayhar [Tue, 29 Sep 2009 14:07:47 +0000 (10:07 -0400)]
ext4: Avoid updating the inode table bh twice in no journal mode

This is a cleanup of commit 91ac6f4.  Since ext4_mark_inode_dirty()
has already called ext4_mark_iloc_dirty(), which in turn calls
ext4_do_update_inode(), it's not necessary to have ext4_write_inode()
call ext4_do_update_inode() in no journal mode.  Indeed, it would be
duplicated work.

Reviewed-by: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Frank Mayhar <fmayhar@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 years agonilfs2: fix missing initialization of i_dir_start_lookup member
Ryusuke Konishi [Mon, 28 Sep 2009 04:02:46 +0000 (13:02 +0900)]
nilfs2: fix missing initialization of i_dir_start_lookup member

The i_dir_start_lookup field in nilfs_inode_info objects should be
cleared when the objects are allocated, but the the initialization was
missing in case of reading from disk.  This adds the initialization.

Since the variable just gives a start page on directory lookups, the
bug was nonfatal until now.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
14 years agonilfs2: fix missing zero-fill initialization of btree node cache
Ryusuke Konishi [Sun, 27 Sep 2009 16:46:11 +0000 (01:46 +0900)]
nilfs2: fix missing zero-fill initialization of btree node cache

This will fix file system corruption which infrequently happens after
mount.  The problem was reported from users with the title "[NILFS
users] Fail to mount NILFS." (Message-ID:
<200908211918.34720.yuri@itinteg.net>), and so forth.  I've also
experienced the corruption multiple times on kernel 2.6.30 and 2.6.31.

The problem turned out to be caused due to discordance between
mapping->nrpages of a btree node cache and the actual number of pages
hung on the cache; if the mapping->nrpages becomes zero even as it has
pages, truncate_inode_pages() returns without doing anything.  Usually
this is harmless except it may cause page leak, but garbage collection
fairly infrequently sees a stale page remained in the btree node cache
of DAT (i.e. disk address translation file of nilfs), and induces the
corruption.

I identified a missing initialization in btree node caches was the
root cause.  This corrects the bug.

I've tested this for kernel 2.6.30 and 2.6.31.

Reported-by: Yuri Chislov <yuri@itinteg.net>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: stable <stable@kernel.org>
14 years agoALSA: hda - Analog Devices AD1984A add HP Touchsmart model
Miguel de Barros [Sun, 27 Sep 2009 20:11:21 +0000 (22:11 +0200)]
ALSA: hda - Analog Devices AD1984A add HP Touchsmart model

Reference: ALSA bug #0004614
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4614

port-A (0x11)      - front hp-out
port-D (0x12)      - rear line out
port-E (0x1c)      - front mic-in
port-F (0x16)      - Internal speakers
digital-mic (0x17) - Internal mic

init verbs, mixers, jack sensing and PCI_QUIRK to support this hardware

Signed-off-by: Miguel de Barros <miguel.de.barros@bluewin.ch>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agodrm/radeon/kms: Convert R520 to new init path and associated cleanup
Jerome Glisse [Mon, 28 Sep 2009 18:39:19 +0000 (20:39 +0200)]
drm/radeon/kms: Convert R520 to new init path and associated cleanup

Convert the r520 asic support to new init path, change are smaller than
previous one as most of the architecture is now in place and more code
sharing can happen btw various asics.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agodrm/radeon/kms: Convert RV515 to new init path and associated cleanup
Jerome Glisse [Mon, 28 Sep 2009 16:34:43 +0000 (18:34 +0200)]
drm/radeon/kms: Convert RV515 to new init path and associated cleanup

Convert the rv515 asic support to new init path also add an explanation
in radeon.h about the new init path. There is also few cleanups
associated with this change (others asic calling rv515 helper
functions).

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agodrm: fix radeon DRM warnings when !CONFIG_DEBUG_FS
Mikael Pettersson [Mon, 28 Sep 2009 16:27:23 +0000 (18:27 +0200)]
drm: fix radeon DRM warnings when !CONFIG_DEBUG_FS

Compiling the radeon DRM driver with !CONFIG_DEBUG_FS
throws the following warnings:

drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_ttm_debugfs_init':
drivers/gpu/drm/radeon/radeon_ttm.c:714: warning: unused variable 'i'
drivers/gpu/drm/radeon/radeon_ttm.c: At top level:
drivers/gpu/drm/radeon/radeon_ttm.c:692: warning: 'radeon_mem_types_list' defined but not used
drivers/gpu/drm/radeon/radeon_ttm.c:693: warning: 'radeon_mem_types_names' defined but not used

Fix: move these variables inside the #if defined(CONFIG_DEBUG_FS)
block in radeon_ttm_debugsfs_init(), which is the only place using them.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agodrm: fix drm_fb_helper warning when !CONFIG_MAGIC_SYSRQ
Mikael Pettersson [Mon, 28 Sep 2009 16:26:25 +0000 (18:26 +0200)]
drm: fix drm_fb_helper warning when !CONFIG_MAGIC_SYSRQ

Compiling DRM throws the following warning if MAGIC_SYSRQ is disabled:

drivers/gpu/drm/drm_fb_helper.c:101: warning: 'sysrq_drm_fb_helper_restore_op' defined but not used

Fix: place sysrq_drm_fb_helper_restore_op and associated
definitions inside #ifdef CONFIG_MAGIC_SYSRQ.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Dave Airlie <airlied@linux.ie>
14 years agopercpu: make allocation failures more verbose
Tejun Heo [Tue, 29 Sep 2009 00:17:58 +0000 (09:17 +0900)]
percpu: make allocation failures more verbose

Warn and dump stack when percpu allocation fails.  percpu allocator is
still young and unchecked NULL percpu pointer usage can result in
random memory corruption when combined with the pointer shifting in
access macros.  Allocation failures should be rare and the warning
message will be disabled after certain times.

Signed-off-by: Tejun Heo <tj@kernel.org>
14 years agopercpu: make pcpu_setup_first_chunk() failures more verbose
Tejun Heo [Thu, 24 Sep 2009 00:43:11 +0000 (09:43 +0900)]
percpu: make pcpu_setup_first_chunk() failures more verbose

The parameters to pcpu_setup_first_chunk() come from different sources
depending on architecture and can be quite complex.  The function runs
various sanity checks on the parameters and triggers BUG() if
something isn't right.  However, this is very early during the boot
and not reporting exactly what the problem is makes debugging even
harder.

Add PCPU_SETUP_BUG() macro which prints out enough information about
the parameters.  As the macro still puts separate BUG() for each
check, it won't lose any information even on the situations where only
the program counter can be retrieved.

While at it, also bump pcpu_dump_alloc_info() message to KERN_INFO so
that it's visible on the console if boot fails to complete.

Signed-off-by: Tejun Heo <tj@kernel.org>
14 years agopercpu: make embedding first chunk allocator check vmalloc space size
Tejun Heo [Thu, 24 Sep 2009 09:46:01 +0000 (18:46 +0900)]
percpu: make embedding first chunk allocator check vmalloc space size

Embedding first chunk allocator maintains the distances between units
in the vmalloc area and thus needs vmalloc space to be larger than the
maximum distances between units; otherwise, it wouldn't be able to
create any dynamic chunks.  This patch makes the embedding first chunk
allocator check vmalloc space size and if the maximum distance between
units is larger than 75% of it, print warning and, if page mapping
allocator is available, fail initialization so that the system falls
back onto it.

This should work around percpu allocation failure problems on certain
sparc64 configurations where distances between NUMA nodes are larger
than the vmalloc area and makes percpu allocator more robust for
future configurations.

Signed-off-by: Tejun Heo <tj@kernel.org>
14 years agosparc64: implement page mapping percpu first chunk allocator
Tejun Heo [Thu, 24 Sep 2009 09:18:55 +0000 (18:18 +0900)]
sparc64: implement page mapping percpu first chunk allocator

Implement page mapping percpu first chunk allocator as a fallback to
the embedding allocator.  The next patch will make the embedding
allocator check distances between units to determine whether it fits
within the vmalloc area so that this fallback can be used on such
cases.

sparc64 currently has relatively small vmalloc area which makes it
impossible to create any dynamic chunks on certain configurations
leading to percpu allocation failures.  This and the next patch should
allow those configurations to keep working until proper solution is
found.

While at it, mark pcpu_cpu_distance() with __init.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: David S. Miller <davem@davemloft.net>
14 years agopercpu: make pcpu_build_alloc_info() clear static buffers
Tejun Heo [Thu, 24 Sep 2009 09:50:34 +0000 (18:50 +0900)]
percpu: make pcpu_build_alloc_info() clear static buffers

pcpu_build_alloc_info() may be called multiple times when percpu is
falling back to different first chunk allocator.  Make it clear static
buffers so that they don't contain values from previous runs.

Signed-off-by: Tejun Heo <tj@kernel.org>
14 years agopercpu: fix unit_map[] verification in pcpu_setup_first_chunk()
Tejun Heo [Tue, 29 Sep 2009 00:17:56 +0000 (09:17 +0900)]
percpu: fix unit_map[] verification in pcpu_setup_first_chunk()

pcpu_setup_first_chunk() incorrectly used NR_CPUS as the impossible
unit number while unit number can equal and go over NR_CPUS with
sparse unit map.  This triggers BUG_ON() spuriously on machines which
have non-power-of-two number of cpus.  Use UINT_MAX instead.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-and-tested-by: Tony Vroon <tony@linx.net>
14 years agoPM / yenta: Fix cardbus suspend/resume regression
Rafael J. Wysocki [Mon, 28 Sep 2009 22:11:03 +0000 (00:11 +0200)]
PM / yenta: Fix cardbus suspend/resume regression

Since 2.6.29 the PCI PM core have been restoring the standard
configuration registers of PCI devices in the early phase of
resume.  In particular, PCI devices without drivers have been handled
this way since commit 355a72d75b3b4f4877db4c9070c798238028ecb5
(PCI: Rework default handling of suspend and resume).  Unfortunately,
this leads to post-resume problems with CardBus devices which cannot
be accessed in the early phase of resume, because the sockets they
are on have not been woken up yet at that point.

To solve this problem, move the yenta socket resume to the early
phase of resume and, analogously, move the suspend of it to the late
phase of suspend.  Additionally, remove some unnecessary PCI code
from the yenta socket's resume routine.

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=13092, which is a
post-2.6.28 regression.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Florian <fs-kernelbugzilla@spline.de>
Cc: stable@kernel.org
14 years agoPM / PCMCIA: Drop second argument of pcmcia_socket_dev_suspend()
Rafael J. Wysocki [Mon, 28 Sep 2009 22:10:41 +0000 (00:10 +0200)]
PM / PCMCIA: Drop second argument of pcmcia_socket_dev_suspend()

pcmcia_socket_dev_suspend() doesn't use its second argument, so it
may be dropped safely.

This change is necessary for the subsequent yenta suspend/resume fix.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
14 years agoMerge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Mon, 28 Sep 2009 21:50:06 +0000 (14:50 -0700)]
Merge branch 'master' of ssh:///linux/kernel/git/linville/wireless-2.6

14 years agosony-laptop: re-read the rfkill state when resuming from suspend
Alan Jenkins [Fri, 25 Sep 2009 09:18:21 +0000 (10:18 +0100)]
sony-laptop: re-read the rfkill state when resuming from suspend

Without this, the hard-blocked state will be reported incorrectly if
the hardware switch is changed while the laptop is suspended.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Tested-by: Norbert Preining <preining@logic.at>
Acked-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agosony-laptop: check for rfkill hard block at load time
Alan Jenkins [Thu, 24 Sep 2009 19:15:24 +0000 (20:15 +0100)]
sony-laptop: check for rfkill hard block at load time

"I recently (on a flight) I found out that when I boot with the hard-switch
activated, so turning off all wireless activity on my laptop, the state
is not correctly announced in /dev/rfkill (reading it with rfkill command,
or my own gnome applet)...

After turning off and on again the hard-switch the events were right."

We can fix this by querying the firmware at load time and calling
rfkill_set_hw_state().

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Tested-by: Norbert Preining <preining@logic.at>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Mattia Dongili <malattia@linux.it>
CC: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowext: add back wireless/ dir in sysfs for cfg80211 interfaces
Johannes Berg [Mon, 28 Sep 2009 13:26:43 +0000 (15:26 +0200)]
wext: add back wireless/ dir in sysfs for cfg80211 interfaces

The move away from having drivers assign wireless handlers,
in favour of making cfg80211 assign them, broke the sysfs
registration (the wireless/ dir went missing) because the
handlers are now assigned only after registration, which is
too late.

Fix this by special-casing cfg80211-based devices, all
of which are required to have an ieee80211_ptr, in the
sysfs code, and also using get_wireless_stats() to have
the same values reported as in procfs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reported-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Tested-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowext: Add bound checks for copy_from_user
Arjan van de Ven [Sat, 26 Sep 2009 18:51:14 +0000 (20:51 +0200)]
wext: Add bound checks for copy_from_user

The wireless extensions have a copy_from_user to a local stack
array "essid", but both me and gcc have failed to find where
the bounds for this copy are located in the code.

This patch adds some basic sanity checks for the copy length
to make sure that we don't overflow the stack buffer.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: improve/fix mlme messages
Johannes Berg [Sat, 26 Sep 2009 12:45:41 +0000 (14:45 +0200)]
mac80211: improve/fix mlme messages

It's useful to know the MAC address when being
disassociated; fix a typo (missing colon) and
move some messages so we get them only when they
are actually taking effect.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: always get BSS
Johannes Berg [Sat, 26 Sep 2009 12:42:53 +0000 (14:42 +0200)]
cfg80211: always get BSS

Multiple problems were reported due to interaction
between wpa_supplicant and the wext compat code in
cfg80211, which appear to be due to it not getting
any bss pointer here when wpa_supplicant sets all
parameters -- do that now. We should still get the
bss after doing an extra scan, but that appears to
increase the time we need for connecting enough to
sometimes cause timeouts.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Hin-Tak Leung <hintak.leung@gmail.com>,
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix 3945 ucode info retrieval after failure
Reinette Chatre [Fri, 25 Sep 2009 21:24:23 +0000 (14:24 -0700)]
iwlwifi: fix 3945 ucode info retrieval after failure

When hardware or uCode problem occurs driver captures significant
information from device to enable debugging. The format of this information
is different between 3945 and 4965 and later devices, yet currently the
3945 uses the 4965 and later format. Fix this by adding a new library call
that is initialized to the correct formatting routine based on device.

This moves the iwlagn event and error log handling back to iwl-agn.c to
make it part of iwlagn module.

Also remove the 3945 sysfs file that triggers dump of event log - there is
already a debugfs file that can do it for all drivers.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix memory leak in command queue handling
Reinette Chatre [Fri, 25 Sep 2009 21:24:22 +0000 (14:24 -0700)]
iwlwifi: fix memory leak in command queue handling

Also free the array of command pointers and meta data of each
command buffer when command queue is freed.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoiwlwifi: fix debugfs buffer handling
Reinette Chatre [Fri, 25 Sep 2009 21:24:21 +0000 (14:24 -0700)]
iwlwifi: fix debugfs buffer handling

We keep track of where to write into a buffer by keeping a count of how
much has been written so far. When writing to the buffer we thus take the
buffer pointer and adding the count of what has been written so far.
Keeping track of what has been written so far is done by incrementing
this number every time something is written to the buffer with how much has
been written at that time.

Currently this number is incremented incorrectly when using the
"hex_dump_to_buffer" call to add data to the buffer. Fix this by only
adding what has been added to the buffer in that call instead of what has
been added since beginning of buffer.

Issue was discovered and discussed during testing of
https://bugzilla.redhat.com/show_bug.cgi?id=464598 .

When a user views any of these files they will see something like:

[  179.355202] ------------[ cut here ]------------
[  179.355209] WARNING: at ../lib/vsprintf.c:989 vsnprintf+0x5ec/0x5f0()
[  179.355212] Hardware name: VGN-Z540N
[  179.355213] Modules linked in: i915 drm i2c_algo_bit i2c_core ipv6 acpi_cpufreq cpufreq_userspace cpufreq_powersave cpufreq_ondemand cpufreq_conservative cpufreq_stats freq_table container sbs sbshc arc4 ecb iwlagn iwlcore joydev led_class mac80211 af_packet pcmcia psmouse sony_laptop cfg80211 iTCO_wdt iTCO_vendor_support pcspkr serio_raw rfkill intel_agp video output tpm_infineon tpm tpm_bios button battery yenta_socket rsrc_nonstatic pcmcia_core processor ac evdev ext3 jbd mbcache sr_mod sg cdrom sd_mod ahci libata scsi_mod ehci_hcd uhci_hcd usbcore thermal fan thermal_sys
[  179.355262] Pid: 5449, comm: cat Not tainted 2.6.31-wl-54419-ge881071 #62
[  179.355264] Call Trace:
[  179.355267]  [<ffffffff811ad14c>] ? vsnprintf+0x5ec/0x5f0
[  179.355271]  [<ffffffff81041348>] warn_slowpath_common+0x78/0xd0
[  179.355275]  [<ffffffff810413af>] warn_slowpath_null+0xf/0x20
[  179.355277]  [<ffffffff811ad14c>] vsnprintf+0x5ec/0x5f0
[  179.355280]  [<ffffffff811ad23d>] ? scnprintf+0x5d/0x80
[  179.355283]  [<ffffffff811ad23d>] scnprintf+0x5d/0x80
[  179.355286]  [<ffffffff811aed29>] ? hex_dump_to_buffer+0x189/0x340
[  179.355290]  [<ffffffff810e91d7>] ? __kmalloc+0x207/0x260
[  179.355303]  [<ffffffffa02a02f8>] iwl_dbgfs_nvm_read+0xe8/0x220 [iwlcore]
[  179.355306]  [<ffffffff811a9b62>] ? __up_read+0x92/0xb0
[  179.355310]  [<ffffffff810f0988>] vfs_read+0xc8/0x1a0
[  179.355313]  [<ffffffff810f0b50>] sys_read+0x50/0x90
[  179.355316]  [<ffffffff8100bd6b>] system_call_fastpath+0x16/0x1b
[  179.355319] ---[ end trace 2383d0d5e0752ca0 ]---

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: don't set privacy w/o key
Johannes Berg [Thu, 24 Sep 2009 07:00:57 +0000 (09:00 +0200)]
cfg80211: don't set privacy w/o key

When wpa_supplicant is used to connect to open networks,
it causes the wdev->wext.keys to point to key memory, but
that key memory is all empty. Only use privacy when there
is a default key to be used.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>