1. 25 4月, 2019 7 次提交
    • S
      tty: serial_core: fix error code returned by uart_register_driver() · 050dfc09
      Sergey Organov 提交于
      uart_register_driver() returned -ENOMEM on any error, even when
      tty_register_driver() call returned another one, such as -EBUSY.
      Signed-off-by: NSergey Organov <sorganov@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      050dfc09
    • L
      serial: 8250-mtk: modify baudrate setting · bdbd0a7f
      Long Cheng 提交于
      In termios function, add Fractional divider to adjust baudrate.
      Signed-off-by: NLong Cheng <long.cheng@mediatek.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bdbd0a7f
    • L
      serial: 8250-mtk: add follow control · 8ceeb470
      Long Cheng 提交于
      Add SW and HW follow control function.
      Signed-off-by: NLong Cheng <long.cheng@mediatek.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8ceeb470
    • M
      docs: serial: convert docs to ReST and rename to *.rst · f1374017
      Mauro Carvalho Chehab 提交于
      The converted files are focused at the Kernel internal API,
      so, this is a good candidate for the kernel API set of books.
      
      The conversion is actually:
        - add blank lines and identation in order to identify paragraphs;
        - fix tables markups;
        - add some lists markups;
        - mark literal blocks;
        - adjust title markups.
      
      At its new index.rst, let's add a :orphan: while this is not linked to
      the main index.rst file, in order to avoid build warnings.
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f1374017
    • S
      serial: 8250_exar: Adjust IOT2000 matching · 3e51ceea
      Su Bao Cheng 提交于
      Since there are more IOT2040 variants with identical hardware but
      different asset tags, the asset tag matching should be adjusted to
      support them.
      
      As only the IOT2040 variants have the Exar chip on board, matching on
      their board name is enough. In the future there will be no other devices
      with the "SIMATIC IOT2000" DMI board name but different hardware.
      Signed-off-by: NSu Bao Cheng <baocheng.su@siemens.com>
      Reviewed-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3e51ceea
    • J
      TTY: serial_core, add ->install · 4cdd17ba
      Jiri Slaby 提交于
      We need to compute the uart state only on the first open. This is
      usually what is done in the ->install hook. serial_core used to do this
      in ->open on every open. So move it to ->install.
      
      As a side effect, it ensures the state is set properly in the window
      after tty_init_dev is called, but before uart_open. This fixes a bunch
      of races between tty_open and flush_to_ldisc we were dealing with
      recently.
      
      One of such bugs was attempted to fix in commit fedb5760 (serial:
      fix race between flush_to_ldisc and tty_open), but it only took care of
      a couple of functions (uart_start and uart_unthrottle).  I was able to
      reproduce the crash on a SLE system, but in uart_write_room which is
      also called from flush_to_ldisc via process_echoes. I was *unable* to
      reproduce the bug locally. It is due to having this patch in my queue
      since 2012!
      
       general protection fault: 0000 [#1] SMP KASAN PTI
       CPU: 1 PID: 5 Comm: kworker/u4:0 Tainted: G             L 4.12.14-396-default #1 SLE15-SP1 (unreleased)
       Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c89-prebuilt.qemu.org 04/01/2014
       Workqueue: events_unbound flush_to_ldisc
       task: ffff8800427d8040 task.stack: ffff8800427f0000
       RIP: 0010:uart_write_room+0xc4/0x590
       RSP: 0018:ffff8800427f7088 EFLAGS: 00010202
       RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000
       RDX: 000000000000002f RSI: 00000000000000ee RDI: ffff88003888bd90
       RBP: ffffffffb9545850 R08: 0000000000000001 R09: 0000000000000400
       R10: ffff8800427d825c R11: 000000000000006e R12: 1ffff100084fee12
       R13: ffffc900004c5000 R14: ffff88003888bb28 R15: 0000000000000178
       FS:  0000000000000000(0000) GS:ffff880043300000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 0000561da0794148 CR3: 000000000ebf4000 CR4: 00000000000006e0
       Call Trace:
        tty_write_room+0x6d/0xc0
        __process_echoes+0x55/0x870
        n_tty_receive_buf_common+0x105e/0x26d0
        tty_ldisc_receive_buf+0xb7/0x1c0
        tty_port_default_receive_buf+0x107/0x180
        flush_to_ldisc+0x35d/0x5c0
      ...
      
      0 in rbx means tty->driver_data is NULL in uart_write_room. 0x178 is
      tried to be dereferenced (0x178 >> 3 is 0x2f in rdx) at
      uart_write_room+0xc4. 0x178 is exactly (struct uart_state *)NULL->refcount
      used in uart_port_lock from uart_write_room.
      
      So revert the upstream commit here as my local patch should fix the
      whole family.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Li RongQing <lirongqing@baidu.com>
      Cc: Wang Li <wangli39@baidu.com>
      Cc: Zhang Yu <zhangyu31@baidu.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4cdd17ba
    • S
      serial: Fix using plain integer instead of Null pointer · 6bc3703d
      Sugaya Taichi 提交于
      Fix build warning that using plain integer as Null pointer.
      This is reported by kbuild test robot.
      
      Fixes: ba44dc04 ("serial: Add Milbeaut serial control")
      Signed-off-by: NSugaya Taichi <sugaya.taichi@socionext.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6bc3703d
  2. 22 4月, 2019 2 次提交
  3. 21 4月, 2019 10 次提交
  4. 20 4月, 2019 21 次提交