]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoENGR00139383-4 MX5 defconfig:Support ISL29023 light sensor
Liu Ying [Tue, 22 Feb 2011 09:13:51 +0000 (17:13 +0800)]
ENGR00139383-4 MX5 defconfig:Support ISL29023 light sensor

This patch builds in ISL29023 light sensor driver.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00139383-3 MX53 SMD:Support ISL29023 light sensor
Liu Ying [Tue, 22 Feb 2011 09:13:28 +0000 (17:13 +0800)]
ENGR00139383-3 MX53 SMD:Support ISL29023 light sensor

This patch adds ISL29023 light sensor support.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00139383-2 Add ISL29023 light sensor support
Liu Ying [Tue, 22 Feb 2011 09:11:30 +0000 (17:11 +0800)]
ENGR00139383-2 Add ISL29023 light sensor support

This patch adds ISL29023 light sensor support.
Users may control the light sensor work at
different modes/ranges/resolutions or read
the lux value via sysfs.
A power state node is also created in sysfs.
If the light sensor works at ALS once mode,
users need to power down/power up the sensor
before read the lux value again.
Currently, IR(Infra Red) mode is not supported.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00139383-1 include: add platform data for ISL29023
Liu Ying [Tue, 22 Feb 2011 09:11:30 +0000 (17:11 +0800)]
ENGR00139383-1 include: add platform data for ISL29023

Add fsl_mxc_light_platform_data

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00139119: mxc_iim: add console output for iim value
Terry Lv [Tue, 15 Feb 2011 17:07:28 +0000 (01:07 +0800)]
ENGR00139119: mxc_iim: add console output for iim value

Add console output for iim value.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00138547: mxc_iim: can't release twice in mxc_iim
Terry Lv [Thu, 27 Jan 2011 12:54:32 +0000 (20:54 +0800)]
ENGR00138547: mxc_iim: can't release twice in mxc_iim

When open mxc_iim twice, mxc_iim can't be close twice.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00138532: mxc_iim: let mxc_iim work with dd and echo
Terry Lv [Wed, 26 Jan 2011 17:52:22 +0000 (01:52 +0800)]
ENGR00138532: mxc_iim: let mxc_iim work with dd and echo

mxc_iim: let mxc_iim work with dd and echo.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00138480: mxc_iim can't be open twice
Terry Lv [Tue, 25 Jan 2011 18:34:56 +0000 (02:34 +0800)]
ENGR00138480: mxc_iim can't be open twice

mxc_iim can't be open twice.
The reason is that request_irq failed when open mxc_iim again.
So put request_irq function to probe function.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00141859 Firmware: Fix Kernel build failed with firmware not find errors
Zeng Zhaoming [Thu, 7 Apr 2011 07:59:04 +0000 (15:59 +0800)]
ENGR00141859 Firmware: Fix Kernel build failed with firmware not find errors

Linux kernel build failed when source and output object separate store.

Fix it by add srctree to prefix firmware.

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
11 years agoENGR00141732 SDMA: Fix bootup stop at sdma firmware loading
Zeng Zhaoming [Thu, 7 Apr 2011 01:16:51 +0000 (09:16 +0800)]
ENGR00141732 SDMA: Fix bootup stop at sdma firmware loading

Linux 2.6.38 kernel bootup slow, it stopped at sdma firmware
loading for about one minute.

It is caused by firmware store on rootfs lib/firmware directory,
while sdma initialization happens before rootfs mounted.

To fix it, we have to build firmware in kernel image.
Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
11 years agoENGR00141654: Mx53 SMD: Add audio support for upgrading to 2.6.38
Zeng Zhaoming [Wed, 6 Apr 2011 00:02:35 +0000 (08:02 +0800)]
ENGR00141654: Mx53 SMD: Add audio support for upgrading to 2.6.38

add audio support to Mx53 SMD for upgrading to 2.6.38 kernel
Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
11 years agoENGR00117843 Missing i.MX headers for kernel headers_install
Lily Zhang [Sun, 1 Nov 2009 03:14:53 +0000 (11:14 +0800)]
ENGR00117843 Missing i.MX headers for kernel headers_install

Add i.MX specific files into include/linux/Kbuild
ISL29023:Add device head file to Kbuild

This patch adds device head file to Kbuild to pass

Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00141651-2 Audio: audio not work when ipmux2 clock disabled in idle
Zeng Zhaoming [Tue, 5 Apr 2011 20:48:28 +0000 (04:48 +0800)]
ENGR00141651-2 Audio: audio not work when ipmux2 clock disabled in idle

When SOC enter wait mode, ipmux2_clk will disable to save power, if using
ssi1 for audio transfer, audio will not work correctly.

To around this, using ssi2.

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
11 years agoENGR00141651-1 MX53,Loco: audio not work when ipmux2 clock disabled in idle
Zeng Zhaoming [Tue, 5 Apr 2011 20:47:32 +0000 (04:47 +0800)]
ENGR00141651-1 MX53,Loco: audio not work when ipmux2 clock disabled in idle

When SOC enter wait mode, ipmux2_clk will disable to save power, if using
ssi1 for audio transfer, audio will not work correctly.

To around this, using ssi2.

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
11 years agoENGR00141647 AUDIO,SGTL5000: Fix codec error after reset
Zeng Zhaoming [Tue, 5 Apr 2011 18:19:15 +0000 (02:19 +0800)]
ENGR00141647 AUDIO,SGTL5000: Fix codec error after reset

sgtl5000 codec not work after board reset, this is caused by
sgtl5000 using register address step is 2, and snd-soc-core can't
handle this as we expect, so we have to fill the register cache by
reading register out when initialization instead of providing a default
value array.

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
11 years agoENGR00141399-5 OCOTP: add the ocotp driver
Huang Shijie [Mon, 30 Aug 2010 01:51:18 +0000 (09:51 +0800)]
ENGR00141399-5 OCOTP: add the ocotp driver

Add a new driver for On-Chip OTP controller. The driver
will register all the register names of all the banks to /sys/.
You can use the following commands to manipulate the OTP banks:

read:
#cat HW_OCOTP_MAC0
write:
#echo 0x11223344 > HW_OCOTP_MAC0

Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00141399-4 RNGB: add RNGB driver for 2.6.38
Anish Trivedi [Tue, 29 Mar 2011 15:09:45 +0000 (10:09 -0500)]
ENGR00141399-4 RNGB: add RNGB driver for 2.6.38

Add RNGB driver support by porting fsl_rngc driver from 2.6.35.

Signed-off-by: Anish Trivedi <anish@freescale.com>
11 years agoENGR00141399-3 DCP: add dcp driver support
Frank Li [Thu, 24 Mar 2011 06:12:39 +0000 (14:12 +0800)]
ENGR00141399-3 DCP: add dcp driver support

upgrade to 2.6.38

Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00141399-2 iMX5x: add clock debug information
Richard Zhao [Tue, 22 Mar 2011 02:22:15 +0000 (10:22 +0800)]
ENGR00141399-2 iMX5x: add clock debug information

Expose clock debug information to debugfs, which makes it easier for clock
system debug by using tools like powerdebug developed by Linaro power
management group.
For long term, this can go into common clock framework, but so far it depends
on the process of common clk API development. Once the common clk API is
ready in upstream, the clock debug information will be based on it too.
The implementation based on common clk API had also been finished and
reviewed with Jeremy.

ARM: iMX5x: fix clock debug enable_count error

Signed-off-by: Yong Shen <yong.shen@linaro.org>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Jason Chen <b02280@freescale.com>
11 years agoENGR00141399-1 Add MX50 support for 2.6.38
Ranjani Vaidyanathan [Wed, 9 Mar 2011 14:55:44 +0000 (08:55 -0600)]
ENGR00141399-1 Add MX50 support for 2.6.38

mx50_rdp: add ocotp device
mx50_rdp: add dcp device
mx50_rdp: Add RNGB device support for MX50
PM: Fix suspend_iram_base can't execute code

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Anish Trivedi <anish@freescale.com>
11 years agoENGR00141398 Security: add security driver for 2.6.38
Frank Li [Tue, 29 Mar 2011 11:05:06 +0000 (19:05 +0800)]
ENGR00141398 Security: add security driver for 2.6.38

Add secuirty driver

Acked-by: Lily Zhang <r58066@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00141397 GPU: Add gpu driver for 2.6.38
Frank Li [Tue, 29 Mar 2011 08:21:50 +0000 (16:21 +0800)]
ENGR00141397 GPU: Add gpu driver for 2.6.38

add gpu driver

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Acked-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00141395-2 PMIC: porting mc13892 driver to 2.6.38
Zhou Jingyu [Thu, 3 Mar 2011 06:16:26 +0000 (14:16 +0800)]
ENGR00141395-2 PMIC: porting mc13892 driver to 2.6.38

Add pmic13892

Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com>
11 years agoENGR00141395-1 include: PMIC: porting mc13892 driver to 2.6.38
Zhou Jingyu [Thu, 3 Mar 2011 06:16:26 +0000 (14:16 +0800)]
ENGR00141395-1 include: PMIC: porting mc13892 driver to 2.6.38

add some missing headers

Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com>
11 years agoENGR00141391-2 PMIC: porting da9053 to i.mx platform
Zhou Jingyu [Wed, 2 Mar 2011 08:28:25 +0000 (16:28 +0800)]
ENGR00141391-2 PMIC: porting da9053 to i.mx platform

Fix da9053 backlight Kconfig error
porting da9052 regulator driver

Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com>
Acked-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00141391-1 PMIC: Add DA9053 source code from Dialog
Zhou Jingyu [Wed, 2 Mar 2011 07:36:28 +0000 (15:36 +0800)]
ENGR00141391-1 PMIC: Add DA9053 source code from Dialog

Add DA9053 original source code

Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com>
Acked-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00141217-9 iim: add iim driver support
Frank Li [Mon, 14 Mar 2011 02:37:22 +0000 (10:37 +0800)]
ENGR00141217-9 iim: add iim driver support

add iim driver for 2.6.38

Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00141217-8 ASoC: SGTL5000: Add DAP support for sgtl5000 codec
Frank Li [Tue, 29 Mar 2011 01:45:35 +0000 (09:45 +0800)]
ENGR00141217-8 ASoC: SGTL5000: Add DAP support for sgtl5000 codec

upgrade to 2.6.38 kernel
Add Digital Audio Process(DAP) for sgtl5000 codec
Audio: imx53,loco,audio: make Loco sgtl5000 codec work
config audmux when ssi probed, and fix sdma watermark settings

Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
11 years agoENGR00141217-7 touch: p1003 touch screen driver for 2.6.38
Frank Li [Mon, 28 Mar 2011 08:27:55 +0000 (16:27 +0800)]
ENGR00141217-7 touch: p1003 touch screen driver for 2.6.38

add p1003

Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00141217-6 srtc: add rtc driver for 2.6.38
Frank Li [Thu, 24 Feb 2011 09:56:09 +0000 (17:56 +0800)]
ENGR00141217-6 srtc: add rtc driver for 2.6.38

Add srtc support

Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00141217-5 IPU\VPU\GPU: upgrade to 2.6.38
Jason Chen [Wed, 23 Feb 2011 09:31:54 +0000 (17:31 +0800)]
ENGR00141217-5 IPU\VPU\GPU: upgrade to 2.6.38

Add drivers/mxc
Add drivers/video/mxc
Add drivers/media/mxc
fb device: change acquire_console_sem to console_lock
And release_console_sem to console_unlock
Add DMA Zone support
Add TVE driver, add regulator
Add hdmi support
Add VPU

Fix build error
ioctl --> unlocked_ioctl
DECLARE_MUTEX --> DEFINE_SEMAPHORE

Signed-off-by: Jason Chen <b02280@freescale.com>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
11 years agoENGR00141217-4 USB: Add USB Host/device/otg drivers support
Zhang Yan [Mon, 7 Mar 2011 02:00:58 +0000 (10:00 +0800)]
ENGR00141217-4 USB: Add USB Host/device/otg drivers support

Add usb support for 2.6.38

Signed-off-by: Zhang Yan <b34916@freescale.com>
11 years agoENGR00141217-3 MX53 MSL part upgrade to 2.6.38
Frank Li [Tue, 22 Feb 2011 09:34:58 +0000 (17:34 +0800)]
ENGR00141217-3 MX53 MSL part upgrade to 2.6.38

imx51_babbage:
imx53_smd: add i2c device
imx53_smd: add i2c board device info
imx53_smd: add esdhc device support
imx53_smd: Add SRTC devices
imx53_smd: enable the AHCI SATA
imx53_smd: Add GPIO Keypad support
imx53_ard: enable ARD board bootup
imx53_ard: add ethernet pin mux
imx53_ard: add smsc911x device
imx53_loco: add i2c device
imx53_loco: change sii902x i2c device
imx53_loco: register v4l2 output device
imx53_loco: add srtc device
imx53_loco: enable the AHCI SATA
imx53_loco: Add GPIO Keypad support
imx53_evk: add evk and arm2 boards io setting and set up display
imx5: add ipu\vpu
imx5: clock.c: remove RATE_PROPAGATES
imx5: Add clock, dvfs, busfreq, sdram_autogating support.
imx5: fix warnings on boot
imx5: add v4l2 device
imx5: add board_is_rev support
imx5: Add sdma support for i.Mx53 and i.Mx51
imx5: add p1003
imx5: add ipuv3
imx5: add sata
imx5: add pmic board files
imx5: add pm function
imx5: add iram config
imx5: add gpu
imx5: fix clock debug enable_count error
imx53: add gpio irq support for mx53
imx53: change PWM backlight device register method to dynamic
imx53: change v4l2 device register method to dynamic
imx53: add vpu devices support
imx53: add dvfs-core and busfreq devices register method
imx53: Add usb devices
imx53: add i2c pad settings
imx53: add ssi support

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Jason Chen <b02280@freescale.com>
Signed-off-by: Zeng Zhaoming <b32542@freescale.com>
Signed-off-by: Richard Zhu <r65037@freescale.com>
Signed-off-by: Zhou Jingyu <Jingyu.Zhou@freescale.com>
Signed-off-by: Zhang Yan <b34916@freescale.com>
11 years agoENGR00141217-2 include file upgrade to 2.6.38
Frank Li [Mon, 28 Mar 2011 15:02:27 +0000 (23:02 +0800)]
ENGR00141217-2 include file upgrade to 2.6.38

Add ipu tve header file

Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00141217-1 Add imx5_defconfig for 2.6.38
Frank Li [Mon, 21 Feb 2011 06:07:30 +0000 (14:07 +0800)]
ENGR00141217-1 Add imx5_defconfig for 2.6.38

add config files for imx5

Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00133978 PM: add time sensitive debug function to suspend & resume
Zhang Jiejing [Mon, 22 Nov 2010 09:14:32 +0000 (17:14 +0800)]
ENGR00133978 PM: add time sensitive debug function to suspend & resume

There was some driver is slow on suspend/resume,
but some embeded system like eReader,Cellphone
are time sensitive,this commit will report the slow
driver on suspend/resume, the default value is 500us(0.5ms)

Also, the threshold can be change by modify
'/sys/power/device_suspend_time_threshold' to change the threshold,
it is in microsecond.

The output is like:

PM: device platform:soc-audio.2 suspend too slow, takes          606.696 msecs
PM: device platform:mxc_sdc_fb.1 suspend too slow, takes         7.708 msecs

the default state of suspend driver is default off,
if you want to debug the suspend time, echo time in
microsecond(u Second) to /sys/powe/device_suspend_time_threshold

eg: I want to know which driver suspend & resume takes
more that 0.5 ms (500 us), you can just :

ehco 500 > /sys/power/device_suspend_time_threshold

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
11 years agoENGR00137546-1 MMA8450: Add mma8450 accelerometer driver
Sammy He [Tue, 4 Jan 2011 06:19:05 +0000 (14:19 +0800)]
ENGR00137546-1 MMA8450: Add mma8450 accelerometer driver

Add mma8450 accelerometer driver.

Signed-off-by: Sammy He <r62914@freescale.com>
11 years agoENGR00137485-1 MMA8451: Add mma8451 accelerometer driver
Sammy He [Thu, 30 Dec 2010 16:17:56 +0000 (00:17 +0800)]
ENGR00137485-1 MMA8451: Add mma8451 accelerometer driver

Add mma8451 accelerometer driver.

Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
Signed-off-by: Sammy He <r62914@freescale.com>
11 years agoENGR00137602-1 input: FSL MPR121 capacitive touch button.
Zhang Jiejing [Wed, 5 Jan 2011 03:37:12 +0000 (11:37 +0800)]
ENGR00137602-1 input: FSL MPR121 capacitive touch button.

This button driver is based on Freescale MPR121 capacitive
touch sensor controller.

It can support 12 elements maximal. The chip is use i2c interface.

You can find all the data sheet reference in code by google the name.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
11 years agoENGR00132493 RAMDISK: doing write barrier will return -EIO
Hu hui [Wed, 20 Oct 2010 01:49:47 +0000 (09:49 +0800)]
ENGR00132493 RAMDISK: doing write barrier will return -EIO

when doing write barrier, the data of the bio is NULL, it's OK for ramdisk
doing nothing, So the result of the bio must be success.

Signed-off-by: Hu Hui <b29976@freescale.com>
11 years agoENGR00126349-2 Change gfp flag in dma_alloc_coherent in common codes
Robby Cai [Tue, 17 Aug 2010 09:44:22 +0000 (17:44 +0800)]
ENGR00126349-2 Change gfp flag in dma_alloc_coherent in common codes

Changed gfp flag directly in dma_alloc_coherent in
drivers/media/video/videobuf-dma-contig.c

Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit b5cfb266e2e2d40568d060b0426e6c4239a34a78)

11 years agoENGR00125800 UIO: clean uioinfo when uninstall uio driver
Jie Zhou [Wed, 4 Aug 2010 03:26:39 +0000 (11:26 +0800)]
ENGR00125800 UIO: clean uioinfo when uninstall uio driver

The uioinfo should be cleaned up when uninstall, otherwise re-install
failure of uio_pdrv_genirq.ko will happen.

Signed-off-by: Jie Zhou <b30303@freescale.com>
11 years agoimx: change timer clock to perclk
Rob Herring [Wed, 26 May 2010 18:26:51 +0000 (13:26 -0500)]
imx: change timer clock to perclk

Signed-off-by: Rob Herring <r.herring@freescale.com>
11 years agow1: imx: add byte transfer and interrupt support
Rob Herring [Wed, 26 May 2010 19:40:20 +0000 (14:40 -0500)]
w1: imx: add byte transfer and interrupt support

Signed-off-by: Rob Herring <r.herring@freescale.com>
Signed-off-by: Lily Zhang <r58066@freescale.com>
11 years agoENGR00122691-1 Add atheros driver ath6kl
Richard Zhao [Wed, 21 Apr 2010 04:46:59 +0000 (12:46 +0800)]
ENGR00122691-1 Add atheros driver ath6kl

Integrate atheros driver package from atheros company.
It's mainly for AR6003.

NGR00132491-1 ath6kl upgrade: change Kconfig
This series of patches are for upgrading Atheros AR6003(ath6kl)
in 31 kernel to 35 kernel.
The WLAN_80211 config option has been changed to WLAN in 35 kernel.

ENGR00132491-2 ath6kl upgrade: add missed semaphore.h headfile
ENGR00132491-3 ath6kl upgrade: enable WEXT implicitely

Atheros ath6kl driver is based on WEXT subsystem and therefore
needs to select CONFIG_WIRELESS_EXT for compiling.

However in the latest kernel such as 2.6.35,
this option can no longer be configured using menuconfig.

So we select it when the user selects ath6kl driver to compile.

Signed-off-by: Nathan Cheng <Nathan.Cheng@Atheros.com>
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Aisheng.Dong <b29396@freescale.com>
11 years agoENGR00122206 MX53-EVK pwm-backlight: PWM backlight enhancement
William Lai [Thu, 1 Apr 2010 05:19:07 +0000 (13:19 +0800)]
ENGR00122206 MX53-EVK pwm-backlight: PWM backlight enhancement

Don't trun off the pwm backlight when blanking the fore-ground.

Signed-off-by: William Lai <b04597@freescale.com>
11 years agogadget: add stmp uut support to file storage
Frank Li [Wed, 23 Sep 2009 21:24:49 +0000 (18:24 -0300)]
gadget: add stmp uut support to file storage

This is gadget file storage changes needed for FSL universal updater
tool (manufacturing flashing tool).

ENGR00131456 mfg-tool: Add get cpu id ioctl at utp driver

The watchdog operation is differ with SoC's for rom code, so the utp app
needs to add or not add watchdog operation according to different SoCs.

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agousb: Add arc ehci driver to ehci core driver
Rob Herring [Wed, 16 Sep 2009 17:58:30 +0000 (12:58 -0500)]
usb: Add arc ehci driver to ehci core driver

Signed-off-by: Rob Herring <r.herring@freescale.com>
11 years agousb: imx usb buffers in iram work-around
Dinh Nguyen [Wed, 16 Sep 2009 17:56:38 +0000 (12:56 -0500)]
usb: imx usb buffers in iram work-around

Some i.MX parts (MX31, MX37) need to have usb host queue descriptors
and/or buffers in on-chip IRAM in cases of heavily loaded memory
system (i.e. large LCDs).

Signed-off-by: Dinh Nguyen <r00091@freescale.com>
11 years agousb: add ehci otg support
Dinh Nguyen [Wed, 16 Sep 2009 16:31:02 +0000 (11:31 -0500)]
usb: add ehci otg support

Add OTG support to ehci host controllers

Signed-off-by: Dinh Nguyen <r00091@freescale.com>
11 years agogadget: gadgetfs changes for MTP support
Rob Herring [Fri, 16 Oct 2009 20:34:41 +0000 (15:34 -0500)]
gadget: gadgetfs changes for MTP support

MTP protocol support using gadgetfs requires the ability to cancel
I/O transactions.

Signed-off-by: Jun Li <r65092@freescale.com>
11 years agonand: add more nand devices
Rob Herring [Wed, 16 Sep 2009 16:44:38 +0000 (11:44 -0500)]
nand: add more nand devices

Signed-off-by: Rob Herring <r.herring@freescale.com>
11 years agonand: export symbols needed for stmp3xxx nand nand: increase max nand page and oob...
Rob Herring [Wed, 16 Sep 2009 16:43:45 +0000 (11:43 -0500)]
nand: export symbols needed for stmp3xxx nand nand: increase max nand page and oob sizes

Signed-off-by: Rob Herring <r.herring@freescale.com>
11 years agocache-l2x0: add enable/disable functions
Rob Herring [Wed, 26 May 2010 19:56:15 +0000 (14:56 -0500)]
cache-l2x0: add enable/disable functions

Signed-off-by: Rob Herring <r.herring@freescale.com>
11 years agoENGR00114911 make video buffer cacheable to improve video performance
Robby Cai [Fri, 7 Aug 2009 07:28:14 +0000 (15:28 +0800)]
ENGR00114911 make video buffer cacheable to improve video performance

use pgprot_writethru instead

Signed-off-by: Robby Cai <r63905@freescale.com>
11 years agoENGR00112200 Add cryptodev device
Michal Ludvig [Tue, 5 May 2009 19:25:06 +0000 (14:25 -0500)]
ENGR00112200 Add cryptodev device

Linux driver for /dev/crypto (aka CryptoDev)
See http://www.logix.cz/michal/devel/cryptodev for details.

Signed-off-by: Michal Ludvig <mludvig@suse.cz>
Signed-off-by: Rob Herring <r.herring@freescale.com>
11 years agotsc2007: fail registration on i2c error
Rob Herring [Fri, 16 Oct 2009 19:41:52 +0000 (14:41 -0500)]
tsc2007: fail registration on i2c error

Return an error on probe if i2c errors occur indicating the device
is not present.

Signed-off-by: Rob Herring <r.herring@freescale.com>
11 years agoEnable partial low interrupt latency mode for ARM1136
Catalin Marinas [Thu, 11 Sep 2008 14:06:34 +0000 (15:06 +0100)]
Enable partial low interrupt latency mode for ARM1136

Enable partial low interrupt latency mode for ARM1136

This patch is a workaround for the 364296 ARM1136 r0pX errata
(possible cache data corruption with hit-under-miss enabled). It sets
the undocumented bit 31 in the auxiliary control register and the FI bit in
the control register, thus disabling hit-under-miss without putting the
processor into full low interrupt latency mode.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
11 years agoENGR00069937 Community patch for Fix mount error in case of MLC flash
Jason Liu [Wed, 26 Mar 2008 02:57:06 +0000 (21:57 -0500)]
ENGR00069937 Community patch for Fix mount error in case of MLC flash

Even though we don't use the OOB for MLC nand flash,
we should use the bad block information to skip the bad block.
Patch url:
http://patchwork.ozlabs.org/linux-mtd/patch?q=mlc&filter=none&id=15477
Author:Kyungmin Park

Signed-off-by: Jason Liu <r64343@freescale.com>
11 years agoENGR00068619 JFFS2 community fix with not use OOB
Jason Liu [Sat, 15 Mar 2008 02:53:04 +0000 (21:53 -0500)]
ENGR00068619 JFFS2 community fix with not use OOB

JFFS2 community fix with not use OOB at MLC NAND, this patch
is coming from the MTD community

Signed-off-by: Jason Liu <r64343@freescale.com>
11 years agoENGR00133884 eMMC: improve boot_info message output
Frank Li [Fri, 19 Nov 2010 10:19:00 +0000 (18:19 +0800)]
ENGR00133884 eMMC: improve boot_info message output

Output bit means of important esd_csd register

Read esd_csd info each time when cat boot_info
becasue user may change config affect esd_csd
value.

boot_info:0x07;
  ALT_BOOT_MODE:1 - Supports alternate boot method
  DDR_BOOT_MODE:1 - Supports alternate dual data rate during boot
  HS_BOOTMODE:1 - Supports high speed timing during boot
boot_size:0512KB
  boot_partition:0x48;
  BOOT_ACK:1 - Boot acknowledge sent during boot operation
  BOOT_PARTITION-ENABLE: 1 - Boot partition 1 enabled
  PARTITION_ACCESS:0 - No access to boot partition
boot_bus:0x01
  BOOT_MODE:0 - Use single data rate + backward compatible timings
in boot operation
  RESET_BOOT_BUS_WIDTH:0 - Reset bus width to x1, single data rate
and backward compatible timings after boot operation
  BOOT_BUS_WIDTH:1 - x4 (sdr/ddr) bus width in boot operation mode

Signed-off-by: Frank Li <Frank.Li@freescale.com>
11 years agoENGR00126228 eMMC: Configure boot_partition_enable
Richard Zhu [Thu, 12 Aug 2010 08:34:23 +0000 (16:34 +0800)]
ENGR00126228 eMMC: Configure boot_partition_enable

Enable the configurations of the boot enable on the eMMC cards.

Add the interface that used to configure the boot_bus_width

In order to make sure that the re-read the ext-csd of card
can be completed successfully, add the method to wait for
the finish of the busy state.

NOTE:
The following are the valid inputs when configure the boot
bus width of the eMMC cards.
+--------------------------------------------------------------------+
| Bit7 Bit6 Bit5 | Bit4 Bit3 | Bit2                 | Bit1 Bit0      |
|----------------|----------------------------------|----------------|
| X              | BOOT_MODE | RESET_BOOT_BUS_WIDTH | BOOT_BUS_WIDTH |
+--------------------------------------------------------------------+
Bit [4:3] : BOOT_MODE (non-volatile)
0x0 : Use single data rate + backward compatible timings in boot
operation (default)
0x1 : Use single data rate + high speed timings in boot operation mode
0x2 : Use dual data rate in boot operation
0x3 : Reserved
Bit [2]: RESET_BOOT_BUS_WIDTH (non-volatile)
0x0 : Reset bus width to x1, single data rate and backward compatible
timings after boot operation (default)
0x1 : Retain boot bus width and boot mode after boot operation
Bit[1:0] : BOOT_BUS_WIDTH (non-volatile)
0x0 : x1 (sdr) or x4 (ddr) bus width in boot operation mode (default)
0x1 : x4 (sdr/ddr) bus width in boot operation mode
0x2 : x8 (sdr/ddr) bus width in boot operation mode
0x3 : Reserved

The following are the valid inputs when configure the boot
partitions of the eMMC cards.
+------------------------------------------------------------+
| Bit7 | Bit6     | Bit5 Bit4 Bit3        | Bit2 Bit1 Bit0   |
|------|----------|-----------------------|------------------|
| X    | BOOT_ACK | BOOT_PARTITION_ENABLE | PARTITION_ACCESS |
+------------------------------------------------------------+
Bit7: Reserved
Bit6: always set to vaule '1' when boot_part is enabled
Bit[5:3]:
0x0 : Device not boot enabled (default)
0x1 : Boot partition 1 enabled for boot
0x2 : Boot partition 2 enabled for boot
0x7 : User area enabled for boot
Bit[2:0]:
0x0 : No access to boot partition (default)
0x1 : R/W boot partition 1
0x2 : R/W boot partition 2
So only the '0, 1, 2; 8, 9, 10; 16, 17, 18; 56, 57, 58' are
valid parameters when configure the boot_partiton.

Signed-off-by: Richard Zhu <r65037@freescale.com>
11 years agoENGR00125411 eMMC: Boot Partition switch func used in MFG tool
Richard Zhu [Fri, 23 Jul 2010 08:38:06 +0000 (16:38 +0800)]
ENGR00125411 eMMC: Boot Partition switch func used in MFG tool

User can get eMMC partitions info from user space layer in
linux OS enviroment.
User can do switch operations between the eMMC boot partitions
and the user partition.
User can access the eMMC boot partitions from user space layer
in linux OS enviroment.
NOTE:This func had been verified on TOSHIBA eMMC44 card only.

Signed-off-by: Richard Zhu <r65037@freescale.com>
Signed-off-by: Rob Herring <r.herring@freescale.com>
12 years agoLinux 3.0.35 v3.0.35
Greg Kroah-Hartman [Sun, 17 Jun 2012 18:23:33 +0000 (11:23 -0700)]
Linux 3.0.35

12 years agohugetlb: fix resv_map leak in error path
Dave Hansen [Tue, 29 May 2012 22:06:46 +0000 (15:06 -0700)]
hugetlb: fix resv_map leak in error path

commit c50ac050811d6485616a193eb0f37bfbd191cc89 and
4523e1458566a0e8ecfaff90f380dd23acc44d27 upstream.

When called for anonymous (non-shared) mappings, hugetlb_reserve_pages()
does a resv_map_alloc().  It depends on code in hugetlbfs's
vm_ops->close() to release that allocation.

However, in the mmap() failure path, we do a plain unmap_region() without
the remove_vma() which actually calls vm_ops->close().

This is a decent fix.  This leak could get reintroduced if new code (say,
after hugetlb_reserve_pages() in hugetlbfs_file_mmap()) decides to return
an error.  But, I think it would have to unroll the reservation anyway.

Christoph's test case:

http://marc.info/?l=linux-mm&m=133728900729735

This patch applies to 3.4 and later.  A version for earlier kernels is at
https://lkml.org/lkml/2012/5/22/418.

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reported-by: Christoph Lameter <cl@linux.com>
Tested-by: Christoph Lameter <cl@linux.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agomm: fix faulty initialization in vmalloc_init()
KyongHo [Tue, 29 May 2012 22:06:49 +0000 (15:06 -0700)]
mm: fix faulty initialization in vmalloc_init()

commit dbda591d920b4c7692725b13e3f68ecb251e9080 upstream.

The transfer of ->flags causes some of the static mapping virtual
addresses to be prematurely freed (before the mapping is removed) because
VM_LAZY_FREE gets "set" if tmp->flags has VM_IOREMAP set.  This might
cause subsequent vmalloc/ioremap calls to fail because it might allocate
one of the freed virtual address ranges that aren't unmapped.

va->flags has different types of flags from tmp->flags.  If a region with
VM_IOREMAP set is registered with vm_area_add_early(), it will be removed
by __purge_vmap_area_lazy().

Fix vmalloc_init() to correctly initialize vmap_area for the given
vm_struct.

Also initialise va->vm.  If it is not set, find_vm_area() for the early
vm regions will always fail.

Signed-off-by: KyongHo Cho <pullip.cho@samsung.com>
Cc: "Olav Haugan" <ohaugan@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agomm/vmalloc.c: change void* into explict vm_struct*
Minchan Kim [Tue, 10 Jan 2012 23:08:39 +0000 (15:08 -0800)]
mm/vmalloc.c: change void* into explict vm_struct*

commit db1aecafef58b5dda39c4228debe2c845e4a27ab upstream.

vmap_area->private is void* but we don't use the field for various purpose
but use only for vm_struct.  So change it to a vm_struct* with naming to
improve for readability and type checking.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoe1000: save skb counts in TX to avoid cache misses
Dean Nelson [Thu, 25 Aug 2011 14:39:24 +0000 (14:39 +0000)]
e1000: save skb counts in TX to avoid cache misses

commit 31c15a2f24ebdab14333d9bf5df49757842ae2ec upstream.

Virtual Machines with emulated e1000 network adapter running on Parallels'
server were seeing kernel panics due to the e1000 driver dereferencing an
unexpected NULL pointer retrieved from buffer_info->skb.

The problem has been addressed for the e1000e driver, but not for the e1000.
Since the two drivers share similar code in the affected area, a port of the
following e1000e driver commit solves the issue for the e1000 driver:

commit 9ed318d546a29d7a591dbe648fd1a2efe3be1180
Author: Tom Herbert <therbert@google.com>
Date:   Wed May 5 14:02:27 2010 +0000

    e1000e: save skb counts in TX to avoid cache misses

    In e1000_tx_map, precompute number of segements and bytecounts which
    are derived from fields in skb; these are stored in buffer_info.  When
    cleaning tx in e1000_clean_tx_irq use the values in the associated
    buffer_info for statistics counting, this eliminates cache misses
    on skb fields.

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Roman Kagan <rkagan@parallels.com>
12 years agofuse: fix stat call on 32 bit platforms
Pavel Shilovsky [Thu, 10 May 2012 15:49:38 +0000 (19:49 +0400)]
fuse: fix stat call on 32 bit platforms

commit 45c72cd73c788dd18c8113d4a404d6b4a01decf1 upstream.

Now we store attr->ino at inode->i_ino, return attr->ino at the
first time and then return inode->i_ino if the attribute timeout
isn't expired. That's wrong on 32 bit platforms because attr->ino
is 64 bit and inode->i_ino is 32 bit in this case.

Fix this by saving 64 bit ino in fuse_inode structure and returning
it every time we call getattr. Also squash attr->ino into inode->i_ino
explicitly.

Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agox86, MCE, AMD: Make APIC LVT thresholding interrupt optional
Borislav Petkov [Mon, 16 Apr 2012 16:01:53 +0000 (18:01 +0200)]
x86, MCE, AMD: Make APIC LVT thresholding interrupt optional

commit f227d4306cf30e1d5b6f231e8ef9006c34f3d186 upstream.

Currently, the APIC LVT interrupt for error thresholding is implicitly
enabled. However, there are models in the F15h range which do not enable
it. Make the code machinery which sets up the APIC interrupt support
an optional setting and add an ->interrupt_capable member to the bank
representation mirroring that capability and enable the interrupt offset
programming only if it is true.

Simplify code and fixup comment style while at it.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
12 years agoiwlwifi: don't mess up the SCD when removing a key
Emmanuel Grumbach [Wed, 6 Jun 2012 07:13:36 +0000 (09:13 +0200)]
iwlwifi: don't mess up the SCD when removing a key

commit d6ee27eb13beab94056e0de52d81220058ca2297 upstream.

When we remove a key, we put a key index which was supposed
to tell the fw that we are actually removing the key. But
instead the fw took that index as a valid index and messed
up the SRAM of the device.

This memory corruption on the device mangled the data of
the SCD. The impact on the user is that SCD queue 2 got
stuck after having removed keys.
The message is the log that was printed is:

Queue 2 stuck for 10000ms

This doesn't seem to fix the higher queues that get stuck
from time to time.

Reviewed-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agosched: Fix the relax_domain_level boot parameter
Dimitri Sivanich [Tue, 5 Jun 2012 18:44:36 +0000 (13:44 -0500)]
sched: Fix the relax_domain_level boot parameter

commit a841f8cef4bb124f0f5563314d0beaf2e1249d72 upstream.

It does not get processed because sched_domain_level_max is 0 at the
time that setup_relax_domain_level() is run.

Simply accept the value as it is, as we don't know the value of
sched_domain_level_max until sched domain construction is completed.

Fix sched_relax_domain_level in cpuset.  The build_sched_domain() routine calls
the set_domain_attribute() routine prior to setting the sd->level, however,
the set_domain_attribute() routine relies on the sd->level to decide whether
idle load balancing will be off/on.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20120605184436.GA15668@sgi.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoacpi_video: fix leaking PCI references
Alan Cox [Wed, 25 Apr 2012 13:33:33 +0000 (14:33 +0100)]
acpi_video: fix leaking PCI references

commit cfb46f433a4da97c31780e08a259fac2cb6bd61f upstream.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agohwmon: (fam15h_power) Increase output resolution
Andre Przywara [Fri, 23 Mar 2012 09:02:17 +0000 (10:02 +0100)]
hwmon: (fam15h_power) Increase output resolution

commit 941a956b0e387b21f385f486c34ef67576775cfc upstream.

On high CPU load the accumulating values in the running_avg_cap
register are very low (below 10), so averaging them too early leads
to unnecessary poor output resolution. Since we pretend to output
micro-Watt we better keep all the bits we have as long as possible.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agocan: c_can: fix race condition in c_can_open()
AnilKumar Ch [Wed, 23 May 2012 12:15:11 +0000 (17:45 +0530)]
can: c_can: fix race condition in c_can_open()

commit f461f27a4436dbe691908fe08b867ef888848cc3 upstream.

Fix the issue of C_CAN interrupts getting disabled forever when canconfig
utility is used multiple times. According to NAPI usage we disable all
the hardware interrupts in ISR and re-enable them in poll(). Current
implementation calls napi_enable() after hardware interrupts are enabled.
If we get any interrupts between these two steps then we do not process
those interrupts because napi is not enabled. Mostly these interrupts
come because of STATUS is not 0x7 or ERROR interrupts. If napi_enable()
happens before HW interrupts enabled then c_can_poll() function will be
called eventual re-enabling.

This patch moves the napi_enable() call before interrupts enabled.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agocan: c_can: fix an interrupt thrash issue with c_can driver
AnilKumar Ch [Wed, 23 May 2012 12:15:10 +0000 (17:45 +0530)]
can: c_can: fix an interrupt thrash issue with c_can driver

commit 148c87c89e1a8863d3d965179f3ab1a06490569e upstream.

This patch fixes an interrupt thrash issue with c_can driver.

In c_can_isr() function interrupts are disabled and enabled only in
c_can_poll() function. c_can_isr() & c_can_poll() both read the
irqstatus flag. However, irqstatus is always read as 0 in c_can_poll()
because all C_CAN interrupts are disabled in c_can_isr(). This causes
all interrupts to be re-enabled in c_can_poll() which in turn causes
another interrupt since the event is not really handled. This keeps
happening causing a flood of interrupts.

To fix this, read the irqstatus register in isr and use the same cached
value in the poll function.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agocan: c_can: fix "BUG! echo_skb is occupied!" during transmit
AnilKumar Ch [Wed, 23 May 2012 12:15:09 +0000 (17:45 +0530)]
can: c_can: fix "BUG! echo_skb is occupied!" during transmit

commit 617caccebe451716df21c069b079d5936ed7b0f3 upstream.

This patch fixes an issue with transmit routine, which causes
"can_put_echo_skb: BUG! echo_skb is occupied!" message when
using "cansequence -p" on D_CAN controller.

In c_can driver, while transmitting packets tx_echo flag holds
the no of can frames put for transmission into the hardware.

As the comment above c_can_do_tx() indicates, if we find any packet
which is not transmitted then we should stop looking for more.
In the current implementation this is not taken care of causing the
said message.

Also, fix the condition used to find if the packet is transmitted
or not. Current code skips the first tx message object and ends up
checking one extra invalid object.

While at it, fix the comment on top of c_can_do_tx() to use the
terminology "packet" instead of "package" since it is more
standard.

Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agonet: sierra_net: device IDs for Aircard 320U++
Bjørn Mork [Tue, 5 Jun 2012 21:18:10 +0000 (21:18 +0000)]
net: sierra_net: device IDs for Aircard 320U++

commit dd03cff23d694cfb0fdae80cb618e7ced05ea696 upstream.

Adding device IDs for Aircard 320U and two other devices
found in the out-of-tree version of this driver.

Cc: linux@sierrawireless.com
Cc: Autif Khan <autif.mlist@gmail.com>
Cc: Tom Cassidy <tomas.cassidy@gmail.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agocfg80211: fix interface combinations check
Johannes Berg [Tue, 5 Jun 2012 10:16:50 +0000 (12:16 +0200)]
cfg80211: fix interface combinations check

commit 463454b5dbd8dbab6e2fc6c557329e5b811b9c32 upstream.

If a given interface combination doesn't contain
a required interface type then we missed checking
that and erroneously allowed it even though iface
type wasn't there at all. Add a check that makes
sure that all interface types are accounted for.

Reported-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agomac80211: clean up remain-on-channel on interface stop
Johannes Berg [Thu, 31 May 2012 13:09:27 +0000 (15:09 +0200)]
mac80211: clean up remain-on-channel on interface stop

commit 71ecfa1893034eeb1c93e02e22ee2ad26d080858 upstream.

When any interface goes down, it could be the one that we
were doing a remain-on-channel with. We therefore need to
cancel the remain-on-channel and flush the related work
structs so they don't run after the interface has been
removed or even destroyed.

It's also possible in this case that an off-channel SKB
was never transmitted, so free it if this is the case.
Note that this can also happen if the driver finishes
the off-channel period without ever starting it.

Reported-by: Nirav Shah <nirav.j2.shah@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agocrypto: aesni-intel - fix unaligned cbc decrypt for x86-32
Mathias Krause [Tue, 29 May 2012 23:43:08 +0000 (01:43 +0200)]
crypto: aesni-intel - fix unaligned cbc decrypt for x86-32

commit 7c8d51848a88aafdb68f42b6b650c83485ea2f84 upstream.

The 32 bit variant of cbc(aes) decrypt is using instructions requiring
128 bit aligned memory locations but fails to ensure this constraint in
the code. Fix this by loading the data into intermediate registers with
load unaligned instructions.

This fixes reported general protection faults related to aesni.

References: https://bugzilla.kernel.org/show_bug.cgi?id=43223
Reported-by: Daniel <garkein@mailueberfall.de>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopowerpc: Fix kernel panic during kernel module load
Steffen Rumler [Wed, 6 Jun 2012 14:37:17 +0000 (16:37 +0200)]
powerpc: Fix kernel panic during kernel module load

commit 3c75296562f43e6fbc6cddd3de948a7b3e4e9bcf upstream.

This fixes a problem which can causes kernel oopses while loading
a kernel module.

According to the PowerPC EABI specification, GPR r11 is assigned
the dedicated function to point to the previous stack frame.
In the powerpc-specific kernel module loader, do_plt_call()
(in arch/powerpc/kernel/module_32.c), GPR r11 is also used
to generate trampoline code.

This combination crashes the kernel, in the case where the compiler
chooses to use a helper function for saving GPRs on entry, and the
module loader has placed the .init.text section far away from the
.text section, meaning that it has to generate a trampoline for
functions in the .init.text section to call the GPR save helper.
Because the trampoline trashes r11, references to the stack frame
using r11 can cause an oops.

The fix just uses GPR r12 instead of GPR r11 for generating the
trampoline code.  According to the statements from Freescale, this is
safe from an EABI perspective.

I've tested the fix for kernel 2.6.33 on MPC8541.

Signed-off-by: Steffen Rumler <steffen.rumler.ext@nsn.com>
[paulus@samba.org: reworded the description]
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agobtree: fix tree corruption in btree_get_prev()
Roland Dreier [Thu, 7 Jun 2012 21:21:13 +0000 (14:21 -0700)]
btree: fix tree corruption in btree_get_prev()

commit cbf8ae32f66a9ceb8907ad9e16663c2a29e48990 upstream.

The memory the parameter __key points to is used as an iterator in
btree_get_prev(), so if we save off a bkey() pointer in retry_key and
then assign that to __key, we'll end up corrupting the btree internals
when we do eg

longcpy(__key, bkey(geo, node, i), geo->keylen);

to return the key value.  What we should do instead is use longcpy() to
copy the key value that retry_key points to __key.

This can cause a btree to get corrupted by seemingly read-only
operations such as btree_for_each_safe.

[akpm@linux-foundation.org: avoid the double longcpy()]
Signed-off-by: Roland Dreier <roland@purestorage.com>
Acked-by: Joern Engel <joern@logfs.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agochar/agp: add another Ironlake host bridge
Eugeni Dodonov [Wed, 6 Jun 2012 14:59:06 +0000 (11:59 -0300)]
char/agp: add another Ironlake host bridge

commit 67384fe3fd450536342330f684ea1f7dcaef8130 upstream.

This seems to come on Gigabyte H55M-S2V and was discovered through the
https://bugs.freedesktop.org/show_bug.cgi?id=50381 debugging.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50381
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoLinux 3.0.34 v3.0.34
Greg Kroah-Hartman [Sat, 9 Jun 2012 15:33:45 +0000 (00:33 +0900)]
Linux 3.0.34

12 years agoext4: don't set i_flags in EXT4_IOC_SETFLAGS
Tao Ma [Thu, 7 Jun 2012 23:04:19 +0000 (19:04 -0400)]
ext4: don't set i_flags in EXT4_IOC_SETFLAGS

commit b22b1f178f6799278d3178d894f37facb2085765 upstream.

Commit 7990696 uses the ext4_{set,clear}_inode_flags() functions to
change the i_flags automatically but fails to remove the error setting
of i_flags.  So we still have the problem of trashing state flags.
Fix this by removing the assignment.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agowl1251: fix oops on early interrupt
Grazvydas Ignotas [Fri, 18 May 2012 00:04:08 +0000 (03:04 +0300)]
wl1251: fix oops on early interrupt

commit f380f2c4a12e913356bd49f8790ec1063c4fe9f8 upstream.

This driver disables interrupt just after requesting it and enables it
later, after interface is up. However currently there is a time window
between request_irq() and disable_irq() where if interrupt arrives, the
driver oopses because it's not yet ready to process it. This can be
reproduced by inserting the module, associating and removing the module
multiple times.

Eliminate this race by setting IRQF_NOAUTOEN flag before request_irq().

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoACPI battery: only refresh the sysfs files when pertinent information changes
Andy Whitcroft [Thu, 3 May 2012 13:48:26 +0000 (14:48 +0100)]
ACPI battery: only refresh the sysfs files when pertinent information changes

commit c5971456964290da7e98222892797b71ef793e62 upstream.

We only need to regenerate the sysfs files when the capacity units
change, avoid the update otherwise.

The origin of this issue is dates way back to 2.6.38:
da8aeb92d4853f37e281f11fddf61f9c7d84c3cd
(ACPI / Battery: Update information on info notification and resume)

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Tested-by: Ralf Jung <post@ralfj.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrm/radeon/kms: add new BTC PCI ids
Alex Deucher [Tue, 5 Jun 2012 13:50:30 +0000 (09:50 -0400)]
drm/radeon/kms: add new BTC PCI ids

commit a2bef8ce826dd1e787fd8ad9b6e0566ba59dab43 upstream.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoext4: remove mb_groups before tearing down the buddy_cache
Salman Qazi [Fri, 1 Jun 2012 03:52:14 +0000 (23:52 -0400)]
ext4: remove mb_groups before tearing down the buddy_cache

commit 95599968d19db175829fb580baa6b68939b320fb upstream.

We can't have references held on pages in the s_buddy_cache while we are
trying to truncate its pages and put the inode.  All the pages must be
gone before we reach clear_inode.  This can only be gauranteed if we
can prevent new users from grabbing references to s_buddy_cache's pages.

The original bug can be reproduced and the bug fix can be verified by:

while true; do mount -t ext4 /dev/ram0 /export/hda3/ram0; \
umount /export/hda3/ram0; done &

while true; do cat /proc/fs/ext4/ram0/mb_groups; done

Signed-off-by: Salman Qazi <sqazi@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoext4: add ext4_mb_unload_buddy in the error path
Salman Qazi [Fri, 1 Jun 2012 03:51:27 +0000 (23:51 -0400)]
ext4: add ext4_mb_unload_buddy in the error path

commit 02b7831019ea4e7994968c84b5826fa8b248ffc8 upstream.

ext4_free_blocks fails to pair an ext4_mb_load_buddy with a matching
ext4_mb_unload_buddy when it fails a memory allocation.

Signed-off-by: Salman Qazi <sqazi@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoext4: don't trash state flags in EXT4_IOC_SETFLAGS
Theodore Ts'o [Fri, 1 Jun 2012 03:46:01 +0000 (23:46 -0400)]
ext4: don't trash state flags in EXT4_IOC_SETFLAGS

commit 79906964a187c405db72a3abc60eb9b50d804fbc upstream.

In commit 353eb83c we removed i_state_flags with 64-bit longs, But
when handling the EXT4_IOC_SETFLAGS ioctl, we replace i_flags
directly, which trashes the state flags which are stored in the high
32-bits of i_flags on 64-bit platforms.  So use the the
ext4_{set,clear}_inode_flags() functions which use atomic bit
manipulation functions instead.

Reported-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoext4: add missing save_error_info() to ext4_error()
Theodore Ts'o [Thu, 31 May 2012 03:00:16 +0000 (23:00 -0400)]
ext4: add missing save_error_info() to ext4_error()

commit f3fc0210c0fc91900766c995f089c39170e68305 upstream.

The ext4_error() function is missing a call to save_error_info().
Since this is the function which marks the file system as containing
an error, this oversight (which was introduced in 2.6.36) is quite
significant, and should be backported to older stable kernels with
high urgency.

Reported-by: Ken Sumrall <ksumrall@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: ksumrall@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoext4: force ro mount if ext4_setup_super() fails
Eric Sandeen [Mon, 28 May 2012 18:17:25 +0000 (14:17 -0400)]
ext4: force ro mount if ext4_setup_super() fails

commit 7e84b6216467b84cd332c8e567bf5aa113fd2f38 upstream.

If ext4_setup_super() fails i.e. due to a too-high revision,
the error is logged in dmesg but the fs is not mounted RO as
indicated.

Tested by:

# mkfs.ext4 -r 4 /dev/sdb6
# mount /dev/sdb6 /mnt/test
# dmesg | grep "too high"
[164919.759248] EXT4-fs (sdb6): revision level too high, forcing read-only mode
# grep sdb6 /proc/mounts
/dev/sdb6 /mnt/test2 ext4 rw,seclabel,relatime,data=ordered 0 0

Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoxfrm: take net hdr len into account for esp payload size calculation
Benjamin Poirier [Thu, 24 May 2012 11:32:38 +0000 (11:32 +0000)]
xfrm: take net hdr len into account for esp payload size calculation

[ Upstream commit 91657eafb64b4cb53ec3a2fbc4afc3497f735788 ]

Corrects the function that determines the esp payload size. The calculations
done in esp{4,6}_get_mtu() lead to overlength frames in transport mode for
certain mtu values and suboptimal frames for others.

According to what is done, mainly in esp{,6}_output() and tcp_mtu_to_mss(),
net_header_len must be taken into account before doing the alignment
calculation.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoskb: avoid unnecessary reallocations in __skb_cow
Felix Fietkau [Tue, 29 May 2012 03:35:08 +0000 (03:35 +0000)]
skb: avoid unnecessary reallocations in __skb_cow

[ Upstream commit 617c8c11236716dcbda877e764b7bf37c6fd8063 ]

At the beginning of __skb_cow, headroom gets set to a minimum of
NET_SKB_PAD. This causes unnecessary reallocations if the buffer was not
cloned and the headroom is just below NET_SKB_PAD, but still more than the
amount requested by the caller.
This was showing up frequently in my tests on VLAN tx, where
vlan_insert_tag calls skb_cow_head(skb, VLAN_HLEN).

Locally generated packets should have enough headroom, and for forward
paths, we already have NET_SKB_PAD bytes of headroom, so we don't need to
add any extra space here.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agosctp: check cached dst before using it
Nicolas Dichtel [Fri, 4 May 2012 05:24:54 +0000 (05:24 +0000)]
sctp: check cached dst before using it

[ Upstream commit e0268868ba064980488fc8c194db3d8e9fb2959c ]

dst_check() will take care of SA (and obsolete field), hence
IPsec rekeying scenario is taken into account.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Vlad Yaseivch <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoRevert "net: maintain namespace isolation between vlan and real device"
David S. Miller [Fri, 11 May 2012 03:03:34 +0000 (23:03 -0400)]
Revert "net: maintain namespace isolation between vlan and real device"

[ Upstream commit 59b9997baba5242997ddc7bd96b1391f5275a5a4 ]

This reverts commit 8a83a00b0735190384a348156837918271034144.

It causes regressions for S390 devices, because it does an
unconditional DST drop on SKBs for vlans and the QETH device
needs the neighbour entry hung off the DST for certain things
on transmit.

Arnd can't remember exactly why he even needed this change.

Conflicts:

drivers/net/macvlan.c
net/8021q/vlan_dev.c
net/core/dev.c

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopktgen: fix module unload for good
Eric Dumazet [Thu, 17 May 2012 23:52:26 +0000 (23:52 +0000)]
pktgen: fix module unload for good

[ Upstream commit d4b1133558e0d417342d5d2c49e4c35b428ff20d ]

commit c57b5468406 (pktgen: fix crash at module unload) did a very poor
job with list primitives.

1) list_splice() arguments were in the wrong order

2) list_splice(list, head) has undefined behavior if head is not
initialized.

3) We should use the list_splice_init() variant to clear pktgen_threads
list.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopktgen: fix crash at module unload
Eric Dumazet [Wed, 9 May 2012 13:29:51 +0000 (13:29 +0000)]
pktgen: fix crash at module unload

[ Upstream commit c57b54684060c8aced64a5b78ff69ff289af97b9 ]

commit 7d3d43dab4e9 (net: In unregister_netdevice_notifier unregister
the netdevices.) makes pktgen crashing at module unload.

[  296.820578] BUG: spinlock bad magic on CPU#6, rmmod/3267
[  296.820719]  lock: ffff880310c38000, .magic: ffff8803, .owner: <none>/-1, .owner_cpu: -1
[  296.820943] Pid: 3267, comm: rmmod Not tainted 3.4.0-rc5+ #254
[  296.821079] Call Trace:
[  296.821211]  [<ffffffff8168a715>] spin_dump+0x8a/0x8f
[  296.821345]  [<ffffffff8168a73b>] spin_bug+0x21/0x26
[  296.821507]  [<ffffffff812b4741>] do_raw_spin_lock+0x131/0x140
[  296.821648]  [<ffffffff8169188e>] _raw_spin_lock+0x1e/0x20
[  296.821786]  [<ffffffffa00cc0fd>] __pktgen_NN_threads+0x4d/0x140 [pktgen]
[  296.821928]  [<ffffffffa00ccf8d>] pktgen_device_event+0x10d/0x1e0 [pktgen]
[  296.822073]  [<ffffffff8154ed4f>] unregister_netdevice_notifier+0x7f/0x100
[  296.822216]  [<ffffffffa00d2a0b>] pg_cleanup+0x48/0x73 [pktgen]
[  296.822357]  [<ffffffff8109528e>] sys_delete_module+0x17e/0x2a0
[  296.822502]  [<ffffffff81699652>] system_call_fastpath+0x16/0x1b

Hold the pktgen_thread_lock while splicing pktgen_threads, and test
pktgen_exiting in pktgen_device_event() to make unload faster.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>