]> git.karo-electronics.de Git - mv-sheeva.git/log
mv-sheeva.git
14 years agoStaging: android: mark subsystem as broken
Greg Kroah-Hartman [Mon, 26 Oct 2009 23:03:51 +0000 (16:03 -0700)]
Staging: android: mark subsystem as broken

It's causing lots of build errors, so just mark it as broken.  It is
scheduled to be removed in 2.6.33 anyway.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: remove stlc45xx driver
Greg Kroah-Hartman [Mon, 26 Oct 2009 23:35:32 +0000 (16:35 -0700)]
Staging: remove stlc45xx driver

It's no longer needed as the p54spi driver is the same thing,
under a different name and in the correct portion of the kernel tree.

Cc: Javier Martinez Canillas <martinez.javier@gmail.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: rtl8187se/rtl8192e/rtl8192su: allow module unload
Herton Ronaldo Krzesinski [Fri, 2 Oct 2009 14:03:38 +0000 (11:03 -0300)]
Staging: rtl8187se/rtl8192e/rtl8192su: allow module unload

On rtl81* additions, they had its wireless stack made builtin instead of
separated modules. But try_module_get/module_put in stack were kept,
they are uneeded with the stack builtin and makes rtl81* modules
impossible to remove on a system with an rtl81* card. request_module
calls are also uneeded with stack builtin, so remove them too.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: vt6656: fix the memory free bug in vntwusb_disconnect()
miaofng [Tue, 29 Sep 2009 07:02:53 +0000 (15:02 +0800)]
Staging: vt6656: fix the memory free bug in vntwusb_disconnect()

This patch is used to solve the memory bug when people plug out the wusb card then plug in.
Error logs are following:

root@smdk2440:~# ifdown eth1
AP deauthed me, reason=2.
Config_FileOperation file Not exist
Zone=[1][J][P]!!
WPA: Terminating
root@smdk2440:~#  ----> !!!!!!!!!!!!!!here plug out the wusbcard
usb 1-1: USB disconnect, address 4
----> !!!!!!!!!!!!!!!!!!!here plug in the wusb card
usb 1-1: new full speed USB device using s3c2410-ohci and address 5
usb 1-1: New USB device found, idVendor=160a, idProduct=3184
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: VNT USB-802.11 Wireless LAN Adapter
usb 1-1: Manufacturer: VIA Networking Technologies, Inc.
usb 1-1: configuration #1 chosen from 1 choice
VIA Networking Wireless LAN USB Driver Ver. 1.19_12
Copyright (c) 2004 VIA Networking Technologies, Inc.
kernel BUG at mm/slab.c:2974!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 817 [#1] PREEMPT
Modules linked in: vt6656_stage
CPU: 0    Not tainted  (2.6.32-rc2 #14)
PC is at __bug+0x1c/0x28
LR is at __bug+0x18/0x28
pc : [<c002fb10>]    lr : [<c002fb0c>]    psr: 40000093
sp : c3867c68  ip : c3867bd0  fp : c3866000
r10: c3800600  r9 : c3802430  r8 : 00000004
r7 : c3802428  r6 : c3802660  r5 : c3802420  r4 : a0000013
r3 : 00000000  r2 : c3866000  r1 : 00000003  r0 : 00000024
Flags: nZcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0000717f  Table: 330a8000  DAC: 00000017
Process khubd (pid: 152, stack limit = 0xc3866270)
Stack: (0xc3867c68 to 0xc3868000)
7c60:                   c0093fdc c0094088 000000d0 000000d0 00000000 000080d0
7c80: 00000000 a0000013 c39ebec0 c3800600 000080d0 00000001 c03f13cc 00000006
7ca0: c02b36f0 c0094574 c0043428 0001c9de c39ebec0 c39ebea0 c3000c00 c02a6a84
7cc0: 89705f41 c3000c00 c39ebec0 c39ebea0 c3000c00 bf036f24 c39ebec8 00000006
7ce0: 00000000 c3000c00 c39ebec0 c39ebea0 c3000c00 bf036f24 c39ebec8 00000006
7d00: 00000000 bf003398 c00aa514 c3867d20 0000a1ff c00e1448 c39d9f84 c39aabe8
7d20: c3867d50 c00e1888 c39aabe8 c39ebea0 c39ebec0 bf036ebc c3000c00 bf036f24
7d40: 0000bec8 01000000 00000000 c39ebea0 c39ebec0 bf036ebc c3000c00 bf036f24
7d60: c39ebec8 00000000 00000000 c0223798 c39ebec0 c01daa14 bf036eec c3867da0
7d80: c045a4f8 c01da6e4 c39ebec0 00000000 c01daa14 c39ebec0 c3867da0 c01d9870
7da0: c38331a8 c39fcb94 c005b3b4 c39ebec0 c39ebec0 c39ebef4 00000000 c01da890
7dc0: c39ebec0 c39ebec0 c3000c00 c01d97f4 00000000 c01d8470 c39ebea0 c3000c68
7de0: 00000000 c3000c68 c3218a00 c3abcd20 00000001 c39ebec0 c39ebea0 c3000c00
7e00: 00000000 c3000c68 c3218a00 c3abcd20 00000001 c0221ee8 00000001 00000000
7e20: 00000000 00000000 00001388 00000000 c3000c04 c3000c68 c3bc29c0 00000001
7e40: c3bc29c4 00000001 c03f4af8 00000000 c39fe780 c3000c00 00000001 c045ab04
7e60: c3867eb8 c045a3bc c3000c70 00000000 00000000 c0229238 c3000c68 c0223210
7e80: c3000c00 c045aaf0 c045ab04 c0223230 c3000c68 c01daa14 c045ab04 c01da6e4
7ea0: c3000c68 00000000 c01daa14 c3000c68 c3867eb8 c01d9870 c38331a8 c3862f54
7ec0: c005b3b4 c3000c68 c3000c68 c3000c9c 00000002 c01da890 c3867ef9 c3000c68
7ee0: c3829f60 c01d97f4 00000000 c01d8470 c38918e0 c3aaf468 39383102 c300343a
7f00: 00000001 c0219660 c03f1768 c3000c00 00000000 c3000c68 00000002 c3aaf814
7f20: 00000001 00000101 c38918e0 c021b6e0 00000002 00000000 00000000 c3000c00
7f40: c38917c0 c021c418 00000064 00000064 00000101 c3867f60 c005b920 c3867f94
7f60: c3891830 c3aaf400 c3866000 c3aaf400 c3aaf800 00000000 c38918e0 c3aaf400
7f80: 00000012 00000000 00000000 c3837920 c00574a0 c3867f94 c3867f94 00000101
7fa0: 01010001 c3867fd4 c381bf48 c3867fd4 c381bf48 00000000 c021ba3c 00000000
7fc0: 00000000 00000000 00000000 c00573dc 00000000 00000000 c3867fd8 c3867fd8
7fe0: 00000000 00000000 00000000 00000000 00000000 c002ce88 00000000 ffff0000
[<c002fb10>] (__bug+0x1c/0x28) from [<c0094088>] (cache_alloc_refill+0x13c/0x594)
[<c0094088>] (cache_alloc_refill+0x13c/0x594) from [<c0094574>] (__kmalloc+0x94/0xd0)
[<c0094574>] (__kmalloc+0x94/0xd0) from [<c02a6a84>] (alloc_netdev_mq+0x48/0x1b0)
[<c02a6a84>] (alloc_netdev_mq+0x48/0x1b0) from [<bf003398>] (vntwusb_found1+0x58/0x53c [vt6656_stage])
[<bf003398>] (vntwusb_found1+0x58/0x53c [vt6656_stage]) from [<c0223798>] (usb_probe_interface+0x130/0x180)
[<c0223798>] (usb_probe_interface+0x130/0x180) from [<c01da6e4>] (driver_probe_device+0xac/0x164)
[<c01da6e4>] (driver_probe_device+0xac/0x164) from [<c01d9870>] (bus_for_each_drv+0x50/0x90)
[<c01d9870>] (bus_for_each_drv+0x50/0x90) from [<c01da890>] (device_attach+0x50/0x68)
[<c01da890>] (device_attach+0x50/0x68) from [<c01d97f4>] (bus_probe_device+0x28/0x54)
[<c01d97f4>] (bus_probe_device+0x28/0x54) from [<c01d8470>] (device_add+0x3b4/0x4f0)
[<c01d8470>] (device_add+0x3b4/0x4f0) from [<c0221ee8>] (usb_set_configuration+0x524/0x5b8)
[<c0221ee8>] (usb_set_configuration+0x524/0x5b8) from [<c0229238>] (generic_probe+0x5c/0xa0)
[<c0229238>] (generic_probe+0x5c/0xa0) from [<c0223230>] (usb_probe_device+0x48/0x54)
[<c0223230>] (usb_probe_device+0x48/0x54) from [<c01da6e4>] (driver_probe_device+0xac/0x164)
[<c01da6e4>] (driver_probe_device+0xac/0x164) from [<c01d9870>] (bus_for_each_drv+0x50/0x90)
[<c01d9870>] (bus_for_each_drv+0x50/0x90) from [<c01da890>] (device_attach+0x50/0x68)
[<c01da890>] (device_attach+0x50/0x68) from [<c01d97f4>] (bus_probe_device+0x28/0x54)
[<c01d97f4>] (bus_probe_device+0x28/0x54) from [<c01d8470>] (device_add+0x3b4/0x4f0)
[<c01d8470>] (device_add+0x3b4/0x4f0) from [<c021b6e0>] (usb_new_device+0x100/0x174)
[<c021b6e0>] (usb_new_device+0x100/0x174) from [<c021c418>] (hub_thread+0x9dc/0xeec)
[<c021c418>] (hub_thread+0x9dc/0xeec) from [<c00573dc>] (kthread+0x78/0x80)
[<c00573dc>] (kthread+0x78/0x80) from [<c002ce88>] (kernel_thread_exit+0x0/0x8)
Code: e1a01000 e59f000c eb005014 e3a03000 (e5833000)
---[ end trace 2a51e0dbab9e4fbe ]---
note: khubd[152] exited with preempt_count 1

Signed-off-by: miaofng <miaofng@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: Panel: prevent driver from calling misc_deregister twice on same ressource
Peter Huewe [Mon, 28 Sep 2009 23:22:40 +0000 (01:22 +0200)]
Staging: Panel: prevent driver from calling misc_deregister twice on same ressource

This patch prevents the driver from calling misc_deregister twice on the same
ressouce when unloading the driver.
Unloading the driver without this patch results in a Kernel BUG like this:
Panel driver version 0.9.5 registered on parport0 (io=0x378).
BUG: unable to handle kernel paging request at 0000000000100108
IP: [<ffffffff803c02ee>] misc_deregister+0x2d/0x90
PGD 6caff067 PUD 762b7067 PMD 0
Oops: 0002 [#1] PREEMPT SMP
last sysfs file: /sys/devices/platform/w83627hf.656/in8_input
...

This patch fixes this issue, although maybe not in the best way possible :)

linux version v2.6.32-rc1 - linus git tree, Di 29. Sep 01:10:18 CEST 2009

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: fix oops in vmbus - missing #include
Milan Dadok [Wed, 28 Oct 2009 22:23:50 +0000 (23:23 +0100)]
Staging: hv: fix oops in vmbus - missing #include

Add missing #includes to make hv module compile successfull.

Signed-off-by: Milan Dadok <milan@dadok.name>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: fix oops in vmbus - netvsc list_head
Milan Dadok [Wed, 28 Oct 2009 22:23:37 +0000 (23:23 +0100)]
Staging: hv: fix oops in vmbus - netvsc list_head

Remove incorrect list_head usage. Variable of type list_head was used in
some function's arguments as list item.

Signed-off-by: Milan Dadok <milan@dadok.name>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: fix oops in vmbus - udev events
Milan Dadok [Wed, 28 Oct 2009 22:23:27 +0000 (23:23 +0100)]
Staging: hv: fix oops in vmbus - udev events

Fix typos in udev event send and guid variables copy

Signed-off-by: Milan Dadok <milan@dadok.name>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: Fix vmbus load hang caused by faulty data packing
Hank Janssen [Fri, 16 Oct 2009 20:11:36 +0000 (20:11 +0000)]
Staging: hv: Fix vmbus load hang caused by faulty data packing

Fix vmbus load hang caused by wrong data packing.

Signed-off-by: Hank Janssen<hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv: Fix null pointer error after vmbus loading
Haiyang Zhang [Fri, 23 Oct 2009 18:14:24 +0000 (18:14 +0000)]
Staging: hv: Fix null pointer error after vmbus loading

Fix null pointer error after vmbus loading. Remove code that checks for
dev_name, the affected structure is kzalloc-ed prior to this routine, so
it is always null at this stage.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoStaging: hv TODO patches
Stephen Hemminger [Fri, 9 Oct 2009 22:47:50 +0000 (15:47 -0700)]
Staging: hv TODO patches

Update for more items

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotty: Mark generic_serial users as BROKEN
Alan Cox [Thu, 29 Oct 2009 12:16:22 +0000 (12:16 +0000)]
tty: Mark generic_serial users as BROKEN

There isn't much else I can do with these. I can find no hardware for any
of them and no users. The code is broken.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agolibertas if_usb: Fix crash on 64-bit machines
David Woodhouse [Fri, 30 Oct 2009 17:45:14 +0000 (17:45 +0000)]
libertas if_usb: Fix crash on 64-bit machines

On a 64-bit kernel, skb->tail is an offset, not a pointer. The libertas
usb driver passes it to usb_fill_bulk_urb() anyway, causing interesting
crashes. Fix that by using skb->data instead.

This highlights a problem with usb_fill_bulk_urb(). It doesn't notice
when dma_map_single() fails and return the error to its caller as it
should. In fact it _can't_ currently return the error, since it returns
void.

So this problem was showing up only at unmap time, after we'd already
suffered memory corruption by doing DMA to a bogus address.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Cc: stable@kernel.org
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix reason code output endianness
Johannes Berg [Thu, 29 Oct 2009 09:09:28 +0000 (10:09 +0100)]
mac80211: fix reason code output endianness

When HT debugging is enabled and we receive a DelBA
frame we print out the reason code in the wrong byte
order. Fix that so we don't get weird values printed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix addba timer
Johannes Berg [Thu, 29 Oct 2009 07:34:00 +0000 (08:34 +0100)]
mac80211: fix addba timer

The addba timer function acquires the sta spinlock,
but at the same time we try to del_timer_sync() it
under the spinlock which can produce deadlocks.

To fix this, always del_timer_sync() the timer in
ieee80211_process_addba_resp() and add it again
after checking the conditions, if necessary.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: fix misplaced semicolon on rate control
Luis R. Rodriguez [Thu, 29 Oct 2009 00:19:06 +0000 (20:19 -0400)]
ath9k: fix misplaced semicolon on rate control

The patch e43419f9:

ath9k: downgrade assert in rc.c for invalid rate

downgraded an ASSERT to a WARN_ON() but also misplaced a
semicolon at the end of the second check. What this did
was force the rate control code to always return the rate
even if we should have warned about it. Since this should
not have happened anymore anyway this fix isn't critical
as the proper rate would have been returned anyway.

Cc: stable@kernel.org
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: Fix DMA TX bounce buffer copying
Michael Buesch [Wed, 28 Oct 2009 21:08:13 +0000 (22:08 +0100)]
b43: Fix DMA TX bounce buffer copying

b43 allocates a bouncebuffer, if the supplied TX skb is in an invalid
memory range for DMA.
However, this is broken in that it fails to copy over some metadata to the
new skb.

This patch fixes three problems:
* Failure to adjust the ieee80211_tx_info pointer to the new buffer.
  This results in a kmemcheck warning.
* Failure to copy the skb cb, which contains ieee80211_tx_info, to the new skb.
  This results in breakage of various TX-status postprocessing (Rate control).
* Failure to transfer the queue mapping.
  This results in the wrong queue being stopped on saturation and can result in queue overflow.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Christian Casteyde <casteyde.christian@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix BSS leak
Johannes Berg [Wed, 28 Oct 2009 14:12:32 +0000 (15:12 +0100)]
mac80211: fix BSS leak

The IBSS code leaks a BSS struct after telling
cfg80211 about a given BSS by passing a frame.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort73usb.c : more ids
Xose Vazquez Perez [Mon, 19 Oct 2009 09:51:11 +0000 (11:51 +0200)]
rt73usb.c : more ids

stolen from windows inf file(07/17/2009, 1.03.05.0000)
Ovislink 0x1b75, 0x7318
MSI 0x0db0, 0x4600
WideTell 0x7167, 0x3840

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2200: fix oops on missing firmware
Zhu Yi [Thu, 15 Oct 2009 06:50:28 +0000 (14:50 +0800)]
ipw2200: fix oops on missing firmware

For non-monitor interfaces, the syntax for alloc_ieee80211/free_80211
is wrong. Because alloc_ieee80211 only creates (wiphy_new) a wiphy, but
free_80211() does wiphy_unregister() also. This is only correct when
the later wiphy_register() is called successfully, which apparently
is not the case for your fw doesn't exist one.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agogre: Fix dev_addr clobbering for gretap
Herbert Xu [Fri, 30 Oct 2009 05:51:48 +0000 (05:51 +0000)]
gre: Fix dev_addr clobbering for gretap

Nathan Neulinger noticed that gretap devices get their MAC address
from the local IP address, which results in invalid MAC addresses
half of the time.

This is because gretap is still using the tunnel netdev ops rather
than the correct tap netdev ops struct.

This patch also fixes changelink to not clobber the MAC address
for the gretap case.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Nathan Neulinger <nneul@mst.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosky2: set carrier off in probe
Brandon Philips [Thu, 29 Oct 2009 13:58:07 +0000 (13:58 +0000)]
sky2: set carrier off in probe

Before bringing up a sky2 interface up ethtool reports
"Link detected: yes". Do as ixgbe does and netif_carrier_off() on
probe().

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix sk_forward_alloc corruption
Eric Dumazet [Fri, 30 Oct 2009 05:03:53 +0000 (05:03 +0000)]
net: fix sk_forward_alloc corruption

On UDP sockets, we must call skb_free_datagram() with socket locked,
or risk sk_forward_alloc corruption. This requirement is not respected
in SUNRPC.

Add a convenient helper, skb_free_datagram_locked() and use it in SUNRPC

Reported-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosound: via82xx: deactivate DXS controls of inactive streams
Clemens Ladisch [Thu, 22 Oct 2009 07:04:09 +0000 (09:04 +0200)]
sound: via82xx: deactivate DXS controls of inactive streams

Activate the DXS volume controls only when the corresponding stream is
being used.  This makes the behaviour consistent with the other drivers
that have per-stream volume controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: snd-usb-caiaq: Bump version number to 1.3.20
Mark Hills [Sat, 24 Oct 2009 11:59:37 +0000 (12:59 +0100)]
ALSA: snd-usb-caiaq: Bump version number to 1.3.20

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: snd-usb-caiaq: Lock on stream start/unpause
Mark Hills [Sat, 24 Oct 2009 11:59:36 +0000 (12:59 +0100)]
ALSA: snd-usb-caiaq: Lock on stream start/unpause

Fix a bug which can result in white noise from the driver after stream
start or unpause.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: snd-usb-caiaq: Missing lock around use of buffer positions
Mark Hills [Sat, 24 Oct 2009 11:59:35 +0000 (12:59 +0100)]
ALSA: snd-usb-caiaq: Missing lock around use of buffer positions

Fix a race which causes snd_pcm_update_hw_ptr_pos() to report a bug.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: sound/parisc: Move dereference after NULL test
Julia Lawall [Sat, 17 Oct 2009 06:33:47 +0000 (08:33 +0200)]
ALSA: sound/parisc: Move dereference after NULL test

If the NULL test on h is needed in snd_harmony_mixer_init, then the
dereference should be after the NULL test.

Actually, there is a sequence of calls: snd_harmony_create, then
snd_harmony_pcm_init, and then snd_harmony_mixer_init.  snd_harmony_create
initializes h, but may indeed leave it as NULL.  There was no NULL test at
the beginning of snd_harmony_pcm_init, so I have added one.  The NULL test
in snd_harmony_mixer_init is then not necessary, but in case the ordering
of the calls changes, I have left it, and moved the dereference after it.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
Julia Lawall [Sat, 17 Oct 2009 06:33:22 +0000 (08:33 +0200)]
ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests

In pcm.c, if the NULL test on pcm is needed, then the dereference should be
after the NULL test.

In dummy.c and ali5451.c, the context of the calls to
snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice,
respectively cannot be NULL.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda_intel: Add the Linux device ID for NVIDIA HDA controller
peer chen [Thu, 15 Oct 2009 08:37:47 +0000 (16:37 +0800)]
ALSA: hda_intel: Add the Linux device ID for NVIDIA HDA controller

Add the generic device ID for NVIDIA HDA controller.

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: pcsp - Fix nforce workaround
Stas Sergeev [Fri, 30 Oct 2009 10:51:24 +0000 (11:51 +0100)]
ALSA: pcsp - Fix nforce workaround

The attached patch fixes the problems introduced in this commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=eea0579fc85e64e9f05361d5aacf496fe7a151aa

- Fix nForce workaround by honouring the pointer_update var
- Revert "ns" to u64, as per the hrtimer API
- Revert to the zero-delay timer startup, since I can't reproduce any
  problem with it (please, give me the hint!)

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: SND_CS5535AUDIO: Remove the X86 platform dependency
Wu Zhangjin [Thu, 15 Oct 2009 02:22:54 +0000 (10:22 +0800)]
ALSA: SND_CS5535AUDIO: Remove the X86 platform dependency

SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
machines, and checked it with ARCH=x86_64, no relative compiling
warnings & errors, so, remove the platform dependency directly.

Reported-by: rixed@happyleptic.org
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoxfs: fix xfs_quota remove error
Ryota Yamauchi [Fri, 30 Oct 2009 08:27:44 +0000 (09:27 +0100)]
xfs: fix xfs_quota remove error

The xfs_quota returns ENOSYS when remove command is executed.
Reproducable with following steps.

    # mount -t xfs -o uquota /dev/sda7 /mnt/mp1
    # xfs_quota -x -c off -c remove
    XFS_QUOTARM: Function not implemented.

The remove command is allowed during quotaoff, but xfs_fs_set_xstate()
checks whether quota is running, and it leads to ENOSYS.

To solve this problem, add a check for X_QUOTARM.

Signed-off-by: Ryota Yamauchi <r-yamauchi@vf.jp.nec.com>
Signed-off-by: Utako Kusaka <u-kusaka@wm.jp.nec.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agoxfs: free temporary cursor in xfs_dialloc
Eric Sandeen [Fri, 30 Oct 2009 08:27:07 +0000 (09:27 +0100)]
xfs: free temporary cursor in xfs_dialloc

Commit bd169565993b39b9b4b102cdac8b13e0a259ce2f seems
to have a slight regression where this code path:

    if (!--searchdistance) {
        /*
         * Not in range - save last search
         * location and allocate a new inode
         */
        ...
        goto newino;
    }

doesn't free the temporary cursor (tcur) that got dup'd in
this function.

This leaks an item in the xfs_btree_cur zone, and it's caught
on module unload:

===========================================================
BUG xfs_btree_cur: Objects remaining on kmem_cache_close()
-----------------------------------------------------------

It seems like maybe a single free at the end of the function might
be cleaner, but for now put a del_cursor right in this code block
similar to the handling in the rest of the function.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agopcnet_cs: add cis of PreMax PE-200 ethernet pcmcia card
Ken Kawasaki [Sat, 17 Oct 2009 15:39:20 +0000 (15:39 +0000)]
pcnet_cs: add cis of PreMax PE-200 ethernet pcmcia card

pcnet_cs,serial_cs:

add cis of PreMax ethernet pcmcia card,
and some Sierra Wireless serial card(AC555, AC7xx, AC8xx).

use PROD_ID for AC7xx, because MANF_ID of AC7xx and AC8xx are the same.

Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agor8169: Fix card drop incoming VLAN tagged MTU byte large jumbo frames
Raimonds Cicans [Mon, 26 Oct 2009 10:52:37 +0000 (10:52 +0000)]
r8169: Fix card drop incoming VLAN tagged MTU byte large jumbo frames

r8169 card drop incoming VLAN tagged MTU byte large jumbo frames

It looks to compare current and maximal packet sizes hardware use
'<' operator, not '<='.

Bug introduced by commit fdd7b4c3302c93f6833e338903ea77245eb510b4
("r8169: fix crash when large packets are received")

Signed-off-by: Raimonds Cicans <ray@apollo.lv>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoibmtr: possible Read buffer overflow?
roel kluin [Sat, 3 Oct 2009 11:26:55 +0000 (11:26 +0000)]
ibmtr: possible Read buffer overflow?

Prevent read outside array bounds.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Fix RPF to work with policy routing
jamal [Sun, 18 Oct 2009 02:12:33 +0000 (02:12 +0000)]
net: Fix RPF to work with policy routing

Policy routing is not looked up by mark on reverse path filtering.
This fixes it.

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: fix kmemcheck annotations
Eric Dumazet [Thu, 29 Oct 2009 00:10:37 +0000 (00:10 +0000)]
net: fix kmemcheck annotations

struct sk_buff kmemcheck annotations enlarged this structure by 8/16 bytes

Fix this by moving 'protocol' inside flags1 bitfield,
and queue_mapping inside flags2 bitfield.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: rework disable K1 at 1000Mbps for 82577/82578
Bruce Allan [Thu, 29 Oct 2009 13:46:05 +0000 (13:46 +0000)]
e1000e: rework disable K1 at 1000Mbps for 82577/82578

This patch reworks a previous workaround (commit 7d3cabbcc) for an issue
in hardware where noise on the interconnect between the MAC and PHY could
be generated by a lower power mode (K1) at 1000Mbps resulting in bad
packets.  Disable K1 while at 1000 Mbps but keep it enabled for 10/100Mbps
and when the cable is disconnected.  The original version of this
workaround was found to be incomplete.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: config PHY via software after resets
Bruce Allan [Thu, 29 Oct 2009 13:45:45 +0000 (13:45 +0000)]
e1000e: config PHY via software after resets

On PCH-based (82577/82578) and some ICH8-based parts (82566) there is an
issue with the hardware automatically configuring the PHY with contents
from the EEPROM after the PHY is reset, so do the configuration by the
driver instead.  This was already similarly done for some 82566 parts in
e1000_phy_hw_reset_ich8lan() but needs to be done after other resets,
so move the PHY configuration code to its own function and call after
all PHY resets.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe100: e100_phy_init() isolates selected PHY, causes 10 second boot delay
Bruce Allan [Thu, 29 Oct 2009 13:42:41 +0000 (13:42 +0000)]
e100: e100_phy_init() isolates selected PHY, causes 10 second boot delay

A change in how PHYs are electrically isolated caused all PHYs to be
isolated followed by reverting that isolation for the selected PHY.
Unfortunately, isolating the selected PHY for even a short period of
time can result in DHCP negotiation taking more than 10 seconds on certain
embedded configurations delaying boot time as reported by Bernhard Kaindl.
This patch reverts the change to how PHYs are isolated yet still works
around the issue for 82552 needing the selected PHY's BMCR register to
be written after the unused PHYs are isolated.  This code is moved below
the setting of nic->phy ID in order to do the 82552-specific workaround.

Cc: Bernhard Kaindl <bernhard.kaindl@gmx.net>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopowerpc: Cleanup Kconfig selection of hugetlbfs support
Benjamin Herrenschmidt [Fri, 30 Oct 2009 04:03:54 +0000 (15:03 +1100)]
powerpc: Cleanup Kconfig selection of hugetlbfs support

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agoMerge branch 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
Linus Torvalds [Thu, 29 Oct 2009 22:03:36 +0000 (15:03 -0700)]
Merge branch 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen

* 'bugfix' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
  xen: set up mmu_ops before trying to set any ptes

14 years agoARM: Fix errata 411920 workarounds
Russell King [Sat, 24 Oct 2009 21:36:36 +0000 (22:36 +0100)]
ARM: Fix errata 411920 workarounds

Errata 411920 indicates that any "invalidate entire instruction cache"
operation can fail if the right conditions are present.  This is not
limited just to those operations in flush.c, but elsewhere.  Place the
workaround in the already existing __flush_icache_all() function
instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: Fix sparsemem with SPARSEMEM_EXTREME enabled
Russell King [Thu, 29 Oct 2009 17:06:17 +0000 (17:06 +0000)]
ARM: Fix sparsemem with SPARSEMEM_EXTREME enabled

When SPARSEMEM_EXTREME is enabled, memory_present() wants to use bootmem
to allocate data structures.  However, we call memory_present() after
declaring memory to bootmem, but before we've reserved areas.

This leads to sparsemem data structures being overwritten later in the
kernel's initialization (when slab initializes.)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Thu, 29 Oct 2009 16:22:34 +0000 (09:22 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide: Serialize CMD643 and CMD646 to fix a hardware bug with SSD

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 29 Oct 2009 16:22:08 +0000 (09:22 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (43 commits)
  net: Fix 'Re: PACKET_TX_RING: packet size is too long'
  netdev: usb: dm9601.c can drive a device not supported yet, add support for it
  qlge: Fix firmware mailbox command timeout.
  qlge: Fix EEH handling.
  AF_RAW: Augment raw_send_hdrinc to expand skb to fit iphdr->ihl (v2)
  bonding: fix a race condition in calls to slave MII ioctls
  virtio-net: fix data corruption with OOM
  sfc: Set ip_summed correctly for page buffers passed to GRO
  cnic: Fix L2CTX_STATUSB_NUM offset in context memory.
  MAINTAINERS: rt2x00 list is moderated
  airo: Reorder tests, check bounds before element
  mac80211: fix for incorrect sequence number on hostapd injected frames
  libertas spi: fix sparse errors
  mac80211: trivial: fix spelling in mesh_hwmp
  cfg80211: sme: deauthenticate on assoc failure
  mac80211: keep auth state when assoc fails
  mac80211: fix ibss joining
  b43: add 'struct b43_wl' missing declaration
  b43: Fix Bugzilla #14181 and the bug from the previous 'fix'
  rt2x00: Fix crypto in TX frame for rt2800usb
  ...

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu
Linus Torvalds [Thu, 29 Oct 2009 16:19:29 +0000 (09:19 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  sched: move rq_weight data array out of .percpu
  percpu: allow pcpu_alloc() to be called with IRQs off

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-param-fixes
Linus Torvalds [Thu, 29 Oct 2009 16:18:20 +0000 (09:18 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-param-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-param-fixes:
  param: fix setting arrays of bool
  param: fix NULL comparison on oom
  param: fix lots of bugs with writing charp params from sysfs, by leaking mem.

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Linus Torvalds [Thu, 29 Oct 2009 16:17:59 +0000 (09:17 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus

* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
  virtio: order used ring after used index read
  virtio-pci: fix per-vq MSI-X request logic

14 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
Linus Torvalds [Thu, 29 Oct 2009 16:17:19 +0000 (09:17 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
  backing-dev: ensure that a removed bdi no longer has super_block referencing it
  block: use after free bug in __blkdev_get
  block: silently error unsupported empty barriers too

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Thu, 29 Oct 2009 16:17:02 +0000 (09:17 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  Revert "PCI: get larger bridge ranges when space is available"

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Thu, 29 Oct 2009 16:16:23 +0000 (09:16 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  mlx4_core: Add a new supported 40 GigE device ID

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Thu, 29 Oct 2009 16:16:01 +0000 (09:16 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] zfcp: Flush SCSI registration work when adding unit
  [SCSI] zfcp: Fix timer initialization for ct and els requests
  [SCSI] zfcp: Warn about storage devices with broken PLOGI data
  [SCSI] zfcp: Handle WWPN mismatch in PLOGI payload
  [SCSI] zfcp: fix kfree handling in zfcp_init_device_setup
  [SCSI] fix memory leak in initialization

14 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Thu, 29 Oct 2009 16:15:02 +0000 (09:15 -0700)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/kms: fix kms/fbdev colormap support properly.
  drm: Add the basic check for the detailed timing in EDID
  drm/radeon/kms: ignore vga arbiter return.

14 years agoMerge branch 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
Linus Torvalds [Thu, 29 Oct 2009 16:07:15 +0000 (09:07 -0700)]
Merge branch 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6

* 'sh/for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: Fix hugetlbfs dependencies for SH-3 && MMU configurations.
  sh: Document uImage.bin target in archhelp.
  sh: add uImage.bin target
  sh: rsk7203 CONFIG_MTD=n fix
  sh: Check for return_to_handler when unwinding the stack
  sh: Build fix: define more __movmem* symbols
  sh: __irq_entry annotate do_IRQ().

Fix up sh/powerpc conflicts in fs/Kconfig

14 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Thu, 29 Oct 2009 16:02:24 +0000 (09:02 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  NFSv4: The link() operation should return any delegation on the file
  NFSv4: Fix two unbalanced put_rpccred() issues.
  NFSv4: Fix a bug when the server returns NFS4ERR_RESOURCE
  nfs: Panic when commit fails

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Thu, 29 Oct 2009 16:02:01 +0000 (09:02 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fixing to avoid invalid kfree() in cifs_get_tcp_session()

14 years agoray_cs: Fix copy_from_user handling
Alan Cox [Tue, 27 Oct 2009 15:35:55 +0000 (15:35 +0000)]
ray_cs: Fix copy_from_user handling

I've not touched the other stuff here but the word "locking" comes to mind.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodpt_i2o: Fix up copy*user
Alan Cox [Tue, 27 Oct 2009 15:35:35 +0000 (15:35 +0000)]
dpt_i2o: Fix up copy*user

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 29 Oct 2009 15:59:06 +0000 (08:59 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/ppc64: Use preempt_schedule_irq instead of preempt_schedule
  powerpc: Minor cleanup to lib/Kconfig.debug
  powerpc: Minor cleanup to sound/ppc/Kconfig
  powerpc: Minor cleanup to init/Kconfig
  powerpc: Limit memory hotplug support to PPC64 Book-3S machines
  powerpc: Limit hugetlbfs support to PPC64 Book-3S machines
  powerpc: Fix compile errors found by new ppc64e_defconfig
  powerpc: Add a Book-3E 64-bit defconfig
  powerpc/booke: Fix xmon single step on PowerPC Book-E
  powerpc: Align vDSO base address
  powerpc: Fix segment mapping in vdso32
  powerpc/iseries: Remove compiler version dependent hack
  powerpc/perf_events: Fix priority of MSR HV vs PR bits
  powerpc/5200: Update defconfigs
  drivers/serial/mpc52xx_uart.c: Use UPIO_MEM rather than SERIAL_IO_MEM
  powerpc/boot/dts: drop obsolete 'fsl5200-clocking'
  of: Remove nested function
  mpc5200: support for the MAN mpc5200 based board mucmc52
  mpc5200: support for the MAN mpc5200 based board uc101

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Linus Torvalds [Thu, 29 Oct 2009 15:44:04 +0000 (08:44 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: Do not dereference null pointer in twl4030 error path
  mfd: Always initialise WM831x IRQ mutex

14 years agodma-debug: Fix compile warning with PAE enabled
Joerg Roedel [Thu, 29 Oct 2009 15:25:50 +0000 (16:25 +0100)]
dma-debug: Fix compile warning with PAE enabled

When PAE is enabled in the kernel configuration the size of
phys_addr_t differs from the size of a void pointer. The gcc
prints a warning about that in dma-debug code.
This patch fixes the warning by converting the output to
unsigned long long instead of a pointer.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
14 years agoMerge branch 'hwpoison-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
Linus Torvalds [Thu, 29 Oct 2009 15:20:00 +0000 (08:20 -0700)]
Merge branch 'hwpoison-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6

* 'hwpoison-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6:
  HWPOISON: fix invalid page count in printk output
  HWPOISON: Allow schedule_on_each_cpu() from keventd
  HWPOISON: fix/proc/meminfo alignment
  HWPOISON: fix oops on ksm pages
  HWPOISON: Fix page count leak in hwpoison late kill in do_swap_page
  HWPOISON: return early on non-LRU pages
  HWPOISON: Add brief hwpoison description to Documentation
  HWPOISON: Clean up PR_MCE_KILL interface

14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Thu, 29 Oct 2009 15:18:25 +0000 (08:18 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: fix double IRELE in xfs_dqrele_inode

14 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 29 Oct 2009 15:16:42 +0000 (08:16 -0700)]
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/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:
  omap4: Fix UART4 platform data on omap4
  omap4: Allow omap_serial_early_init() for OMAP4430 board
  omap3: PM: enable UART3 module wakeups
  omap2: Fix console serial port number for n8x0
  omap2: Fix detection of n8x0
  omap1: Fix DSP public peripherals support for ams-delta
  omap1: Fix redundant UARTs pin muxing that can break other hardware support
  omap: iommu: fix wrong condition check for SUPERSECTION
  omap: SDMA: Fix omap_stop_dma() API for channel linking
  omap: Fix omap-keypad by restoring old keypad.h without breaking omap2 boards that use matrix_keypad

14 years agoMerge branch 'for-linus' of git://git.infradead.org/ubi-2.6
Linus Torvalds [Thu, 29 Oct 2009 15:15:34 +0000 (08:15 -0700)]
Merge branch 'for-linus' of git://git.infradead.org/ubi-2.6

* 'for-linus' of git://git.infradead.org/ubi-2.6:
  UBI: fix check on unsigned long
  UBI: fix backward compatibility

14 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Thu, 29 Oct 2009 15:14:58 +0000 (08:14 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (it87) Fix VID reading on IT8718F/IT8720F
  hwmon: (dme1737) No vid attributes for SCH311x
  hwmon: (fschmd) Fix check on unsigned in watchdog_write()
  hwmon: (coretemp) Maintainer update

14 years agoMerge branch 'urgent-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmci...
Linus Torvalds [Thu, 29 Oct 2009 15:14:14 +0000 (08:14 -0700)]
Merge branch 'urgent-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6

* 'urgent-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
  pcmcia: do not load the pd6729 driver if io_base is NULL
  pcmcia: Fix possible printk format warnings
  pcmcia: do not try to store more than 4 version strings
  pcmcia: pccard_read_tuple and TUPLE_RETURN_COMMON cleanup
  pcmcia: properly close previous dev_printk if kzalloc fails in do_io_probe
  pcmcia: fix controller printk format warnings

14 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 29 Oct 2009 15:13:03 +0000 (08:13 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
  ARM: Fix lubbock defconfig build
  ARM: 5769/1: CPU_ARM920T: remove dead Maverick EP9312 URL
  ARM: 5768/1: ep93xx: remove dead code in ep93xx_gpio_ab_irq_handler()
  ARM: 5767/1: ep93xx: remove ep93xx_init_time() prototype
  ARM: 5765/1: Updated U300 defconfig
  ARM: 5766/1: Fix watchdog enabling for AT91SAM9G45
  ARM: 5764/1: bcmring: add oprofile pmu support
  [ARM] pxa/spitz: add gpio button support (fixes regression)
  [ARM] pxa/cm-x300: fix mmc numbering
  ARM: 5763/1: ARM: SMP: Fix the BUG with CONFIG_PREEMPT enabled
  ARM: 5760/1: ep93xx: fix build error in edb93xx.c
  ARM: 5759/1: Add register information of threads to coredump
  ARM: 5757/1: Thumb-2: Correct "mov.w pc, lr" instruction which is unpredictable
  MXC: fix reset for mx31, mx35 and mx27 SoCs
  fix pcm037_eet compilation with the new SPI driver
  fix compilation of i.MX31 platforms
  pcm970 mmc: Fix ro switch
  pcm038: Add SPI/MC13783 support
  mx25: Add missing copyright / license header
  mx25pdk: remove nand support as it is not present in current tree
  ...

14 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 29 Oct 2009 15:12:20 +0000 (08:12 -0700)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: Move drop_futex_key_refs out of spinlock'ed region
  rcu: Fix TREE_PREEMPT_RCU CPU_HOTPLUG bad-luck hang
  rcu: Stopgap fix for synchronize_rcu_expedited() for TREE_PREEMPT_RCU
  rcu: Prevent RCU IPI storms in presence of high call_rcu() load
  futex: Check for NULL keys in match_futex
  futex: Handle spurious wake up

14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 29 Oct 2009 15:12:00 +0000 (08:12 -0700)]
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf timechart: Improve the visual appearance of scheduler delays
  perf timechart: Fix the wakeup-arrows that point to non-visible processes
  perf top: Fix --delay_secs 0 division by zero
  perf tools: Bump version to 0.0.2
  perf_event: Adjust frequency and unthrottle for non-group-leader events

14 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 29 Oct 2009 15:10:38 +0000 (08:10 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/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: Do less agressive buddy clearing
  sched: Disable SD_PREFER_LOCAL for MC/CPU domains

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 29 Oct 2009 15:10:26 +0000 (08:10 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, UV: Set DELIVERY_MODE=4 for vector=NMI_VECTOR in uv_hub_send_ipi()
  x86, UV: Fix and clean up bau code to use uv_gpa_to_pnode()
  x86: Don't print number of MCE banks for every CPU
  x86, UV: Fix information in __uv_hub_info structure
  x86: Document linker script ASSERT() quirk

14 years agofrv: fix check on unsigned in do_signal()
Roel Kluin [Mon, 26 Oct 2009 23:50:23 +0000 (16:50 -0700)]
frv: fix check on unsigned in do_signal()

syscallno is unsigned

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: don't call pte_unmap() against an improper pte
Daisuke Nishimura [Mon, 26 Oct 2009 23:50:23 +0000 (16:50 -0700)]
mm: don't call pte_unmap() against an improper pte

There are some places where we do like:

pte = pte_map();
do {
(do break in some conditions)
} while (pte++, ...);
pte_unmap(pte - 1);

But if the loop breaks at the first loop, pte_unmap() unmaps invalid pte.

This patch is a fix for this problem.

Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Reviewd-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agolis3: add support for the HP HDX 18
Ian E. Morgan [Mon, 26 Oct 2009 23:50:21 +0000 (16:50 -0700)]
lis3: add support for the HP HDX 18

I have an HP HDX 18 laptop, and noted that the configuration of the
accelerometer needs to be x_inverted.

Signed-off-by: Ian E. Morgan <penguin.wrangler@gmail.com>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agolis3: add support for the HP EliteBook 8530w
Éric Piel [Mon, 26 Oct 2009 23:50:20 +0000 (16:50 -0700)]
lis3: add support for the HP EliteBook 8530w

Correct orientation for  HP EliteBook 8530w.

Reported-by: Jörgen Jonssson <jorgen.jonsson@saitek.se>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agolis3: better support for hp 6730x
Pavel Herrmann [Mon, 26 Oct 2009 23:50:19 +0000 (16:50 -0700)]
lis3: better support for hp 6730x

I have learned that the 6730b and 6730s have different accelerometer
orientation, and have modified the driver accordingly (diff attached),
while dropping the wild guess for AMD based 6735 having the same
orientation as Intel based 6730 (this is not true for any other related
series/family, thus is not probable for 673x).

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocpuidle: always return with interrupts enabled
Kevin Hilman [Mon, 26 Oct 2009 23:50:18 +0000 (16:50 -0700)]
cpuidle: always return with interrupts enabled

In the case where cpuidle_idle_call() returns before changing state due to
a need_resched(), it was returning with IRQs disabled.

The idle path assumes that the platform specific idle code returns with
interrupts enabled (although this too is undocumented AFAICT) and on ARM
we have a WARN_ON(!(irqs_disabled()) when returning from the idle loop, so
the user-visible effects were only a warning since interrupts were
eventually re-enabled later.

On x86, this same problem exists, but there is no WARN_ON() to detect it.
As on ARM, the interrupts are eventually re-enabled, so I'm not sure of
any actual bugs triggered by this.  It's primarily a
correctness/consistency fix.

This patch ensures IRQs are (re)enabled before returning.

Reported-by: Hemanth V <hemanthv@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Tested-by: Martin Michlmayr <tbm@cyrius.com>
Cc: <stable@kernel.org> [2.6.31.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocheckpatch: version 0.30
Andy Whitcroft [Mon, 26 Oct 2009 23:50:17 +0000 (16:50 -0700)]
checkpatch: version 0.30

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocheckpatch: fix false EXPORT_SYMBOL warning
Andy Whitcroft [Mon, 26 Oct 2009 23:50:16 +0000 (16:50 -0700)]
checkpatch: fix false EXPORT_SYMBOL warning

Ingo reported that the following lines triggered a false warning,

static struct lock_class_key rcu_lock_key;
struct lockdep_map rcu_lock_map =
        STATIC_LOCKDEP_MAP_INIT("rcu_read_lock", &rcu_lock_key);
EXPORT_SYMBOL_GPL(rcu_lock_map);

from kernel/rcutree.c , and the false warning looked like this,

WARNING: EXPORT_SYMBOL(foo); should immediately follow its
function/variable
+EXPORT_SYMBOL_GPL(rcu_lock_map);

We actually should be checking the statement before the EXPORT_* for a
mention of the exported object, and complain where it is not there.

[akpm@linux-foundation.org: coding-style fixes]
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reported-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocheckpatch: fix __attribute__ matching
Andy Whitcroft [Mon, 26 Oct 2009 23:50:15 +0000 (16:50 -0700)]
checkpatch: fix __attribute__ matching

In the following code,

union thread_union init_thread_union
__attribute__((__section__(".data.init_task"))) =
{ INIT_THREAD_INFO(init_task) };

There is a non-conforming declaration. It should really be like the
following,

union thread_union init_thread_union
__attribute__((__section__(".data.init_task"))) = {
INIT_THREAD_INFO(init_task)
};

However, checkpatch doesn't catch this right now because it doesn't
correctly evaluate the "__attribute__".

It is not at all clear that we care what preceeds an assignment style
attribute when we find the open brace.  Relax the test so we do not need
to check the __attribute__.

Reported-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocheckpatch: fix false errors due to macro concatenation
Andy Whitcroft [Mon, 26 Oct 2009 23:50:14 +0000 (16:50 -0700)]
checkpatch: fix false errors due to macro concatenation

The macro concatenation (##) sequence can cause false errors when checking
macro's.  Checkpatch doesn't currently know about the operator.

For example this line,

+  entry = (struct ftrace_raw_##call *)raw_data;                   \

is correct but it produces the following error,

ERROR: need consistent spacing around '*' (ctx:WxB)
+       entry = (struct ftrace_raw_##call *)raw_data;\
                                          ^

The line above doesn't have any spacing problems, and if you remove the
macro concatenation sequence checkpatch doesn't give any errors.

Extend identifier handling to include ## concatenation within the
definition of an identifier.

Reported-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocheckpatch: update copyright dates
Andy Whitcroft [Mon, 26 Oct 2009 23:50:14 +0000 (16:50 -0700)]
checkpatch: update copyright dates

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocheckpatch: correctly stop scanning at the bottom of a hunk
Andy Whitcroft [Mon, 26 Oct 2009 23:50:13 +0000 (16:50 -0700)]
checkpatch: correctly stop scanning at the bottom of a hunk

We are allowing context scanning checks to apply against the first line of
context outside at the end of the hunk.  This can lead to false matches to
patch names leading to various perl warnings.  Correctly stop at the
bottom of the hunk.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agocheckpatch: possible types -- prevent illegal modifiers being added
Andy Whitcroft [Mon, 26 Oct 2009 23:50:12 +0000 (16:50 -0700)]
checkpatch: possible types -- prevent illegal modifiers being added

Prevent known non types being detected as modifiers.  Ensure we do not
look at any type which starts with a keyword.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomm: fix sparsemem configuration
Russell King [Mon, 26 Oct 2009 23:50:12 +0000 (16:50 -0700)]
mm: fix sparsemem configuration

Currently, sparsemem is only available if EXPERIMENTAL is enabled.
However, it hasn't ever been marked experimental.

It's been about four years since sparsemem was merged, and we have
platforms which depend on it; allow architectures to decide whether
sparsemem should be the default memory model.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoedac: i5100 fix initialization code
Keith Mannthey [Mon, 26 Oct 2009 23:50:11 +0000 (16:50 -0700)]
edac: i5100 fix initialization code

Allow csrows to properly initialize when the topology only has active
channels on 2 and 3.  This new check allows proper detection and
initialization in this topology.  Only checking the first mrt that
represented channels 0 and 1 is not sufficient.

I also fixed up the related debug information path.  I can submit as a 2nd
patch if needed.

Signed-off-by: Keith Mannthey <kmannth@us.ibm.com>
Acked-by: Aristeu Rozanski <aris@ruivo.org>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoedac: i5400 fix missing CONFIG_PCI define
Ira W. Snyder [Mon, 26 Oct 2009 23:50:10 +0000 (16:50 -0700)]
edac: i5400 fix missing CONFIG_PCI define

When building without CONFIG_PCI the edac_pci_idx variable is unused,
causing a build-time warning.  Wrap the variable in #ifdef CONFIG_PCI,
just like the rest of the PCI support.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoedac: i5400 fix csrow mapping
Jeff Roberson [Mon, 26 Oct 2009 23:50:09 +0000 (16:50 -0700)]
edac: i5400 fix csrow mapping

The i5400 EDAC driver has several bugs with chip-select row computation
which most likely lead to bugs in detailed error reporting.  Attempts to
contact the authors have gone mostly unanswered so I am presenting my diff
here.  I do not subscribe to lkml and would appreciate being kept in the
cc.

The most egregious problem was miscalculating the addresses of MTR
registers after register 0 by assuming they are 32bit rather than 16.
This caused the driver to miss half of the memories.  Most motherboards
tend to have only 8 dimm slots and not 16, so this may not have been
noticed before.

Further, the row calculations multiplied the number of dimms several
times, ultimately ending up with a maximum row of 32.  The chipset only
supports 4 dimms in each of 4 channels, so csrow could not be higher than
4 unless you use a row per-rank with dual-rank dimms.  I opted to
eliminate this behavior as it is confusing to the user and the error
reporting works by slot and not rank.  This gives a much clearer view of
memory by slot and channel in /sys.

Signed-off-by: Jeff Roberson <jroberson@jroberson.net>
Signed-off-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosysctl: fix false positives when PROC_SYSCTL=n
Alexey Dobriyan [Mon, 26 Oct 2009 23:50:07 +0000 (16:50 -0700)]
sysctl: fix false positives when PROC_SYSCTL=n

Having ->procname but not ->proc_handler is valid when PROC_SYSCTL=n,
people use such combination to reduce ifdefs with non-standard handlers.

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

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reported-by: Peter Teoh <htmldeveloper@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agohwmon: enhance the sysfs API for power meters
Darrick J. Wong [Mon, 26 Oct 2009 23:50:07 +0000 (16:50 -0700)]
hwmon: enhance the sysfs API for power meters

Augment the documentation of the hwmon sysfs API to accomodate ACPI power
meters and the current desired behavior of power capping hardware drivers.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agotwl4030-gpio: remove __devexit markings from remove func
Mike Frysinger [Mon, 26 Oct 2009 23:50:06 +0000 (16:50 -0700)]
twl4030-gpio: remove __devexit markings from remove func

The gpio_twl4030_probe() function calls gpio_twl4030_remove(), and the
former has __devinit, so the latter cannot use __devexit.  Otherwise we
hit the section mismatch warning:

WARNING: drivers/gpio/built-in.o(.devinit.text+0x71a): Section mismatch
in reference from the function _gpio_twl4030_probe() to the function
.devexit.text:_gpio_twl4030_remove()
The function __devinit _gpio_twl4030_probe() references a function
__devexit _gpio_twl4030_remove().
This is often seen when error handling in the init function uses
functionality in the exit path.
The fix is often to remove the __devexit annotation of
_gpio_twl4030_remove() so it may be used outside an exit section.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years ago8250_pci: add IBM Saturn serial card
Benjamin Herrenschmidt [Mon, 26 Oct 2009 23:50:05 +0000 (16:50 -0700)]
8250_pci: add IBM Saturn serial card

The IBM Saturn serial card has only one port. Without that fixup,
the kernel thinks it has two, which confuses userland setup and
admin tools as well.

[akpm@linux-foundation.org: fix pci-ids.h layout]
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Cox <alan@linux.intel.com>
Cc: Michael Reed <mreed10@us.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoserial: add ADDI-DATA GmbH PCI-Express communication cards in 8250_pci.c and pci_ids.h
Krauth.Julien [Mon, 26 Oct 2009 23:50:04 +0000 (16:50 -0700)]
serial: add ADDI-DATA GmbH PCI-Express communication cards in 8250_pci.c and pci_ids.h

Add support for ADDI-DATA GmbH PCI-Express communication cards:

APCIe-7300
APCIe-7420
APCIe-7500
APCIe-7800

Warning: 8250_pci.c depends on pci_ids.h. 8250_pci.c

Signed-off-by: Krauth Julien <Krauth.Julien@addi-data.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoatmel_serial: fix bad BUILD_BUG_ON() usage
Haavard Skinnemoen [Mon, 26 Oct 2009 23:50:02 +0000 (16:50 -0700)]
atmel_serial: fix bad BUILD_BUG_ON() usage

is_power_of_2() appears not to be constant enough for BUILD_BUG_ON()
after the latest rework, so replace it with an open-coded test.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jan Beulich <jbeulich@novell.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Claudio Scordino <claudio@evidence.eu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agovmscan: order evictable rescue in LRU putback
Johannes Weiner [Mon, 26 Oct 2009 23:50:00 +0000 (16:50 -0700)]
vmscan: order evictable rescue in LRU putback

Isolators putting a page back to the LRU do not hold the page lock, and if
the page is mlocked, another thread might munlock it concurrently.

Expecting this, the putback code re-checks the evictability of a page when
it just moved it to the unevictable list in order to correct its decision.

The problem, however, is that ordering is not garuanteed between setting
PG_lru when moving the page to the list and checking PG_mlocked
afterwards:

#0: #1

spin_lock()
if (TestClearPageMlocked())
  if (PageLRU())
    move to evictable list
SetPageLRU()
spin_unlock()
if (!PageMlocked())
  move to evictable list

The PageMlocked() check may get reordered before SetPageLRU() in #0,
resulting in #0 not moving the still mlocked page, and in #1 failing to
isolate and move the page as well.  The page is now stranded on the
unevictable list.

The race condition is very unlikely.  The consequence currently is one
page falling off the reclaim grid and eventually getting freed with
PG_unevictable set, which triggers a warning in the page allocator.

TestClearPageMlocked() in #1 already provides full memory barrier
semantics.

This patch adds an explicit full barrier to force ordering between
SetPageLRU() and PageMlocked() so that either one of the competitors
rescues the page.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodo_mbind(): fix memory leak
KOSAKI Motohiro [Mon, 26 Oct 2009 23:49:59 +0000 (16:49 -0700)]
do_mbind(): fix memory leak

If migrate_prep is failed, new variable is leaked.  This patch fixes it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>