Re: sc16is7xx: sometimes invalid chars read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2016-02-29 17:48, Greg KH wrote:
On Mon, Feb 29, 2016 at 01:47:36PM +0100, Sean Nyekjær wrote:
Hi

I'm still having some problems with this driver :-(

I'm using the sc16is750 on an imx6d platform i have tested it with a vanilla
kernel and RT patches applied.

I have our hardware hooked up to a PC using an ttl ftdi chip, both the
sc16is750 and the ftdi is setup:
$ stty -F /dev/tty[dev] 115200 raw -echo

 From the PC I cat a large file:
$ cat /var/log/pacman.log > /dev/ttyUSB3

And on the imx I open and closes cat:
$ cat /dev/ttySC0
[2014-09-17 08:08] [ALPM-SCRIPTLET] gpg: next trustdb check due at
2015-03-31
[2014-09-17 08:08] [PACMAN] upgraded archlinux-keyring (20140220-1 ->
20140908-1)
[2014-09-17 08:08] [PACMAN] upgraded linux-api-headers (3.14.1-1 ->
3.16.2-1)
[2014-09-17 08:08] [ALPM] warning: /etc/locale.gen installed as
/etc/locale.gen.pacnew
[2014-09-17 08:08] [ALPM-SCRIPTLET] Generating locales...
[2014-09-17 08:08] [ALPM-SCRIPTLET]   en_DK.UTF-8... done
...

Waiting for data to flow and closes og repeates again, most of the time data
is flowing perfectly but sometimes the whole datastream is containing
invalid chars:

$ cat /dev/ttySC0
'cat' is never a good thing to use for serial ports, try using something
like minicom or another program that knows it is talking to a serial
device.

thanks,

greg k-h

Ops

If I open the serialport with minicom it's not pretty :-)

$ minicom -D /dev/ttySC0 -b 115200
BUG: scheduling while atomic: minicom/287/0x00000002
3 locks held by minicom/287:
 #0:  (&port->mutex){......}, at: [<80282bf8>] uart_tiocmget+0x20/0x6c
 #1:  (&port_lock_key){......}, at: [<80282c10>] uart_tiocmget+0x38/0x6c
 #2:  (&map->mutex){......}, at: [<802a759c>] regmap_read+0x30/0x60
Modules linked in: sc16is7xx regmap_spi usb_f_acm u_serial usb_f_rndis g_multi u_ether usb_f_mass_storage libcomposite
Preemption disabled at:[<  (null)>]   (null)

CPU: 0 PID: 287 Comm: minicom Not tainted 4.1.15-00136-g27ad049-dirty #7
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[<80016850>] (unwind_backtrace) from [<800128a8>] (show_stack+0x10/0x14)
[<800128a8>] (show_stack) from [<804ab1f4>] (dump_stack+0x80/0xc0)
[<804ab1f4>] (dump_stack) from [<804a8bec>] (__schedule_bug+0xb0/0xc4)
[<804a8bec>] (__schedule_bug) from [<804ad1d8>] (__schedule+0x4bc/0x534)
[<804ad1d8>] (__schedule) from [<804ad290>] (schedule+0x40/0x98)
[<804ad290>] (schedule) from [<804ad5f0>] (schedule_preempt_disabled+0x14/0x20) [<804ad5f0>] (schedule_preempt_disabled) from [<804af30c>] (mutex_lock_nested+0x1b4/0x444)
[<804af30c>] (mutex_lock_nested) from [<802a759c>] (regmap_read+0x30/0x60)
[<802a759c>] (regmap_read) from [<7f04a494>] (sc16is7xx_port_read+0x2c/0x38 [sc16is7xx]) [<7f04a494>] (sc16is7xx_port_read [sc16is7xx]) from [<7f04a4ac>] (sc16is7xx_get_mctrl+0xc/0x4c [sc16is7xx]) [<7f04a4ac>] (sc16is7xx_get_mctrl [sc16is7xx]) from [<80282c20>] (uart_tiocmget+0x48/0x6c)
[<80282c20>] (uart_tiocmget) from [<8026ade8>] (tty_ioctl+0x46c/0xc84)
[<8026ade8>] (tty_ioctl) from [<800f7740>] (do_vfs_ioctl+0x428/0x67c)
[<800f7740>] (do_vfs_ioctl) from [<800f79c8>] (SyS_ioctl+0x34/0x5c)
[<800f79c8>] (SyS_ioctl) from [<8000f440>] (ret_fast_syscall+0x0/0x3c)

BUG: scheduling while atomic: minicom/287/0x00000002
4 locks held by minicom/287:
 #0:  (&port->mutex){......}, at: [<80282bf8>] uart_tiocmget+0x20/0x6c
 #1:  (&port_lock_key){......}, at: [<80282c10>] uart_tiocmget+0x38/0x6c
 #2:  (&map->mutex){......}, at: [<802a759c>] regmap_read+0x30/0x60
 #3:  (lock#2){......}, at: [<802d4b44>] spi_write_then_read+0x124/0x184
Modules linked in: sc16is7xx regmap_spi usb_f_acm u_serial usb_f_rndis g_multi u_ether usb_f_mass_storage libcomposite
Preemption disabled at:[<  (null)>]   (null)

CPU: 0 PID: 287 Comm: minicom Tainted: G W 4.1.15-00136-g27ad049-dirty #7
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[<80016850>] (unwind_backtrace) from [<800128a8>] (show_stack+0x10/0x14)
[<800128a8>] (show_stack) from [<804ab1f4>] (dump_stack+0x80/0xc0)
[<804ab1f4>] (dump_stack) from [<804a8bec>] (__schedule_bug+0xb0/0xc4)
[<804a8bec>] (__schedule_bug) from [<804ad1d8>] (__schedule+0x4bc/0x534)
[<804ad1d8>] (__schedule) from [<804ad290>] (schedule+0x40/0x98)
[<804ad290>] (schedule) from [<804b1538>] (schedule_timeout+0x154/0x194)
[<804b1538>] (schedule_timeout) from [<804adccc>] (wait_for_common+0xb4/0x144) [<804adccc>] (wait_for_common) from [<802d6b38>] (spi_imx_transfer+0x26c/0x368) [<802d6b38>] (spi_imx_transfer) from [<802d5aa0>] (spi_bitbang_transfer_one+0xa4/0x22c) [<802d5aa0>] (spi_bitbang_transfer_one) from [<802d474c>] (__spi_pump_messages+0x380/0x4cc) [<802d474c>] (__spi_pump_messages) from [<802d4a08>] (__spi_sync+0x164/0x16c)
[<802d4a08>] (__spi_sync) from [<802d4aec>] (spi_write_then_read+0xcc/0x184)
[<802d4aec>] (spi_write_then_read) from [<802a7a84>] (_regmap_raw_read+0x98/0xf4) [<802a7a84>] (_regmap_raw_read) from [<802a7b04>] (_regmap_bus_read+0x24/0x5c)
[<802a7b04>] (_regmap_bus_read) from [<802a74f4>] (_regmap_read+0x6c/0xe4)
[<802a74f4>] (_regmap_read) from [<802a75ac>] (regmap_read+0x40/0x60)
[<802a75ac>] (regmap_read) from [<7f04a494>] (sc16is7xx_port_read+0x2c/0x38 [sc16is7xx]) [<7f04a494>] (sc16is7xx_port_read [sc16is7xx]) from [<7f04a4ac>] (sc16is7xx_get_mctrl+0xc/0x4c [sc16is7xx]) [<7f04a4ac>] (sc16is7xx_get_mctrl [sc16is7xx]) from [<80282c20>] (uart_tiocmget+0x48/0x6c)
[<80282c20>] (uart_tiocmget) from [<8026ade8>] (tty_ioctl+0x46c/0xc84)
[<8026ade8>] (tty_ioctl) from [<800f7740>] (do_vfs_ioctl+0x428/0x67c)
[<800f7740>] (do_vfs_ioctl) from [<800f79c8>] (SyS_ioctl+0x34/0x5c)
[<800f79c8>] (SyS_ioctl) from [<8000f440>] (ret_fast_syscall+0x0/0x3c)

/Sean
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux