linux-kernel-test/drivers
Stefan Agner 5f1437f61a serial: fsl_lpuart: avoid new transfer while DMA is running
When the UART is in DMA receive mode (RDMAS set) and one character
just arrived while another interrupt is handled (e.g. TX), the RDRF
(receiver data register full flag) is set due to the water level of
1. But since the DMA will take care of this character, there is no
need to handle it by calling lpuart_prepare_rx. Handling it leads to
adding the RX timeout timer twice:

[   74.336698] Kernel BUG at 80053070 [verbose debug info unavailable]
[   74.342999] Internal error: Oops - BUG: 0 [#1] ARM0:00.00 khungtaskd
[   74.347817] Modules linked in:    0 S  0.0  0.0   0:00.00 writeback
[   74.350926] CPU: 0 PID: 0 Comm: swapper Not tainted 3.19.0-rc3-00001-g39d78e2 #1788
[   74.358617] Hardware name: Freescale Vybrid VF610 (Device Tree)t
[   74.364563] task: 807a7678 ti: 8079c000 task.ti: 8079c000 kblockd
[   74.370002] PC is at add_timer+0x24/0x28.0  0.0   0:00.09 kworker/u2:1
[   74.373960] LR is at lpuart_int+0x15c/0x3d8
[   74.378171] pc : [<80053070>]    lr : [<802e0d88>]    psr: a0010193
[   74.378171] sp : 8079de10  ip : 8079de20  fp : 8079de1c
[   74.389694] r10: 807d44c0  r9 : 8688c300  r8 : 00000013
[   74.394943] r7 : 20010193  r6 : 00000000  r5 : 000000a0  r4 : 86997210
[   74.401498] r3 : ffffa7da  r2 : 80817868  r1 : 86997210  r0 : 86997344
[   74.408052] Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[   74.415489] Control: 10c5387d  Table: 8611c059  DAC: 00000015
[   74.421265] Process swapper (pid: 0, stack limit = 0x8079c230)
...

Solve this by only execute the receiver path (lpuart_prepare_rx) if
the DMA receive mode (RDMAS) is not set. Also, make sure the flag is
cleared on initialization, in case it has been left set.

This can be best reproduced using UART as a serial console, then
running top while dd'ing data into the terminal.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Cc: stable <stable@vger.kernel.org> # 3.14
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-02 10:09:55 -08:00
..
accessibility
acpi Merge branch 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2015-01-14 07:53:51 +13:00
amba Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
android
ata More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
atm Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
auxdisplay
base Merge branches 'pm-domains', 'powercap' and 'pm-tools' 2014-12-29 21:24:00 +01:00
bcma Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
block NVMe: Fix locking on abort handling 2015-01-08 09:02:23 -07:00
bluetooth Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next 2014-12-15 13:23:09 -05:00
bus drivers: bus: check cci device tree node status 2015-01-16 19:10:41 -08:00
cdrom
char ipmi: Fix compile warning with tv_usec 2014-12-30 13:34:36 -06:00
clk clk: fix possible null pointer dereference 2015-01-17 11:33:57 -08:00
clocksource Fixes for 3.19 2014-12-30 15:27:20 +01:00
connector
coresight
cpufreq Merge branches 'pm-cpufreq' and 'pm-cpuidle' 2014-12-29 21:23:41 +01:00
cpuidle Merge branches 'pm-cpufreq' and 'pm-cpuidle' 2014-12-29 21:23:41 +01:00
crypto Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
dca
devfreq
dio
dma dmaengine: dw: balance PM runtime calls 2015-01-13 23:07:58 +05:30
dma-buf
edac Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
eisa
extcon Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
firewire firewire: sbp2: replace card lock by target lock 2014-12-10 20:53:21 +01:00
firmware Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
fmc
gpio gpio: dln2: use bus_sync_unlock instead of scheduling work 2015-01-09 07:57:35 +01:00
gpu Merge tag 'amdkfd-fixes-2015-01-06' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes 2015-01-08 10:36:37 +10:00
hid HID: roccat: potential out of bounds in pyra_sysfs_write_settings() 2015-01-09 14:41:01 +01:00
hsi * misc. fixes in omap-ssi and nokia-modem drivers 2014-12-15 17:33:47 -08:00
hv Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
hwmon Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-12-17 10:16:27 -08:00
hwspinlock
i2c Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2014-12-20 13:52:52 -08:00
ide Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
idle
iio First round of IIO fixes for the 3.19 cycle. 2015-01-08 17:59:04 -08:00
infiniband SCSI for-linus on 20141220 2014-12-20 13:42:57 -08:00
input Revert "Input: atmel_mxt_ts - use deep sleep mode when stopped" 2014-12-31 12:59:34 -08:00
iommu iommu/rockchip: Drop owner assignment from platform_drivers 2015-01-05 12:40:06 +01:00
ipack
irqchip Merge branch 'irq-irqdomain-arm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-15 17:30:09 -08:00
isdn isdn: fix NUL (\0 or \x00) specification in string 2015-01-12 15:31:35 -05:00
leds leds: netxbig: fix oops at probe time 2015-01-13 13:49:01 -08:00
lguest virtio: allow finalize_features to fail 2014-12-09 16:32:32 +02:00
macintosh macintosh: therm_pm72: delete deprecated driver 2014-12-19 19:32:47 +01:00
mailbox Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
mcb mcb: mcb-pci: Only remap the 1st 0x200 bytes of BAR 0 2015-01-09 15:46:37 -08:00
md dm: fix missed error code if .end_io isn't implemented by target_type 2014-12-17 12:31:13 -05:00
media More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
memory MTD updates for 3.19: 2014-12-17 09:59:26 -08:00
memstick
message
mfd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-12-30 16:59:59 -08:00
misc Char/Misc driver fixes for 3.19-rc5 2015-01-17 08:18:08 +13:00
mmc mmc: sdhci: Set SDHCI_POWER_ON with external vmmc 2015-01-14 09:47:19 +01:00
mtd MTD updates for 3.19: 2014-12-17 09:59:26 -08:00
net tg3: Release tp->lock before invoking synchronize_irq() 2015-01-14 17:05:51 -05:00
nfc More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
ntb
nubus
of ARM: SoC/iommu configuration for 3.19 2014-12-16 14:53:01 -08:00
oprofile
parisc
parport Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
pci Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-12-19 14:02:02 -08:00
pcmcia Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
phy phy: phy-ti-pipe3: fix inconsistent enumeration of PCIe gen2 cards 2014-12-23 15:44:32 +05:30
pinctrl pinctrl: st: Add irq_disable hook to st_gpio_irqchip 2015-01-07 10:44:39 +01:00
platform platform-drivers-x86 for 3.19 2014-12-18 20:24:55 -08:00
pnp
power More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
powercap powercap / RAPL: add IDs for future Xeon CPUs 2014-12-17 02:35:42 +01:00
pps
ps3
ptp
pwm pwm: Changes for v3.19-rc1 2014-12-17 10:10:51 -08:00
rapidio
ras
regulator regulator: Fix for v3.19 2014-12-29 13:24:38 -08:00
remoteproc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
reset reset: sunxi: fix spinlock initialization 2015-01-16 19:11:31 -08:00
rpmsg
rtc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
s390 s390/zcrypt: kernel oops at insmod of the z90crypt device driver 2014-12-18 09:55:55 +01:00
sbus
scsi scsi: ->queue_rq can't sleep 2015-01-09 15:43:01 +01:00
sfi
sh drivers: sh / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM 2014-12-05 03:08:24 +01:00
sn
soc Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-12-15 15:52:01 -08:00
spi Merge remote-tracking branches 'spi/fix/img-spfi' and 'spi/fix/msiof' into spi-linus 2014-12-24 12:57:54 +00:00
spmi
ssb Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-12-11 17:56:37 -08:00
staging staging: vt6655: fix sparse warning: argument type 2015-01-12 19:49:47 -08:00
target iscsi-target: Fix typos in enum cmd_flags_table 2015-01-09 15:25:58 -08:00
tc
thermal Merge branch 'thermal-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2015-01-15 19:20:26 +13:00
thunderbolt
tty serial: fsl_lpuart: avoid new transfer while DMA is running 2015-02-02 10:09:55 -08:00
uio Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
usb usb: fixes for v3.19-rc6 2015-01-14 16:27:23 -08:00
uwb
vfio vfio-pci: Fix the check on pci device type in vfio_pci_probe() 2015-01-07 10:29:11 -07:00
vhost Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-01-13 15:23:26 +13:00
video fbdev/broadsheetfb: fix memory leak 2015-01-13 15:13:45 +02:00
virt
virtio virtio_pci: document why we defer kfree 2015-01-06 16:35:36 +02:00
vlynq
vme
w1 Char/Misc driver patches for 3.19-rc1 2014-12-14 16:43:47 -08:00
watchdog watchdog: imx2_wdt: Fix the argument of watchdog_active() 2014-12-18 16:01:20 +01:00
xen Merge remote-tracking branch 'scsi-queue/drivers-for-3.19' into for-linus 2014-12-18 05:56:29 -08:00
zorro
Kconfig Staging patches for 3.19-rc1 2014-12-15 18:06:13 -08:00
Makefile drivers: Move iommu/ before gpu/ in Makefile 2014-12-22 11:47:37 +02:00