]> Pileus Git - ~andy/linux/log
~andy/linux
13 years ago[media] tuner-core: fix s_std and s_tuner
Hans Verkuil [Tue, 14 Jun 2011 06:56:09 +0000 (03:56 -0300)]
[media] tuner-core: fix s_std and s_tuner

Both s_std and s_tuner are broken because set_mode_freq is called before the
new std (for s_std) and audmode (for s_tuner) are set.

This patch splits set_mode_freq in a set_mode and a set_freq and in s_std/s_tuner
first calls set_mode, and if that returns 0 (i.e. the mode is supported)
then they set t->std/t->audmode and call set_freq.

This fixes a bug where changing std or audmode would actually change it to
the previous value.

Discovered while testing analog TV standards for cx18 with a tda18271 tuner.

Cc: stable@kernel.org
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
13 years agoASoC: ak4642: fixup snd_soc_update_bits mask for PW_MGMT2
Kuninori Morimoto [Thu, 7 Jul 2011 00:58:56 +0000 (17:58 -0700)]
ASoC: ak4642: fixup snd_soc_update_bits mask for PW_MGMT2

mask didn't cover update-data

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoxen/pci: Move check for acpi_sci_override_gsi to xen_setup_acpi_sci.
Konrad Rzeszutek Wilk [Wed, 6 Jul 2011 13:43:16 +0000 (09:43 -0400)]
xen/pci: Move check for acpi_sci_override_gsi to xen_setup_acpi_sci.

Previously we would check for acpi_sci_override_gsi == gsi every time
a PCI device was enabled. That works during early bootup, but later
on it could lead to triggering unnecessarily the acpi_gsi_to_irq(..) lookup.
The reason is that acpi_sci_override_gsi was declared in __initdata and
after early bootup could contain bogus values.

This patch moves the check for acpi_sci_override_gsi to the
site where the ACPI SCI is preset.

CC: stable@kernel.org
Reported-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
Tested-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
[http://lists.xensource.com/archives/html/xen-devel/2011-07/msg00154.html]
Suggested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoplatform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM
Axel Lin [Wed, 29 Jun 2011 03:43:30 +0000 (11:43 +0800)]
platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM

Some newly added drivers do not set backlight type, as a result
/sys/class/backlight/<backlight>/type shows incorrect backlight type.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Corentin Chary <corentin.chary@gmail.com>
Cc: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad-acpi: handle HKEY 0x4010, 0x4011 events
Henrique de Moraes Holschuh [Sun, 5 Jun 2011 19:22:35 +0000 (16:22 -0300)]
thinkpad-acpi: handle HKEY 0x4010, 0x4011 events

Handle events 0x4010 and 0x4011 so that we do not pester users about them.

These events report when the thinkpad is docked/undocked to a native
hotplug dock (i.e. one that does not need ACPI handling, nor is represented
in the ACPI device tree).  Such docks are based on USB 2.0/3.0, and also
work as port replicators.

We really want a proper dock class to report these, or at least new input
EV_SW events.  Since it is not clear which one to use yet, keep reporting
them as vendor-specific ThinkPad events.

WARNING: As defined by the thinkpad-acpi sysfs ABI rules of engagement, the
vendor-specific events will be REMOVED as soon as generic events are made
available (duplicate events are a big problem), with an appropriate update
to the thinkpad-acpi sysfs/event ABI versioning.  Userspace is already
prepared to provide easy backwards compatibility for such changes when
convenient to the distro (see acpi-fakekey).

* Event 0x4010: docking to hotplug dock/port replicator
* Event 0x4011: undocking from hotplug dock/port replicator

Typical usecase would be to trigger display reconfiguration.

Reports mention T410, T510, and series 3 docks/port replicators.  Special
thanks to Robert de Rooy for his extensive report and analysis of the
situation.

http://www.thinkwiki.org/wiki/ThinkPad_Port_Replicator_Series_3
http://www.thinkwiki.org/wiki/ThinkPad_Mini_Dock_Series_3
http://www.thinkwiki.org/wiki/ThinkPad_Mini_Dock_Plus_Series_3
http://www.thinkwiki.org/wiki/ThinkPad_Mini_Dock_Plus_Series_3_for_Mobile_Workstations
http://lenovoblogs.com/insidethebox/?p=290

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Reported-by: Claudius Hubig <claudiushubig@chubig.net>
Reported-by: Doctor Bill <docbill@gmail.com>
Reported-by: Korte Noack <gbk.noack@gmx.de>
Reported-by: Robert de Rooy <robert.de.rooy@gmail.com>
Reported-by: Sebastian Will <swill@csail.mit.edu>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agodrivers/platform/x86: Fix memory leak
Andre Bartke [Fri, 3 Jun 2011 18:55:43 +0000 (20:55 +0200)]
drivers/platform/x86: Fix memory leak

data is not freed in the error case of
compal_probe().

Signed-off-by: Andre Bartke <andre.bartke@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agothinkpad-acpi: handle some new HKEY 0x60xx events
Henrique de Moraes Holschuh [Sun, 5 Jun 2011 19:22:34 +0000 (16:22 -0300)]
thinkpad-acpi: handle some new HKEY 0x60xx events

Handle some user interface events from the newer Lenovo models.  We are likely
to do something smart with these events in the future, for now, hide the ones
we are already certain about from the user and userspace both.

* Events 0x6000 and 0x6005 are key-related.  0x6005 is not properly identified
  yet.  Ignore these events, and do not report them.

* Event 0x6040 has not been properly identified yet, and we don't know if it
  is important (looks like it isn't, but still...).  Keep reporting it.

* Change the message the driver outputs on unknown 0x6xxx events, as all
  recent events are not related to thermal alarms.  Degrade log level from
  ALERT to WARNING.

Thanks to all users who reported these events or asked about them in a number
of mailing lists.  Your help is highly appreciated, even if I did took a lot of
time to act on them.  For that I apologise.

I will list those that identified the reasons for the events as "reported-by",
and I apologise in advance if I leave anyone out: it was not done on purpose, I
made the mistake of not properly tagging all event report emails separately,
and might have missed some.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Reported-by: Markus Malkusch <markus@malkusch.de>
Reported-by: Peter Giles <g1l3sp@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: fix bitwise bug when set device state
Lee, Chun-Yi [Tue, 31 May 2011 06:20:11 +0000 (14:20 +0800)]
acer-wmi: fix bitwise bug when set device state

Fix a bitwise bug that was found by Joern Heissler, it must be OR
but not AND when we query current device state.

Acked-by: Joern Heissler <linux-acpi@joern.heissler.de>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoacer-wmi: Only update rfkill status for associated hotkey events
Seth Forshee [Tue, 21 Jun 2011 17:00:33 +0000 (12:00 -0500)]
acer-wmi: Only update rfkill status for associated hotkey events

acer-wmi is indiscriminately using the device state from hotkey
events to update the various rfkill states. On the Aspire 1830 this
can result in a soft block on the wlan when the touchpad hotkey is
pressed, as it is reporting a non-zero device state that does not
reflect the wireless status. To fix this, only update rfkill states
when a wlan or bluetooth hotkey is pressed.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
13 years agoARM: 6994/1: smp_twd: Fix typo in 'twd_timer_rate' printing
Vitaly Kuzmichev [Thu, 7 Jul 2011 13:56:05 +0000 (14:56 +0100)]
ARM: 6994/1: smp_twd: Fix typo in 'twd_timer_rate' printing

To get hundredths of MHz the rate needs to be divided by 10'000.
Here is an example:
 twd_timer_rate = 123456789
 Before the patch:
    twd_timer_rate / 1000000 = 123
    (twd_timer_rate / 1000000) % 100 = 23
    Result: 123.23MHz.
 After being fixed:
    twd_timer_rate / 1000000 = 123
    (twd_timer_rate / 10000) % 100 = 45
    Result: 123.45MHz.

Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agosctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it
Wei Yongjun [Sat, 2 Jul 2011 09:28:04 +0000 (09:28 +0000)]
sctp: fix missing send up SCTP_SENDER_DRY_EVENT when subscribe it

We forgot to send up SCTP_SENDER_DRY_EVENT notification when
user app subscribes to this event, and there is no data to be
sent or retransmit.

This is required by the Socket API and used by the DTLS/SCTP
implementation.

Reported-by: Michael Tüxen <Michael.Tuexen@lurchi.franken.de>
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Tested-by: Robin Seggelmann <seggelmann@fh-muenster.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agox86: Don't use the EFI reboot method by default
Matthew Garrett [Wed, 6 Jul 2011 20:52:37 +0000 (16:52 -0400)]
x86: Don't use the EFI reboot method by default

Testing suggests that at least some Lenovos and some Intels will
fail to reboot via EFI, attempting to jump to an unmapped
physical address. In the long run we could handle this by
providing a page table with a 1:1 mapping of physical addresses,
but for now it's probably just easier to assume that ACPI or
legacy methods will be present and reboot via those.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@linux.intel.com>
Link: http://lkml.kernel.org/r/1309985557-15350-1-git-send-email-mjg@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agoARM: i.MX53: Fix IOMUX type o's
Troy Kisky [Thu, 7 Jul 2011 02:56:03 +0000 (19:56 -0700)]
ARM: i.MX53: Fix IOMUX type o's

", o" was used for ", 0"

", 17" was used for ", 7 | 0x10"

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX dma: Fix burstsize settings
Sascha Hauer [Wed, 6 Jul 2011 09:18:33 +0000 (11:18 +0200)]
ARM i.MX dma: Fix burstsize settings

dmaengine expects the maxburst parameter in words, not bytes.
The imxdma driver and its users do this wrong. Fix this.

As a side note the imx-pcm-dma-mx2 driver was 'fixed' to work
with imx-dma. This broke the driver with imx-sdma support which
correctly takes the maxburst parameter in words. This patch
puts the sdma based sound back to work.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agodrm/kms: allow drm_mode_group with no objects
Ben Skeggs [Mon, 4 Jul 2011 03:16:17 +0000 (03:16 +0000)]
drm/kms: allow drm_mode_group with no objects

Sometimes we could be controlling a device (such as an NVIDIA Tesla) that
has no crtcs/encoders/connectors.

One could argue that the driver should unset DRIVER_MODESET in this case,
but that changes a whole heap of the DRM's other behaviours, and it's much
easier to just be a modesetting driver without any outputs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: free ib pool on module unloading
Jerome Glisse [Wed, 6 Jul 2011 18:30:09 +0000 (18:30 +0000)]
drm/radeon/kms: free ib pool on module unloading

ib pool weren't free for various newer asic on module unload.
This doesn't cause much arm but still could be candidate for
stable.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
cc: stable@kernel.org
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: fix typo in evergreen disp int status register
Alex Deucher [Wed, 6 Jul 2011 19:37:47 +0000 (19:37 +0000)]
drm/radeon/kms: fix typo in evergreen disp int status register

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: fix typo in IH_CNTL swap bitfield
Alex Deucher [Wed, 6 Jul 2011 19:52:27 +0000 (19:52 +0000)]
drm/radeon/kms: fix typo in IH_CNTL swap bitfield

Only affects BE systems.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agonet: refine {udp|tcp|sctp}_mem limits
Eric Dumazet [Thu, 7 Jul 2011 07:27:05 +0000 (00:27 -0700)]
net: refine {udp|tcp|sctp}_mem limits

Current tcp/udp/sctp global memory limits are not taking into account
hugepages allocations, and allow 50% of ram to be used by buffers of a
single protocol [ not counting space used by sockets / inodes ...]

Lets use nr_free_buffer_pages() and allow a default of 1/8 of kernel ram
per protocol, and a minimum of 128 pages.
Heavy duty machines sysadmins probably need to tweak limits anyway.

References: https://bugzilla.stlinux.com/show_bug.cgi?id=38032
Reported-by: starlight <starlight@binnacle.cx>
Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoALSA: hda - Change all ADCs for dual-adc switching mode for Realtek
Takashi Iwai [Thu, 7 Jul 2011 07:25:54 +0000 (09:25 +0200)]
ALSA: hda - Change all ADCs for dual-adc switching mode for Realtek

When the dual-adc switching mode is active in Realtek auto-parser,
we need to couple all ADCs as a single capture-volume.  Currently, the
volume control changes only the first ADC, thus others may remain silent.
This patch fixes the problem.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agovmxnet3: round down # of queues to power of two
Shreyas Bhatewara [Thu, 7 Jul 2011 07:25:52 +0000 (00:25 -0700)]
vmxnet3: round down # of queues to power of two

vmxnet3 device supports only power-of-two number of queues. The driver
therefore needs to check this and rounds down the number of queues to the
nearest power of two.

Signed-off-by: Yong Wang <yongwang@vmware.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Reviewed-by: Dmitry Torokhov <dtor@vmware.com>
13 years agomach-mx5: fix the I2C clock parents
Lothar Waßmann [Mon, 4 Jul 2011 13:52:17 +0000 (15:52 +0200)]
mach-mx5: fix the I2C clock parents

The clock from which the I2C timing is derived is the ipg_perclk not ipg_clk.

I2C bus frequency was lower by a factor of ~8 due to the clock divider
calculation being based on 66.5MHz IPG clock while the bus actually
uses 8MHz ipg_perclk.

Kernel version: 3.0.0-rc2 branch 'imx-for-next' of git://git.pengutronix.de/git/imx/linux-2.6

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxs/tx28: according to the TX28's datasheet D4-D7 are not used for MMC0
Uwe Kleine-König [Tue, 5 Jul 2011 10:06:36 +0000 (12:06 +0200)]
ARM: mxs/tx28: according to the TX28's datasheet D4-D7 are not used for MMC0

The pins are actually used (not in mainline yet):

D4 -> SSP2_D0
D5 -> GPIO
D6 -> GPIO
D7 -> GPIO for owire

so their pinmapping for SSP0 is wrong.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM i.MX23/28: platform-mxsfb: Add missing include of linux/dma-mapping.h
Axel Lin [Thu, 30 Jun 2011 13:35:03 +0000 (21:35 +0800)]
ARM i.MX23/28: platform-mxsfb: Add missing include of linux/dma-mapping.h

Fix below build error:
  CC      arch/arm/mach-mxs/devices/platform-mxsfb.o
arch/arm/mach-mxs/devices/platform-mxsfb.c: In function 'mx23_add_mxsfb':
arch/arm/mach-mxs/devices/platform-mxsfb.c:27: error: implicit declaration of function 'DMA_BIT_MASK'
make[2]: *** [arch/arm/mach-mxs/devices/platform-mxsfb.o] Error 1
make[1]: *** [arch/arm/mach-mxs/devices] Error 2
make: *** [arch/arm/mach-mxs] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Fix some interrupts marked as reserved.
Fabio Estevam [Tue, 28 Jun 2011 15:58:36 +0000 (12:58 -0300)]
ARM: mx53: Fix some interrupts marked as reserved.

Mark the actual interrupt source for some interrupts currently marked as reserved.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoMXC: iomux-v3: correct NO_PAD_CTRL definition
Troy Kisky [Fri, 24 Jun 2011 17:52:56 +0000 (10:52 -0700)]
MXC: iomux-v3: correct NO_PAD_CTRL definition

iomux-v3.c uses NO_PAD_CTRL as a 32 bit value
so it should not be shifted left by MUX_PAD_CTRL_SHIFT(41)

Previously, anything requesting NO_PAD_CTRL would get
their pad control register set to 0.

Since it is a pad control mask, place it with the other mask values.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Lothar Waßmann <LW@KARO-electronics.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx51: Fix the address space length for SSI
Fabio Estevam [Mon, 27 Jun 2011 20:12:10 +0000 (17:12 -0300)]
ARM: mx51: Fix the address space length for SSI

On MX51 the address space length for SSI is 16KB.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: imx-dma on imx25 has no other TO version but TO1
Shawn Guo [Wed, 22 Jun 2011 14:41:29 +0000 (22:41 +0800)]
ARM: mxc: imx-dma on imx25 has no other TO version but TO1

The imx25 sdma script only gets TO1 version, so there is no need
to encode "to1" in the variable name.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: change imx-dma default to_version to 1
Shawn Guo [Wed, 22 Jun 2011 14:41:28 +0000 (22:41 +0800)]
ARM: mxc: change imx-dma default to_version to 1

The value 0 is not a valid TO version number.  With the current
code, imx-sdma driver will try to load firmware sdma-imx25-to0.bin,
which is obviously not a good name.  Instead, sdma-imx25-to1.bin
makes much more sense.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: sdma on imx25 is a V2 block
Shawn Guo [Wed, 22 Jun 2011 14:41:27 +0000 (22:41 +0800)]
ARM: mxc: sdma on imx25 is a V2 block

The sdma on soc imx25 is not a V1 but V2 block.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: imx-sdma device gets 16K iosize than 4K
Shawn Guo [Wed, 22 Jun 2011 14:41:26 +0000 (22:41 +0800)]
ARM: mxc: imx-sdma device gets 16K iosize than 4K

The sdma on all imx soc gets 16K IO space not 4K.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxc: iomux-v1: Fix build warning
Fabio Estevam [Wed, 22 Jun 2011 14:31:00 +0000 (11:31 -0300)]
ARM: mxc: iomux-v1: Fix build warning

Fix the following warning:

CC      arch/arm/plat-mxc/iomux-v1.o
arch/arm/plat-mxc/iomux-v1.c: In function 'mxc_gpio_setup_multiple_pins':
arch/arm/plat-mxc/iomux-v1.c:160: warning: 'ret' may be used uninitialized in this function
arch/arm/plat-mxc/iomux-v1.c:160: note: 'ret' was declared here

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-imx/mx27_3ds: Fix regulator support
Fabio Estevam [Wed, 22 Jun 2011 12:25:24 +0000 (09:25 -0300)]
ARM: mach-imx/mx27_3ds: Fix regulator support

Fix the 2.8V (VMMC1) and 1.8V (VGEN) voltage generation on mx27_3ds.

Also configure the IOMUX for the PMIC interrupt pin and for the CSPI chip select that is connected
to the MC13783 PMIC.

In order to get the voltage for the LCD (2.8V and 1.8V) it is also necessary to turn on GPO1 and GPO3
supplies because they are connected to switches that enable these two voltages.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agomxc: iomuxv1: Do not use gpio_request when setting the pin as GPIO
Fabio Estevam [Tue, 21 Jun 2011 17:49:37 +0000 (14:49 -0300)]
mxc: iomuxv1: Do not use gpio_request when setting the pin as GPIO

When setting the IOMUX of multiple pins via mxc_gpio_setup_multiple_pins, gpio_request
is called and this prevents subsequent calls of gpio_request done by drivers to succeed.

Remove gpio_request call from mxc_gpio_setup_multiple_pins function.

As gpio_request is removed from mxc_gpio_setup_multiple_pins, there is no need to have
mxc_gpio_release_multiple_pins anymore, so remove this function.

Tested on a mx27_3ds board and after applying this patch it is possible to define all the
IOMUX setup in a static array

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-imx/mx31_3ds: Fix IOMUX for SPI1 signals
Fabio Estevam [Mon, 20 Jun 2011 13:37:13 +0000 (10:37 -0300)]
ARM: mach-imx/mx31_3ds: Fix IOMUX for SPI1 signals

Original code was assuming that the CSPI1 pins on the
MX31PDK were the primary pin function, which is incorrect.

On MX31PDK board these are the pins that provide CSPI1 functionality:

DSR_DCE1 (ALT mode 1) --> CSPI1_CLK
RI_DCE1 (ALT mode 1) --> CSPI1_RDY

DTR_DTE1  -->CSI1_MOSI
DSR_DTE1 --> CSPI1_MISO
DTR_DCE2 ---> CSPI1_SS2

The 3 IOMUX settings above are done via GPR as per Table A-1 of the MX31RM.

This patch fixes the CSPI1 IOMUX and makes the LCD to be functional.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mach-imx/mx27_3ds: Use the standard i.MX macro for GPIO numbering
Fabio Estevam [Wed, 22 Jun 2011 12:25:23 +0000 (09:25 -0300)]
ARM: mach-imx/mx27_3ds: Use the standard i.MX macro for GPIO numbering

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Fix the base addresses for the DDR memory regions
Marc Kleine-Budde [Wed, 8 Jun 2011 15:56:38 +0000 (17:56 +0200)]
ARM: mx53: Fix the base addresses for the DDR memory regions

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Fix the chip select addresses
Fabio Estevam [Fri, 3 Jun 2011 19:10:15 +0000 (16:10 -0300)]
ARM: mx53: Fix the chip select addresses

MX53 has 4 chip selects (CS0 - CS3) and the valid combinations are:

- CS0 (128MB)
- CS0 (64MB), CS1 (64MB)
- CS0 (64MB), CS1 (32MB), CS2 (32MB)
- CS0 (32MB), CS1 (32MB), CS2 (32MB) , CS3 (32MB)

Fix these addresses and also take into account all the four possibilities.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mx53: Fix alternate modes for MX53_PAD_PATA_DATA6
Fabio Estevam [Sat, 4 Jun 2011 16:35:00 +0000 (13:35 -0300)]
ARM: mx53: Fix alternate modes for MX53_PAD_PATA_DATA6

MX53_PAD_PATA_DATA6 can have the following alternate modes:

PATA_DATA_6:   mode 0
GPIO2_6: mode 1
EMI_NANDF_D_6: mode 3
ESDHC4_DAT6 mode 4
GPU3d_GPU_DEBUG_OUT_6 mode 5
IPU_DIAG_BUS_6 mode 6

Fix the modes accordingly.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Dinh Nguyen <dinh.nguyen@freescale.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agomx51: Let USB Storage be built by default
Fabio Estevam [Sat, 28 May 2011 14:11:34 +0000 (11:11 -0300)]
mx51: Let USB Storage be built by default

Let USB Storage be built by default.

Also select NLS_ISO8859 so that the USB device can be mounted.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agoARM: mxs_defconfig: Change CONFIG_RTC_CLASS 'm' to 'y'
Shawn Guo [Wed, 25 May 2011 13:55:38 +0000 (21:55 +0800)]
ARM: mxs_defconfig: Change CONFIG_RTC_CLASS 'm' to 'y'

The patch fixes the warning below.

arch/arm/configs/mxs_defconfig:92:warning: symbol value 'm' invalid for RTC_CLASS

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
13 years agox86, suspend: Restore MISC_ENABLE MSR in realmode wakeup
Kees Cook [Thu, 7 Jul 2011 01:10:34 +0000 (18:10 -0700)]
x86, suspend: Restore MISC_ENABLE MSR in realmode wakeup

Some BIOSes will reset the Intel MISC_ENABLE MSR (specifically the
XD_DISABLE bit) when resuming from S3, which can interact poorly with
ebba638ae723d8a8fc2f7abce5ec18b688b791d7. In 32bit PAE mode, this can
lead to a fault when EFER is restored by the kernel wakeup routines,
due to it setting the NX bit for a CPU that (thanks to the BIOS reset)
now incorrectly thinks it lacks the NX feature. (64bit is not affected
because it uses a common CPU bring-up that specifically handles the
XD_DISABLE bit.)

The need for MISC_ENABLE being restored so early is specific to the S3
resume path. Normally, MISC_ENABLE is saved in save_processor_state(),
but this happens after the resume header is created, so just reproduce
the logic here. (acpi_suspend_lowlevel() creates the header, calls
do_suspend_lowlevel, which calls save_processor_state(), so the saved
processor context isn't available during resume header creation.)

[ hpa: Consider for stable if OK in mainline ]

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Link: http://lkml.kernel.org/r/20110707011034.GA8523@outflux.net
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: <stable@kernel.org> 2.6.38+
13 years agoMerge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Thu, 7 Jul 2011 01:36:53 +0000 (18:36 -0700)]
Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6

* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
  gpio: tps65910: add missing breaks in tps65910_gpio_init

13 years agobtrfs: fix oops when doing space balance
Miao Xie [Wed, 6 Jul 2011 22:51:53 +0000 (18:51 -0400)]
btrfs: fix oops when doing space balance

We need to make sure the data relocation inode doesn't go through
the delayed metadata updates, otherwise we get an oops during balance:

kernel BUG at fs/btrfs/relocation.c:4303!
[SNIP]
Call Trace:
 [<ffffffffa03143fd>] ? update_ref_for_cow+0x22d/0x330 [btrfs]
 [<ffffffffa0314951>] __btrfs_cow_block+0x451/0x5e0 [btrfs]
 [<ffffffffa031355d>] ? read_block_for_search+0x14d/0x4d0 [btrfs]
 [<ffffffffa0314beb>] btrfs_cow_block+0x10b/0x240 [btrfs]
 [<ffffffffa031acae>] btrfs_search_slot+0x49e/0x7a0 [btrfs]
 [<ffffffffa032d8af>] btrfs_lookup_inode+0x2f/0xa0 [btrfs]
 [<ffffffff8147bf0e>] ? mutex_lock+0x1e/0x50
 [<ffffffffa0380cf1>] btrfs_update_delayed_inode+0x71/0x160 [btrfs]
 [<ffffffffa037ff27>] ? __btrfs_release_delayed_node+0x67/0x190 [btrfs]
 [<ffffffffa0381cf8>] btrfs_run_delayed_items+0xe8/0x120 [btrfs]
 [<ffffffffa03365e0>] btrfs_commit_transaction+0x250/0x850 [btrfs]
 [<ffffffff810f91d9>] ? find_get_pages+0x39/0x130
 [<ffffffffa0336cd5>] ? join_transaction+0x25/0x250 [btrfs]
 [<ffffffff81081de0>] ? wake_up_bit+0x40/0x40
 [<ffffffffa03785fa>] prepare_to_relocate+0xda/0xf0 [btrfs]
 [<ffffffffa037f2bb>] relocate_block_group+0x4b/0x620 [btrfs]
 [<ffffffffa0334cf5>] ? btrfs_clean_old_snapshots+0x35/0x150 [btrfs]
 [<ffffffffa037fa43>] btrfs_relocate_block_group+0x1b3/0x2e0 [btrfs]
 [<ffffffffa0368ec0>] ? btrfs_tree_unlock+0x50/0x50 [btrfs]
 [<ffffffffa035e39b>] btrfs_relocate_chunk+0x8b/0x670 [btrfs]
 [<ffffffffa031303d>] ? btrfs_set_path_blocking+0x3d/0x50 [btrfs]
 [<ffffffffa03577d8>] ? read_extent_buffer+0xd8/0x1d0 [btrfs]
 [<ffffffffa031bea1>] ? btrfs_previous_item+0xb1/0x150 [btrfs]
 [<ffffffffa03577d8>] ? read_extent_buffer+0xd8/0x1d0 [btrfs]
 [<ffffffffa035f5aa>] btrfs_balance+0x21a/0x2b0 [btrfs]
 [<ffffffffa0368898>] btrfs_ioctl+0x798/0xd20 [btrfs]
 [<ffffffff8111e358>] ? handle_mm_fault+0x148/0x270
 [<ffffffff814809e8>] ? do_page_fault+0x1d8/0x4b0
 [<ffffffff81160d6a>] do_vfs_ioctl+0x9a/0x540
 [<ffffffff811612b1>] sys_ioctl+0xa1/0xb0
 [<ffffffff81484ec2>] system_call_fastpath+0x16/0x1b
[SNIP]
RIP  [<ffffffffa037c1cc>] btrfs_reloc_cow_block+0x22c/0x270 [btrfs]

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: don't panic if we get an error while balancing V2
Josef Bacik [Sat, 2 Jul 2011 21:24:41 +0000 (21:24 +0000)]
Btrfs: don't panic if we get an error while balancing V2

A user reported an error where if we try to balance an fs after a device has
been removed it will blow up.  This is because we get an EIO back and this is
where BUG_ON(ret) bites us in the ass.  To fix we just exit.  Thanks,

Reported-by: Anand Jain <Anand.Jain@oracle.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agobtrfs: add missing options displayed in mount output
David Sterba [Tue, 28 Jun 2011 15:10:37 +0000 (15:10 +0000)]
btrfs: add missing options displayed in mount output

There are three missed mount options settable by user which are not
currently displayed in mount output.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoxfs: unpin stale inodes directly in IOP_COMMITTED
Dave Chinner [Mon, 4 Jul 2011 05:27:36 +0000 (05:27 +0000)]
xfs: unpin stale inodes directly in IOP_COMMITTED

When inodes are marked stale in a transaction, they are treated
specially when the inode log item is being inserted into the AIL.
It tries to avoid moving the log item forward in the AIL due to a
race condition with the writing the underlying buffer back to disk.
The was "fixed" in commit de25c18 ("xfs: avoid moving stale inodes
in the AIL").

To avoid moving the item forward, we return a LSN smaller than the
commit_lsn of the completing transaction, thereby trying to trick
the commit code into not moving the inode forward at all. I'm not
sure this ever worked as intended - it assumes the inode is already
in the AIL, but I don't think the returned LSN would have been small
enough to prevent moving the inode. It appears that the reason it
worked is that the lower LSN of the inodes meant they were inserted
into the AIL and flushed before the inode buffer (which was moved to
the commit_lsn of the transaction).

The big problem is that with delayed logging, the returning of the
different LSN means insertion takes the slow, non-bulk path.  Worse
yet is that insertion is to a position -before- the commit_lsn so it
is doing a AIL traversal on every insertion, and has to walk over
all the items that have already been inserted into the AIL. It's
expensive.

To compound the matter further, with delayed logging inodes are
likely to go from clean to stale in a single checkpoint, which means
they aren't even in the AIL at all when we come across them at AIL
insertion time. Hence these were all getting inserted into the AIL
when they simply do not need to be as inodes marked XFS_ISTALE are
never written back.

Transactional/recovery integrity is maintained in this case by the
other items in the unlink transaction that were modified (e.g. the
AGI btree blocks) and committed in the same checkpoint.

So to fix this, simply unpin the stale inodes directly in
xfs_inode_item_committed() and return -1 to indicate that the AIL
insertion code does not need to do any further processing of these
inodes.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
13 years agoDocumentation: fix cgroup blkio throttle filenames
Andrea Righi [Wed, 6 Jul 2011 18:26:26 +0000 (11:26 -0700)]
Documentation: fix cgroup blkio throttle filenames

All the blkio.throttle.* file names are incorrectly reported without
".throttle" in the documentation. Fix it.

Signed-off-by: Andrea Righi <andrea@betterlinux.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation: update CodingStyle memory allocators
Jesper Juhl [Wed, 6 Jul 2011 18:27:17 +0000 (11:27 -0700)]
Documentation: update CodingStyle memory allocators

The list of available general purpose memory allocators in
Documentation/CodingStyle chapter 14 is incomplete. This patch adds
the missing vzalloc() to the list.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: move kernel-doc patches location
Randy Dunlap [Wed, 6 Jul 2011 18:19:56 +0000 (11:19 -0700)]
MAINTAINERS: move kernel-doc patches location

Move location of quilt series for kernel-doc patches.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocifs: have cifs_cleanup_volume_info not take a double pointer
Jeff Layton [Wed, 6 Jul 2011 12:10:37 +0000 (08:10 -0400)]
cifs: have cifs_cleanup_volume_info not take a double pointer

...as that makes for a cumbersome interface. Make it take a regular
smb_vol pointer and rely on the caller to zero it out if needed.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Pavel Shilovsky <piastryyy@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: fix build_unc_path_to_root to account for a prefixpath
Jeff Layton [Wed, 6 Jul 2011 12:10:36 +0000 (08:10 -0400)]
cifs: fix build_unc_path_to_root to account for a prefixpath

Regression introduced by commit f87d39d9513.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Pavel Shilovsky <piastryyy@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: remove bogus call to cifs_cleanup_volume_info
Jeff Layton [Tue, 5 Jul 2011 21:37:37 +0000 (17:37 -0400)]
cifs: remove bogus call to cifs_cleanup_volume_info

This call to cifs_cleanup_volume_info is clearly wrong. As soon as it's
called the following call to cifs_get_tcp_session will oops as the
volume_info pointer will then be NULL.

The caller of cifs_mount should clean up this data since it passed it
in. There's no need for us to call this here.

Regression introduced by commit 724d9f1cfba.

Reported-by: Adam Williamson <awilliam@redhat.com>
Cc: Pavel Shilovsky <piastryyy@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoARM: 6987/1: l2x0: fix disabling function to avoid deadlock
Will Deacon [Fri, 1 Jul 2011 13:36:19 +0000 (14:36 +0100)]
ARM: 6987/1: l2x0: fix disabling function to avoid deadlock

The l2x0_disable function attempts to writel with the l2x0_lock held.
This results in deadlock when the writel contains an outer_sync call
for the platform since the l2x0_lock is already held by the disable
function. A further problem is that disabling the L2 without flushing it
first can lead to the spin_lock operation becoming visible after the
spin_unlock, causing any subsequent L2 maintenance to deadlock.

This patch replaces the writel with a call to writel_relaxed in the
disabling code and adds a flush before disabling in the control
register, preventing livelock from occurring.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6966/1: ep93xx: fix inverted RTS/DTR signals on uart1
Petr Štetiar [Fri, 17 Jun 2011 10:10:04 +0000 (11:10 +0100)]
ARM: 6966/1: ep93xx: fix inverted RTS/DTR signals on uart1

It was discovered by Roberto Bergo, that RTS/DTR signals are inverted after
the boot, because it was causing him problems with hardware controlled modem
connected on ttyAM0. Todd Valentic came with this patch for the issue.

Discussion: http://tech.groups.yahoo.com/group/ts-7000/message/20259

Comments from Petr Štetiar:

 Sorry, but forget to add Acked-by[1]:

 1. https://patchwork.kernel.org/patch/873052/

Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Todd Valentic <todd.valentic@sri.com>
Tested-by: Roberto Bergo <roberto.bergo@robson.it>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6980/1: mmci: use StartBitErr to detect bad connections
Linus Walleij [Thu, 30 Jun 2011 14:10:21 +0000 (15:10 +0100)]
ARM: 6980/1: mmci: use StartBitErr to detect bad connections

Stresstesting insert/remove of SD-cards can trigger
a StartBitErr. This made the driver to hang in forever
waiting for a non ocurring data timeout.

This bit and interrupt is documented in the original
PL180 TRM, just never implemented until now.

Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-by: Linus Walleij <linus.walleij@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6979/1: mach-vt8500: add forgotten irq_data conversion
Wolfram Sang [Tue, 28 Jun 2011 08:53:20 +0000 (09:53 +0100)]
ARM: 6979/1: mach-vt8500: add forgotten irq_data conversion

This platform has not been converted to 'struct irq_data' when the big
pile was done and fails to compile nowadays. Tested on a JayPC-Tablet.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Alexey Charkov <alchark@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Wed, 6 Jul 2011 19:16:49 +0000 (12:16 -0700)]
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (46 commits)
  [media] rc: call input_sync after scancode reports
  [media] imon: allow either proto on unknown 0xffdc
  [media] imon: auto-config ffdc 7e device
  [media] saa7134: fix raw IR timeout value
  [media] rc: fix ghost keypresses with certain hw
  [media] [staging] lirc_serial: allocate irq at init time
  [media] lirc_zilog: fix spinning rx thread
  [media] keymaps: fix table for pinnacle pctv hd devices
  [media] ite-cir: 8709 needs to use pnp resource 2
  [media] V4L: mx1-camera: fix uninitialized variable
  [media] omap_vout: Added check in reqbuf & mmap for buf_size allocation
  [media] OMAP_VOUT: Change hardcoded device node number to -1
  [media] OMAP_VOUTLIB: Fix wrong resizer calculation
  [media] uvcvideo: Disable the queue when failing to start
  [media] uvcvideo: Remove buffers from the queues when freeing
  [media] uvcvideo: Ignore entities for terminals with no supported format
  [media] v4l: Don't access media entity after is has been destroyed
  [media] media: omap3isp: fix a potential NULL deref
  [media] media: vb2: fix allocation failure check
  [media] media: vb2: reset queued_count value during queue reinitialization
  ...

Fix up trivial conflict in MAINTAINERS as per Mauro

13 years agoFDPIC: Fix memory leak
Davidlohr Bueso [Wed, 6 Jul 2011 11:26:05 +0000 (12:26 +0100)]
FDPIC: Fix memory leak

The shdr4extnum variable isn't being freed in the cleanup process of
elf_fdpic_core_dump().

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoPM / Hibernate: Fix free_unnecessary_pages()
Rafael J. Wysocki [Wed, 6 Jul 2011 18:15:23 +0000 (20:15 +0200)]
PM / Hibernate: Fix free_unnecessary_pages()

There is a bug in free_unnecessary_pages() that causes it to
attempt to free too many pages in some cases, which triggers the
BUG_ON() in memory_bm_clear_bit() for copy_bm.  Namely, if
count_data_pages() is initially greater than alloc_normal, we get
to_free_normal equal to 0 and "save" greater from 0.  In that case,
if the sum of "save" and count_highmem_pages() is greater than
alloc_highmem, we subtract a positive number from to_free_normal.
Hence, since to_free_normal was 0 before the subtraction and is
an unsigned int, the result is converted to a huge positive number
that is used as the number of pages to free.

Fix this bug by checking if to_free_normal is actually greater
than or equal to the number we're going to subtract from it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Matthew Garrett <mjg@redhat.com>
Cc: stable@kernel.org
13 years agoresource: ability to resize an allocated resource
Ram Pai [Wed, 6 Jul 2011 06:44:30 +0000 (23:44 -0700)]
resource: ability to resize an allocated resource

Provides the ability to resize a resource that is already allocated.
This functionality is put in place to support reallocation needs of
pci resources.

Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agofs: fix lock initialization
Miklos Szeredi [Wed, 6 Jul 2011 10:33:55 +0000 (12:33 +0200)]
fs: fix lock initialization

locks_alloc_lock() assumed that the allocated struct file_lock is
already initialized to zero members.  This is only true for the first
allocation of the structure, after reuse some of the members will have
random values.

This will for example result in passing random fl_start values to
userspace in fuse for FL_FLOCK locks, which is an information leak at
best.

Fix by reinitializing those members which may be non-zero after freeing.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoARM: pxa168: correct nand pmu setting
Lei Wen [Tue, 21 Jun 2011 12:37:47 +0000 (05:37 -0700)]
ARM: pxa168: correct nand pmu setting

The original pair of <0x01db, 208000000> is invalid. Correct it to
the valid value.

The 6th bit of the NFC APMU register indicates NFC works whether
at 156Mhz or 78Mhz. So 0x19b indicates NFC works at 156Mhz, and
0x1db indicates it works at 78Mhz.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Cc: stable@kernel.org
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
13 years agoARM: pxa910: correct nand pmu setting
Lei Wen [Tue, 21 Jun 2011 09:54:18 +0000 (02:54 -0700)]
ARM: pxa910: correct nand pmu setting

The original pair of <0x01db, 208000000> is invalid.
Correct to the valid value.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Cc: stable@kernel.org
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
13 years agoARM: pxa: fix PGSR register address calculation
Paul Parsons [Sun, 8 May 2011 01:54:33 +0000 (01:54 +0000)]
ARM: pxa: fix PGSR register address calculation

The file mfp-pxa2xx.c defines a macro, PGSR(), which translates a gpio
bank number to a PGSR register address. The function pxa2xx_mfp_suspend()
erroneously passed in a gpio number instead of a gpio bank number.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Cc: stable@kernel.org
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
13 years agoARM: EXYNOS4: Set appropriate I2C device variant
Sylwester Nawrocki [Wed, 6 Jul 2011 07:04:09 +0000 (16:04 +0900)]
ARM: EXYNOS4: Set appropriate I2C device variant

Set up a correct I2C bus controller variant name for Exynos4.
Without this change the I2C bus driver fails to acquire its
clocks.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoMerge branch 'for-spi' into s5p-fixes-for-linus
Kukjin Kim [Wed, 6 Jul 2011 06:46:41 +0000 (15:46 +0900)]
Merge branch 'for-spi' into s5p-fixes-for-linus

13 years agonet: sh_eth: fix the parameter for the ETHER of SH7757
Yoshihiro Shimoda [Tue, 5 Jul 2011 20:33:57 +0000 (20:33 +0000)]
net: sh_eth: fix the parameter for the ETHER of SH7757

If the driver didn't set this parameter on the ETHER, the CPU will
encounter the "data address error" exception.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: sh_eth: fix cannot work half-duplex mode
Yoshihiro Shimoda [Tue, 5 Jul 2011 20:33:51 +0000 (20:33 +0000)]
net: sh_eth: fix cannot work half-duplex mode

When link was down, the bit of DM in ECMR was always set.
So, we could not use half-duplex mode on the controller.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoARM: S5PC100: Fix for compilation error
Padmavathi Venna [Wed, 6 Jul 2011 06:37:08 +0000 (15:37 +0900)]
ARM: S5PC100: Fix for compilation error

S5PC100 Compilation fails without this patch

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agospi/s3c64xx: Bug fix for SPI with different FIFO level
Padmavathi Venna [Tue, 5 Jul 2011 08:14:02 +0000 (17:14 +0900)]
spi/s3c64xx: Bug fix for SPI with different FIFO level

The existing macro fails for following scenarios.
1) S5P64X0 channel 1
2) S5PV210 channel 1

The FIFO data level supported in the above SoCs either 64 or
256 bytes depending on the channel. Because of this the TX_DONE
is the 25 bit in the status register.

The existing macro works for the following scenarios
1) S3C6410 all channels
2) S5PC100 all channels

The FIFO data level supported in the above SoCs 64 bytes
on all the channels. Because of this the TX_DONE is the 21 bit
in the status register.

So when we use the existing macro for the non-working SoCs
it is not anding with the TX_DONE bit for transmission status check.

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: SAMSUNG: Add tx_st_done variable
Padmavathi Venna [Tue, 5 Jul 2011 08:13:56 +0000 (17:13 +0900)]
ARM: SAMSUNG: Add tx_st_done variable

tx_st_done is required for checking the transmission status of SPI
channels with different fifo levels

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agogpio: tps65910: add missing breaks in tps65910_gpio_init
Axel Lin [Wed, 6 Jul 2011 02:08:27 +0000 (10:08 +0800)]
gpio: tps65910: add missing breaks in tps65910_gpio_init

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
13 years agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Wed, 6 Jul 2011 03:57:45 +0000 (20:57 -0700)]
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: fix regression occurring during device removal
  USB: fsl_udc_core: fix build breakage when building for ARM arch

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Linus Torvalds [Wed, 6 Jul 2011 03:57:08 +0000 (20:57 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
  mfd: Add Makefile and Kconfig Entries for tps65911 comparator
  mfd: Fix build error for tps65911-comparator.c
  Revert "mfd: Add omap-usbhs runtime PM support"
  input: pmic8xxx-pwrkey: Do not use mfd_get_data()
  input: pmic8xxx-keypad: Do not use mfd_get_data()

13 years agonet: vlan: enable soft features regardless of underlying device
Shan Wei [Wed, 6 Jul 2011 03:43:12 +0000 (20:43 -0700)]
net: vlan: enable soft features regardless of underlying device

If gso/gro feature of underlying device is turned off,
then new created vlan device never can turn gso/gro on.

Although underlying device don't support TSO, we still
should use software segments for vlan device.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agox86, reboot: Acer Aspire One A110 reboot quirk
Peter Chubb [Wed, 6 Jul 2011 00:56:30 +0000 (10:56 +1000)]
x86, reboot: Acer Aspire One A110 reboot quirk

Since git commit
  660e34cebf0a11d54f2d5dd8838607452355f321 x86: reorder reboot method
  preferences,
my Acer Aspire One hangs on reboot.  It appears that its ACPI method
for rebooting is broken.  The attached patch adds a quirk so that the
machine will reboot via the BIOS.

[ hpa: verified that the ACPI control on this machine is just plain broken. ]

Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>
Link: http://lkml.kernel.org/r/w439iki5vl.wl%25peter@chubb.wattle.id.au
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
13 years agovmxnet3: fix starving rx ring whenoc_skb kb fails
Shreyas Bhatewara [Tue, 5 Jul 2011 14:34:05 +0000 (14:34 +0000)]
vmxnet3: fix starving rx ring whenoc_skb kb fails

If the rx ring is completely empty, then the device may never fire an rx
interrupt. Unfortunately, the rx interrupt is what triggers populating the
rx ring with fresh buffers, so this will cause networking to lock up.

This patch replenishes the skb in recv descriptor as soon as it is
peeled off while processing rx completions. If the skb/buffer
allocation fails, existing one is recycled and the packet in hand is
dropped. This way none of the RX desc is ever left empty, thus avoiding
starvation

Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: Always flood broadcast packets
Herbert Xu [Tue, 5 Jul 2011 13:58:33 +0000 (13:58 +0000)]
bridge: Always flood broadcast packets

As is_multicast_ether_addr returns true on broadcast packets as
well, we need to explicitly exclude broadcast packets so that
they're always flooded.  This wasn't an issue before as broadcast
packets were considered to be an unregistered multicast group,
which were always flooded.  However, as we now only flood such
packets to router ports, this is no longer acceptable.

Reported-by: Michael Guntsche <mike@it-loops.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoARM: EXYNOS4: Address a section mismatch w/ suspend issue.
MyungJoo Ham [Mon, 4 Jul 2011 10:03:54 +0000 (19:03 +0900)]
ARM: EXYNOS4: Address a section mismatch w/ suspend issue.

The section mismatch in headsmp.S made hotplug stop working after the
first instance of suspend-to-RAM and its wakeup.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: S5P: Fix bug on init of PWMTimers for HRTimer
Sangbeom Kim [Thu, 23 Jun 2011 12:43:58 +0000 (21:43 +0900)]
ARM: S5P: Fix bug on init of PWMTimers for HRTimer

This patch fixes following.

<6>[    0.000000] sched_clock: 32 bits at 33MHz, ...
<6>[  128.651309] Calibrating delay loop...

There is a big jump. The reason is that PWM Timer which
is for HRTimer was used before its initialization.

So this patch changes its order and following is kernel
boot log message after this.

<6>[    0.000000] sched_clock: 32 bits at 33MHz, ...
<6>[    0.000088] Calibrating delay loop...

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: SAMSUNG: header file revised to prevent declaring duplicated
MyungJoo Ham [Wed, 22 Jun 2011 09:03:21 +0000 (18:03 +0900)]
ARM: SAMSUNG: header file revised to prevent declaring duplicated

There has been no #ifndef - #define - #endif protection for this
header file.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: EXYNOS4: fix improper gpio configuration
Naveen Krishna Chatradhi [Thu, 16 Jun 2011 10:33:29 +0000 (19:33 +0900)]
ARM: EXYNOS4: fix improper gpio configuration

These pins are incorrectly configured for PCM2
configure them to SPDIF(_OUT & _EXT_CLK)

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoARM: EXYNOS4: Fix card detection for sdhci 0 and 2
Thomas Abraham [Thu, 16 Jun 2011 07:12:35 +0000 (16:12 +0900)]
ARM: EXYNOS4: Fix card detection for sdhci 0 and 2

On SMDKV310 board, a card detect gpio pin is available that is directly
connected to the io pad of the sdhci controller. Fix incorrect value
of cd_type field in platform data for sdhci instance 0 and 2.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Tue, 5 Jul 2011 20:15:57 +0000 (13:15 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: fix sync and dio writes across stripe boundaries
  libceph: fix page calculation for non-page-aligned io
  ceph: fix page alignment corrections

13 years agoARM: move memory layout sanity checking before meminfo initialization
Russell King [Tue, 5 Jul 2011 18:58:29 +0000 (19:58 +0100)]
ARM: move memory layout sanity checking before meminfo initialization

Ensure that the meminfo array is sanity checked before we pass the
memory to memblock.  This helps to ensure that memblock and meminfo
agree on the dimensions of memory, especially when more memory is
passed than the kernel can deal with.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoASoC: Manage WM8731 ACTIVE bit as a supply widget
Mark Brown [Mon, 4 Jul 2011 17:27:51 +0000 (10:27 -0700)]
ASoC: Manage WM8731 ACTIVE bit as a supply widget

Now we have supply widgets there's no need to open code the handling of
the ACTIVE bit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus
Linus Torvalds [Tue, 5 Jul 2011 17:04:27 +0000 (10:04 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus:
  hfsplus: Fix double iput of the same inode in hfsplus_fill_super()
  hfsplus: add missing call to bio_put()

13 years agoASoC: Don't set invalid name string to snd_card->driver field
Takashi Iwai [Tue, 5 Jul 2011 07:25:59 +0000 (09:25 +0200)]
ASoC: Don't set invalid name string to snd_card->driver field

The snd_card->driver field contains a driver name string, and in
general it shouldn't contain space or special letters.  The commit
2b39535b9e54888649923beaab443af212b6c0fd changed the string copy from
card->name, but the long name string may contain such letters, thus
it may still lead to a segfault.

A temporary fix is not to copy the long name string but just keep it
empty as the earlier version did.

Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoARM: 6990/1: MAINTAINERS: add entry for ARM PMU profiling and debugging
Will Deacon [Fri, 1 Jul 2011 13:38:53 +0000 (14:38 +0100)]
ARM: 6990/1: MAINTAINERS: add entry for ARM PMU profiling and debugging

Following a request from Russell King:

http://lists.infradead.org/pipermail/linux-arm-kernel/2011-June/055031.html

Add myself as the ARM PMU profiling and debugging maintainer. This
covers the ARM implementations of perf, oprofile and hw_breakpoint along
with the glue for this to work on different platforms.

Cc: Jean Pihet <j-pihet@ti.com>
Acked-by: Jamie Iles <jamie@jamieiles.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: 6989/1: perf: do not start the PMU when no events are present
Will Deacon [Fri, 1 Jul 2011 13:38:12 +0000 (14:38 +0100)]
ARM: 6989/1: perf: do not start the PMU when no events are present

armpmu_enable can be called in situations where no events are present
(for example, from the event rotation tick after a profiled task has
exited). In this case, we currently start the PMU anyway which may
leave it active inevitably without any events being monitored.

This patch adds a simple check to the enabling code so that we avoid
starting the PMU when no events are present.

Cc: <stable@kernel.org>
Reported-by: Ashwin Chaugle <ashwinc@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agosched: Disable (revert) SCHED_LOAD_SCALE increase
Peter Zijlstra [Tue, 5 Jul 2011 08:56:32 +0000 (10:56 +0200)]
sched: Disable (revert) SCHED_LOAD_SCALE increase

Alex reported that commit c8b281161df ("sched: Increase
SCHED_LOAD_SCALE resolution") caused a power usage regression
under light load as it increases the number of load-balance
operations and keeps idle cpus from staying idle.

Time has run out to find the root cause for this release so
disable the feature for v3.0 until we can figure out what
causes the problem.

Reported-by: "Alex, Shi" <alex.shi@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Nikhil Rao <ncrao@google.com>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/n/tip-m4onxn0sxnyn5iz9o88eskc3@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
13 years agomfd: Add Makefile and Kconfig Entries for tps65911 comparator
Axel Lin [Thu, 23 Jun 2011 02:15:51 +0000 (10:15 +0800)]
mfd: Add Makefile and Kconfig Entries for tps65911 comparator

Base on Mark's comment [1], I make the Kconfig entry invisible to users.
[1] https://lkml.org/lkml/2011/5/14/136

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Fix build error for tps65911-comparator.c
Axel Lin [Thu, 23 Jun 2011 02:17:43 +0000 (10:17 +0800)]
mfd: Fix build error for tps65911-comparator.c

Fix below build error:
  CC      drivers/mfd/tps65911-comparator.o
drivers/mfd/tps65911-comparator.c: In function 'tps65911_comparator_probe':
drivers/mfd/tps65911-comparator.c:131: error: 'struct tps65910_platform_data' has no member named 'vmbch_threshold'
drivers/mfd/tps65911-comparator.c:137: error: 'struct tps65910_platform_data' has no member named 'vmbch2_threshold'
make[2]: *** [drivers/mfd/tps65911-comparator.o] Error 1
make[1]: *** [drivers/mfd] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoRevert "mfd: Add omap-usbhs runtime PM support"
Keshava Munegowda [Mon, 20 Jun 2011 13:22:56 +0000 (15:22 +0200)]
Revert "mfd: Add omap-usbhs runtime PM support"

This reverts commit 7e6502d577106fb5b202bbaac64c5f1b065e6daa.

Oops are produced during initialization of ehci and ohci
drivers. This is because the run time pm apis are used by
the driver but the corresponding hwmod structures and
initialization is not merged. hence revering  back the
commit id 7e6502d577106fb5b202bbaac64c5f1b065e6daa

Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com>
Reported-by: Luciano Coelho <coelho@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoinput: pmic8xxx-pwrkey: Do not use mfd_get_data()
Samuel Ortiz [Wed, 8 Jun 2011 09:06:30 +0000 (11:06 +0200)]
input: pmic8xxx-pwrkey: Do not use mfd_get_data()

mfd_get_data() has been removed from the MFD API.

Cc: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoinput: pmic8xxx-keypad: Do not use mfd_get_data()
Samuel Ortiz [Wed, 8 Jun 2011 09:03:23 +0000 (11:03 +0200)]
input: pmic8xxx-keypad: Do not use mfd_get_data()

mfd_get_data() has been removed from the MFD API.

Cc: Anirudh Ghayal <aghayal@codeaurora.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoMerge branch 'for-3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Takashi Iwai [Tue, 5 Jul 2011 06:20:00 +0000 (08:20 +0200)]
Merge branch 'for-3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc

13 years agoMerge branch 'for-3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Takashi Iwai [Tue, 5 Jul 2011 05:33:06 +0000 (07:33 +0200)]
Merge branch 'for-3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into fix/asoc

13 years agogreth: greth_set_mac_add would corrupt the MAC address.
Kristoffer Glembo [Tue, 5 Jul 2011 04:39:10 +0000 (21:39 -0700)]
greth: greth_set_mac_add would corrupt the MAC address.

The MAC address was set using the signed char sockaddr->sa_addr
field and thus the address could be corrupted through sign extension.

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>