Linus Torvalds [Wed, 18 Nov 2009 15:38:19 +0000 (07:38 -0800)]
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: Fixup last users of irq_chip->typename
uio: pm_runtime_disable is needed if failed
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
tty: cp210x: Fix carrier handling
tty_port: If we are opened non blocking we still need to raise the carrier
Peter Zijlstra [Tue, 17 Nov 2009 22:06:24 +0000 (14:06 -0800)]
fcntl: rename F_OWNER_GID to F_OWNER_PGRP
This is for consistency with various ioctl() operations that include the
suffix "PGRP" in their names, and also for consistency with PRIO_PGRP,
used with setpriority() and getpriority(). Also, using PGRP instead of
GID avoids confusion with the common abbreviation of "group ID".
I'm fine with anything that makes it more consistent, and if PGRP is what
is the predominant abbreviation then I see no need to further confuse
matters by adding a third one.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andi Kleen [Tue, 17 Nov 2009 22:06:22 +0000 (14:06 -0800)]
mm: allow memory hotplug and hibernation in the same kernel
Allow memory hotplug and hibernation in the same kernel
Memory hotplug and hibernation were exclusive in Kconfig. This is
obviously a problem for distribution kernels who want to support both in
the same image.
After some discussions with Rafael and others the only problem is with
parallel memory hotadd or removal while a hibernation operation is in
process. It was also working for s390 before.
This patch removes the Kconfig level exclusion, and simply makes the
memory add / remove functions grab the pm_mutex to exclude against
hibernation.
Fixes a regression - old kernels didn't exclude memory hotadd and
hibernation.
Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Tejun Heo [Tue, 17 Nov 2009 22:06:20 +0000 (14:06 -0800)]
workqueue: fix race condition in schedule_on_each_cpu()
Commit 65a64464349883891e21e74af16c05d6e1eeb4e9 ("HWPOISON: Allow
schedule_on_each_cpu() from keventd") which allows schedule_on_each_cpu()
to be called from keventd added a race condition. schedule_on_each_cpu()
may race with cpu hotplug and end up executing the function twice on a
cpu.
Fix it by moving direct execution into the section protected with
get/put_online_cpus(). While at it, update code such that direct
execution is done after works have been scheduled for all other cpus and
drop unnecessary cpu != orig test from flush loop.
Hidetoshi Seto [Tue, 17 Nov 2009 22:06:18 +0000 (14:06 -0800)]
mm/memory_hotplug: fix section mismatch
With CONFIG_MEMORY_HOTPLUG I got following warning:
WARNING: vmlinux.o(.text+0x1276b0): Section mismatch in reference from
the function hotadd_new_pgdat() to the function
.meminit.text:free_area_init_node()
The function hotadd_new_pgdat() references
the function __meminit free_area_init_node().
This is often because hotadd_new_pgdat lacks a __meminit
annotation or the annotation of free_area_init_node is wrong.
Zhang Le [Wed, 4 Nov 2009 15:22:59 +0000 (23:22 +0800)]
USB: option.c: add support for D-Link DWM-162-U5
Add D-Link DWM-162-U5 device id 1e0e:ce16 into option driver. The device
has 4 interfaces, of which 1 is handled by storage and the other 3 by
option driver.
The device appears first as CD-only 05c6:2100 device and must be
switched to 1e0e:ce16 mode either by using "eject CD" or usb_modeswitch.
Alan Stern [Wed, 4 Nov 2009 16:35:53 +0000 (11:35 -0500)]
USB: usbmon: fix bug in mon_buff_area_shrink
This patch (as1299b) fixes a bug in an error-handling path of usbmon's
binary interface. The storage area for URB data is divided into
fixed-size blocks. If an URB's data can't be copied, the area
reserved for it should be decreased to the size of the truncated
information (rounded up to a block boundary). Rounding up the amount
to be removed and subtracting it from the reserved size is definitely
the wrong thing to do.
Also, when the data for an isochronous URB can't be copied, we can
still copy the isoc packet descriptors. In fact the current code does
copy the descriptors, but then sets the capture length to 0 so they
remain inaccessible. The capture length should be reduced to the
length of the descriptors, not set to 0.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Pete Zaitcev <zaitcev@redhat.com> CC: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sarah Sharp [Wed, 4 Nov 2009 19:22:19 +0000 (11:22 -0800)]
USB: xhci: Fix scratchpad deallocation.
The scratchpad_free() function uses xhci->page_size to free some memory
with pci_free_consistent(). However, the page_size is set to zero before
the call, causing kernel oopses on driver unload. Call scratchpad_free()
before setting xhci->page_size to zero.
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Acked-by: John Youn <John.Youn@synopsys.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sarah Sharp [Wed, 4 Nov 2009 06:02:24 +0000 (22:02 -0800)]
USB: xhci: Fix TRB physical to virtual address translation.
The trb_in_td() function in the xHCI driver is supposed to translate a
physical transfer buffer request (TRB) into a virtual pointer to the ring
segment that TRB is in.
Unfortunately, a mistake in this function may cause endless loops as the
driver searches through the linked list of ring segments over and over
again. Fix a couple bugs that may lead to loops or bad output:
1. Bail out if we get a NULL pointer when translating the segment's
private structure and the starting DMA address of the segment chunk. If
this happens, we've been handed a starting TRB pointer from a different
ring.
2. Make sure the function works when there's multiple segments in the
ring. In the while loop to search through the ring segments, use the
current segment variable (cur_seg), rather than the starting segment
variable (start_seg) that is passed in.
3. Stop searching the ring if we've run through all the segments in the
ring.
Sarah Sharp [Wed, 4 Nov 2009 06:02:22 +0000 (22:02 -0800)]
USB: xhci: Fix bug memory free after failed initialization.
If the xHCI driver fails during the memory initialization, xhci->ir_set
may not be a valid pointer. Check that it points to valid DMA'able memory
before writing to that address during the memory freeing process.
Francesco Lavra [Tue, 3 Nov 2009 10:53:07 +0000 (10:53 +0000)]
USB: cdc_acm: Fix memory leak after hangup
Am Donnerstag, 10. September 2009 15:43:53 schrieb Dietmar Hilbrich:
> Hello,
>
> i have the following problem with the cdc-acm - driver:
>
> I'm using the driver with an "Ericsson F3507G" on a Thinkpad T400.
>
> If a disable the device (with the RFKill-Switch) while it is used by a
> programm like ppp, the driver doesn't seem to correctly clean up the tty,
> even after the program has been closed)
>
> The tty is still active (e.g. there still exists an entry in
> /sys/dev/char/166:0 if ttyACM0 was used) and if a reacticate the device,
> this device entry will be skipped and the Device-Nodes ttyACM1, ttyACM2
> and ttyACM3 will be used.
>
> This problem was introduced with the commit
> 10077d4a6674f535abdbe25cdecb1202af7948f1 (before 2.6.31-rc1) and still
> exists in 2.6.31.
>
> I was able the fix this problem with the following patch:
>
> diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
> index 2bfc41e..0970d2f 100644
> --- a/drivers/usb/class/cdc-acm.c
> +++ b/drivers/usb/class/cdc-acm.c
> @@ -676,6 +676,7 @@ static void acm_tty_hangup(struct tty_struct *tty)
> struct acm *acm = tty->driver_data;
> tty_port_hangup(&acm->port);
> acm_port_down(acm, 0);
> + acm_tty_unregister(acm);
> }
I have the same problem with cdc-acm (I'm using a Samsung SGH-U900): when I
unplug it from the USB port during a PPP connection, the ppp daemon gets the
hangup correctly (and closes the device), but the struct acm corresponding to
the device disconnected is not freed. Hence reconnecting the device results in
creation of /dev/ttyACM(x+1). The same happens when the system is hibernated
during a PPP connection.
This memory leak is due to the fact that when the tty is hung up,
tty_port_close_start() returns always zero, and acm_tty_close() never reaches
the point where acm_tty_unregister() is called.
Here is a fix for this.
Signed-off-by: Francesco Lavra <francescolavra@interfree.it> Acked-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Libin Yang [Wed, 4 Nov 2009 06:55:18 +0000 (14:55 +0800)]
USB: ohci: quirk AMD prefetch for USB 1.1 ISO transfer
The following patch in the driver is required to avoid USB 1.1 device
failures that may occur due to requests from USB OHCI controllers may
be overwritten if the latency for any pending request by the USB
controller is very long (in the range of milliseconds).
Signed-off-by: Libin Yang <libin.yang@amd.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Wed, 28 Oct 2009 20:12:33 +0000 (21:12 +0100)]
tty: cp210x: Fix carrier handling
Original discussion:
http://thread.gmane.org/gmane.linux.usb.general/23217/focus=23248
or
http://marc.info/?l=linux-usb&m=125553790714133&w=2
9a68e39d4a701fb3be03cae9b462408664ebd205 broke carrier handling so that a
cp210x setup which needed the carrier lines set up (non CLOCAL) which did
not make a call which set the termios bits left the lines down even if
CLOCAL was not asserted.
Fix this not by reverting but by adding the proper dtr_rts and
carrier_raised methods. This both sets the modem lines properly and also
implements the correct blocking semantics for the port as required by
POSIX.
Signed-off-by: Alan Cox <alan@linux.intel.com> Reported-by: Karl Hiramoto <karl@hiramoto.org> Tested-by: Karl Hiramoto <karl@hiramoto.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Wed, 28 Oct 2009 20:12:32 +0000 (21:12 +0100)]
tty_port: If we are opened non blocking we still need to raise the carrier
Original discussion:
http://thread.gmane.org/gmane.linux.usb.general/23217/focus=23248
or
http://marc.info/?l=linux-usb&m=125553790714133&w=2
The tty_port code inherited a bug common to various drivers it was based
upon. If the tty is opened O_NONBLOCK we do not wait for the carrier to be
raised but we must still raise our modem lines if appropriate.
(There is a second question here about whether we should do so if CLOCAL is
set but that can wait)
Signed-off-by: Alan Cox <alan@linux.intel.com> Reported-by: Karl Hiramoto <karl@hiramoto.org> Tested-by: Karl Hiramoto <karl@hiramoto.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] bfa: declare MODULE_FIRMWARE
[SCSI] gdth: Prevent negative offsets in ioctl CVE-2009-3080
[SCSI] libsas: do not set res = 0 in sas_ex_discover_dev()
[SCSI] Fix incorrect reporting of host protection capabilities
[SCSI] pmcraid: Fix ppc64 driver build for using cpu_to_le32 on U8 data type
[SCSI] ipr: add workaround for MSI interrupts on P7
[SCSI] scsi_transport_fc: Fix WARN message for FC passthru failure paths
[SCSI] bfa: fix test in bfad_os_fc_host_init()
Linus Torvalds [Tue, 17 Nov 2009 17:19:54 +0000 (09:19 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] pxa: ensure mfp is in correct range in mfp_{read,write}
[ARM] pxa/hx4700: fix hx4700 touchscreen pressure values
ARM: 5787/1: U300 COH 901 331 fixes
ARM: Fix warning in sa1100-flash.c
[ARM] Kirkwood: disable propagation of mbus error to the CPU local bus
[ARM] pxa: fix incorrect mfp_to_gpio() conversion
[ARM] pxa/colibri: fix AC97 ifdefs and add missing include
[ARM] pxa: fix missing underscores in mfp-pxa910.h
[ARM] pxa: fix interrupts number calculation when CONFIG_PXA_HAVE_ISA_IRQS=y
Linus Torvalds [Tue, 17 Nov 2009 17:19:27 +0000 (09:19 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
dereferencing freed memory regulator_fixed_voltage_remove()
regulator: Fix check of unsigned return value and transmit errors in wm831x_gp_ldo_get_mode()
regulator: Handle missing constraints in _regulator_disable()
Linus Torvalds [Tue, 17 Nov 2009 17:16:57 +0000 (09:16 -0800)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
leds-gpio: fix possible crash on OF device unbinding
backlight: Fix backlight limiting on spitz/corgi devices
backlight: lcd - Fix wrong sizeof
Linus Torvalds [Tue, 17 Nov 2009 17:15:48 +0000 (09:15 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: ice1724 - make some bitfields unsigned
ALSA: hda - Dell Studio 1557 hd-audio quirk
ALSA: ice1724 - Fix section mismatch in prodigy_hd2_resume()
ALSA: hda - Add another Nvidia HDMI codec id (10de:0005)
ALSA: hda: Use model=mb5 for MacBookPro 5,2
Linus Torvalds [Tue, 17 Nov 2009 17:14:49 +0000 (09:14 -0800)]
Merge branch 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc
* 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc:
Makefile: Add -Wmising-prototypes to HOSTCFLAGS
oss: Mark loadhex static in hex2hex.c
dtc: Mark various internal functions static
dtc: Set "noinput" in the lexer to avoid an unused function
drm: radeon: Mark several functions static in mkregtable
arch/sparc/boot/*.c: Mark various internal functions static
arch/powerpc/boot/addRamDisk.c: Mark several internal functions static
arch/alpha/boot/tools/objstrip.c: Mark "usage" static
Documentation/vm/page-types.c: Declare checked_open static
genksyms: Mark is_reserved_word static
kconfig: Mark various internal functions static
kconfig: Make zconf.y work with current bison
Access to log items on the AIL is generally protected by m_ail_lock;
this is particularly needed when we're getting or setting the 64-bit
li_lsn on a 32-bit platform. This patch fixes a couple places where we
were accessing the log item after dropping the AIL lock on 32-bit
machines.
This can result in a partially-zeroed log->l_tail_lsn if
xfs_trans_ail_delete is racing with xfs_trans_ail_update, and in at
least some cases, this can leave the l_tail_lsn with a zero cycle
number, which means xlog_space_left will think the log is full (unless
CONFIG_XFS_DEBUG is set, in which case we'll trip an ASSERT), leading to
processes stuck forever in xlog_grant_log_space.
Thanks to Adrian VanderSpek for first spotting the race potential and to
Dave Chinner for debug assistance.
Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
Jan Rekorajski [Mon, 16 Nov 2009 11:57:02 +0000 (11:57 +0000)]
XFS bug in log recover with quota (bugzilla id 855)
Hi,
I was hit by a bug in linux 2.6.31 when XFS is not able to recover the
log after a crash if fs was mounted with quotas. Gory details in XFS
bugzilla: http://oss.sgi.com/bugzilla/show_bug.cgi?id=855.
It looks like wrong struct is used in buffer length check, and the following
patch should fix the problem.
xfs_dqblk_t has a size of 104+32 bytes, while xfs_disk_dquot_t is 104 bytes
long, and this is exactly what I see in system logs - "XFS: dquot too small
(104) in xlog_recover_do_dquot_trans."
Signed-off-by: Jan Rekorajski <baggins@sith.mimuw.edu.pl> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Alex Elder <aelder@sgi.com>
Jiri Kosina [Tue, 17 Nov 2009 06:12:13 +0000 (22:12 -0800)]
Input: psmouse - fix breakage introduced by b7802c5c1ea
Commit b7802c5c1ea ("Input: psmouse - use boolean type") caused the
synaptics_hardware variable to be completely useless, as it is
constantly set to 'true' throughout the whole psmouse_extensions().
This was caused by the following hunk in the commit in question
- int synaptics_hardware = 0;
+ bool synaptics_hardware = true;
which is wrong and causes driver to issue extra reset when falling
back to bare PS/2 protocol.
hx4700 touchscreen events were being dropped in ads7846_rx() because their
pressure values consistently exceeded the platform maximum of 512; a sample
of 256 pressure values were in the range 531 to 815. Doubling the platform
maximum to 1024 allows hx4700 touchscreen events to pass the test.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Linus Walleij [Sat, 14 Nov 2009 00:03:24 +0000 (01:03 +0100)]
ARM: 5787/1: U300 COH 901 331 fixes
This will fix some small issues with the COH 901 331 RTC driver:
- Interrupt is disabled after alarm so that we don't fire
multiple interrupts.
- We return 0 from the coh901331_alarm_irq_enable() ridding
a compile warning.
- We alter the name in the U300 device registry to match that
of the driver so they sucessfully resolve.
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Mon, 16 Nov 2009 16:13:35 +0000 (16:13 +0000)]
ARM: Fix warning in sa1100-flash.c
drivers/mtd/maps/sa1100-flash.c: In function 'sa1100_probe_subdev':
drivers/mtd/maps/sa1100-flash.c:214: warning: format '%d' expects type 'int', but argument 3 has type 'uint64_t'
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
at91sam9g20ek rev. C and onwards embed two SD/MMC slots. This patch modify the
previous dual slot board definition to match the official rev. C board. It also
allows the use of at91_mci SD/MMC driver in addition to the atmel-mci one.
Some pins have been re-affected from leds or Ethernet phy IRQ to the SD/MMC
slot A. This lead to a modification of those definitions.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za>
Suresh Jayaraman [Mon, 16 Nov 2009 06:33:16 +0000 (12:03 +0530)]
cifs: clear server inode number flag while autodisabling
Fix the commit ec06aedd44 that intended to turn off querying for server inode
numbers when server doesn't consistently support inode numbers. Presumably
the commit didn't actually clear the CIFS_MOUNT_SERVER_INUM flag, perhaps a
typo.
Signed-off-by: Suresh Jayaraman <sjayaraman@suse.de> Acked-by: Jeff Layton <jlayton@redhat.com> Cc: Stable <stable@kernel.org> Signed-off-by: Steve French <sfrench@us.ibm.com>
Don't dereference drvdata after it has been freed.
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
leds-gpio: fix possible crash on OF device unbinding
If there are leds present in the OF tree, but the GPIOs for (some) of
them are unavailable, led_data doesn't get populated with correct
devices. Then, on device unbinding, one can crash the kernel.
Workaround this by setting led->gpio to invalid value early.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Pavel Machek [Fri, 6 Nov 2009 15:58:31 +0000 (15:58 +0000)]
backlight: Fix backlight limiting on spitz/corgi devices
On spitz (& similar) machines, if battery is running low, backlight
needs
to be limited to lower step. Unfortunately, current code uses &= for
limiting, turning backlight off completely for some backlight settings.
Fix that.
Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Jean Delvare [Mon, 16 Nov 2009 11:45:40 +0000 (12:45 +0100)]
hwmon: (adt7475) Cache limits for 60 seconds
The comment says that limits are cached for 60 seconds but the code
actually caches them for only 2 seconds. Align the code on the
comment, as 60 seconds makes more sense.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Avoid registering channels that have zero divider settings in them, as this
will only lead to kernel OOPS from divide-by-zero when the sysfs entry is
read.
Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Roel Kluin [Fri, 16 Oct 2009 12:16:15 +0000 (14:16 +0200)]
regulator: Fix check of unsigned return value and transmit errors in wm831x_gp_ldo_get_mode()
If ret is unsigned, the checks for negative wm831x_reg_read() return values
are wrong. The error value should be transmitted to its caller, e.g.
wm831x_gp_ldo_get_status() which tests for a negative return value.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Dan Carpenter [Mon, 16 Nov 2009 09:07:17 +0000 (11:07 +0200)]
ALSA: ice1724 - make some bitfields unsigned
This is a clean up and doesn't change the behavior.
Bit fields should always be unsigned. Otherwise pm_suspend_enabled will
be -1 when you want it to be 1. The other bad thing is that the sparse
checker will complain 36 times if they aren't unsigned.
The other bitfields in that struct are unsigned already.
Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Josh Triplett [Sun, 15 Nov 2009 22:38:47 +0000 (14:38 -0800)]
Makefile: Add -Wmising-prototypes to HOSTCFLAGS
Now that all host programs use static for all private functions and
forward prototypes for all extern functions, add -Wmissing-prototypes to
HOSTCFLAGS in the hopes of keeping it that way.
All versions of GCC supported by the kernel handle -Wmissing-prototypes.
Josh Triplett [Fri, 16 Oct 2009 22:52:06 +0000 (15:52 -0700)]
dtc: Set "noinput" in the lexer to avoid an unused function
Regenerate the corresponding generated lexer.
Regenerating the lexer with current flex also provides prototypes for
various yy* functions, making some -Wmissing-prototypes warnings go away
as well.
Josh Triplett [Thu, 15 Oct 2009 19:58:40 +0000 (12:58 -0700)]
genksyms: Mark is_reserved_word static
The genksyms keyword gperf hash provides a function is_reserved_word.
genksyms #includes the resulting generated file keywords.c, so the
function gets used only in the same source file that defines it. Mark
is_reserved_word static, and regenerate the corresponding generated
file.
Josh Triplett [Thu, 15 Oct 2009 19:13:36 +0000 (12:13 -0700)]
kconfig: Mark various internal functions static
kconfig's keyword hash, lexer, and parser define various functions used
only locally. Declare these functions as static, and regenerate the
corresponding generated files.
* git://git.infradead.org/users/dwmw2/iommu-2.6.32:
intel-iommu: Support PCIe hot-plug
intel-iommu: Obey coherent_dma_mask for alloc_coherent on passthrough
intel-iommu: Check for 'DMAR at zero' BIOS error earlier.
Linus Torvalds [Sat, 14 Nov 2009 21:03:24 +0000 (13:03 -0800)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
MIPS: SMTC: Fix lockup in smtc_distribute_timer
MIPS: TXx9: Update rbtx49xx_defconfig
MIPS: Make local arrays with CL_SIZE static __initdata
MIPS: Add DMA declare coherent memory support
MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs.
Linus Torvalds [Sat, 14 Nov 2009 21:00:17 +0000 (13:00 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: psmouse - remove unneeded '\n' from psmouse.proto parameter
Input: atkbd - restore LED state at reconnect
Input: force LED reset on resume
Input: fix locking in memoryless force-feedback devices
Linus Torvalds [Sat, 14 Nov 2009 20:59:32 +0000 (12:59 -0800)]
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md/raid5: Allow dirty-degraded arrays to be assembled when only party is degraded.
Don't unconditionally set in_sync on newly added device in raid5_reshape
md: allow v0.91 metadata to record devices as being active but not in-sync.
md: factor out updating of 'recovery_offset'.
Linus Torvalds [Sat, 14 Nov 2009 20:59:06 +0000 (12:59 -0800)]
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:
percpu: restructure pcpu_extend_area_map() to fix bugs and improve readability
Linus Torvalds [Sat, 14 Nov 2009 20:57:39 +0000 (12:57 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
[S390] s390: fix single stepping on svc0
[S390] sclp: undo quiesce handler override on resume
[S390] reset cputime accounting after IPL from NSS
[S390] monreader: fix use after free bug with suspend/resume
Oliver Neukum [Fri, 13 Nov 2009 13:26:23 +0000 (14:26 +0100)]
fix memory leak in fixed btusb_close
If the waker is killed before it can replay outstanding URBs, these URBs
won't be freed or will be replayed at the next open. This patch closes
the window by explicitely discarding outstanding URBs.
Petr Vandrovec [Sat, 14 Nov 2009 09:47:07 +0000 (10:47 +0100)]
Fix memory corruption caused by nfsd readdir+
Commit 8177e6d6dfb9cd03d9bdeb647c32161f8f58f686 ("nfsd: clean up
readdirplus encoding") introduced single character typo in nfs3 readdir+
implementation. Unfortunately that typo has quite bad side effects:
random memory corruption, followed (on my box) with immediate
spontaneous box reboot.
Using 'p1' instead of 'p' fixes my Linux box rebooting whenever VMware
ESXi box tries to list contents of my home directory.
Signed-off-by: Petr Vandrovec <petr@vandrovec.name> Cc: "J. Bruce Fields" <bfields@fieldses.org> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ARM] Kirkwood: disable propagation of mbus error to the CPU local bus
Disable propagation of mbus errors to the CPU local bus, as this causes
mbus errors (which can occur for example for PCI aborts) to throw CPU
aborts, which we're not set up to deal with.
Kevin D. Kissell [Tue, 10 Nov 2009 19:45:46 +0000 (11:45 -0800)]
MIPS: SMTC: Fix lockup in smtc_distribute_timer
1. At the end of smtc_distribute_timer, nextstamp is valid and has already
passed so we goto repeat.
2. Nothing updates nextstamp (only updated if the timeout is in the future
And we just decided it is in the past)
3. At the end nextstamp still has the same value so it is still valid and
in the past.
4. This repeats until read_c0_count has a value which causes nextstamp to
be in the future.
Reported and initial patch and testing by Mikael Starvik
<mikael.starvik@axis.com>.
Signed-off-by: Kevin D. Kissell <kevink@paralogos.com> Cc: Mikael Starvik <mikael.starvik@axis.com> Cc: linux-mips@linux-mips.org Cc: Jesper Nilsson <Jesper.Nilsson@axis.com>
Patchwork: http://patchwork.linux-mips.org/patch/621/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Atsushi Nemoto [Sat, 7 Nov 2009 17:20:37 +0000 (02:20 +0900)]
MIPS: Make local arrays with CL_SIZE static __initdata
Since commit 22242681cff52bfb7cba5d2a37b91802be7a4e4c ("MIPS: Extend
COMMAND_LINE_SIZE"), CL_SIZE is 4096 and local array variables with this
size will cause an build failure with default CONFIG_FRAME_WARN settings.
Although current users of such array variables are all early bootstrap
code and not likely to cause real stack overflow (thread_info corruption),
it is preferable to to declare these arrays static with __initdata.
David Daney [Mon, 2 Nov 2009 19:33:46 +0000 (11:33 -0800)]
MIPS: Fix emulation of 64-bit FPU on FPU-less 64-bit CPUs.
Running a 64-bit kernel on a 64-bit CPU without an FPU would cause the
emulator to run in 32-bit mode. The c0_Status.FR bit is wired to zero
on systems without an FPU, so using that bit to decide how the emulator
behaves doesn't allow for proper emulation on 64-bit FPU-less
processors.
Instead, we need to select the emulator mode based on the user-space
ABI. Since the thread flag TIF_32BIT_REGS is used to set c0_Status.FR,
we can just use it to decide if the emulator should be in 32-bit or
64-bit mode.
Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
On s390 there are two ways of specifying the system call number for
the svc instruction. The standard way is to use the immediate field
in the instruction (or to use EXecute for values unknown during
assemble time). This can encode 256 system calls.
The kernel ABI also allows to put the system call number in r1 and
then execute svc 0 to enable system call numbers > 255.
It turns out that single stepping svc 0 is broken, since the PER
program check handler uses r1. We have to use a different register.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
[S390] sclp: undo quiesce handler override on resume
In a system where the ctrl-alt-del init action initiated by signal
quiesce suspends the machine the quiesce handler override for
_machine_restart, _machine_halt and _machine_power_off needs to be
undone, otherwise the override is still present in the resumed
system. The next shutdown would then load the quiesce state psw
instead of performing the correct shutdown action.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
[S390] reset cputime accounting after IPL from NSS
After an IPL from NSS the uptime of the system is incorrect. The reason
is that the startup code in head.S is not executed in case of an IPL
from NSS. Due to that sched_clock_base_cc which is used to initialze
wall_to_monotonic contains the time stamp when the NSS has been created
instead of the time stamp of the system start.
Reinitialize the cputime accounting values in create_kernel_nss after
the SAVESYS CP command that created the NSS segment.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Gerald Schaefer [Fri, 13 Nov 2009 14:43:51 +0000 (15:43 +0100)]
[S390] monreader: fix use after free bug with suspend/resume
The monreader device driver doesn't set dev->driver_data to NULL after
freeing the corresponding data structure. This leads to a use after
free bug in the freeze/thaw suspend/resume functions after the device
has been opened and closed once. Fix this by clearing dev->driver_data
in the close() function.
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Marek Vasut [Sun, 8 Nov 2009 02:05:11 +0000 (03:05 +0100)]
[ARM] pxa/colibri: fix AC97 ifdefs and add missing include
The AC97 part wasn't initialized on Colibri/PXA320 because the macros
were wrong. Also, the code didn't compile because of a header file not
being included.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Marc Zyngier [Thu, 5 Nov 2009 07:10:10 +0000 (08:10 +0100)]
[ARM] pxa: fix interrupts number calculation when CONFIG_PXA_HAVE_ISA_IRQS=y
Commit d2c37068429b29d6549cf3486fc84b836689e122 ([ARM] pxa:
initialize default interrupt priority and use ICHP for IRQ handling)
broke ISA interrupt support on pxa27x/3xx.
In such a case, PXA_IRQ(0) != 0, and the IRQ number computed from
ICHP must be offset by PXA_IRQ(0).
Tested on an Arcom Zeus (pxa270), with both CONFIG_PXA_HAVE_ISA_IRQS
enabled and disabled.
Signed-off-by: Marc Zyngier <maz@misterjones.org> Tested-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Dmitry Torokhov [Fri, 13 Nov 2009 07:19:05 +0000 (23:19 -0800)]
Input: atkbd - restore LED state at reconnect
Even though input core tells us to restore LED state and repeat rate
at resume keyboard may be reconnected either by request from userspace
(via sysfs) or just by pulling it from the box and plugging it back in.
In these cases we still need to restore state ourselves.
Dmitry Torokhov [Fri, 13 Nov 2009 07:19:05 +0000 (23:19 -0800)]
Input: force LED reset on resume
We should be sending EV_LED event down to drivers upon resume even in cases
when in-kernel state of the LED is off since device could come up with some
leds turned on.
Reported-and-tested-by: Mikko Vinni <mmvinni@yahoo.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>