AnsweredAssumed Answered

i.MX28 AUART driver on 3.14 kernel doesn't work well with hardware flow control

Question asked by Craig McQueen on Oct 29, 2014
Latest reply on Nov 20, 2014 by lategoodbye

I'm testing a 3.14.17 kernel. I've found that the AUART driver seems to work okay with no flow control, but with hardware flow control turned on, it causes repeated and/or missing characters on RX. E.g. when connected to a modem from picocom:

 

picocom v1.7

port is        : /dev/ttyAPP0
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,

Terminal ready
at
OK
at
OK

*** flow: RTS/CTS ***

OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

OK
OK
OK
OK
OK
OK
OK
OK
OK
OK

 

I had pressed Ctrl-A, Ctrl-F in picocom to turn on hardware flow control. Then I typed at[LF] again, and got forever-scrolling OK, with a sample shown above.

 

Then I tried quitting and restarting picocom, and got a kernel crash:

 

picocom v1.7

port is        : /dev/ttyAPP0
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
escape is      : C-a
local echo is  : no
noinit is      : no
[  575.000155] Unable to handle kernel paging request at virtual address c9065e00
[  575.009220] pgd = c6e6c000
[  575.011966] [c9065e00] *pgd=00000000
[  575.015611] Internal error: Oops: 5 [#1] ARM
[  575.019916] Modules linked in: mxs_auart usb_f_rndis u_ether libcomposite configfs
[  575.027667] CPU: 0 PID: 509 Comm: picocom Not tainted 3.14.17-01382-gc14be63-dirty #1
[  575.035539] task: c6ed0000 ti: c78b2000 task.ti: c78b2000
[  575.041001] PC is at kmem_cache_free+0xa0/0x1d4
[  575.045572] LR is at final_putname+0x34/0x50
[  575.049883] pc : [<c00dee04>]    lr : [<c00ef0f0>]    psr: a0000013
[  575.049883] sp : c78b3f10  ip : c78b3f38  fp : c78b3f34
[  575.061397] r10: 00000000  r9 : c6e78c40  r8 : c00ef0f0
[  575.066653] r7 : c6ec8368  r6 : c6d83000  r5 : 4b4f0a0d  r4 : c7801a80
[  575.073210] r3 : c7efc000  r2 : 0008b4f0  r1 : 00000000  r0 : c7801a80
[  575.079770] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  575.086938] Control: 0005317f  Table: 46e6c000  DAC: 00000015
[  575.092713] Process picocom (pid: 509, stack limit = 0xc78b21c0)
[  575.098750] Stack: (0xc78b3f10 to 0xc78b4000)
[  575.103152] 3f00:                                     c06eb43c c6d83000 00000003 c6d83000
[  575.111386] 3f20: c6ec8368 00000020 c78b3f4c c78b3f38 c00ef0f0 c00ded74 c6ee604c c6ec8360
[  575.119616] 3f40: c78b3f94 c78b3f50 c00e42a8 c00ef0cc 00000000 00000000 c78b3f84 00000902
[  575.127843] 3f60: c0040000 00000026 00000100 00000001 00000000 00000000 00008e58 00000005
[  575.136074] 3f80: c0009764 c78b2000 c78b3fa4 c78b3f98 c00e4300 c00e4110 00000000 c78b3fa8
[  575.144301] 3fa0: c0009500 c00e42dc 00000000 00000000 00017240 00000902 00000005 00000000
[  575.152527] 3fc0: 00000000 00000000 00008e58 00000005 00000000 00000000 b6f84fac bea7fd24
[  575.160758] 3fe0: 00000000 bea7fcf4 0000bb60 b6ee45bc 60000010 00017240 280aa820 aaa280aa
[  575.169014] [<c00dee04>] (kmem_cache_free) from [<c00ef0f0>] (final_putname+0x34/0x50)
[  575.176997] [<c00ef0f0>] (final_putname) from [<c00e42a8>] (do_sys_open+0x1a8/0x1cc)
[  575.184798] [<c00e42a8>] (do_sys_open) from [<c00e4300>] (SyS_open+0x34/0x38)
[  575.191995] [<c00e4300>] (SyS_open) from [<c0009500>] (ret_fast_syscall+0x0/0x44)
[  575.199537] Code: e1833a01 e0632622 e59f312c e5933000 (e7931282) 
[  575.205686] ---[ end trace f1b66cb68fba87e0 ]---
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,

Segmentation fault
# 

# 

 

I first tried this on our own hardware. I then tried it on the i.MX28 EVK, also running a 3.14.17 kernel and connected to an EVK for the modem, and got the same sort of result.

 

Can anyone reproduce this behaviour, and recommend a solution?

Outcomes