firefly-linux-kernel-4.4.55.git
11 years agork2928phonepad:
邱建斌 [Fri, 19 Oct 2012 02:48:56 +0000 (10:48 +0800)]
rk2928phonepad:
     add support rk2928 codec for phonepad

11 years agork2928: rk2926 tb: fix 'vol-' and 'wifi: rk306->usb wifi'
kfx [Fri, 19 Oct 2012 02:45:44 +0000 (10:45 +0800)]
rk2928: rk2926 tb: fix 'vol-' and 'wifi: rk306->usb wifi'

11 years agort5631: fix hdmi set spk error
邱建斌 [Fri, 19 Oct 2012 02:18:03 +0000 (10:18 +0800)]
rt5631: fix hdmi set spk error
[  415.288635] Unable to handle kernel paging request at virtual address ffffffd2
[  415.295881] pgd = c0404000
[  415.298737] [ffffffd2] *pgd=8edfe821, *pte=00000000, *ppte=00000000
[  415.305203] Internal error: Oops: 17 [#1] PREEMPT SMP
[  415.310281] CPU: 0    Tainted: G         C   (3.0.8+ #6)
[  415.315635] PC is at dapm_seq_check_event+0x78/0x110
[  415.320622] LR is at dapm_seq_run_coalesced+0x118/0x150
[  415.325873] pc : [<c07b6dac>]    lr : [<c07b6f5c>]    psr: 80000013
[  415.325891] sp : ee855e30  ip : 00000014  fp : 00000001
[  415.337382] r10: 00000003  r9 : c0ade668  r8 : ffffffff
[  415.342625] r7 : ee855e98  r6 : 00000002  r5 : c0a33820  r4 : ffffff9e
[  415.349169] r3 : 00000001  r2 : c0ade668  r1 : ffffff9e  r0 : ed544cac
[  415.355720] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[  415.363047] Control: 10c53c7d  Table: 8d22404a  DAC: 00000015
[  415.368804]
[  415.368813] PC: 0xc07b6d2c:
[  415.373097] 6d2c  e8bd4010 ea05c6c1 e2423001 e92d4073 e1a06002 e1a04001 e5902064 e3530007
[  415.381420] 6d4c  979ff103 ea000010 c07b6da4 c07b6d74 c07b6d98 c07b6d80 c07b6d98 c07b6d98
[  415.389742] 6d6c  c07b6d98 c07b6d8c e3a03001 e59f50a8 ea00000a e3a03000 e59f50a0 ea000007
[  415.398054] 6d8c  e3a03000 e59f5098 ea000004 e59f0094 e3a01d0d ebf5042f e59f508c e3a03001
[  415.406359] 6dac  e5d41034 e2011001 e1510003 1a000018 e5943044 e3530000 0a000015 e1d434b0
[  415.414674] 6dcc  e1160003 0a000012 e58d5000 e5921164 e5943004 e590005c e59f2050 ebffffab
[  415.422996] 6dec  e1a00004 e1a02006 e3a01000 e1a0e00f e594f044 e2503000 aa000005 e1a01005
[  415.431321] 6e0c  e5942004 e59f0028 e28dd008 e8bd4070 ea05c1df e28dd008 e8bd8070 c0a33820

11 years agork2928: use 800x480 linux logo as default logo for factory tool
yxj [Thu, 18 Oct 2012 13:01:34 +0000 (21:01 +0800)]
rk2928: use 800x480 linux logo as default logo for factory tool

11 years agork2928: rk2926 tb initial(rk2926_tb_defconfig)
kfx [Thu, 18 Oct 2012 10:59:06 +0000 (18:59 +0800)]
rk2928: rk2926 tb initial(rk2926_tb_defconfig)

11 years agork2928: rk2926 sdk: revert dvfs_arm_table
kfx [Thu, 18 Oct 2012 10:33:41 +0000 (18:33 +0800)]
rk2928: rk2926 sdk: revert dvfs_arm_table

11 years agoadd rga soft reset when rga time out happen
zsq [Thu, 18 Oct 2012 10:01:19 +0000 (18:01 +0800)]
add rga soft reset when rga time out happen

11 years agophonepad: update driver for new V1.2 code.
宋秀杰 [Thu, 18 Oct 2012 09:12:54 +0000 (17:12 +0800)]
phonepad: update driver for new V1.2 code.

11 years agork2928: update rk2928 tb config
kfx [Thu, 18 Oct 2012 08:09:15 +0000 (16:09 +0800)]
rk2928: update rk2928 tb config

11 years agom701: support save_capacity policy.
zhengxing [Wed, 17 Oct 2012 07:29:59 +0000 (15:29 +0800)]
m701: support save_capacity policy.

11 years agork610:fix edid read problem
yzq [Thu, 18 Oct 2012 06:41:16 +0000 (14:41 +0800)]
rk610:fix edid read problem

11 years agork2928 lcdc :fig bug of FBIOGET_PANEL_SIZE
yxj [Thu, 18 Oct 2012 06:28:32 +0000 (14:28 +0800)]
rk2928 lcdc :fig bug of FBIOGET_PANEL_SIZE

11 years agork3066b m701: add tps65910 shutdown support
yzq [Thu, 18 Oct 2012 04:25:57 +0000 (12:25 +0800)]
rk3066b m701: add tps65910 shutdown support

11 years agork3066b m701: usb DWC_OTG_BOTH_HOST_SLAVE Mode
yzq [Mon, 15 Oct 2012 06:49:51 +0000 (14:49 +0800)]
rk3066b m701: usb  DWC_OTG_BOTH_HOST_SLAVE Mode

11 years agork2926:v86:open vcc_wl when pmu enter sleep
张晴 [Thu, 18 Oct 2012 03:06:00 +0000 (11:06 +0800)]
rk2926:v86:open vcc_wl when pmu enter sleep

11 years agork3066: set uart0 297M to support bluetooth 3M
chenxing [Wed, 17 Oct 2012 10:46:36 +0000 (18:46 +0800)]
rk3066: set uart0 297M to support bluetooth 3M

11 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into rk2926
wuhao@rock-chips.com [Wed, 17 Oct 2012 10:29:53 +0000 (18:29 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into rk2926

11 years agosync rk2926_sdk_defconfig :add support charger display
wuhao@rock-chips.com [Wed, 17 Oct 2012 10:29:26 +0000 (18:29 +0800)]
sync rk2926_sdk_defconfig :add support charger display

11 years agork3066b: set uart0 297M to support bluetooth 3M
chenxing [Wed, 17 Oct 2012 10:26:27 +0000 (18:26 +0800)]
rk3066b: set uart0 297M to support bluetooth 3M

11 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into rk2926
wuhao@rock-chips.com [Wed, 17 Oct 2012 10:18:37 +0000 (18:18 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into rk2926

11 years agork_fb:fix get wrong display size when plug hdmi start system
yzq [Wed, 17 Oct 2012 10:13:03 +0000 (18:13 +0800)]
rk_fb:fix get wrong display size when plug hdmi start system

11 years agosync rk2926_sdk_defconfig :add support charger display
wuhao@rock-chips.com [Wed, 17 Oct 2012 10:13:04 +0000 (18:13 +0800)]
sync rk2926_sdk_defconfig :add support charger display

11 years agork2928 acodec:
Zheng Yang [Wed, 17 Oct 2012 10:03:35 +0000 (18:03 +0800)]
rk2928 acodec:
1. fix sometimes only one channel autio output error.
2. fix pop sound when open PGA.

11 years agork2926:m713:slove io conflict for act8931 and tps65910
张晴 [Wed, 17 Oct 2012 09:55:43 +0000 (17:55 +0800)]
rk2926:m713:slove io conflict for act8931 and tps65910

11 years agork2928: cpufreq: set reboot freq from 600MHz to 816MHz, make sure vdd_arm 1.2v at...
黄涛 [Wed, 17 Oct 2012 09:46:55 +0000 (17:46 +0800)]
rk2928: cpufreq: set reboot freq from 600MHz to 816MHz, make sure vdd_arm 1.2v at least

11 years agork2928: pack-kernel-rk2928.sh support rk2928/rk2926 sdk only
黄涛 [Wed, 17 Oct 2012 09:00:43 +0000 (17:00 +0800)]
rk2928: pack-kernel-rk2928.sh support rk2928/rk2926 sdk only

11 years agork_fb: one lcdc dual screen mode,if plug hdmi,not blank lcdc.
yzq [Wed, 17 Oct 2012 08:59:45 +0000 (16:59 +0800)]
rk_fb: one lcdc dual screen mode,if plug hdmi,not blank lcdc.

11 years agork2928(tr726): borad config for battery
wuhao@rock-chips.com [Wed, 17 Oct 2012 08:31:21 +0000 (16:31 +0800)]
rk2928(tr726): borad config for battery

11 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into rk2926
wuhao@rock-chips.com [Wed, 17 Oct 2012 08:30:19 +0000 (16:30 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into rk2926

11 years agork2928: act8931: adjust GPIO effective value for the control of charge current
xieyi [Wed, 17 Oct 2012 07:56:14 +0000 (15:56 +0800)]
rk2928: act8931: adjust GPIO effective value for the control of charge current

11 years agobacklight: if brightness is zero, disable backlight
yzq [Wed, 17 Oct 2012 07:56:07 +0000 (15:56 +0800)]
backlight: if brightness is zero, disable backlight

11 years agothe bug of detection charging
许盛飞 [Wed, 17 Oct 2012 07:32:28 +0000 (15:32 +0800)]
the bug of detection charging

11 years agork:move pmic_type to board.h
张晴 [Wed, 17 Oct 2012 07:18:35 +0000 (15:18 +0800)]
rk:move pmic_type to board.h

11 years agork2926(m713): borad config for battery
wuhao@rock-chips.com [Wed, 17 Oct 2012 06:40:50 +0000 (14:40 +0800)]
rk2926(m713): borad config for battery

11 years agork2928&rk2926 sdk: disable:'/proc/clocks support' and 'Put the FIQ debugger into...
kfx [Wed, 17 Oct 2012 06:23:24 +0000 (14:23 +0800)]
rk2928&rk2926 sdk: disable:'/proc/clocks support' and 'Put the FIQ debugger into console mode by default'

11 years agork2928: rk2928 sdk & rk2926 sdk: enable ddr freq scale
kfx [Wed, 17 Oct 2012 03:58:08 +0000 (11:58 +0800)]
rk2928: rk2928 sdk & rk2926 sdk: enable ddr freq scale

11 years agoSDMMC:
xbw [Wed, 17 Oct 2012 03:51:04 +0000 (11:51 +0800)]
SDMMC:
Temporarily,the RK2926 machine reduces the sdcard frequency,due to be very prone to occur data-timeout-error.
And so the issue is resolved, and then change it back

11 years agork3066b: update rk3066b dvfs table, add rk3066b voltage differential limit
chenxing [Wed, 17 Oct 2012 03:39:50 +0000 (11:39 +0800)]
rk3066b: update rk3066b dvfs table, add rk3066b voltage differential limit

11 years agork2928 : add interface for adc_battery
许盛飞 [Wed, 17 Oct 2012 03:26:01 +0000 (11:26 +0800)]
rk2928 : add interface for adc_battery

11 years agork30: adjust the sequence of APLL and GPLL,in the suspend
许盛飞 [Wed, 17 Oct 2012 02:30:27 +0000 (10:30 +0800)]
rk30: adjust the sequence of APLL and GPLL,in the suspend

11 years agork30:add interface for rk30_adc_battery
许盛飞 [Wed, 17 Oct 2012 01:50:42 +0000 (09:50 +0800)]
rk30:add interface for rk30_adc_battery

11 years agocamera: update hi253 driver.
zyc [Wed, 17 Oct 2012 01:49:40 +0000 (09:49 +0800)]
camera: update hi253 driver.

11 years agork3066b: set gpll=297M, cpll=1200M, support GPU 400M
chenxing [Tue, 16 Oct 2012 11:09:52 +0000 (19:09 +0800)]
rk3066b: set gpll=297M, cpll=1200M, support GPU 400M

11 years agork2928: codec: ifndef CONFIG_MACH_RK2926_SDK --> if(soc_is_rk2928g())
kfx [Tue, 16 Oct 2012 10:41:19 +0000 (18:41 +0800)]
rk2928: codec: ifndef CONFIG_MACH_RK2926_SDK --> if(soc_is_rk2928g())

11 years agork2926:move pmic_type and gpio offset addr to board.h
张晴 [Tue, 16 Oct 2012 09:57:28 +0000 (17:57 +0800)]
rk2926:move pmic_type and gpio offset addr to board.h

11 years agork30_phonepad:modify defconfig to support auto driver
luowei [Tue, 16 Oct 2012 09:35:59 +0000 (17:35 +0800)]
rk30_phonepad:modify defconfig to support auto driver

11 years agork30_phonepad: modify lcd_auto.c
luowei [Tue, 16 Oct 2012 09:31:19 +0000 (17:31 +0800)]
rk30_phonepad: modify lcd_auto.c

11 years agork2928: rk2928 sdk(bga) initial
kfx [Tue, 16 Oct 2012 09:09:47 +0000 (17:09 +0800)]
rk2928: rk2928 sdk(bga) initial

11 years agork2928-phonepad-sdk: add hdmi support
linjh [Tue, 16 Oct 2012 08:56:39 +0000 (16:56 +0800)]
rk2928-phonepad-sdk: add hdmi support

11 years agoMerge commit 'a8aea20e19ead970a19154695905079cd81ded6b' into develop-3.0
yangkai [Tue, 16 Oct 2012 07:53:18 +0000 (15:53 +0800)]
Merge commit 'a8aea20e19ead970a19154695905079cd81ded6b' into develop-3.0

11 years agocamera 3066b: modify power control function, modify hi253 driver.
zyc [Tue, 16 Oct 2012 07:11:13 +0000 (15:11 +0800)]
camera 3066b: modify power control function, modify hi253 driver.

11 years agork30_phonepad:improve auto touch screen to support i2c,spi,uart interface
luowei [Tue, 16 Oct 2012 07:02:37 +0000 (15:02 +0800)]
rk30_phonepad:improve auto touch screen to support i2c,spi,uart interface

11 years agork2928: move rk2928_sdk_defconfig(old) to rk2928_tb_defconfig: support rk2928 top...
kfx [Tue, 16 Oct 2012 03:37:43 +0000 (11:37 +0800)]
rk2928: move rk2928_sdk_defconfig(old) to rk2928_tb_defconfig: support rk2928 top board + rk3066 main board

11 years agork: ddr_freq: move video_state to plat-rk and better support release
黄涛 [Tue, 16 Oct 2012 03:23:50 +0000 (11:23 +0800)]
rk: ddr_freq: move video_state to plat-rk and better support release

11 years agorelease wakelock when usb disconnect
lyz [Tue, 16 Oct 2012 03:09:04 +0000 (11:09 +0800)]
release wakelock when usb disconnect

11 years agork2928-phonepad-sdk: support otg
linjh [Mon, 15 Oct 2012 10:42:01 +0000 (18:42 +0800)]
rk2928-phonepad-sdk:  support otg

modify file:   arch/arm/configs/rk2928_phonepad_defconfig

11 years agork2928: rk2926 sdk(support m713) initial
kfx [Mon, 15 Oct 2012 10:04:02 +0000 (18:04 +0800)]
rk2928: rk2926 sdk(support m713) initial

11 years agork3066b m701:set backlight delay_ms zero to make resume fast
yzq [Mon, 15 Oct 2012 09:47:11 +0000 (17:47 +0800)]
rk3066b m701:set backlight delay_ms zero to make resume fast

11 years agobacklight: if min_brightness not zero,when suspend,the pwm value not be zero
yzq [Mon, 15 Oct 2012 09:38:08 +0000 (17:38 +0800)]
backlight: if min_brightness not zero,when suspend,the pwm value not be zero
case problem: flash screen when resume.

11 years agom701 - tp: modify firmware upgrade mode to async, avoid to barrage
zhengxing [Mon, 15 Oct 2012 07:20:07 +0000 (15:20 +0800)]
m701 - tp: modify firmware upgrade mode to async, avoid to barrage
    and too slow when startup in m701.

11 years agokeyboard: If the power button is pressed in suspend state, immediately report event
kfx [Mon, 15 Oct 2012 07:10:27 +0000 (15:10 +0800)]
keyboard: If the power button is pressed in suspend state, immediately report event

11 years agom701 - tp: change the order that ft5306 sleep after set reg.
zhengxing [Mon, 15 Oct 2012 05:11:23 +0000 (13:11 +0800)]
m701 - tp: change the order that ft5306 sleep after set reg.

11 years agoMerge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0
黄涛 [Mon, 15 Oct 2012 03:56:57 +0000 (11:56 +0800)]
Merge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0

Conflicts:
Makefile

11 years agoM701: add charing animation when charging power off and restart.
zhengxing [Mon, 15 Oct 2012 03:41:18 +0000 (11:41 +0800)]
M701: add charing animation when charging power off and restart.

11 years agork2928/rk30: board: remove unuse comments
chenxing [Mon, 15 Oct 2012 03:00:25 +0000 (11:00 +0800)]
rk2928/rk30: board: remove unuse comments

11 years agork2928/rk2926: reset dvfs table
chenxing [Mon, 15 Oct 2012 02:43:29 +0000 (10:43 +0800)]
rk2928/rk2926: reset dvfs table

11 years agork3066b: set vdd_11 1.0V
chenxing [Mon, 15 Oct 2012 02:37:13 +0000 (10:37 +0800)]
rk3066b: set vdd_11 1.0V

11 years agodo nothing in usb device suspend
yangkai [Mon, 15 Oct 2012 02:14:41 +0000 (10:14 +0800)]
do nothing in usb device suspend

11 years agom701: remove ft5306_ts compile waring
yzq [Mon, 15 Oct 2012 01:54:55 +0000 (09:54 +0800)]
m701: remove ft5306_ts compile waring

11 years agork30_phonepad:improve auto lcd driver
luowei [Sun, 14 Oct 2012 05:51:02 +0000 (13:51 +0800)]
rk30_phonepad:improve auto lcd driver

11 years agork30_phonepad:add init parameter support after get board id
luowei [Sun, 14 Oct 2012 05:14:09 +0000 (13:14 +0800)]
rk30_phonepad:add init parameter support after get board id

11 years agork2928:acodec: 修复有时只有一个声道输出或输出声音变小错误.
Zheng Yang [Sat, 13 Oct 2012 03:10:58 +0000 (11:10 +0800)]
rk2928:acodec: 修复有时只有一个声道输出或输出声音变小错误.

11 years agoLinux 3.0.46
Greg Kroah-Hartman [Fri, 12 Oct 2012 20:37:00 +0000 (05:37 +0900)]
Linux 3.0.46

11 years agomtd: omap2: fix module loading
Andreas Bießmann [Fri, 31 Aug 2012 11:35:42 +0000 (13:35 +0200)]
mtd: omap2: fix module loading

commit 4d3d688da8e7016f15483e9319b41311e1db9515 upstream.

Unloading the omap2 nand driver missed to release the memory region which will
result in not being able to request it again if one want to load the driver
later on.

This patch fixes following error when loading omap2 module after unloading:
---8<---
~ $ rmmod omap2
~ $ modprobe omap2
[   37.420928] omap2-nand: probe of omap2-nand.0 failed with error -16
~ $
--->8---

This error was introduced in 67ce04bf2746f8a1f8c2a104b313d20c63f68378 which
was the first commit of this driver.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agomtd: omap2: fix omap_nand_remove segfault
Andreas Bießmann [Fri, 31 Aug 2012 11:35:41 +0000 (13:35 +0200)]
mtd: omap2: fix omap_nand_remove segfault

commit 7d9b110269253b1d5858cfa57d68dfc7bf50dd77 upstream.

Do not kfree() the mtd_info; it is handled in the mtd subsystem and
already freed by nand_release(). Instead kfree() the struct
omap_nand_info allocated in omap_nand_probe which was not freed before.

This patch fixes following error when unloading the omap2 module:

---8<---
~ $ rmmod omap2
------------[ cut here ]------------
kernel BUG at mm/slab.c:3126!
Internal error: Oops - BUG: 0 [#1] PREEMPT ARM
Modules linked in: omap2(-)
CPU: 0    Not tainted  (3.6.0-rc3-00230-g155e36d-dirty #3)
PC is at cache_free_debugcheck+0x2d4/0x36c
LR is at kfree+0xc8/0x2ac
pc : [<c01125a0>]    lr : [<c0112efc>]    psr: 200d0193
sp : c521fe08  ip : c0e8ef90  fp : c521fe5c
r10: bf0001fc  r9 : c521e000  r8 : c0d99c8c
r7 : c661ebc0  r6 : c065d5a4  r5 : c65c4060  r4 : c78005c0
r3 : 00000000  r2 : 00001000  r1 : c65c4000  r0 : 00000001
Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 86694019  DAC: 00000015
Process rmmod (pid: 549, stack limit = 0xc521e2f0)
Stack: (0xc521fe08 to 0xc5220000)
fe00:                   c008a874 c00bf44c c515c6d0 200d0193 c65c4860 c515c240
fe20: c521fe3c c521fe30 c008a9c0 c008a854 c521fe5c c65c4860 c78005c0 bf0001fc
fe40: c780ff40 a00d0113 c521e000 00000000 c521fe84 c521fe60 c0112efc c01122d8
fe60: c65c4860 c0673778 c06737ac 00000000 00070013 00000000 c521fe9c c521fe88
fe80: bf0001fc c0112e40 c0673778 bf001ca8 c521feac c521fea0 c02ca11c bf0001ac
fea0: c521fec4 c521feb0 c02c82c4 c02ca100 c0673778 bf001ca8 c521fee4 c521fec8
fec0: c02c8dd8 c02c8250 00000000 bf001ca8 bf001ca8 c0804ee0 c521ff04 c521fee8
fee0: c02c804c c02c8d20 bf001924 00000000 bf001ca8 c521e000 c521ff1c c521ff08
ff00: c02c950c c02c7fbc bf001d48 00000000 c521ff2c c521ff20 c02ca3a4 c02c94b8
ff20: c521ff3c c521ff30 bf001938 c02ca394 c521ffa4 c521ff40 c009beb4 bf001930
ff40: c521ff6c 70616d6f b6fe0032 c0014f84 70616d6f b6fe0032 00000081 60070010
ff60: c521ff84 c521ff70 c008e1f4 c00bf328 0001a004 70616d6f c521ff94 0021ff88
ff80: c008e368 0001a004 70616d6f b6fe0032 00000081 c0015028 00000000 c521ffa8
ffa0: c0014dc0 c009bcd0 0001a004 70616d6f bec2ab38 00000880 bec2ab38 00000880
ffc0: 0001a004 70616d6f b6fe0032 00000081 00000319 00000000 b6fe1000 00000000
ffe0: bec2ab30 bec2ab20 00019f00 b6f539c0 60070010 bec2ab38 aaaaaaaa aaaaaaaa
Backtrace:
[<c01122cc>] (cache_free_debugcheck+0x0/0x36c) from [<c0112efc>] (kfree+0xc8/0x2ac)
[<c0112e34>] (kfree+0x0/0x2ac) from [<bf0001fc>] (omap_nand_remove+0x5c/0x64 [omap2])
[<bf0001a0>] (omap_nand_remove+0x0/0x64 [omap2]) from [<c02ca11c>] (platform_drv_remove+0x28/0x2c)
 r5:bf001ca8 r4:c0673778
[<c02ca0f4>] (platform_drv_remove+0x0/0x2c) from [<c02c82c4>] (__device_release_driver+0x80/0xdc)
[<c02c8244>] (__device_release_driver+0x0/0xdc) from [<c02c8dd8>] (driver_detach+0xc4/0xc8)
 r5:bf001ca8 r4:c0673778
[<c02c8d14>] (driver_detach+0x0/0xc8) from [<c02c804c>] (bus_remove_driver+0x9c/0x104)
 r6:c0804ee0 r5:bf001ca8 r4:bf001ca8 r3:00000000
[<c02c7fb0>] (bus_remove_driver+0x0/0x104) from [<c02c950c>] (driver_unregister+0x60/0x80)
 r6:c521e000 r5:bf001ca8 r4:00000000 r3:bf001924
[<c02c94ac>] (driver_unregister+0x0/0x80) from [<c02ca3a4>] (platform_driver_unregister+0x1c/0x20)
 r5:00000000 r4:bf001d48
[<c02ca388>] (platform_driver_unregister+0x0/0x20) from [<bf001938>] (omap_nand_driver_exit+0x14/0x1c [omap2])
[<bf001924>] (omap_nand_driver_exit+0x0/0x1c [omap2]) from [<c009beb4>] (sys_delete_module+0x1f0/0x2ec)
[<c009bcc4>] (sys_delete_module+0x0/0x2ec) from [<c0014dc0>] (ret_fast_syscall+0x0/0x48)
 r8:c0015028 r7:00000081 r6:b6fe0032 r5:70616d6f r4:0001a004
Code: e1a00005 eb0d9172 e7f001f2 e7f001f2 (e7f001f2)
---[ end trace 6a30b24d8c0cc2ee ]---
Segmentation fault
--->8---

This error was introduced in 67ce04bf2746f8a1f8c2a104b313d20c63f68378 which
was the first commit of this driver.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agomtd: nand: Use the mirror BBT descriptor when reading its version
Shmulik Ladkani [Sun, 10 Jun 2012 10:58:12 +0000 (13:58 +0300)]
mtd: nand: Use the mirror BBT descriptor when reading its version

commit 7bb9c75436212813b38700c34df4bbb6eb82debe upstream.

The code responsible for reading the version of the mirror bbt was
incorrectly using the descriptor of the main bbt.

Pass the mirror bbt descriptor to 'scan_read_raw' when reading the
version of the mirror bbt.

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agomtd: nandsim: bugfix: fail if overridesize is too big
Richard Genoud [Wed, 12 Sep 2012 12:26:26 +0000 (14:26 +0200)]
mtd: nandsim: bugfix: fail if overridesize is too big

commit bb0a13a13411c4ce24c48c8ff3cdf7b48d237240 upstream.

If override size is too big, the module was actually loaded instead of
failing, because retval was not set.

This lead to memory corruption with the use of the freed structs nandsim
and nand_chip.

Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agomtd: autcpu12-nvram: Fix compile breakage
Alexander Shiyan [Wed, 15 Aug 2012 16:28:05 +0000 (20:28 +0400)]
mtd: autcpu12-nvram: Fix compile breakage

commit d1f55c680e5d021e7066f4461dd678d42af18898 upstream.

Update driver autcpu12-nvram.c so it compiles; map_read32/map_write32
no longer exist in the kernel so the driver is totally broken.
Additionally, map_info name passed to simple_map_init is incorrect.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoCPU hotplug, cpusets, suspend: Don't modify cpusets during suspend/resume
Srivatsa S. Bhat [Thu, 24 May 2012 14:16:26 +0000 (19:46 +0530)]
CPU hotplug, cpusets, suspend: Don't modify cpusets during suspend/resume

commit d35be8bab9b0ce44bed4b9453f86ebf64062721e upstream.

In the event of CPU hotplug, the kernel modifies the cpusets' cpus_allowed
masks as and when necessary to ensure that the tasks belonging to the cpusets
have some place (online CPUs) to run on. And regular CPU hotplug is
destructive in the sense that the kernel doesn't remember the original cpuset
configurations set by the user, across hotplug operations.

However, suspend/resume (which uses CPU hotplug) is a special case in which
the kernel has the responsibility to restore the system (during resume), to
exactly the same state it was in before suspend.

In order to achieve that, do the following:

1. Don't modify cpusets during suspend/resume. At all.
   In particular, don't move the tasks from one cpuset to another, and
   don't modify any cpuset's cpus_allowed mask. So, simply ignore cpusets
   during the CPU hotplug operations that are carried out in the
   suspend/resume path.

2. However, cpusets and sched domains are related. We just want to avoid
   altering cpusets alone. So, to keep the sched domains updated, build
   a single sched domain (containing all active cpus) during each of the
   CPU hotplug operations carried out in s/r path, effectively ignoring
   the cpusets' cpus_allowed masks.

   (Since userspace is frozen while doing all this, it will go unnoticed.)

3. During the last CPU online operation during resume, build the sched
   domains by looking up the (unaltered) cpusets' cpus_allowed masks.
   That will bring back the system to the same original state as it was in
   before suspend.

Ultimately, this will not only solve the cpuset problem related to suspend
resume (ie., restores the cpusets to exactly what it was before suspend, by
not touching it at all) but also speeds up suspend/resume because we avoid
running cpuset update code for every CPU being offlined/onlined.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20120524141611.3692.20155.stgit@srivatsabhat.in.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agomempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()
Mel Gorman [Mon, 8 Oct 2012 23:29:20 +0000 (16:29 -0700)]
mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

commit 00442ad04a5eac08a98255697c510e708f6082e2 upstream.

Commit cc9a6c877661 ("cpuset: mm: reduce large amounts of memory barrier
related damage v3") introduced a potential memory corruption.
shmem_alloc_page() uses a pseudo vma and it has one significant unique
combination, vma->vm_ops=NULL and vma->policy->flags & MPOL_F_SHARED.

get_vma_policy() does NOT increase a policy ref when vma->vm_ops=NULL
and mpol_cond_put() DOES decrease a policy ref when a policy has
MPOL_F_SHARED.  Therefore, when a cpuset update race occurs,
alloc_pages_vma() falls in 'goto retry_cpuset' path, decrements the
reference count and frees the policy prematurely.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Christoph Lameter <cl@linux.com>
Cc: Josh Boyer <jwboyer@gmail.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>
11 years agomempolicy: fix refcount leak in mpol_set_shared_policy()
KOSAKI Motohiro [Mon, 8 Oct 2012 23:29:19 +0000 (16:29 -0700)]
mempolicy: fix refcount leak in mpol_set_shared_policy()

commit 63f74ca21f1fad36d075e063f06dcc6d39fe86b2 upstream.

When shared_policy_replace() fails to allocate new->policy is not freed
correctly by mpol_set_shared_policy().  The problem is that shared
mempolicy code directly call kmem_cache_free() in multiple places where
it is easy to make a mistake.

This patch creates an sp_free wrapper function and uses it. The bug was
introduced pre-git age (IOW, before 2.6.12-rc2).

[mgorman@suse.de: Editted changelog]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Christoph Lameter <cl@linux.com>
Cc: Josh Boyer <jwboyer@gmail.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>
11 years agomempolicy: fix a race in shared_policy_replace()
Mel Gorman [Mon, 8 Oct 2012 23:29:17 +0000 (16:29 -0700)]
mempolicy: fix a race in shared_policy_replace()

commit b22d127a39ddd10d93deee3d96e643657ad53a49 upstream.

shared_policy_replace() use of sp_alloc() is unsafe.  1) sp_node cannot
be dereferenced if sp->lock is not held and 2) another thread can modify
sp_node between spin_unlock for allocating a new sp node and next
spin_lock.  The bug was introduced before 2.6.12-rc2.

Kosaki's original patch for this problem was to allocate an sp node and
policy within shared_policy_replace and initialise it when the lock is
reacquired.  I was not keen on this approach because it partially
duplicates sp_alloc().  As the paths were sp->lock is taken are not that
performance critical this patch converts sp->lock to sp->mutex so it can
sleep when calling sp_alloc().

[kosaki.motohiro@jp.fujitsu.com: Original patch]
Signed-off-by: Mel Gorman <mgorman@suse.de>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Cc: Josh Boyer <jwboyer@gmail.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>
11 years agomempolicy: remove mempolicy sharing
KOSAKI Motohiro [Mon, 8 Oct 2012 23:29:16 +0000 (16:29 -0700)]
mempolicy: remove mempolicy sharing

commit 869833f2c5c6e4dd09a5378cfc665ffb4615e5d2 upstream.

Dave Jones' system call fuzz testing tool "trinity" triggered the
following bug error with slab debugging enabled

    =============================================================================
    BUG numa_policy (Not tainted): Poison overwritten
    -----------------------------------------------------------------------------

    INFO: 0xffff880146498250-0xffff880146498250. First byte 0x6a instead of 0x6b
    INFO: Allocated in mpol_new+0xa3/0x140 age=46310 cpu=6 pid=32154
     __slab_alloc+0x3d3/0x445
     kmem_cache_alloc+0x29d/0x2b0
     mpol_new+0xa3/0x140
     sys_mbind+0x142/0x620
     system_call_fastpath+0x16/0x1b

    INFO: Freed in __mpol_put+0x27/0x30 age=46268 cpu=6 pid=32154
     __slab_free+0x2e/0x1de
     kmem_cache_free+0x25a/0x260
     __mpol_put+0x27/0x30
     remove_vma+0x68/0x90
     exit_mmap+0x118/0x140
     mmput+0x73/0x110
     exit_mm+0x108/0x130
     do_exit+0x162/0xb90
     do_group_exit+0x4f/0xc0
     sys_exit_group+0x17/0x20
     system_call_fastpath+0x16/0x1b

    INFO: Slab 0xffffea0005192600 objects=27 used=27 fp=0x          (null) flags=0x20000000004080
    INFO: Object 0xffff880146498250 @offset=592 fp=0xffff88014649b9d0

The problem is that the structure is being prematurely freed due to a
reference count imbalance. In the following case mbind(addr, len) should
replace the memory policies of both vma1 and vma2 and thus they will
become to share the same mempolicy and the new mempolicy will have the
MPOL_F_SHARED flag.

  +-------------------+-------------------+
  |     vma1          |     vma2(shmem)   |
  +-------------------+-------------------+
  |                                       |
 addr                                 addr+len

alloc_pages_vma() uses get_vma_policy() and mpol_cond_put() pair for
maintaining the mempolicy reference count.  The current rule is that
get_vma_policy() only increments refcount for shmem VMA and
mpol_conf_put() only decrements refcount if the policy has
MPOL_F_SHARED.

In above case, vma1 is not shmem vma and vma->policy has MPOL_F_SHARED!
The reference count will be decreased even though was not increased
whenever alloc_page_vma() is called.  This has been broken since commit
[52cd3b07: mempolicy: rework mempolicy Reference Counting] in 2008.

There is another serious bug with the sharing of memory policies.
Currently, mempolicy rebind logic (it is called from cpuset rebinding)
ignores a refcount of mempolicy and override it forcibly.  Thus, any
mempolicy sharing may cause mempolicy corruption.  The bug was
introduced by commit [68860ec1: cpusets: automatic numa mempolicy
rebinding].

Ideally, the shared policy handling would be rewritten to either
properly handle COW of the policy structures or at least reference count
MPOL_F_SHARED based exclusively on information within the policy.
However, this patch takes the easier approach of disabling any policy
sharing between VMAs.  Each new range allocated with sp_alloc will
allocate a new policy, set the reference count to 1 and drop the
reference count of the old policy.  This increases the memory footprint
but is not expected to be a major problem as mbind() is unlikely to be
used for fine-grained ranges.  It is also inefficient because it means
we allocate a new policy even in cases where mbind_range() could use the
new_policy passed to it.  However, it is more straight-forward and the
change should be invisible to the user.

[mgorman@suse.de: Edited changelog]
Reported-by: Dave Jones <davej@redhat.com>
Cc: Christoph Lameter <cl@linux.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: Josh Boyer <jwboyer@gmail.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>
11 years agorevert "mm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages"
KOSAKI Motohiro [Mon, 8 Oct 2012 23:29:14 +0000 (16:29 -0700)]
revert "mm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages"

commit 8d34694c1abf29df1f3c7317936b7e3e2e308d9b upstream.

Commit 05f144a0d5c2 ("mm: mempolicy: Let vma_merge and vma_split handle
vma->vm_policy linkages") removed vma->vm_policy updates code but it is
the purpose of mbind_range().  Now, mbind_range() is virtually a no-op
and while it does not allow memory corruption it is not the right fix.
This patch is a revert.

[mgorman@suse.de: Edited changelog]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: Christoph Lameter <cl@linux.com>
Cc: Josh Boyer <jwboyer@gmail.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>
11 years agor8169: call netif_napi_del at errpaths and at driver unload
Devendra Naga [Fri, 5 Oct 2012 21:29:21 +0000 (23:29 +0200)]
r8169: call netif_napi_del at errpaths and at driver unload

commit ad1be8d345416a794dea39761a374032aa471a76 upstream.

When register_netdev fails, the init'ed NAPIs by netif_napi_add must be
deleted with netif_napi_del, and also when driver unloads, it should
delete the NAPI before unregistering netdevice using unregister_netdev.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: fix unsigned int wraparound with TSO
Julien Ducourthial [Fri, 5 Oct 2012 21:29:20 +0000 (23:29 +0200)]
r8169: fix unsigned int wraparound with TSO

commit 477206a018f902895bfcd069dd820bfe94c187b1 upstream.

The r8169 may get stuck or show bad behaviour after activating TSO :
the net_device is not stopped when it has no more TX descriptors.
This problem comes from TX_BUFS_AVAIL which may reach -1 when all
transmit descriptors are in use. The patch simply tries to keep positive
values.

Tested with 8111d(onboard) on a D510MO, and with 8111e(onboard) on a
Zotac 890GXITX.

Signed-off-by: Julien Ducourthial <jducourt@free.fr>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: 8168c and later require bit 0x20 to be set in Config2 for PME signaling.
Francois Romieu [Fri, 5 Oct 2012 21:29:19 +0000 (23:29 +0200)]
r8169: 8168c and later require bit 0x20 to be set in Config2 for PME signaling.

commit d387b427c973974dd619a33549c070ac5d0e089f upstream.

The new 84xx stopped flying below the radars.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: Config1 is read-only on 8168c and later.
Francois Romieu [Fri, 5 Oct 2012 21:29:18 +0000 (23:29 +0200)]
r8169: Config1 is read-only on 8168c and later.

commit 851e60221926a53344b4227879858bef841b0477 upstream.

Suggested by Hayes.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: runtime resume before shutdown.
françois romieu [Fri, 5 Oct 2012 21:29:17 +0000 (23:29 +0200)]
r8169: runtime resume before shutdown.

commit 2a15cd2ff488a9fdb55e5e34060f499853b27c77 upstream.

With runtime PM, if the ethernet cable is disconnected, the device is
transitioned to D3 state to conserve energy. If the system is shutdown
in this state, any register accesses in rtl_shutdown are dropped on
the floor. As the device was programmed by .runtime_suspend() to wake
on link changes, it is thus brought back up as soon as the link recovers.

Resuming every suspended device through the driver core would slow things
down and it is not clear how many devices really need it now.

Original report and D0 transition patch by Sameer Nanda. Patch has been
changed to comply with advices by Rafael J. Wysocki and the PM folks.

Reported-by: Sameer Nanda <snanda@chromium.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Hayes Wang <hayeswang@realtek.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: missing barriers.
Francois Romieu [Fri, 5 Oct 2012 21:29:16 +0000 (23:29 +0200)]
r8169: missing barriers.

commit 1e874e041fc7c222cbd85b20c4406070be1f687a upstream.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: fix Config2 MSIEnable bit setting.
françois romieu [Fri, 5 Oct 2012 21:29:15 +0000 (23:29 +0200)]
r8169: fix Config2 MSIEnable bit setting.

commit 2ca6cf06d988fea21e812a86be79353352677c9c upstream.

The MSIEnable bit is only available for the 8169.

Avoid Config2 writes for the post-8169 8168 and 810x.

Reported-by: Su Kang Yin <cantona@cantona.net>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: Rx FIFO overflow fixes.
Francois Romieu [Fri, 5 Oct 2012 21:29:14 +0000 (23:29 +0200)]
r8169: Rx FIFO overflow fixes.

commit 811fd3010cf512f2e23e6c4c912aad54516dc706 upstream.

Realtek has specified that the post 8168c gigabit chips and the post
8105e fast ethernet chips recover automatically from a Rx FIFO overflow.
The driver does not need to clear the RxFIFOOver bit of IntrStatus and
it should rather avoid messing it.

The implementation deserves some explanation:
1. events outside of the intr_event bit mask are now ignored. It enforces
   a no-processing policy for the events that either should not be there
   or should be ignored.

2. RxFIFOOver was already ignored in rtl_cfg_infos[RTL_CFG_1] for the
   whole 8168 line of chips with two exceptions:
   - RTL_GIGA_MAC_VER_22 since b5ba6d12bdac21bc0620a5089e0f24e362645efd
     ("use RxFIFO overflow workaround for 8168c chipset.").
     This one should now be correctly handled.
   - RTL_GIGA_MAC_VER_11 (8168b) which requires a different Rx FIFO
     overflow processing.

   Though it does not conform to Realtek suggestion above, the updated
   driver includes no change for RTL_GIGA_MAC_VER_12 and RTL_GIGA_MAC_VER_17.
   Both are 8168b. RTL_GIGA_MAC_VER_12 is common and a bit old so I'd rather
   wait for experimental evidence that the change suggested by Realtek really
   helps or does not hurt in unexpected ways.

   Removed case statements in rtl8169_interrupt are only 8168 relevant.

3. RxFIFOOver is masked for post 8105e 810x chips, namely the sole 8105e
   (RTL_GIGA_MAC_VER_30) itself.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: hayeswang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: increase the delay parameter of pm_schedule_suspend
hayeswang [Fri, 5 Oct 2012 21:29:13 +0000 (23:29 +0200)]
r8169: increase the delay parameter of pm_schedule_suspend

commit 10953db8e1a278742ef7e64a3d1491802bcfa98b upstream
The link down would occur when reseting PHY. And it would take about 2 ~ 5
seconds from link down to link up. If the delay of pm_schedule_suspend is
not long enough, the device would enter runtime_suspend before link up.
After link up, the device would wake up and reset PHY again. Then, you
would find the driver keep in a loop of runtime_suspend and rumtime_resume.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: expand received packet length indication.
Francois Romieu [Fri, 5 Oct 2012 21:29:12 +0000 (23:29 +0200)]
r8169: expand received packet length indication.

commit deb9d93c89d311714a60809b28160e538e1cbb43 upstream.

8168d and above allow jumbo frames beyond 8k. Bump the received
packet length check before enabling jumbo frames on these chipsets.

Frame length indication covers bits 0..13 of the first Rx descriptor
32 bits for the 8169 and 8168. I only have authoritative documentation
for the allowed use of the extra (13) bit with the 8169 and 8168c.
Realtek's drivers use the same mask for the 816x and the fast ethernet
only 810x.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: jumbo fixes.
Francois Romieu [Fri, 5 Oct 2012 21:29:11 +0000 (23:29 +0200)]
r8169: jumbo fixes.

commit d58d46b5d85139d18eb939aa7279c160bab70484 upstream.

- fix features : jumbo frames and checksumming can not be used at the
  same time.

- introduce hw_jumbo_{enable / disable} helpers. Their content has been
  creatively extracted from Realtek's own drivers. As an illustration,
  it would be nice to know how/if the MaxTxPacketSize register operates
  when the device can work with a 9k jumbo frame as its documentation
  (8168c) can not be applied beyond ~7k.

- rtl_tx_performance_tweak is moved forward. No change.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: remove erroneous processing of always set bit.
Francois Romieu [Fri, 5 Oct 2012 21:29:10 +0000 (23:29 +0200)]
r8169: remove erroneous processing of always set bit.

commit e03f33af79f0772156e1a1a1e36bdddf8012b2e4 upstream.

When set, RxFOVF (resp. RxBOVF) is always 1 (resp. 0).

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: don't enable rx when shutdown.
Hayes Wang [Fri, 5 Oct 2012 21:29:09 +0000 (23:29 +0200)]
r8169: don't enable rx when shutdown.

commit aaa89c08d9ffa3739c93d65d98b73ec2aa2e93a5 upstream.

Only 8111b needs to enable rx when shutdowning with WoL.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agor8169: fix wake on lan setting for non-8111E.
Hayes Wang [Fri, 5 Oct 2012 21:29:08 +0000 (23:29 +0200)]
r8169: fix wake on lan setting for non-8111E.

commit d4ed95d796e5126bba51466dc07e287cebc8bd19 upstream.

Only 8111E needs enable RxConfig bit 0 ~ 3 when suspending or
shutdowning for wake on lan.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agorcu: Fix day-one dyntick-idle stall-warning bug
Paul E. McKenney [Sat, 22 Sep 2012 20:55:30 +0000 (13:55 -0700)]
rcu: Fix day-one dyntick-idle stall-warning bug

commit a10d206ef1a83121ab7430cb196e0376a7145b22 upstream.

Each grace period is supposed to have at least one callback waiting
for that grace period to complete.  However, if CONFIG_NO_HZ=n, an
extra callback-free grace period is no big problem -- it will chew up
a tiny bit of CPU time, but it will complete normally.  In contrast,
CONFIG_NO_HZ=y kernels have the potential for all the CPUs to go to
sleep indefinitely, in turn indefinitely delaying completion of the
callback-free grace period.  Given that nothing is waiting on this grace
period, this is also not a problem.

That is, unless RCU CPU stall warnings are also enabled, as they are
in recent kernels.  In this case, if a CPU wakes up after at least one
minute of inactivity, an RCU CPU stall warning will result.  The reason
that no one noticed until quite recently is that most systems have enough
OS noise that they will never remain absolutely idle for a full minute.
But there are some embedded systems with cut-down userspace configurations
that consistently get into this situation.

All this begs the question of exactly how a callback-free grace period
gets started in the first place.  This can happen due to the fact that
CPUs do not necessarily agree on which grace period is in progress.
If a CPU still believes that the grace period that just completed is
still ongoing, it will believe that it has callbacks that need to wait for
another grace period, never mind the fact that the grace period that they
were waiting for just completed.  This CPU can therefore erroneously
decide to start a new grace period.  Note that this can happen in
TREE_RCU and TREE_PREEMPT_RCU even on a single-CPU system:  Deadlock
considerations mean that the CPU that detected the end of the grace
period is not necessarily officially informed of this fact for some time.

Once this CPU notices that the earlier grace period completed, it will
invoke its callbacks.  It then won't have any callbacks left.  If no
other CPU has any callbacks, we now have a callback-free grace period.

This commit therefore makes CPUs check more carefully before starting a
new grace period.  This new check relies on an array of tail pointers
into each CPU's list of callbacks.  If the CPU is up to date on which
grace periods have completed, it checks to see if any callbacks follow
the RCU_DONE_TAIL segment, otherwise it checks to see if any callbacks
follow the RCU_WAIT_TAIL segment.  The reason that this works is that
the RCU_WAIT_TAIL segment will be promoted to the RCU_DONE_TAIL segment
as soon as the CPU is officially notified that the old grace period
has ended.

This change is to cpu_needs_another_gp(), which is called in a number
of places.  The only one that really matters is in rcu_start_gp(), where
the root rcu_node structure's ->lock is held, which prevents any
other CPU from starting or completing a grace period, so that the
comparison that determines whether the CPU is missing the completion
of a grace period is stable.

Reported-by: Becky Bruce <bgillbruce@gmail.com>
Reported-by: Subodh Nijsure <snijsure@grid-net.com>
Reported-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrm/radeon: force MSIs on RS690 asics
Alex Deucher [Wed, 26 Sep 2012 16:40:45 +0000 (12:40 -0400)]
drm/radeon: force MSIs on RS690 asics

commit fb6ca6d154cdcd53e7f27f8dbba513830372699b upstream.

There are so many quirks, lets just try and force
this for all RS690s.  See:
https://bugs.freedesktop.org/show_bug.cgi?id=37679

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>