alistair23-linux/drivers
Siftar, Gabe 57c3686842 tty/serial: atmel_serial: fix RS485 half-duplex problem
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>
2012-04-09 10:30:39 -07:00
..
accessibility
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
amba
ata
atm Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
auxdisplay
base Merge branch 'for-linus-3.4' of git://git.linaro.org/people/sumitsemwal/linux-dma-buf 2012-03-28 15:02:41 -07:00
bcma
block Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-28 17:19:28 -07:00
bluetooth Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
cdrom
char Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
clk
clocksource Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-03-29 16:53:48 -07:00
connector
cpufreq Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
cpuidle Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
crypto
dca
devfreq ARM: global cleanups 2012-03-27 16:03:32 -07:00
dio
dma MTD merge for 3.4 2012-03-30 17:31:56 -07:00
edac Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac 2012-03-28 14:24:40 -07:00
eisa
firewire Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
firmware
gpio Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-03-29 16:53:48 -07:00
gpu drm/i915: suspend fbdev device around suspend/hibernate 2012-03-29 07:44:27 +01:00
hid
hv
hwmon MFD changes for 3.4 2012-03-28 13:56:35 -07:00
hwspinlock
i2c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
ide Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
idle
ieee802154
infiniband Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2012-03-29 23:17:44 -07:00
iommu
isdn isdn/gigaset: use gig_dbg() for debugging output 2012-04-09 10:30:38 -07:00
leds MFD changes for 3.4 2012-03-28 13:56:35 -07:00
lguest
macintosh Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
mca
md dm: add verity target 2012-03-28 18:43:38 +01:00
media ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
memstick
message Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
mfd Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
misc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
mmc MTD merge for 3.4 2012-03-30 17:31:56 -07:00
mtd Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-03-31 13:42:57 -07:00
net MTD merge for 3.4 2012-03-30 17:31:56 -07:00
nfc
nubus Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
of GPIO changes for v3.4 2012-03-28 14:08:46 -07:00
oprofile
parisc Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
parport
pci ASPM: Fix pcie devices with non-pcie children 2012-03-31 12:49:56 -07:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia 2012-03-29 16:00:48 -07:00
pinctrl
platform Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
pnp Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-03-30 16:45:39 -07:00
power Various small bugfixes and enhancements, plus two new drivers: 2012-03-30 16:09:02 -07:00
pps
ps3
ptp
rapidio
regulator ARM: driver specific updates 2012-03-27 16:41:24 -07:00
remoteproc
rpmsg
rtc ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
s390 Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
sbus Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
scsi SCSI updates on 20120331 2012-03-31 13:31:23 -07:00
sfi
sh SuperH updates for 3.4 merge window 2012-03-30 00:09:17 -07:00
sn
spi Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-03-29 15:34:57 -07:00
ssb
staging Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
target
tc
thermal
tty tty/serial: atmel_serial: fix RS485 half-duplex problem 2012-04-09 10:30:39 -07:00
uio
usb Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
uwb
vhost
video ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
virt
virtio virtio-pci: switch to PM ops macro to initialise PM functions 2012-03-31 08:09:51 +05:30
vlynq
w1
watchdog ARM: cleanups of io includes 2012-03-29 18:02:10 -07:00
xen
zorro
Kconfig remoteproc/rpmsg: new subsystem 2012-03-27 16:30:09 -07:00
Makefile remoteproc/rpmsg: new subsystem 2012-03-27 16:30:09 -07:00