linux-2.6
15 years agodm mpath: warn if args ignored
Chandra Seetharaman [Thu, 13 Nov 2008 23:39:06 +0000 (23:39 +0000)] 
dm mpath: warn if args ignored

Currently dm ignores the parameters provided to hardware handlers
without providing any notifications to the user.

This patch just prints a warning message so that the user knows that
the arguments are ignored.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm mpath: avoid attempting to activate null path
Chandra Seetharaman [Thu, 13 Nov 2008 23:39:00 +0000 (23:39 +0000)] 
dm mpath: avoid attempting to activate null path

Path activation code is called even when the pgpath is NULL. This could
lead to a panic in activate_path(). Such a panic is seen in -rt kernel.

This problem has been there before the pg_init() was moved to a
workqueue.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm stripe: fix init failure
Heinz Mauelshagen [Thu, 13 Nov 2008 23:38:56 +0000 (23:38 +0000)] 
dm stripe: fix init failure

Don't proceed if dm_stripe_init() fails to register itself as a dm target.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
15 years agodm raid1: flush workqueue before destruction
Mikulas Patocka [Thu, 13 Nov 2008 23:38:52 +0000 (23:38 +0000)] 
dm raid1: flush workqueue before destruction

We queue work on keventd queue --- so this queue must be flushed in the
destructor. Otherwise, keventd could access mirror_set after it was freed.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org
15 years agoUSB: net: asix: add support for Cables-to-Go USB Ethernet adapter
Jason Cooper [Tue, 11 Nov 2008 18:02:53 +0000 (13:02 -0500)] 
USB: net: asix: add support for Cables-to-Go USB Ethernet adapter

Add support to drivers/net/usb/asix.c for the Cables-to-Go "USB 2.0 to
10/100 Ethernet Adapter". USB id 0b95:772a.

Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: gadget: cdc-acm deadlock fix
David Brownell [Wed, 12 Nov 2008 19:35:13 +0000 (11:35 -0800)] 
USB: gadget: cdc-acm deadlock fix

This fixes a deadlock appearing with some USB peripheral drivers
when running CDC ACM gadget code.

The newish (2.6.27) CDC ACM event notification mechanism sends
messages (IN to the host) which are short enough to fit in most
FIFOs.  That means that with some peripheral controller drivers
(evidently not the ones used to verify the notification code!!)
the completion callback can be issued before queue() returns.

The deadlock would come because the completion callback and the
event-issuing code shared a spinlock.  Fix is trivial:  drop
that lock while queueing the message.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: EHCI: fix divide-by-zero bug
Alan Stern [Wed, 12 Nov 2008 22:02:57 +0000 (17:02 -0500)] 
USB: EHCI: fix divide-by-zero bug

This patch (as1164) fixes a bug in the EHCI scheduler.  The interval
value it uses is already in linear format, not logarithmically coded.
The existing code can sometimes crash the system by trying to divide
by zero.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: EHCI: fix handling of dead controllers
Alan Stern [Wed, 12 Nov 2008 22:04:53 +0000 (17:04 -0500)] 
USB: EHCI: fix handling of dead controllers

This patch (as1165) makes a few small changes in the logic used by
ehci-hcd when it encounters a controller error:

Instead of printing out the masked status, it prints the
original status as read directly from the hardware.

It doesn't check for the STS_HALT status bit before taking
action.  The mere fact that the STS_FATAL bit is set means
that something bad has happened and the controller needs to
be reset.  With the old code this test could never succeed
because the STS_HALT bit was masked out from the status.

I anticipate that this will prevent the occasional "irq X: nobody cared"
problem people encounter when their EHCI controllers die.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: r8a66597-hcd: fix wrong data access in SuperH on-chip USB
Yoshihiro Shimoda [Tue, 11 Nov 2008 07:47:21 +0000 (16:47 +0900)] 
usb: r8a66597-hcd: fix wrong data access in SuperH on-chip USB

When I used SuperH on-chip USB, there was the problem that accessed
r8a66597_root_hub which was not allocated.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoub: stub pre_reset and post_reset to fix oops
Pete Zaitcev [Tue, 11 Nov 2008 04:11:11 +0000 (21:11 -0700)] 
ub: stub pre_reset and post_reset to fix oops

Due to recent changes to usb_reset_device, the following hang occurs:

events/0      D 0000000000000000     0     6      2
 ffff880037477cc0 0000000000000046 ffff880037477c50 ffffffff80237434
 ffffffff80574c80 00000001000a015c 0000000000000286 ffff8800374757d0
 ffff88002a31c860 ffff880037475a00 0000000036779140 ffff880037475a00
Call Trace:
 [<ffffffff80237434>] try_to_del_timer_sync+0x52/0x5b
 [<ffffffff8026f86c>] dma_pool_free+0x1a7/0x1ec
 [<ffffffffa02a928a>] ub_disconnect+0x8e/0x1ad [ub]
 [<ffffffff802407c9>] autoremove_wake_function+0x0/0x2e
 [<ffffffff80378959>] usb_unbind_interface+0x5c/0xb7
 [<ffffffff8036ab70>] __device_release_driver+0x95/0xbd
 [<ffffffff8036ac70>] device_release_driver+0x21/0x2d
 [<ffffffff803789f8>] usb_driver_release_interface+0x44/0x83
 [<ffffffff80378ab9>] usb_forced_unbind_intf+0x17/0x1d
 [<ffffffff80371ba4>] usb_reset_device+0x7d/0x114
 [<ffffffffa02aaffd>] ub_reset_task+0x0/0x293 [ub]
 [<ffffffffa02ab1c1>] ub_reset_task+0x1c4/0x293 [ub]
 [<ffffffff8033dd1e>] flush_to_ldisc+0x0/0x1cd
 [<ffffffffa02aaffd>] ub_reset_task+0x0/0x293 [ub]
 [<ffffffff8023d302>] run_workqueue+0x87/0x114
 [<ffffffff8023d467>] worker_thread+0xd8/0xe7
 [<ffffffff802407c9>] autoremove_wake_function+0x0/0x2e
 [<ffffffff8023d38f>] worker_thread+0x0/0xe7
 [<ffffffff802404c1>] kthread+0x47/0x73
 [<ffffffff8022c8dd>] schedule_tail+0x27/0x60
 [<ffffffff8020c249>] child_rip+0xa/0x11
 [<ffffffff8024047a>] kthread+0x0/0x73
 [<ffffffff8020c23f>] child_rip+0x0/0x11

This is because usb_reset_device now unbinds, and that calls disconnect,
which in case of ub waits until the reset completes... which deadlocks.
Worse, this deadlocks keventd and this takes whole box down.

I'm going to fix this properly later, but let's unbreak the driver
quickly for non-composite devices at least.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: SISUSB2VGA driver: add 0x0711, 0x0903
Albert Comerma [Tue, 4 Nov 2008 18:44:01 +0000 (10:44 -0800)] 
USB: SISUSB2VGA driver: add 0x0711, 0x0903

Signed-off-by: Albert Comerma <albert.comerma@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David Brownell <david-b@pacbell.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: unusual devs patch for Nokia 7610 Supernova
Ricky Wong [Tue, 4 Nov 2008 11:13:45 +0000 (19:13 +0800)] 
usb: unusual devs patch for Nokia 7610 Supernova

Additional sectors were reported by the Nokia 7610 Supernova phone in
usb storage mode. The following patch rectifies the aforementioned
problem.

Signed-off-by: Ricky Wong Yung Fei <evilbladewarrior@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: remove optional bus bindings in isp1760, fixing runtime warning
Sebastian Andrzej Siewior [Sun, 2 Nov 2008 14:25:42 +0000 (15:25 +0100)] 
USB: remove optional bus bindings in isp1760, fixing runtime warning

Roland Reported the following:
| kmem_cache_create: duplicate cache isp1760_qtd
| Pid: 461, comm: modprobe Tainted: G        W  2.6.28-rc2-git3-default #4
| Call Trace:
|  [<c017540e>] kmem_cache_create+0xc9/0x3a3
|  [<c0159a8d>] free_pages_bulk+0x16c/0x1c9
|  [<f165c05f>] isp1760_init+0x0/0xb [isp1760]
|  [<f165c018>] init_kmem_once+0x18/0x5f [isp1760]
|  [<f165c064>] isp1760_init+0x5/0xb [isp1760]
|  [<c010113d>] _stext+0x4d/0x148
|  [<c0142936>] load_module+0x12cd/0x142e
|  [<c01743c4>] kmem_cache_destroy+0x0/0xd7
|  [<c0142b1e>] sys_init_module+0x87/0x176
|  [<c01039eb>] sysenter_do_call+0x12/0x2f

The reason, is that ret is initialized with ENODEV instead of 0 _or_
the kmem cache is not freed in error case with no bus binding.

The difference between OF+PCI and OF only is
| 15148     804      32   15984    3e70 isp1760-of-pci.o
| 13748     676       8   14432    3860 isp1760-of.o

about 1.5 KiB.

Until there is a checkbox where the user *must* select atleast one item,
and may select multiple entries I don't make it selectable anymore.
Having a driver which can't be used under any circumstances is broken
anyway and I've seen distros shipping it that way.

Reported-by: Roland Kletzing <devzero@web.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>a
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years ago+ usb-serial-cp2101-add-enfora-gsm2228.patch added to -mm tree
Damir N Abdullin [Thu, 30 Oct 2008 20:52:38 +0000 (13:52 -0700)] 
+ usb-serial-cp2101-add-enfora-gsm2228.patch added to -mm tree

Enfora GSM2228 based on Cygnal Integrated Products chip uses the same
cp2101 driver.

Signed-off-by: Damir N Abdullin <damir@mimas.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: storage: adjust comment in Kconfig
Paul Bolle [Thu, 30 Oct 2008 15:42:43 +0000 (08:42 -0700)] 
USB: storage: adjust comment in Kconfig

Since commit 65934a9 ("Make USB storage depend on SCSI rather than selecting
it [try #6]") the comment at the top of drivers/usb/storage/Kconfig is
incorrect. Adjust it to the current situation.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Fix PS3 USB shutdown problems
Geoff Levand [Fri, 31 Oct 2008 20:52:54 +0000 (13:52 -0700)] 
USB: Fix PS3 USB shutdown problems

Add ehci_shutdown() or ohci_shutdown() calls to the USB
PS3 bus glue.  ehci_shutdown() and ohci_shutdown() do some
controller specific cleanups not done by usb_remove_hcd().

Fixes errors on shutdown or reboot similar to these:

  ps3-ehci-driver sb_07: HC died; cleaning up
  irq 51: nobody cared (try booting with the "irqpoll" option)

Related bugzilla reports:

  http://bugzilla.kernel.org/show_bug.cgi?id=11819
  http://bugzilla.terrasoftsolutions.com/show_bug.cgi?id=317

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: unusual_devs entry for Argosy USB mass-storage interface
Alan Stern [Tue, 4 Nov 2008 16:33:35 +0000 (11:33 -0500)] 
USB: unusual_devs entry for Argosy USB mass-storage interface

This patch (as1162) adds an unusual_devs entry for Argosy's USB-IDE
interface.  This fixes Bugzilla #11843.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Luciano Rocha <luciano@eurotux.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: cdc-acm.c: fix recursive lock in acm_start_wb error path
Brandon Philips [Thu, 6 Nov 2008 19:19:11 +0000 (11:19 -0800)] 
USB: cdc-acm.c: fix recursive lock in acm_start_wb error path

Fixes an obvious bug in cdc-acm by avoiding a recursive lock on
acm_start_wb()'s error path. Should apply towards 2.6.27 stable and
2.6.28.

=============================================
[ INFO: possible recursive locking detected ]
2.6.27-2-pae #109
---------------------------------------------
python/31449 is trying to acquire lock:
 (&acm->write_lock){++..}, at: [<f89a0348>] acm_start_wb+0x5c/0x7b [cdc_acm]

but task is already holding lock:
 (&acm->write_lock){++..}, at: [<f89a04fb>] acm_tty_write+0xe1/0x167 [cdc_acm]

other info that might help us debug this:
2 locks held by python/31449:
 #0:  (&tty->atomic_write_lock){--..}, at: [<c0260fae>] tty_write_lock+0x14/0x3b
 #1:  (&acm->write_lock){++..}, at: [<f89a04fb>] acm_tty_write+0xe1/0x167 [cdc_acm]

stack backtrace:
Pid: 31449, comm: python Not tainted 2.6.27-2-pae #109
 [<c030f42f>] ? printk+0xf/0x18
 [<c0149f33>] __lock_acquire+0xc7b/0x1316
 [<c014a63e>] lock_acquire+0x70/0x97
 [<f89a0348>] ? acm_start_wb+0x5c/0x7b [cdc_acm]
 [<c0312109>] _spin_lock_irqsave+0x37/0x47
 [<f89a0348>] ? acm_start_wb+0x5c/0x7b [cdc_acm]
 [<f89a0348>] acm_start_wb+0x5c/0x7b [cdc_acm]
 [<f89a055d>] acm_tty_write+0x143/0x167 [cdc_acm]
 [<c0262a98>] write_chan+0x1cd/0x297
 [<c012527e>] ? default_wake_function+0x0/0xd
 [<c026111e>] tty_write+0x149/0x1b9
 [<c02628cb>] ? write_chan+0x0/0x297
 [<c01912c5>] ? rw_verify_area+0x76/0x98
 [<c0260fd5>] ? tty_write+0x0/0x1b9
 [<c01919ba>] vfs_write+0x8c/0x136
 [<c0191afd>] sys_write+0x3b/0x60
 [<c0103beb>] sysenter_do_call+0x12/0x3f
 =======================

Signed-off-by: Brandon Philips <bphilips@suse.de>
Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: CP2101 Add device ID for AMB2560
Craig Shelley [Sun, 9 Nov 2008 20:17:54 +0000 (20:17 +0000)] 
USB: CP2101 Add device ID for AMB2560

This patch adds the device vendor and product IDs for Amber Wireless AMB2560

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: mention URB_FREE_BUFFER in usb_free_urb documentation
Rabin Vincent [Sun, 9 Nov 2008 06:10:30 +0000 (11:40 +0530)] 
USB: mention URB_FREE_BUFFER in usb_free_urb documentation

The usb_free_urb comment says that the transfer buffer will not be
freed, but this is not the case when URB_FREE_BUFFER is set.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Add YISO u893 usb modem vendor and product IDs to option driver
Leslie Watter [Wed, 12 Nov 2008 17:10:07 +0000 (15:10 -0200)] 
USB: Add YISO u893 usb modem vendor and product IDs to option driver

This patch adds YISO u893 usb modem vendor and product ID to option.c.

I had a better experience using this modification and the same system.

Signed-off-by: Leslie Harlley Watter <leslie@watter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: musb: fix BULK request on different available endpoints
Ajay Kumar Gupta [Wed, 29 Oct 2008 13:10:35 +0000 (15:10 +0200)] 
usb: musb: fix BULK request on different available endpoints

Fixes co-working issue of usb serial device with usb/net devices while
oter endpoints are free and can be used.This patch implements the policy
that if endpoint resources are available then different BULK request goes
to different endpoint otherwise they are multiplexed to one reserved
endpoint as currently done.

Switch statement case is reordered in musb_giveback() to take care of
bulk request both in multiplex scenario and otherwise.

NAK limit scheme has to be added for multiplexed BULK request scenario
to avoid endpoint starvation due to usb/net devices.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: musb: fix debug global variable name
Felipe Balbi [Wed, 29 Oct 2008 13:10:39 +0000 (15:10 +0200)] 
usb: musb: fix debug global variable name

In order to avoid namespace conflicts, add a prefix
to our kernel-wise symbol.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: musb: Removes compilation warning in gadget mode
Ajay Kumar Gupta [Wed, 29 Oct 2008 13:10:38 +0000 (15:10 +0200)] 
usb: musb: Removes compilation warning in gadget mode

Fixes compilation warning when musb is configured in gadget mode.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: musb: tusb6010: kill compile warning
Felipe Balbi [Wed, 29 Oct 2008 13:10:36 +0000 (15:10 +0200)] 
usb: musb: tusb6010: kill compile warning

Add an errno to failing case.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: musb: Fix for isochronous IN transfer
Ajay Kumar Gupta [Wed, 29 Oct 2008 13:10:31 +0000 (15:10 +0200)] 
usb: musb: Fix for isochronous IN transfer

Fixes blurred capture images in dma mode. Isochronous error field in
urb and source data buffer pointer were not updated properly in dma
mode.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: don't register endpoints for interfaces that are going away
Alan Stern [Wed, 29 Oct 2008 19:16:58 +0000 (15:16 -0400)] 
USB: don't register endpoints for interfaces that are going away

This patch (as1155) fixes a bug in usbcore.  When interfaces are
deleted, either because the device was disconnected or because of a
configuration change, the extra attribute files and child endpoint
devices may get left behind.  This is because the core removes them
before calling device_del().  But during device_del(), after the
driver is unbound the core will reinstall altsetting 0 and recreate
those extra attributes and children.

The patch prevents this by adding a flag to record when the interface
is in the midst of being unregistered.  When the flag is set, the
attribute files and child devices will not be created.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org> [2.6.27, 2.6.26, 2.6.25]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: add Nikon D300 camera to unusual_devs
Paul Ready [Wed, 29 Oct 2008 21:25:50 +0000 (14:25 -0700)] 
USB: add Nikon D300 camera to unusual_devs

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

When A Nikon D300 camera is connected to a system it is seen in
/proc/bus/pci/devices but is not accessible.

This is seen in the above file:

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=041a Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: vstusb: fix compiler warning on x86-64
Greg Kroah-Hartman [Fri, 31 Oct 2008 17:09:57 +0000 (10:09 -0700)] 
USB: vstusb: fix compiler warning on x86-64

This fixes a reported compiler warning.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Thu, 13 Nov 2008 21:14:29 +0000 (13:14 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: ignore bit0 of _OSC return code

15 years ago[CIFS] remove unused list, add new cifs sock list to prepare for mount/umount fix
Steve French [Thu, 13 Nov 2008 20:04:07 +0000 (20:04 +0000)] 
[CIFS] remove unused list, add new cifs sock list to prepare for mount/umount fix

Also adds two lines missing from the previous patch (for the need reconnect flag in the
/proc/fs/cifs/DebugData handling)

The new global_cifs_sock_list is added, and initialized in init_cifs but not used yet.
Jeff Layton will be adding code in to use that and to remove the GlobalTcon and GlobalSMBSession
lists.

CC: Jeff Layton <jlayton@redhat.com>
CC: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Thu, 13 Nov 2008 19:56:05 +0000 (11:56 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: fix shutdown cleanup

15 years ago[CIFS] Fix cifs reconnection flags
Steve French [Thu, 13 Nov 2008 19:45:32 +0000 (19:45 +0000)] 
[CIFS] Fix cifs reconnection flags

In preparation for Jeff's big umount/mount fixes to remove the possibility of
various races in cifs mount and linked list handling of sessions, sockets and
tree connections, this patch cleans up some repetitive code in cifs_mount,
and addresses a problem with ses->status and tcon->tidStatus in which we
were overloading the "need_reconnect" state with other status in that
field.  So the "need_reconnect" flag has been broken out from those
two state fields (need reconnect was not mutually exclusive from some of the
other possible tid and ses states).  In addition, a few exit cases in
cifs_mount were cleaned up, and a problem with a tcon flag (for lease support)
was not being set consistently for the 2nd mount of the same share

CC: Jeff Layton <jlayton@redhat.com>
CC: Shirish Pargaonkar <shirishp@us.ibm.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Thu, 13 Nov 2008 19:30:46 +0000 (11:30 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slab: document SLAB_DESTROY_BY_RCU
  Kconfig: SLUB is the default slab allocator

15 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 13 Nov 2008 19:30:25 +0000 (11:30 -0800)] 
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] cdb89712: avoid namespace clashes with SRAM_ and BOOTROM_ constants
  [ARM] cdb89712,clps7500,h720x: avoid namespace clash for FLASH_* constants
  [ARM] integrator,realview,versatile: remove FLASH_* and EPROM_* constants
  [ARM] dma-mapping: fix compiler warning
  [ARM] iop: iop3xx needs registers mapped uncached+unbuffered
  [ARM] versatile: correct MMC clock rate
  [ARM] realview: correct MMC clock rate
  [ARM] 5329/1: Feroceon: fix feroceon_l2_inv_range

15 years agofix cpumask build breakage on parisc
Helge Deller [Thu, 13 Nov 2008 17:55:54 +0000 (18:55 +0100)] 
fix cpumask build breakage on parisc

Commit 2d3854a37e8b767a51aba38ed6d22817b0631e33 ("cpumask: introduce new
API, without changing anything") introduced a build breakage on parisc.

This trivial patch fixes it.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Kyle Mc Martin <kyle@hera.kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodlm: fix shutdown cleanup
David Teigland [Thu, 13 Nov 2008 19:22:34 +0000 (13:22 -0600)] 
dlm: fix shutdown cleanup

Fixes a regression from commit 0f8e0d9a317406612700426fad3efab0b7bbc467,
"dlm: allow multiple lockspace creates".

An extraneous 'else' slipped into a code fragment being moved from
release_lockspace() to dlm_release_lockspace().  The result of the
unwanted 'else' is that dlm threads and structures are not stopped
and cleaned up when the final dlm lockspace is removed.  Trying to
create a new lockspace again afterward will fail with
"kmem_cache_create: duplicate cache dlm_conn" because the cache
was not previously destroyed.

Signed-off-by: David Teigland <teigland@redhat.com>
15 years agoslab: document SLAB_DESTROY_BY_RCU
Peter Zijlstra [Thu, 13 Nov 2008 18:40:12 +0000 (20:40 +0200)] 
slab: document SLAB_DESTROY_BY_RCU

Explain this SLAB_DESTROY_BY_RCU thing...

[hugh@veritas.com: add a pointer to comment in mm/slab.c]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
15 years agoKconfig: SLUB is the default slab allocator
Simon Arlott [Wed, 5 Nov 2008 22:18:19 +0000 (22:18 +0000)] 
Kconfig: SLUB is the default slab allocator

In 2007, a0acd820807680d2ccc4ef3448387fcdbf152c73 changed the default
slab allocator to SLUB, but the SLAB help text still says SLAB is the
default. This change fixes that.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
15 years ago[ARM] cdb89712: avoid namespace clashes with SRAM_ and BOOTROM_ constants
Russell King [Thu, 13 Nov 2008 15:02:41 +0000 (15:02 +0000)] 
[ARM] cdb89712: avoid namespace clashes with SRAM_ and BOOTROM_ constants

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] cdb89712,clps7500,h720x: avoid namespace clash for FLASH_* constants
Russell King [Thu, 13 Nov 2008 14:53:08 +0000 (14:53 +0000)] 
[ARM] cdb89712,clps7500,h720x: avoid namespace clash for FLASH_* constants

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] integrator,realview,versatile: remove FLASH_* and EPROM_* constants
Russell King [Thu, 13 Nov 2008 14:43:03 +0000 (14:43 +0000)] 
[ARM] integrator,realview,versatile: remove FLASH_* and EPROM_* constants

FLASH_* and EPROM_* constants are unused, and clash with drivers:

drivers/atm/ambassador.h:257:1: warning: "FLASH_BASE" redefined
drivers/atm/ambassador.h:258:1: warning: "FLASH_SIZE" redefined
drivers/atm/iphase.h:332:1: warning: "EPROM_SIZE" redefined

so remove them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] dma-mapping: fix compiler warning
Russell King [Thu, 13 Nov 2008 14:33:51 +0000 (14:33 +0000)] 
[ARM] dma-mapping: fix compiler warning

arch/arm/mm/dma-mapping.c: In function `dma_sync_sg_for_cpu':
arch/arm/mm/dma-mapping.c:588: warning: statement with no effect

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoHID: fix radio-mr800 hidquirks
Alexey Klimov [Thu, 13 Nov 2008 02:44:50 +0000 (05:44 +0300)] 
HID: fix radio-mr800 hidquirks

This patch fixes radio-mr800 hidqurks. Removes it from blacklist entry
and places it in ignore entry in hid/hid-core.c

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: fix kworld fm700 radio hidquirks
Alexey Klimov [Thu, 13 Nov 2008 09:36:11 +0000 (10:36 +0100)] 
HID: fix kworld fm700 radio hidquirks

This patch fixes kworld fm700 usb-radio hidqurks that handled by
radio-si470x. Removes it from blacklist entry and places it in ignore
entry in hid/hid-core.c

The bug went in through the V4L/DVB tree by commit 6a13378a without
HID maintainer being involved at all.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: fix start/stop cycle in usbhid driver
Jiri Slaby [Sat, 1 Nov 2008 22:41:46 +0000 (23:41 +0100)] 
HID: fix start/stop cycle in usbhid driver

`stop' left out usbhid->urb* pointers and so the next `start' thought
it needs to allocate nothing and used the memory pointers previously
pointed to. This led to memory corruption and device malfunction.

Also don't forget to clear disconnect flag on start which was left set
by the previous `stop'.

This fixes

echo DEVICE > /sys/bus/hid/drivers/DRIVER/unbind
echo DEVICE > /sys/bus/hid/drivers/DRIVER/bind

failures.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: use single threaded work queue for hid_compat
Andi Kleen [Mon, 10 Nov 2008 21:51:50 +0000 (22:51 +0100)] 
HID: use single threaded work queue for hid_compat

Use single threaded work queue for hid_compat

I doubt HID really needs to scale over multiple CPUs. So only use a
single threaded workqueue for HID_COMPAT. This avoids some excessive
thread use on systems with a larger number of CPUs.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: map macbook keys for "Expose" and "Dashboard"
Henrik Rydberg [Tue, 4 Nov 2008 12:31:38 +0000 (13:31 +0100)] 
HID: map macbook keys for "Expose" and "Dashboard"

On macbooks there are specific keys for the user-space functions Expose
and Dashboard, which currently has no counterpart in input.h. This patch
adds KEY_SCALE and KEY_DASHBOARD, and maps the keyboard accordingly.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: support for new unibody macbooks
Henrik Rydberg [Tue, 4 Nov 2008 19:03:45 +0000 (20:03 +0100)] 
HID: support for new unibody macbooks

The unibody MacBook 5 and MacBook Pro 5 come with a new version of
the bcm5974 trackpad. This patch adds the USB device ids and all
the appropriate quirks, including hid_blacklist.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoHID: fix locking in hidraw_open()
Oliver Neukum [Thu, 30 Oct 2008 23:07:23 +0000 (00:07 +0100)] 
HID: fix locking in hidraw_open()

As open needs to sleep hidraw was wrong to call it with a spinlock held.
Furthermore, open can of course fail which needs to be handled.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agoserial: sh-sci: Reorder the SCxTDR write after the TDxE clear.
Paul Mundt [Thu, 13 Nov 2008 08:46:06 +0000 (17:46 +0900)] 
serial: sh-sci: Reorder the SCxTDR write after the TDxE clear.

Under qemu there is a race between the TDxE read-and-clear and the SCxTDR
write. While on hardware it can be gauranteed that the read-and-clear
will happen prior to the character being written out, no such assumption
can be made under emulation. As this path happens with IRQs off and the
hardware itself doesn't care about the ordering, move the SCxTDR write
until after the read-and-clear.

Signed-off-by: Vladimir Prus <vladimir@codesourcery.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: __copy_user function can corrupt the stack in case of exception
Stuart MENEFY [Fri, 10 Oct 2008 18:49:30 +0000 (19:49 +0100)] 
sh: __copy_user function can corrupt the stack in case of exception

The __copy_user function can corrupt the stack in the case of a
non-trivial length of data, and either of the first two move instructions
cause an exception. This is because the fixup for these two instructions
is mapped to the no_pop case, but these instructions execute after the
stack is pushed.

This change creates an explicit NO_POP exception mapping macro, and uses
it for the two instructions executed in the trivial case where no stack
pushes occur.

More information at ST Linux bugzilla:

https://bugzilla.stlinux.com/show_bug.cgi?id=4824

Signed-off-by: Dylan Reid <dylan_reid@bose.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: Fixed the TMU0 reload value on resume
Francesco VIRLINZI [Wed, 15 Oct 2008 09:58:24 +0000 (11:58 +0200)] 
sh: Fixed the TMU0 reload value on resume

This patch fixes the TMU0 interrupt frequency on suspend/resume.
During the resume the kernel reprograms the TMU0.ClockEvent mode
but if the mode is periodic than the TMU0.TCOR is updated with
a random wrong value without taking care latest valid saved value.

There was no problem with No_HZ system where TMU0.TCOR isn't used.

Signed-off-by: Francesco M. Virlinzi <francesco.virlinzi@st.com>
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosparc: Fix tty compile warnings.
Robert Reif [Thu, 13 Nov 2008 07:51:54 +0000 (23:51 -0800)] 
sparc: Fix tty compile warnings.

This patch fixes tty compile warnings as sugested by Alan Cox:

CC drivers/char/n_tty.o
drivers/char/n_tty.c: In function \91normal_poll\92:
drivers/char/n_tty.c:1555: warning: array subscript is above array bounds
drivers/char/n_tty.c:1564: warning: array subscript is above array bounds
drivers/char/n_tty.c: In function \91read_chan\92:
drivers/char/n_tty.c:1269: warning: array subscript is above array bounds
CC drivers/char/tty_ioctl.o
drivers/char/tty_ioctl.c: In function \91set_termios\92:
drivers/char/tty_ioctl.c:533: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:537: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c: In function \91tty_mode_ioctl\92:
drivers/char/tty_ioctl.c:662: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:892: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:896: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:577: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:928: warning: array subscript is above array
bounds
drivers/char/tty_ioctl.c:934: warning: array subscript is above array
bounds

Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Thu, 13 Nov 2008 07:48:40 +0000 (23:48 -0800)] 
sparc: struct device - replace bus_id with dev_name(), dev_set_name()

Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years ago9p: restrict RDMA usage
Randy Dunlap [Wed, 12 Nov 2008 11:05:17 +0000 (11:05 +0000)] 
9p: restrict RDMA usage

Make 9p's RDMA option depend on INET since it uses Infiniband rdma_*
functions and that code depends on INET.  Otherwise 9p can try to
use symbols which don't exist.

ERROR: "rdma_destroy_id" [net/9p/9pnet_rdma.ko] undefined!
ERROR: "rdma_connect" [net/9p/9pnet_rdma.ko] undefined!
ERROR: "rdma_create_id" [net/9p/9pnet_rdma.ko] undefined!
ERROR: "rdma_create_qp" [net/9p/9pnet_rdma.ko] undefined!
ERROR: "rdma_resolve_route" [net/9p/9pnet_rdma.ko] undefined!
ERROR: "rdma_disconnect" [net/9p/9pnet_rdma.ko] undefined!
ERROR: "rdma_resolve_addr" [net/9p/9pnet_rdma.ko] undefined!

I used an if/endif block so that the menu items would remain
presented together.

Also correct an article adjective.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agonet: shy netns_ok check
Alexey Dobriyan [Thu, 13 Nov 2008 07:23:51 +0000 (23:23 -0800)] 
net: shy netns_ok check

Failure to pass netns_ok check is SILENT, except some MIB counter is
incremented somewhere.

And adding "netns_ok = 1" (after long head-scratching session) is
usually the last step in making some protocol netns-ready...

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoipv6: routing header fixes
Brian Haley [Thu, 13 Nov 2008 06:59:21 +0000 (22:59 -0800)] 
ipv6: routing header fixes

This patch fixes two bugs:

1. setsockopt() of anything but a Type 2 routing header should return
EINVAL instead of EPERM.  Noticed by Shan Wei
(shanwei@cn.fujitsu.com).

2. setsockopt()/sendmsg() of a Type 2 routing header with invalid
length or segments should return EINVAL.  These values are statically
fixed in RFC 3775, unlike the variable Type 0 was.

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosh: Don't factor in PAGE_OFFSET for valid_phys_addr_range() check.
Paul Mundt [Thu, 13 Nov 2008 06:38:02 +0000 (15:38 +0900)] 
sh: Don't factor in PAGE_OFFSET for valid_phys_addr_range() check.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: early printk port type fix
Magnus Damm [Thu, 13 Nov 2008 06:33:45 +0000 (15:33 +0900)] 
sh: early printk port type fix

Add PORT_SCIF to unbreak the early printk code.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoi2c: fix i2c-sh_mobile rx underrun
Magnus Damm [Thu, 13 Nov 2008 06:28:21 +0000 (15:28 +0900)] 
i2c: fix i2c-sh_mobile rx underrun

Fix receive path underrun in i2c-sh_mobile driver.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 13 Nov 2008 01:22:44 +0000 (17:22 -0800)] 
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: fix init_idle()'s use of sched_clock()
  sched: fix stale value in average load per task

15 years agoc2port: add c2port support for Eurotech Duramar 2150
Rodolfo Giometti [Wed, 12 Nov 2008 21:27:14 +0000 (13:27 -0800)] 
c2port: add c2port support for Eurotech Duramar 2150

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoAdd c2 port support
Rodolfo Giometti [Wed, 12 Nov 2008 21:27:12 +0000 (13:27 -0800)] 
Add c2 port support

C2port implements a two wire serial communication protocol (bit
banging) designed to enable in-system programming, debugging, and
boundary-scan testing on low pin-count Silicon Labs devices.

Currently this code supports only flash programming through sysfs
interface but extensions shoud be easy to add.

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohdq: documentation for OMAP HDQ
Madhusudhan Chikkature [Wed, 12 Nov 2008 21:27:12 +0000 (13:27 -0800)] 
hdq: documentation for OMAP HDQ

Add a brief document about omap2430/3430 HDQ/1-wire driver.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohdq: bQ27000 HDQ Slave Interface Driver
Madhusudhan Chikkature [Wed, 12 Nov 2008 21:27:11 +0000 (13:27 -0800)] 
hdq: bQ27000 HDQ Slave Interface Driver

Provide the BQ27000 slave interface driver.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohdq driver for OMAP2430/3430
Madhusudhan Chikkature [Wed, 12 Nov 2008 21:27:09 +0000 (13:27 -0800)] 
hdq driver for OMAP2430/3430

The HDQ/1-Wire module of TI OMAP2430/3430 platforms implement the hardware
protocol of the master functions of the Benchmark HDQ and the Dallas
Semiconductor 1-Wire protocols.  These protocols use a single wire for
communication between the master (HDQ/1-Wire controller) and the slave
(HDQ/1-Wire external compliant device).

This patch provides the HDQ driver to suppport TI OMAP2430/3430 platforms.

Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agow1: export w1_read_8 function
Madhusudhan Chikkature [Wed, 12 Nov 2008 21:27:08 +0000 (13:27 -0800)] 
w1: export w1_read_8 function

Export the w1_read_8 function for use of drivers.  The OMAP HDQ
driver(drivers/w1/masters/omap_hdq.c) uses this function.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Madhusudhan Chikkature<madhu.cr@ti.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: add Dallas DS1390/93/94 RTC chips
Mark Jackson [Wed, 12 Nov 2008 21:27:07 +0000 (13:27 -0800)] 
rtc: add Dallas DS1390/93/94 RTC chips

Add support for the Dallas DS1390/93/94 SPI RTC chip.

Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
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>
15 years agortc: basic implementation of Epson RX-8581 I2C Real Time Clock
Martyn Welch [Wed, 12 Nov 2008 21:27:06 +0000 (13:27 -0800)] 
rtc: basic implementation of Epson RX-8581 I2C Real Time Clock

Provide the basic "get" and "set" functionality for the Epson RX-8581 I2C
RTC.  It currently does not support the RTC's Alarm or Fixed-cycle timer.

[akpm@linux-foundation.org: need log2.h for ilog2(), remove unneeded initialisation]
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agortc: rtc-wm8350: add support for WM8350 RTC
Mark Brown [Wed, 12 Nov 2008 21:27:04 +0000 (13:27 -0800)] 
rtc: rtc-wm8350: add support for WM8350 RTC

This adds support for the RTC provided by the Wolfson Microelectronics
WM8350.

This driver was originally written by Graeme Gregory and Liam Girdwood,
though it has been modified since then to update it to current mainline
coding standards and for API completeness.

[akpm@linux-foundation.org: s/schedule_timeout_interruptible/schedule_timeout_uninterruptible/ to prevent bogus timeout when signal_pending()]
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Liam Girdwood <linux@wolfsonmicro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoics932s401: new clock generator chip driver
Darrick J. Wong [Wed, 12 Nov 2008 21:27:04 +0000 (13:27 -0800)] 
ics932s401: new clock generator chip driver

The ics932s401 is a clock generator chip.  This driver allows users to
read the current clock outputs.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoadt7462: new hwmon driver
Darrick J. Wong [Wed, 12 Nov 2008 21:27:03 +0000 (13:27 -0800)] 
adt7462: new hwmon driver

New driver to play with.  As Jean mentioned a couple of years ago, this
chip is a beast with odd combinations of 8 fans, 4 temperatures, and 13
voltage sensors.  This driver has been tested on an IntelliStation Z30.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoLIS3LV02Dx Accelerometer driver
Pavel Machek [Wed, 12 Nov 2008 21:27:02 +0000 (13:27 -0800)] 
LIS3LV02Dx Accelerometer driver

This adds a driver to the accelerometer sensor found in several HP
laptops (under the commercial names of "HP Mobile Data Protection System
3D" and "HP 3D driveguard").  It tries to have more or less the same
interfaces as the hdaps and other accelerometer drivers: in sysfs and as
a joystick.

This driver was first written by Yan Burman.  Eric Piel has updated it
and slimed it up (including the removal of an interface to access to the
free-fall feature of the sensor because it is not reliable enough for
now).  Pavel Machek removed few more features and switched locking from
semaphore to mutex.

Several people have contributed to the database of the axes.

[eric.piel@tremplin-utc.net: LIS3LV02D: Conform to the new ACPI API]
Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: Pavel Machek <pavel@suse.cz>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomemcg: bugfix for memory hotplug
KAMEZAWA Hiroyuki [Wed, 12 Nov 2008 21:27:01 +0000 (13:27 -0800)] 
memcg: bugfix for memory hotplug

The start pfn calculation in page_cgroup's memory hotplug notifier chain
is wrong.

Tested-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoext3: Clean up outdated and incorrect comment for ext3_write_super()
Theodore Tso [Wed, 12 Nov 2008 21:27:01 +0000 (13:27 -0800)] 
ext3: Clean up outdated and incorrect comment for ext3_write_super()

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoatmel_spi: work-around required for new HW bug in AT91SAM9263 Rev.B SPI controller
Jean-Christophe Lallemand [Wed, 12 Nov 2008 21:27:00 +0000 (13:27 -0800)] 
atmel_spi: work-around required for new HW bug in AT91SAM9263 Rev.B SPI controller

We're working with an AT91SAM9263 Rev B in our design and I experienced
some inconsistency in spi-based touchscreen usage between our board and
the Atmel evaluation kit we have that runs on a Rev A chip.

The data was apparently delayed by 1 byte and got ridiculous data out of
the touchscreen driver, very strange.  As everything looked normal in
the spi, touchscreen and dma logs, I contacted the Atmel support and
they triggered me on a new HW bug that appeared in the Rev B SPI
controller.

The problem is that the SPI controller on the Rev B needs that the
software reset is performed two times so that it's performed correctly.

Applying the patch below solves the issue on my Rev B board.  I've tested
it as well on my Rev A evaluation kit and it has apparently no unwanted
side effect, things continue to work as expected.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
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>
15 years agolm85: support adt7468 chips
Darrick J. Wong [Wed, 12 Nov 2008 21:26:59 +0000 (13:26 -0800)] 
lm85: support adt7468 chips

The adt7468 is a follow-on to the adt7463, so plumb in adt7468 support
along the same code paths.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoadt7473: check inputs from sysfs writes
Darrick J. Wong [Wed, 12 Nov 2008 21:26:58 +0000 (13:26 -0800)] 
adt7473: check inputs from sysfs writes

Implement correct range checking for adt7470 to prevent userland from
writing impossible values into the chip, and cap out-of-range values per
standard hwmon conventions.

Implement correct rounding of input values per standard hwmon conventions.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoadt7470: check input range when sysfs files are written
Darrick J. Wong [Wed, 12 Nov 2008 21:26:57 +0000 (13:26 -0800)] 
adt7470: check input range when sysfs files are written

Implement correct range checking for adt7470 to prevent userland from
writing impossible values into the chip, and cap out-of-range values per
standard hwmon conventions.

Implement correct rounding of input values per standard hwmon conventions.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokernel/kprobes.c: don't pad kretprobe_table_locks[] on uniprocessor builds
Andrew Morton [Wed, 12 Nov 2008 21:26:57 +0000 (13:26 -0800)] 
kernel/kprobes.c: don't pad kretprobe_table_locks[] on uniprocessor builds

We only need the cacheline padding on SMP kernels.  Saves 6k:

   text    data     bss     dec     hex filename
   5713     388    8840   14941    3a5d kernel/kprobes.o
   5713     388    2632    8733    221d kernel/kprobes.o

Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDOC: update xip method info
Marco Stornelli [Wed, 12 Nov 2008 21:26:56 +0000 (13:26 -0800)] 
DOC: update xip method info

xip documentation updated:
- change "get_xip_page" to "get_xip_mem";
- explain changed function parameters

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoDOC: add printk-formats.txt
Randy Dunlap [Wed, 12 Nov 2008 21:26:55 +0000 (13:26 -0800)] 
DOC: add printk-formats.txt

Add printk-formats.txt so that we don't have to keep fixing the
same things over and over again.  <wishful thinking>

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoremove ratelimt()
Andrew Morton [Wed, 12 Nov 2008 21:26:55 +0000 (13:26 -0800)] 
remove ratelimt()

It mistakenly assumes that a static local in an inlined function is a
kernel-wide singleton.  It also has no callers, so let's remove it.

Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agovfs: fix shrink_submounts
Eric W. Biederman [Wed, 12 Nov 2008 21:26:54 +0000 (13:26 -0800)] 
vfs: fix shrink_submounts

In the last refactoring of shrink_submounts a variable was not completely
renamed.  So finish the renaming of mnt to m now.

Without this if you attempt to mount an nfs mount that has both automatic
nfs sub mounts on it, and has normal mounts on it.  The unmount will
succeed when it should not.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomm: remove lru_add_drain_all() from the munlock path
KOSAKI Motohiro [Wed, 12 Nov 2008 21:26:53 +0000 (13:26 -0800)] 
mm: remove lru_add_drain_all() from the munlock path

lockdep warns about following message at boot time on one of my test
machine.  Then, schedule_on_each_cpu() sholdn't be called when the task
have mmap_sem.

Actually, lru_add_drain_all() exist to prevent the unevictalble pages
stay on reclaimable lru list.  but currenct unevictable code can rescue
unevictable pages although it stay on reclaimable list.

So removing is better.

In addition, this patch add lru_add_drain_all() to sys_mlock() and
sys_mlockall().  it isn't must.  but it reduce the failure of moving to
unevictable list.  its failure can rescue in vmscan later.  but reducing
is better.

Note, if above rescuing happend, the Mlocked and the Unevictable field
mismatching happend in /proc/meminfo.  but it doesn't cause any real
trouble.

=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.28-rc2-mm1 #2
-------------------------------------------------------
lvm/1103 is trying to acquire lock:
 (&cpu_hotplug.lock){--..}, at: [<c0130789>] get_online_cpus+0x29/0x50

but task is already holding lock:
 (&mm->mmap_sem){----}, at: [<c01878ae>] sys_mlockall+0x4e/0xb0

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #3 (&mm->mmap_sem){----}:
       [<c0153da2>] check_noncircular+0x82/0x110
       [<c0185e6a>] might_fault+0x4a/0xa0
       [<c0156161>] validate_chain+0xb11/0x1070
       [<c0185e6a>] might_fault+0x4a/0xa0
       [<c0156923>] __lock_acquire+0x263/0xa10
       [<c015714c>] lock_acquire+0x7c/0xb0 (*) grab mmap_sem
       [<c0185e6a>] might_fault+0x4a/0xa0
       [<c0185e9b>] might_fault+0x7b/0xa0
       [<c0185e6a>] might_fault+0x4a/0xa0
       [<c0294dd0>] copy_to_user+0x30/0x60
       [<c01ae3ec>] filldir+0x7c/0xd0
       [<c01e3a6a>] sysfs_readdir+0x11a/0x1f0 (*) grab sysfs_mutex
       [<c01ae370>] filldir+0x0/0xd0
       [<c01ae370>] filldir+0x0/0xd0
       [<c01ae4c6>] vfs_readdir+0x86/0xa0 (*) grab i_mutex
       [<c01ae75b>] sys_getdents+0x6b/0xc0
       [<c010355a>] syscall_call+0x7/0xb
       [<ffffffff>] 0xffffffff

-> #2 (sysfs_mutex){--..}:
       [<c0153da2>] check_noncircular+0x82/0x110
       [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
       [<c0156161>] validate_chain+0xb11/0x1070
       [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
       [<c0156923>] __lock_acquire+0x263/0xa10
       [<c015714c>] lock_acquire+0x7c/0xb0 (*) grab sysfs_mutex
       [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
       [<c04f8b55>] mutex_lock_nested+0xa5/0x2f0
       [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
       [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
       [<c01e3d2c>] sysfs_addrm_start+0x2c/0xc0
       [<c01e422f>] create_dir+0x3f/0x90
       [<c01e42a9>] sysfs_create_dir+0x29/0x50
       [<c04faaf5>] _spin_unlock+0x25/0x40
       [<c028f21d>] kobject_add_internal+0xcd/0x1a0
       [<c028f37a>] kobject_set_name_vargs+0x3a/0x50
       [<c028f41d>] kobject_init_and_add+0x2d/0x40
       [<c019d4d2>] sysfs_slab_add+0xd2/0x180
       [<c019d580>] sysfs_add_func+0x0/0x70
       [<c019d5dc>] sysfs_add_func+0x5c/0x70 (*) grab slub_lock
       [<c01400f2>] run_workqueue+0x172/0x200
       [<c014008f>] run_workqueue+0x10f/0x200
       [<c0140bd0>] worker_thread+0x0/0xf0
       [<c0140c6c>] worker_thread+0x9c/0xf0
       [<c0143c80>] autoremove_wake_function+0x0/0x50
       [<c0140bd0>] worker_thread+0x0/0xf0
       [<c0143972>] kthread+0x42/0x70
       [<c0143930>] kthread+0x0/0x70
       [<c01042db>] kernel_thread_helper+0x7/0x1c
       [<ffffffff>] 0xffffffff

-> #1 (slub_lock){----}:
       [<c0153d2d>] check_noncircular+0xd/0x110
       [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0
       [<c0156161>] validate_chain+0xb11/0x1070
       [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0
       [<c015433d>] mark_lock+0x35d/0xd00
       [<c0156923>] __lock_acquire+0x263/0xa10
       [<c015714c>] lock_acquire+0x7c/0xb0
       [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0
       [<c04f93a3>] down_read+0x43/0x80
       [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0 (*) grab slub_lock
       [<c04f650f>] slab_cpuup_callback+0x11f/0x1d0
       [<c04fd9ac>] notifier_call_chain+0x3c/0x70
       [<c04f5454>] _cpu_up+0x84/0x110
       [<c04f552b>] cpu_up+0x4b/0x70 (*) grab cpu_hotplug.lock
       [<c06d1530>] kernel_init+0x0/0x170
       [<c06d15e5>] kernel_init+0xb5/0x170
       [<c06d1530>] kernel_init+0x0/0x170
       [<c01042db>] kernel_thread_helper+0x7/0x1c
       [<ffffffff>] 0xffffffff

-> #0 (&cpu_hotplug.lock){--..}:
       [<c0155bff>] validate_chain+0x5af/0x1070
       [<c040f7e0>] dev_status+0x0/0x50
       [<c0156923>] __lock_acquire+0x263/0xa10
       [<c015714c>] lock_acquire+0x7c/0xb0
       [<c0130789>] get_online_cpus+0x29/0x50
       [<c04f8b55>] mutex_lock_nested+0xa5/0x2f0
       [<c0130789>] get_online_cpus+0x29/0x50
       [<c0130789>] get_online_cpus+0x29/0x50
       [<c017bc30>] lru_add_drain_per_cpu+0x0/0x10
       [<c0130789>] get_online_cpus+0x29/0x50 (*) grab cpu_hotplug.lock
       [<c0140cf2>] schedule_on_each_cpu+0x32/0xe0
       [<c0187095>] __mlock_vma_pages_range+0x85/0x2c0
       [<c0156945>] __lock_acquire+0x285/0xa10
       [<c0188f09>] vma_merge+0xa9/0x1d0
       [<c0187450>] mlock_fixup+0x180/0x200
       [<c0187548>] do_mlockall+0x78/0x90 (*) grab mmap_sem
       [<c01878e1>] sys_mlockall+0x81/0xb0
       [<c010355a>] syscall_call+0x7/0xb
       [<ffffffff>] 0xffffffff

other info that might help us debug this:

1 lock held by lvm/1103:
 #0:  (&mm->mmap_sem){----}, at: [<c01878ae>] sys_mlockall+0x4e/0xb0

stack backtrace:
Pid: 1103, comm: lvm Not tainted 2.6.28-rc2-mm1 #2
Call Trace:
 [<c01555fc>] print_circular_bug_tail+0x7c/0xd0
 [<c0155bff>] validate_chain+0x5af/0x1070
 [<c040f7e0>] dev_status+0x0/0x50
 [<c0156923>] __lock_acquire+0x263/0xa10
 [<c015714c>] lock_acquire+0x7c/0xb0
 [<c0130789>] get_online_cpus+0x29/0x50
 [<c04f8b55>] mutex_lock_nested+0xa5/0x2f0
 [<c0130789>] get_online_cpus+0x29/0x50
 [<c0130789>] get_online_cpus+0x29/0x50
 [<c017bc30>] lru_add_drain_per_cpu+0x0/0x10
 [<c0130789>] get_online_cpus+0x29/0x50
 [<c0140cf2>] schedule_on_each_cpu+0x32/0xe0
 [<c0187095>] __mlock_vma_pages_range+0x85/0x2c0
 [<c0156945>] __lock_acquire+0x285/0xa10
 [<c0188f09>] vma_merge+0xa9/0x1d0
 [<c0187450>] mlock_fixup+0x180/0x200
 [<c0187548>] do_mlockall+0x78/0x90
 [<c01878e1>] sys_mlockall+0x81/0xb0
 [<c010355a>] syscall_call+0x7/0xb

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Tested-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokprobes: disable preempt for module_text_address() and kernel_text_address()
Masami Hiramatsu [Wed, 12 Nov 2008 21:26:51 +0000 (13:26 -0800)] 
kprobes: disable preempt for module_text_address() and kernel_text_address()

__register_kprobe() can be preempted after checking probing address but
before module_text_address() or try_module_get(), and in this interval
the module can be unloaded.  In that case, try_module_get(probed_mod)
will access to invalid address, or kprobe will probe invalid address.

This patch uses preempt_disable() to protect it and uses
__module_text_address() and __kernel_text_address().

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofreezer_cg: disable writing freezer.state of root cgroup
Li Zefan [Wed, 12 Nov 2008 21:26:50 +0000 (13:26 -0800)] 
freezer_cg: disable writing freezer.state of root cgroup

With this change, control file 'freezer.state' doesn't exist in root
cgroup, making root cgroup unfreezable.

I think it's reasonable to disallow freeze tasks in the root cgroup.  And
then we can avoid fork overhead when freezer subsystem is compiled but not
used.

Also make writing invalid value to freezer.state returns EINVAL rather
than EIO.  This is more consistent with other cgroup subsystem.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Paul Menage <menage@google.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofreezer_cg: remove task_lock from freezer_fork()
Li Zefan [Wed, 12 Nov 2008 21:26:49 +0000 (13:26 -0800)] 
freezer_cg: remove task_lock from freezer_fork()

In theory the task can be moved to another cgroup and the freezer will be
freed right after task_lock is dropped, so the lock results in zero
protection.

But in the case of freezer_fork() no lock is needed, since the task is not
in tasklist yet so it won't be moved to another cgroup, so task->cgroups
won't be changed or invalidated.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoGPIO: add new Xilinx driver for powerpc
John Linn [Wed, 12 Nov 2008 21:25:38 +0000 (13:25 -0800)] 
GPIO: add new Xilinx driver for powerpc

This driver supports the Xilinx XPS GPIO IP core which has the typical
GPIO features.

Signed-off-by: Kiran Sutariya <kirans@xilinx.com>
Signed-off-by: John Linn <john.linn@xilinx.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: "Grant Likely" <grant.likely@secretlab.ca>
Cc: <avorontsov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocpusets: update mems allowed in page allocator
David Rientjes [Wed, 12 Nov 2008 21:25:37 +0000 (13:25 -0800)] 
cpusets: update mems allowed in page allocator

If all allowable memory is unreclaimable, it is possible to loop forever
in the page allocator for ~__GFP_NORETRY allocations.

During this time, it is also possible for a task's cpuset to expand its
set of allowable nodes so that it now includes free memory.  The cached
copy of this set, current->mems_allowed, is stale, however, since there
has not been a subsequent call to cpuset_update_task_memory_state().

The cached copy of the set of allowable nodes is now updated in the page
allocator's slow path so the additional memory is available to
get_page_from_freelist().

[akpm@linux-foundation.org: add comment]
Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Paul Menage <menage@google.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoi5000-edac: hold reference to mci kobject
Darrick J. Wong [Wed, 12 Nov 2008 21:25:36 +0000 (13:25 -0800)] 
i5000-edac: hold reference to mci kobject

It turns out that edac_mc_del_mc will kobject_put the last kref on the
mci object.

If the timing is just right, that means that the mci object is freed
before before i5000_remove_one has a chance to free the resources
associated with it, causing a null pointer exceptions when unloading the
driver.  Insert a kobject_{get,put} pair so that this doesn't happen.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix platform drivers that crash on suspend/resume
Darrick J. Wong [Wed, 12 Nov 2008 21:25:00 +0000 (13:25 -0800)] 
Fix platform drivers that crash on suspend/resume

It turns out that if one registers a struct platform_device, the
platform device code expects that platform_device.device->driver points
to a struct driver inside a struct platform_driver.

This is not the case with the ipmi-si, ipmi-msghandler and ibmaem
drivers, which causes the suspend/resume hook functions to jump off into
nowhere, causing a crash.  Make this assumption hold true for these
three drivers.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Greg KH <greg@kroah.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoatmel_lcdfb: change irq_base definition to allow error reporting
Nicolas Ferre [Wed, 12 Nov 2008 21:24:59 +0000 (13:24 -0800)] 
atmel_lcdfb: change irq_base definition to allow error reporting

Changed because old the definition of unsigned long cannot be negative.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Reported-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andrew Victor <linux@maxim.org.za>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohwmon: applesmc: add support for Macbook 4
Henrik Rydberg [Wed, 12 Nov 2008 21:24:58 +0000 (13:24 -0800)] 
hwmon: applesmc: add support for Macbook 4

This patch adds accelerometer and temperature sensor support for Macbook 4.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Cc: Nicolas Boichat <nicolas@boichat.ch
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohugetlb: make unmap_ref_private multi-size-aware
Adam Litke [Wed, 12 Nov 2008 21:24:56 +0000 (13:24 -0800)] 
hugetlb: make unmap_ref_private multi-size-aware

Oops.  Part of the hugetlb private reservation code was not fully
converted to use hstates.

When a huge page must be unmapped from VMAs due to a failed COW,
HPAGE_SIZE is used in the call to unmap_hugepage_range() regardless of
the page size being used.  This works if the VMA is using the default
huge page size.  Otherwise we might unmap too much, too little, or
trigger a BUG_ON.  Rare but serious -- fix it.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Cc: Jon Tollefson <kniht@linux.vnet.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 13 Nov 2008 00:41:27 +0000 (16:41 -0800)] 
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  bnx2: fix poll_controller to pass proper structures and check all rx queues
  niu: Fix readq implementation when architecture does not provide one.
  hostap: pad the skb->cb usage in lieu of a proper fix
  rtl8187 : support for Sitecom WL-168 0001 v4
  mac80211: fix notify_mac function
  rtl8187: Add Abocom USB ID
  net: put_cmsg_compat + SO_TIMESTAMP[NS]: use same name for value as caller
  tcp_htcp: last_cong bug fix
  [netdrvr] smc911x: fix for driver resume (and compilation warning)
  RDMA/cxgb3: deadlock in iw_cxgb3 can cause hang when configuring interface.
  cxgb3 - Limit multiqueue setting to msi-x
  cxgb3 - eeprom read fixes
  myri10ge: fix stop/go ordering even more

15 years agobnx2: fix poll_controller to pass proper structures and check all rx queues
Neil Horman [Thu, 13 Nov 2008 00:23:44 +0000 (16:23 -0800)] 
bnx2: fix poll_controller to pass proper structures and check all rx queues

Fix bnx2 so that netpoll works properly.  Specifically:

1) Fix parameters to bnx2_interrupt to be a struct bnx2_napi rather than a
struct net_device

2) Fix poll_controller method to check every queue in the rx case so frames
aren't missed

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Wed, 12 Nov 2008 22:37:29 +0000 (14:37 -0800)] 
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years agoniu: Fix readq implementation when architecture does not provide one.
David S. Miller [Wed, 12 Nov 2008 22:32:54 +0000 (14:32 -0800)] 
niu: Fix readq implementation when architecture does not provide one.

This fixes a TX hang reported by Jesper Dangaard Brouer.

When an architecutre cannot provide a fully functional
64-bit atomic readq/writeq, the driver must implement
it's own.  This is because only the driver can say whether
doing something like using two 32-bit reads to implement
the full 64-bit read will actually work properly.

In particular one of the issues is whether the top 32-bits
or the bottom 32-bits of the 64-bit register should be read
first.  There could be side effects, and in fact that is
exactly the problem here.

The TX_CS register has counters in the upper 32-bits and
state bits in the lower 32-bits.  A read clears the state
bits.

We would read the counter half before the state bit half.
That first read would clear the state bits, and then the
driver thinks that no interrupts are pending because the
interrupt indication state bits are seen clear every time.

Fix this by reading the bottom half before the upper half.

Tested-by: Jesper Dangaard Brouer <jdb@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>