Age | Commit message (Collapse) | Author |
|
' into integration-android-ux500
Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
|
|
PL011 calls del_timer_sync() (via cancel_delayed_work()) from atomic context.
Fix it.
======================================================
[ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ]
3.0.8+ #1188
------------------------------------------------------
kworker/u:0/5 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
(&(&uap->clk_off_work)->timer){+.-...}, at: [<c01d82b4>] del_timer_sync+0x0/0xc8
and this task is already holding:
(&port_lock_key){-.-...}, at: [<c03ca2b0>] pl011_clock_on+0x80/0xc4
which would create a new lock dependency:
(&port_lock_key){-.-...} -> (&(&uap->clk_off_work)->timer){+.-...}
but this new dependency connects a HARDIRQ-irq-safe lock:
(&port_lock_key){-.-...}
... which became HARDIRQ-irq-safe at:
[<c01fc734>] mark_irqflags+0x68/0x170
[<c01ff788>] __lock_acquire+0x598/0x788
[<c01fff84>] lock_acquire+0x10c/0x130
[<c06513cc>] _raw_spin_lock_irqsave+0x5c/0x98
[<c03cb788>] pl011_int+0x10/0x128
[<c0217a80>] handle_irq_event_percpu+0x98/0x1f4
[<c0217c18>] handle_irq_event+0x3c/0x5c
[<c021a0f4>] handle_fasteoi_irq+0xc8/0x100
[<c02175e4>] generic_handle_irq+0x28/0x30
[<c0197078>] asm_do_IRQ+0x78/0xb8
[<c019cc90>] __irq_svc+0x50/0xf4
[<c04b21a0>] enter_sleep+0x550/0x608
[<c04b02ac>] cpuidle_idle_call+0x1c4/0x33c
[<c019e1fc>] cpu_idle+0xa4/0x10c
[<c0008a28>] start_kernel+0x228/0x27c
[<00008040>] 0x8040
to a HARDIRQ-irq-unsafe lock:
(&(&uap->clk_off_work)->timer){+.-...}
... which became HARDIRQ-irq-unsafe at:
... [<c01fc7b8>] mark_irqflags+0xec/0x170
[<c01ff788>] __lock_acquire+0x598/0x788
[<c01fff84>] lock_acquire+0x10c/0x130
[<c01d78a4>] call_timer_fn+0x68/0x1e4
[<c01d7be8>] run_timer_softirq+0x1c8/0x224
[<c01d0244>] __do_softirq+0x110/0x23c
[<c01d05b8>] irq_exit+0x5c/0xc0
[<c0197308>] do_local_timer+0x50/0x80
[<c019cc90>] __irq_svc+0x50/0xf4
[<c064f30c>] __mutex_unlock_slowpath+0x150/0x17c
[<c02c6d08>] sysfs_addrm_finish+0x10/0x74
[<c02c5afc>] sysfs_add_file_mode+0x70/0xb0
[<c02c8368>] create_files+0x7c/0xb4
[<c02c8458>] internal_create_group+0xb8/0x118
[<c03f08a8>] device_add_groups+0x1c/0x70
[<c03f0e2c>] device_add_attrs+0x50/0xa8
[<c03f0f94>] device_add+0x110/0x2b4
[<c0601114>] hci_register_sysfs+0x54/0x114
[<c05f2fec>] hci_register_dev+0x378/0x4d8
[<c04dbe58>] register_bluetooth+0xb4/0x124
[<c04dbf44>] probe_common+0x7c/0xcc
[<c06482e0>] btcg2900_evt_probe+0x38/0x6c
[<c03f3f18>] platform_drv_probe+0x18/0x1c
[<c03f2c98>] really_probe+0x98/0x148
[<c03f2d90>] driver_probe_device+0x48/0x60
[<c03f21f0>] bus_for_each_drv+0x44/0x74
[<c03f2f10>] device_attach+0x78/0xa4
[<c03f2028>] bus_probe_device+0x24/0x40
[<c03f0ff8>] device_add+0x174/0x2b4
[<c03f4530>] platform_device_add+0x104/0x160
[<c0405d34>] mfd_add_device+0x194/0x1d4
[<c0405ef8>] mfd_add_devices+0x70/0xbc
[<c04d6eec>] work_power_off_chip+0x11c/0x1c8
[<c01e250c>] process_one_work+0x2ac/0x4c8
[<c01e29f8>] worker_thread+0x144/0x234
[<c01e8280>] kthread+0x80/0x88
[<c019dc88>] kernel_thread_exit+0x0/0x8
other info that might help us debug this:
Possible interrupt unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&(&uap->clk_off_work)->timer);
local_irq_disable();
lock(&port_lock_key);
lock(&(&uap->clk_off_work)->timer);
<Interrupt>
lock(&port_lock_key);
*** DEADLOCK ***
Change-Id: I55d565d484baaee2dc76f258a5066aacbb6e6dee
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
ST-Ericsson ID: 413918
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I1a45effb0afeb4344f03ca500a5b0767bd760ec3
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/47174
Reviewed-by: QABUILD
Reviewed-by: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
Tested-by: Rabin VINCENT <rabin.vincent@stericsson.com>
|
|
PL011 should use pm_runtime_irq_safe() since it calls the pm_runtime routines
with interrupts disabled.
Found via lockdep:
=================================
[ INFO: inconsistent lock state ]
3.0.8+ #1187
---------------------------------
inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
kworker/u:0/5 [HC0[0]:SC0[0]:HE1:SE1] takes:
(&port_lock_key){?.....}, at: [<c03ca23c>] pl011_clock_on+0xc/0xc4
{IN-HARDIRQ-W} state was registered at:
[<c01fc734>] mark_irqflags+0x68/0x170
[<c01ff788>] __lock_acquire+0x598/0x788
[<c01fff84>] lock_acquire+0x10c/0x130
[<c06513cc>] _raw_spin_lock_irqsave+0x5c/0x98
[<c03cb788>] pl011_int+0x10/0x128
[<c0217a80>] handle_irq_event_percpu+0x98/0x1f4
[<c0217c18>] handle_irq_event+0x3c/0x5c
[<c021a0f4>] handle_fasteoi_irq+0xc8/0x100
[<c02175e4>] generic_handle_irq+0x28/0x30
[<c0197078>] asm_do_IRQ+0x78/0xb8
[<c019cc90>] __irq_svc+0x50/0xf4
[<c0651e44>] _raw_spin_unlock_irq+0x28/0x54
[<c03c7394>] uart_carrier_raised+0x3c/0x44
[<c03c486c>] tty_port_carrier_raised+0x1c/0x20
[<c03c4d6c>] tty_port_block_til_ready+0x220/0x2cc
[<c03bf2b0>] tty_open+0x1f0/0x32c
[<c0273580>] chrdev_open+0x20c/0x238
[<c026e874>] __dentry_open+0x220/0x338
[<c026ea44>] nameidata_to_filp+0x50/0x5c
[<c027c670>] do_last+0x43c/0x4c4
[<c027d480>] path_openat+0xb8/0x37c
[<c027d824>] do_filp_open+0x30/0x7c
[<c026e594>] do_sys_open+0xd8/0x170
[<c019d240>] ret_fast_syscall+0x0/0x3c
irq event stamp: 60637
hardirqs last enabled at (60636): [<c0650558>] mutex_lock_nested+0x364/0x3c8
hardirqs last disabled at (60637): [<c065138c>] _raw_spin_lock_irqsave+0x1c/0x98
softirqs last enabled at (60509): [<c01d05b8>] irq_exit+0x5c/0xc0
softirqs last disabled at (60490): [<c01d05b8>] irq_exit+0x5c/0xc0
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&port_lock_key);
<Interrupt>
lock(&port_lock_key);
*** DEADLOCK ***
7 locks held by kworker/u:0/5:
#0: ((hdev->name)){.+.+.+}, at: [<c01e242c>] process_one_work+0x1cc/0x4c8
#1: ((&hdev->power_on)){+.+.+.}, at: [<c01e242c>] process_one_work+0x1cc/0x4c8
#2: (&hdev->req_lock){+.+.+.}, at: [<c05f51e8>] hci_dev_open+0x28/0x334
#3: (&main_info->man_mutex#2){+.+.+.}, at: [<c04d5f10>] cg2900_open+0xa8/0x49c
#4: (&(uart_info->sleep_state_lock)){+.+.+.}, at: [<c04dd648>] uart_set_chip_power+0x64/0x228
#5: (&tty->termios_mutex){+.+...}, at: [<c04de6cc>] cg2900_hci_uart_set_baudrate+0x34/0x8c
#6: (&port_lock_key){?.....}, at: [<c03ca23c>] pl011_clock_on+0xc/0xc4
stack backtrace:
[<c01a36ac>] (unwind_backtrace+0x0/0xec) from [<c01fc014>] (print_usage_bug+0x184/0x1c4)
[<c01fc014>] (print_usage_bug+0x184/0x1c4) from [<c01fc110>] (mark_lock_irq+0xbc/0x280)
[<c01fc110>] (mark_lock_irq+0xbc/0x280) from [<c01fc59c>] (mark_lock+0x2c8/0x3f8)
[<c01fc59c>] (mark_lock+0x2c8/0x3f8) from [<c01fc898>] (mark_held_locks+0x5c/0x80)
[<c01fc898>] (mark_held_locks+0x5c/0x80) from [<c01fcba8>] (trace_hardirqs_on_caller+0x138/0x18c)
[<c01fcba8>] (trace_hardirqs_on_caller+0x138/0x18c) from [<c0651e40>] (_raw_spin_unlock_irq+0x24/0x54)
[<c0651e40>] (_raw_spin_unlock_irq+0x24/0x54) from [<c03f8df8>] (rpm_callback+0x3c/0x5c)
[<c03f8df8>] (rpm_callback+0x3c/0x5c) from [<c03f9abc>] (rpm_resume+0x2ec/0x3c0)
[<c03f9abc>] (rpm_resume+0x2ec/0x3c0) from [<c03f9e04>] (__pm_runtime_resume+0x48/0x60)
[<c03f9e04>] (__pm_runtime_resume+0x48/0x60) from [<c03ca264>] (pl011_clock_on+0x34/0xc4)
[<c03ca264>] (pl011_clock_on+0x34/0xc4) from [<c03ca34c>] (pl011_set_termios+0x28/0x308)
[<c03ca34c>] (pl011_set_termios+0x28/0x308) from [<c03c76b8>] (uart_change_speed+0x90/0x94)
[<c03c76b8>] (uart_change_speed+0x90/0x94) from [<c03c7724>] (uart_set_termios+0x68/0x1b4)
[<c03c7724>] (uart_set_termios+0x68/0x1b4) from [<c04de710>] (cg2900_hci_uart_set_baudrate+0x78/0x8c)
[<c04de710>] (cg2900_hci_uart_set_baudrate+0x78/0x8c) from [<c04dd6e4>] (uart_set_chip_power+0x100/0x228)
[<c04dd6e4>] (uart_set_chip_power+0x100/0x228) from [<c04d6090>] (cg2900_open+0x228/0x49c)
[<c04d6090>] (cg2900_open+0x228/0x49c) from [<c04dc4b4>] (btcg2900_open+0x84/0x188)
[<c04dc4b4>] (btcg2900_open+0x84/0x188) from [<c05f5254>] (hci_dev_open+0x94/0x334)
[<c05f5254>] (hci_dev_open+0x94/0x334) from [<c05f5508>] (hci_power_on+0x14/0x6c)
[<c05f5508>] (hci_power_on+0x14/0x6c) from [<c01e250c>] (process_one_work+0x2ac/0x4c8)
[<c01e250c>] (process_one_work+0x2ac/0x4c8) from [<c01e29f8>] (worker_thread+0x144/0x234)
[<c01e29f8>] (worker_thread+0x144/0x234) from [<c01e8280>] (kthread+0x80/0x88)
[<c01e8280>] (kthread+0x80/0x88) from [<c019dc88>] (kernel_thread_exit+0x0/0x8)
Change-Id: I8b05184e348656a0d422b5b68267ee03246c6563
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
ST-Ericsson ID: 413918
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Id5a17f56dfa1b1b8c469237be5b9c236ad212137
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/47173
Reviewed-by: QABUILD
Tested-by: Rabin VINCENT <rabin.vincent@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
|
|
The first amba port does not always have an attached tty, which will
result in a crash if the work-around is activated.
This seems to be the case for example on Snowball which has no modem
hw, which seems to be the main use-case for this work-around.
|
|
amba-pl011 mechanism detects the hardware register
deadlock situation, and triggers a workaround
tasklet. Tasklet implementation should execute
workaround for the instance of the uart on which
deadlock is detected.
This patch provides the uart line number on whcich
the deadlock is detected to the tasklet.
ST-Ericsson ID: 355971
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ie8fbea42dc20cae1b604b555815935bcb5a70241
Signed-off-by: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/38415
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
|
|
ST-Ericsson Linux next: -
ST-Ericsson ID: 373766
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ie2a7719ca602abf3fbb3e4cef05adc4f7ab07035
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/37021
Reviewed-by: QABUILD
Reviewed-by: Ulf HANSSON <ulf.hansson@stericsson.com>
|
|
These will be enabled once in use.
ST-Ericsson Linux next: -
ST-Ericsson ID: 367599
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I1cfe9b00262d78a3326ca01af85268e918170735
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/35397
Reviewed-by: QABUILD
|
|
Register the console in a console_initcall() to ensure that
pl011_console_setup() gets called early and thus the
uart_console() macro usage in pl011_power_startup() returns
the correct value the first time it is called, so that the
vAPE regulator is not taken for the console port.
Note that this problem is seen only when the console port
is line 0, since even without this patch pl011_console_setup()
gets called (and thus the correct console->index is set)
after the first port is added.
ST-Ericsson ID: 368522
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I7f4ab80e8d8be014bfdbe695ea45007212c9c4ea
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34411
Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Reviewed-by: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
|
|
During pl011 probe() On u8500 platform, amba bus driver tries to access
regulator driver and fails as the regulator driver is also at arch_init level.
Moving serial driver to the next level but still as early as possible.
Change-Id: I29d23067df9465b3c25f4010dca8af253fe6d070
Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32121
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
|
|
pl011 changes from the following commits have been manually merged.
ef45647, d57a627, 588c0bb, 9b4ecf9, 913afa0,
13aa593, e7d5dcb, 5115d25, 19fcf44
ST-Ericsson ID: NA
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: NA
Change-Id: I1759c825add127867cf6edc688b860e82743ce6f
Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com>
|
|
Ref:
ARM: ux500: uart: context save/restore uses relaxed
pl011: add ifdef
pl011: don't touch registers when clock is off
ux500: pl011: Workaround for UART registers lockup
Migrated Changes from: e1f512c, 852b78d, c2195fa, ac87c0e
|
|
ST-Ericsson Linux next: 342766
ST-Ericsson ID: 340139
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by: Robert Marklund <robert.marklund@stericsson.com>
Change-Id: I47692d7a7993cbeda53dfca737d6346f043336f3
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24059
Reviewed-by: Par-Gunnar HJALMDAHL <par-gunnar.p.hjalmdahl@stericsson.com>
Reviewed-by: Dmitry TARNYAGIN <dmitry.tarnyagin@stericsson.com>
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
|
|
3.4-rc introduced a regression when setting the LEDS. We do the right thing
but then return an error code.
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43144
Reported-by: Christian Casteyde
Signed-off-by: Alan Cox <alan@linux/intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Conflicts:
arch/arm/mm/cache-l2x0.c
arch/arm/mm/mmu.c
Change-Id: If4f371a21c052fa597d107c44b128a093e4a8b91
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull a TTY fix from Greg Kroah-Hartman:
"This is a deadlock bugfix that was easy to hit, and that the vt layer
lock rework got wrong, so it reverts the logic back to the way it was
in 3.3 and earlier kernels to prevent problems."
* tag 'tty-3.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
vt: Fix deadlock on scroll-lock
|
|
Fixing the locking accidentally replaced a race in the scroll
lock handling with a deadlock. Turn it back into a race for
now.
The basic problem is that there are two paths into the tty
stop/start helpers. One via the tty layer ^S/^Q handling
where we need to take the kbd_event_lock and one via the
special keyboard handler for fn_hold where we already hold
it. Probably we need to split out into a separate LED lock
but for now just go back to the race as it's a bit close
to release.
Reported-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Following commit a79dd5a titled "tty/serial/pmac_zilog: Fix suspend & resume",
my Powerbook G4 Titanium showed the following stack dump:
[ 36.878225] irq 23: nobody cared (try booting with the "irqpoll" option)
[ 36.878251] Call Trace:
[ 36.878291] [dfff3f00] [c000984c] show_stack+0x7c/0x194 (unreliable)
[ 36.878322] [dfff3f40] [c00a6868] __report_bad_irq+0x44/0xf4
[ 36.878339] [dfff3f60] [c00a6b04] note_interrupt+0x1ec/0x2ac
[ 36.878356] [dfff3f80] [c00a48d0] handle_irq_event_percpu+0x250/0x2b8
[ 36.878372] [dfff3fd0] [c00a496c] handle_irq_event+0x34/0x54
[ 36.878389] [dfff3fe0] [c00a753c] handle_fasteoi_irq+0xb4/0x124
[ 36.878412] [dfff3ff0] [c000f5bc] call_handle_irq+0x18/0x28
[ 36.878428] [deef1f10] [c000719c] do_IRQ+0x114/0x1cc
[ 36.878446] [deef1f40] [c0015868] ret_from_except+0x0/0x1c
[ 36.878484] --- Exception: 501 at 0xf497610
[ 36.878489] LR = 0xfdc3dd0
[ 36.878497] handlers:
[ 36.878510] [<c02b7424>] pmz_interrupt
[ 36.878520] Disabling IRQ #23
From an E-mail exchange about this problem, Andreas Schwab noticed a typo
that resulted in the wrong condition being tested.
The patch also corrects 2 typos that incorrectly report why an error branch
is being taken.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
|
|
tty_unlock is used on all other exits from the function.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Conflicts:
drivers/staging/android/lowmemorykiller.c
Change-Id: Ia3ffcfc702e28c4fce0e91b363f4afd5f1c40306
|
|
This driver anticipates pch_uart_verify_port() is not called
during installation.
However, actually pch_uart_verify_port() is called during
installation.
As a result, memory access violation occurs like below.
0. initial value: use_dma=0
1. starup()
- dma channel is not allocated because use_dma=0
2. pch_uart_verify_port()
- Set use_dma=1
3. UART processing acts DMA mode because use_dma=1
- memory access violation occurs!
This patch fixes the issue.
Solution:
Whenever pch_uart_verify_port() is called and then
dma channel is not allocated, the channel should be allocated.
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Since 2.6.30-rc1 clps711x serial driver hungs system. This is a result
of call disable_irq from ISR. synchronize_irq waits for end of interrupt
and goes to infinite loop. This patch fix this problem.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty and serial fixes from Greg KH:
"Here are some tty and serial fixes for 3.4-rc2.
Most important here is the pl011 fix, which has been reported by about
100 different people, which means more people use it than I expected
:)
There are also some 8250 driver reverts due to some problems reported
by them. And other minor fixes as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'tty-3.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
pch_uart: Add Kontron COMe-mTT10 uart clock quirk
pch_uart: Fix MSI setting issue
serial/8250_pci: add a "force background timer" flag and use it for the "kt" serial port
Revert "serial/8250_pci: setup-quirk workaround for the kt serial controller"
Revert "serial/8250_pci: init-quirk msi support for kt serial controller"
tty/serial/omap: console can only be built-in
serial: samsung: fix omission initialize ulcon in reset port fn()
printk(): add KERN_CONT where needed in hpet and vt code
tty/serial: atmel_serial: fix RS485 half-duplex problem
tty: serial: altera_uart: Check for NULL platform_data in probe.
isdn/gigaset: use gig_dbg() for debugging output
omap-serial: Fix the error handling in the omap_serial probe
serial: PL011: move interrupt clearing
|
|
Add wake_peer which is called before starting UART TX. The idea here
is to provide a mechanism where we can wakeup our peer before sending
data.
Change-Id: I42e0779b635f64ca99184b45d5b028de80197491
Signed-off-by: San Mehat <san@google.com>
|
|
Add UART clock quirk for the Kontron COMe-mTT10 module.
The board has previously been called nanoETXexpress-TT, therefore this
is also checked.
As suggested by Darren Hart the comparison in this patch version is
placed after the FRI2 checks to ensure it will also work with possible
upcoming changes to the FRI2 firmware.
This patch follows the patchset submitted by Darren Hart at
commit a46f5533ecfc7bbdd646d84fdab8656031a715c6.
Signed-off-by: Michael Brunner <mibru@gmx.de>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The following patch (MSI setting) is not enough.
commit e463595fd9c752fa4bf06b47df93ef9ade3c7cf0
Author: Alexander Stein <alexander.stein@systec-electronic.com>
Date: Mon Jul 4 08:58:31 2011 +0200
pch_uart: Add MSI support
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
To enable MSI mode, PCI bus-mastering must be enabled.
This patch enables the setting.
cc: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
serial port
Workaround dropped notifications in the iir register. Register reads
coincident with new interrupt notifications sometimes result in this
device clearing the interrupt event without reporting it in the read
data.
The serial core already has a heuristic for determining when a device
has an untrustworthy iir register. In this case when we apriori know
that the iir is faulty use a flag (UPF_BUG_THRE) to bypass the test and
force usage of the background timer.
[stable: 3.3.x]
Acked-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Reported-by: Nhan H Mai <nhan.h.mai@intel.com>
Reported-by: Sudhakar Mamillapalli <sudhakar@fb.com>
Tested-by: Nhan H Mai <nhan.h.mai@intel.com>
Tested-by: Sudhakar Mamillapalli <sudhakar@fb.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This reverts commit 448ac154c957c4580531fa0c8f2045816fe2f0e7.
The semantic of UPF_IIR_ONCE is only guaranteed to workaround the race
condition in the kt serial's iir register if the only source of
interrupts is THRE (fifo-empty) events. An modem status event at the
wrong time can again cause an iir read to drop the 'empty' status
leading to a hang. So, revert this in preparation for using the
existing "I don't trust my iir register" workaround in the 8250 core
(UART_BUG_THRE).
[stable: 3.3.x]
Cc: stable <stable@vger.kernel.org>
Acked-by: Alan Cox <alan@linux.intel.com>
Cc: Sudhakar Mamillapalli <sudhakar@fb.com>
Reported-by: Nhan H Mai <nhan.h.mai@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
This reverts commit e86ff4a63c9fdd875ba8492577cd1ad2252f525c.
This tried to enforce the semantics of one interrupt per iir read of the
THRE (transmit-hold empty) status, but events from other sources
(particularly modem status) defeat this guarantee.
This change also broke 8250_pci suspend/resume support as
pciserial_resume_ports() re-runs .init() quirks, but does not run
.exit() quirks in pciserial_suspend_ports() leading to reports like:
sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:16.3/msi_irqs'
...and a subsequent crash. The mismatch of init/exit at suspend/resume
seems like a bug in its own right.
[stable: 3.3.x]
Cc: stable <stable@vger.kernel.org>
Acked-by: Alan Cox <alan@linux.intel.com>
Cc: Sudhakar Mamillapalli <sudhakar@fb.com>
Reported-by: Nhan H Mai <nhan.h.mai@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
When the omap serial driver is built as a module, we must
not allow the console driver to be selected, because consoles
can not be loadable modules.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Fix omission initialize ulcon in s3c24xx_serial_resetport(),
reset port function in drivers/tty/serial/samsung.c. It has
been happened from commit 0dfb3b41("serial: samsung: merge
all SoC specific port reset functions")
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: stable <stable@vger.kernel.org> [3.3]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
A prototype for kmsg records instead of a byte-stream buffer revealed
a couple of missing printk(KERN_CONT ...) uses. Subsequent calls produce
one record per printk() call, while all should have ended up in a single
record.
Instead of:
ACPI: (supports S0 S5)
ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
hpet0: at MMIO 0xfed00000, IRQs 2 , 8 , 0
It prints:
ACPI: (supports S0
S5
)
ACPI: PCI Interrupt Link [LNKA] (IRQs
5
*10
11
)
hpet0: at MMIO 0xfed00000, IRQs
2
, 8
, 0
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
On our custom board, we are using RS485 in half-duplex mode on an AT91SAM9G45.
SER_RS485_RX_DURING_TX is not set as we do not want to receive the data we
transmit (our transceiver will receive transmitted data).
Although the current driver attempts to disable and enable the receiver at the
appropriate points, incoming data is still loaded into the receive register
causing our code to receive the very last byte that was sent once the receiver
is enabled.
I ran this by Atmel support and they wrote: "The issue comes from the fact
that you disable the PDC/DMA Reception and not the USART Reception channel. In
your case, the[n] you will still receive data into the USART_RHR register, and
maybe you [h]ave the overrun flag set. So please disable the USART reception
channel."
The following patch should force the driver to enable/disable the receiver via
RXEN/RXDIS fields of the USART control register. It fixed the issue I was
having.
Signed-off-by: Gabe Siftar <gabe.siftar@getingeusa.com>
[nicolas.ferre@atmel.com: slightly modify commit message]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Follow altera_jtag_uart. This fixes a crash if there is a mistake in the DTS.
Signed-off-by: Yuriy Kozlov <ykozlov@ptcusa.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The patch does the following
- The pm_runtime_disable is called in the remove not in the error
case of probe.The patch calls the pm_runtime_disable in the error
case.
- Calls pm_runtime_put in the error case.
- The up is not freed in the error path. Fix the memory leak by using
devm_* so that the memory need not be freed in the driver.
- Also the iounmap is not called fix the same by calling using devm_ioremap.
- Make the name of the error tags more meaningful.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Pull SuperH fixes from Paul Mundt.
* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
sh: fix clock-sh7757 for the latest sh_mobile_sdhi driver
serial: sh-sci: use serial_port_in/out vs sci_in/out.
sh: vsyscall: Fix up .eh_frame generation.
sh: dma: Fix up device attribute mismatch from sysdev fallout.
sh: dwarf unwinder depends on SHcompact.
sh: fix up fallout from system.h disintegration.
|
|
Commit 360f748b204275229f8398cb2f9f53955db1503b
"serial: PL011: clear pending interrupts"
attempts to clear interrupts by writing to a
yet-unassigned memory address. This fixes the issue.
The breaking patch is marked for stable so should be
carried along with the other patch.
Cc: Shreshtha Kumar Sahu <shreshthakumar.sahu@stericsson.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: stable <stable@vger.kernel.org>
Cc: Nicolas Pitre <nico@fluxnic.net>
Reported-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Merge batch of fixes from Andrew Morton:
"The simple_open() cleanup was held back while I wanted for laggards to
merge things.
I still need to send a few checkpoint/restore patches. I've been
wobbly about merging them because I'm wobbly about the overall
prospects for success of the project. But after speaking with Pavel
at the LSF conference, it sounds like they're further toward
completion than I feared - apparently davem is at the "has stopped
complaining" stage regarding the net changes. So I need to go back
and re-review those patchs and their (lengthy) discussion."
* emailed from Andrew Morton <akpm@linux-foundation.org>: (16 patches)
memcg swap: use mem_cgroup_uncharge_swap fix
backlight: add driver for DA9052/53 PMIC v1
C6X: use set_current_blocked() and block_sigmask()
MAINTAINERS: add entry for sparse checker
MAINTAINERS: fix REMOTEPROC F: typo
alpha: use set_current_blocked() and block_sigmask()
simple_open: automatically convert to simple_open()
scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()
libfs: add simple_open()
hugetlbfs: remove unregister_filesystem() when initializing module
drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback
fs/xattr.c:setxattr(): improve handling of allocation failures
fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed
fs/xattr.c: suppress page allocation failure warnings from sys_listxattr()
sysrq: use SEND_SIG_FORCED instead of force_sig()
proc: fix mount -t proc -o AAA
|
|
Many users of debugfs copy the implementation of default_open() when
they want to support a custom read/write function op. This leads to a
proliferation of the default_open() implementation across the entire
tree.
Now that the common implementation has been consolidated into libfs we
can replace all the users of this function with simple_open().
This replacement was done with the following semantic patch:
<smpl>
@ open @
identifier open_f != simple_open;
identifier i, f;
@@
-int open_f(struct inode *i, struct file *f)
-{
(
-if (i->i_private)
-f->private_data = i->i_private;
|
-f->private_data = i->i_private;
)
-return 0;
-}
@ has_open depends on open @
identifier fops;
identifier open.open_f;
@@
struct file_operations fops = {
...
-.open = open_f,
+.open = simple_open,
...
};
</smpl>
[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Change send_sig_all() to use do_send_sig_info(SEND_SIG_FORCED) instead
of force_sig(SIGKILL). With the recent changes we do not need force_ to
kill the CLONE_NEWPID tasks.
And this is more correct. force_sig() can race with the exiting thread,
while do_send_sig_info(group => true) kill the whole process.
Some more notes from Oleg Nesterov:
> Just one note. This change makes no difference for sysrq_handle_kill().
> But it obviously changes the behaviour sysrq_handle_term(). I think
> this is fine, if you want to really kill the task which blocks/ignores
> SIGTERM you can use sysrq_handle_kill().
>
> Even ignoring the reasons why force_sig() is simply wrong here,
> force_sig(SIGTERM) looks strange. The task won't be killed if it has
> a handler, but SIG_IGN can't help. However if it has the handler
> but blocks SIGTERM temporary (this is very common) it will be killed.
Also,
> force_sig() can't kill the process if the main thread has already
> exited. IOW, it is trivial to create the process which can't be
> killed by sysrq.
So, this patch fixes the issue.
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
The keyboard on my SUN SPARCstation 5 no longer worked.
The culprint was: d4e33fac2408d37f7b52e80ca2a89f9fb482914f
("serial: Kill off NO_IRQ")
Fix up logic for no irq / irq so the keyboard works again.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Usage of /etc/modprobe.conf file was deprecated by module-init-tools and
is no longer parsed by new kmod tool. References to this file are
replaced in Documentation, comments and Kconfig according to the
context.
There are also some references to the old /etc/modules.conf from 2.4
kernels that are being removed.
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Follows the 8250 change for pretty much the same rationale.
See commit "serial: use serial_port_in/out vs serial_in/out in 8250".
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
|
|
Pull SuperH updates from Paul Mundt.
* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (25 commits)
sh: Support I/O space swapping where needed.
sh: use set_current_blocked() and block_sigmask()
sh: no need to reset handler if SA_ONESHOT
sh: intc: Fix up section mismatch for intc_ack_data
sh: select ARCH_DISCARD_MEMBLOCK.
sh: Consolidate duplicate _32/_64 unistd definitions.
sh: ecovec: switch SDHI controllers to card polling
sh: Avoid exporting unimplemented syscalls.
sh: add platform_device for RSPI in setup-sh7757
SH: pci-sh7780: enable big-endian operation.
serial: sh-sci: fix a race of DMA submit_tx on transfer
sh: dma: Collect up CHCR of SH7763, SH7764, SH7780 and SH7785
sh: dma: Collect up CHCR of SH7723 and SH7730
sh/next: Fix build fail by asm/system.h in asm/bitops.h
arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are compatible
sh: cpufreq: Wire up scaling_available_freqs support.
sh: cpufreq: notify about rate rounding fallback.
sh: cpufreq: Support CPU clock frequency table.
sh: cpufreq: struct device lookup from CPU topology.
sh: cpufreq: percpu struct clk accounting.
...
|
|
Pull slave-dmaengine update from Vinod Koul:
"This includes the cookie cleanup by Russell, the addition of context
parameter for dmaengine APIs, more arm dmaengine driver cleanup by
moving code to dmaengine, this time for imx by Javier and pl330 by
Boojin along with the usual driver fixes."
Fix up some fairly trivial conflicts with various other cleanups.
* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (67 commits)
dmaengine: imx: fix the build failure on x86_64
dmaengine: i.MX: Fix merge of cookie branch.
dmaengine: i.MX: Add support for interleaved transfers.
dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages.
dmaengine: imx-dma: remove 'imx_dmav1_baseaddr' and 'dma_clk'.
dmaengine: imx-dma: remove unused arg of imxdma_sg_next.
dmaengine: imx-dma: remove internal structure.
dmaengine: imx-dma: remove 'resbytes' field of 'internal' structure.
dmaengine: imx-dma: remove 'in_use' field of 'internal' structure.
dmaengine: imx-dma: remove sg member from internal structure.
dmaengine: imx-dma: remove 'imxdma_setup_sg_hw' function.
dmaengine: imx-dma: remove 'imxdma_config_channel_hw' function.
dmaengine: imx-dma: remove 'imxdma_setup_mem2mem_hw' function.
dmaengine: imx-dma: remove dma_mode member of internal structure.
dmaengine: imx-dma: remove data member from internal structure.
dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c
dmaengine: at_hdmac: add slave config operation
dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic
dmaengine/dma_slave: introduce inline wrappers
dma: imx-sdma: Treat firmware messages as warnings instead of erros
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system
Pull "Disintegrate and delete asm/system.h" from David Howells:
"Here are a bunch of patches to disintegrate asm/system.h into a set of
separate bits to relieve the problem of circular inclusion
dependencies.
I've built all the working defconfigs from all the arches that I can
and made sure that they don't break.
The reason for these patches is that I recently encountered a circular
dependency problem that came about when I produced some patches to
optimise get_order() by rewriting it to use ilog2().
This uses bitops - and on the SH arch asm/bitops.h drags in
asm-generic/get_order.h by a circuituous route involving asm/system.h.
The main difficulty seems to be asm/system.h. It holds a number of
low level bits with no/few dependencies that are commonly used (eg.
memory barriers) and a number of bits with more dependencies that
aren't used in many places (eg. switch_to()).
These patches break asm/system.h up into the following core pieces:
(1) asm/barrier.h
Move memory barriers here. This already done for MIPS and Alpha.
(2) asm/switch_to.h
Move switch_to() and related stuff here.
(3) asm/exec.h
Move arch_align_stack() here. Other process execution related bits
could perhaps go here from asm/processor.h.
(4) asm/cmpxchg.h
Move xchg() and cmpxchg() here as they're full word atomic ops and
frequently used by atomic_xchg() and atomic_cmpxchg().
(5) asm/bug.h
Move die() and related bits.
(6) asm/auxvec.h
Move AT_VECTOR_SIZE_ARCH here.
Other arch headers are created as needed on a per-arch basis."
Fixed up some conflicts from other header file cleanups and moving code
around that has happened in the meantime, so David's testing is somewhat
weakened by that. We'll find out anything that got broken and fix it..
* tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits)
Delete all instances of asm/system.h
Remove all #inclusions of asm/system.h
Add #includes needed to permit the removal of asm/system.h
Move all declarations of free_initmem() to linux/mm.h
Disintegrate asm/system.h for OpenRISC
Split arch_align_stack() out from asm-generic/system.h
Split the switch_to() wrapper out of asm-generic/system.h
Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h
Create asm-generic/barrier.h
Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h
Disintegrate asm/system.h for Xtensa
Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]
Disintegrate asm/system.h for Tile
Disintegrate asm/system.h for Sparc
Disintegrate asm/system.h for SH
Disintegrate asm/system.h for Score
Disintegrate asm/system.h for S390
Disintegrate asm/system.h for PowerPC
Disintegrate asm/system.h for PA-RISC
Disintegrate asm/system.h for MN10300
...
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull a few more things for powerpc by Benjamin Herrenschmidt:
- Anton's did some recent improvements to EPOW event reporting on
pSeries (power supply failures and such). The patches are self
contained enough and replace really nasty code so I felt it should
still go in
- I did the vio driver registration change Greg requested, I don't see
the point of leaving that til the next merge window
- The remaining EEH changes I said were still pending to get rid of the
EEH references from the generic struct device_node
- A few more iSeries removal bits
- A perf bug fix on 970
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
powerpc/perf: Fix instruction address sampling on 970 and Power4
powerpc+sparc/vio: Modernize driver registration
powerpc: Random little legacy iSeries removal tidy ups
powerpc: Remove NO_IRQ_IGNORE
powerpc/pseries: Cut down on enthusiastic use of defines in RAS code
powerpc/pseries: Clean up ras_error_interrupt code
powerpc/pseries: Remove RTAS_POWERMGM_EVENTS
powerpc/pseries: Use rtas_get_sensor in RAS code
powerpc/pseries: Parse and handle EPOW interrupts
powerpc: Make function that parses RTAS error logs global
powerpc/eeh: Retrieve PHB from global list
powerpc/eeh: Remove eeh information from pci_dn
powerpc/eeh: Remove eeh device from OF node
|
|
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it. Performed with the following command:
perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`
Signed-off-by: David Howells <dhowells@redhat.com>
|
|
Disintegrate asm/system.h for Sparc.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: sparclinux@vger.kernel.org
|
|
Disintegrate asm/system.h for CRIS.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
cc: linux-cris-kernel@axis.com
|