An error occurred fetching the project authors.
  1. 24 May, 2015 4 commits
  2. 10 May, 2015 2 commits
  3. 06 May, 2015 2 commits
  4. 26 Mar, 2015 1 commit
  5. 09 Jan, 2015 1 commit
  6. 26 Nov, 2014 1 commit
  7. 20 Oct, 2014 1 commit
  8. 10 Jul, 2014 1 commit
  9. 19 Jun, 2014 1 commit
    • Peter Hurley's avatar
      serial: Fix IGNBRK handling · ef8b9ddc
      Peter Hurley authored
      If IGNBRK is set without either BRKINT or PARMRK set, some uart
      drivers send a 0x00 byte for BREAK without the TTYBREAK flag to the
      line discipline, when it should send either nothing or the TTYBREAK flag
      set. This happens because the read_status_mask masks out the BI
      condition, which uart_insert_char() then interprets as a normal 0x00 byte.
      
      SUS v3 is clear regarding the meaning of IGNBRK; Section 11.2.2, General
      Terminal Interface - Input Modes, states:
        "If IGNBRK is set, a break condition detected on input shall be ignored;
         that is, not put on the input queue and therefore not read by any
         process."
      
      Fix read_status_mask to include the BI bit if IGNBRK is set; the
      lsr status retains the BI bit if a BREAK is recv'd, which is
      subsequently ignored in uart_insert_char() when masked with the
      ignore_status_mask.
      
      Affected drivers:
      8250 - all
      serial_txx9
      mfd
      amba-pl010
      amba-pl011
      atmel_serial
      bfin_uart
      dz
      ip22zilog
      max310x
      mxs-auart
      netx-serial
      pnx8xxx_uart
      pxa
      sb1250-duart
      sccnxp
      serial_ks8695
      sirfsoc_uart
      st-asc
      vr41xx_siu
      zs
      sunzilog
      fsl_lpuart
      sunsab
      ucc_uart
      bcm63xx_uart
      sunsu
      efm32-uart
      pmac_zilog
      mpsc
      msm_serial
      m32r_sio
      
      Unaffected drivers:
      omap-serial
      rp2
      sa1100
      imx
      icom
      
      Annotated for fixes:
      altera_uart
      mcf
      
      Drivers without break detection:
      21285
      xilinx-uartps
      altera_jtaguart
      apbuart
      arc-uart
      clps711x
      max3100
      uartlite
      msm_serial_hs
      nwpserial
      lantiq
      vt8500_serial
      
      Unknown:
      samsung
      mpc52xx_uart
      bfin_sport_uart
      cpm_uart/core
      
      Fixes: Bugzilla #71651, '8250_core.c incorrectly handles IGNBRK flag'
      Reported-by: default avatarIvan <athlon_@mail.ru>
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ef8b9ddc
  10. 29 May, 2014 1 commit
  11. 28 May, 2014 2 commits
    • Qipan Li's avatar
      serial: sirf: fix spinlock deadlock issue · 07d410e0
      Qipan Li authored
      commit fb78b811 provide a workaround for
      kernel panic, but bring potential deadlock risk. that is in
      sirfsoc_rx_tmo_process_tl while enter into sirfsoc_uart_pio_rx_chars
      cpu hold uart_port->lock, if uart interrupt comes cpu enter into
      sirfsoc_uart_isr and deadlock occurs in getting uart_port->lock.
      
      the patch replace spin_lock version to spin_lock_irq* version to avoid
      spinlock dead lock issue. let function tty_flip_buffer_push in tasklet
      outof spin_lock_irq* protect area to avoid add the pair of spin_lock and
      spin_unlock for tty_flip_buffer_push.
      BTW drop self defined unused spinlock protect of tx_lock/rx_lock.
      
      56274.220464] BUG: spinlock lockup suspected on CPU#0, swapper/0/0
      [56274.223648]  lock: 0xc05d9db0, .magic: dead4ead, .owner: swapper/0/0,
      	.owner_cpu: 0
      	[56274.231278] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G
      	O 3.10.35 #1
      	[56274.238241] [<c0015530>] (unwind_backtrace+0x0/0xf4) from
      	[<c00120d8>] (show_stack+0x10/0x14)
      	[56274.246742] [<c00120d8>] (show_stack+0x10/0x14) from
      	[<c01b11b0>] (do_raw_spin_lock+0x110/0x184)
      	[56274.255501] [<c01b11b0>] (do_raw_spin_lock+0x110/0x184) from
      	[<c02124c8>] (sirfsoc_uart_isr+0x20/0x42c)
      	[56274.264874] [<c02124c8>] (sirfsoc_uart_isr+0x20/0x42c) from
      	[<c0075790>] (handle_irq_event_percpu+0x54/0x17c)
      	[56274.274758] [<c0075790>] (handle_irq_event_percpu+0x54/0x17c)
      	from [<c00758f4>] (handle_irq_event+0x3c/0x5c)
      	[56274.284561] [<c00758f4>] (handle_irq_event+0x3c/0x5c) from
      	[<c0077fa0>] (handle_level_irq+0x98/0xfc)
      	[56274.293670] [<c0077fa0>] (handle_level_irq+0x98/0xfc) from
      	[<c0074f44>] (generic_handle_irq+0x2c/0x3c)
      	[56274.302952] [<c0074f44>] (generic_handle_irq+0x2c/0x3c) from
      	[<c000ef80>] (handle_IRQ+0x40/0x90)
      	[56274.311706] [<c000ef80>] (handle_IRQ+0x40/0x90) from
      	[<c000dc80>] (__irq_svc+0x40/0x70)
      	[56274.319697] [<c000dc80>] (__irq_svc+0x40/0x70) from
      	[<c038113c>] (_raw_spin_unlock_irqrestore+0x10/0x48)
      	[56274.329158] [<c038113c>]
      	(_raw_spin_unlock_irqrestore+0x10/0x48) from [<c0200034>]
      	(tty_port_tty_get+0x58/0x90)
      	[56274.339213] [<c0200034>] (tty_port_tty_get+0x58/0x90) from
      	[<c0212008>] (sirfsoc_uart_pio_rx_chars+0x1c/0xc8)
      	[56274.349097] [<c0212008>]
      	(sirfsoc_uart_pio_rx_chars+0x1c/0xc8) from [<c0212ef8>]
      	(sirfsoc_rx_tmo_process_tl+0xe4/0x1fc)
      	[56274.359853] [<c0212ef8>]
      	(sirfsoc_rx_tmo_process_tl+0xe4/0x1fc) from [<c0027c04>]
      	(tasklet_action+0x84/0x114)
      	[56274.369739] [<c0027c04>] (tasklet_action+0x84/0x114) from
      	[<c0027db4>] (__do_softirq+0x120/0x200)
      	[56274.378585] [<c0027db4>] (__do_softirq+0x120/0x200) from
      	[<c0027f44>] (do_softirq+0x54/0x5c)
      	[56274.386998] [<c0027f44>] (do_softirq+0x54/0x5c) from
      	[<c00281ec>] (irq_exit+0x9c/0xd0)
      	[56274.394899] [<c00281ec>] (irq_exit+0x9c/0xd0) from
      	[<c000ef84>] (handle_IRQ+0x44/0x90)
      	[56274.402790] [<c000ef84>] (handle_IRQ+0x44/0x90) from
      	[<c000dc80>] (__irq_svc+0x40/0x70)
      	[56274.410774] [<c000dc80>] (__irq_svc+0x40/0x70) from
      	[<c0288af4>] (cpuidle_enter_state+0x50/0xe0)
      	[56274.419532] [<c0288af4>] (cpuidle_enter_state+0x50/0xe0) from
      	[<c0288c34>] (cpuidle_idle_call+0xb0/0x148)
      	[56274.429080] [<c0288c34>] (cpuidle_idle_call+0xb0/0x148) from
      	[<c000f3ac>] (arch_cpu_idle+0x8/0x38)
      	[56274.438016] [<c000f3ac>] (arch_cpu_idle+0x8/0x38) from
      	[<c0059344>] (cpu_startup_entry+0xfc/0x140)
      	[56274.446956] [<c0059344>] (cpu_startup_entry+0xfc/0x140) from
      	[<c04a3a54>] (start_kernel+0x2d8/0x2e4)
      Signed-off-by: default avatarQipan Li <Qipan.Li@csr.com>
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      07d410e0
    • Barry Song's avatar
      serial: sirf: move to writel for TXFIFO instead of writeb · 205c384f
      Barry Song authored
      All SiRFSoC UART registers are in 32-bits. If we use writeb for
      TXFIFO, actually all of 32-bits are still written, for TXTIFO,
      only low 8-bits are valid, so in prima2&atlas6, this causes no
      problem.
      But in the new atlas7, using writeb to write UART registers will
      cause an imprecise data abort as HW does check the "wrong" writeb.
      So move to writel and this also makes the code consistent with
      sirfsoc_uart_pio_tx_chars() in which we use writel.
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      205c384f
  12. 13 Feb, 2014 2 commits
    • Qipan Li's avatar
      serial: sirf: move to use generic dma dt-binding to get dma channels · 9be16b38
      Qipan Li authored
      instead of using sirf specific dma channel property like "sirf,uart-dma-rx-channel"
      and "sirf,uart-dma-tx-channel", here we move to use generic dma dt-binding to get
      the channel like:
      - sirf,uart-dma-rx-channel = <21>;
      - sirf,uart-dma-tx-channel = <2>;
      + dmas = <&dmac1 5>, <&dmac0 2>;
      + dma-names = "rx", "tx";
      
      and we move dma_request_channel() to dma_request_slave_channel(), we don't need to
      call sirfsoc dma filter function sirfsoc_dma_filter_id() again.
      Signed-off-by: default avatarQipan Li <Qipan.Li@csr.com>
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9be16b38
    • Qipan Li's avatar
      serial: sirf: fix kernel panic caused by unpaired spinlock · fb78b811
      Qipan Li authored
      commit 8b9ade9f coming from Viresh Kumar "tty: serial: sirfsoc: drop
      uart_port->lock before calling tty_flip_buffer_push()" broke sirfsoc uart
      driver by knic:
      
      	[    5.129122] BUG: spinlock already unlocked on CPU#0, ip6tables/1331
      	[    5.132554]  lock: sirfsoc_uart_ports+0x4/0x8a0, .magic: dead4ead,
      	.owner: <none>/-1, .owner_cpu: -1
      	[    5.141651] CPU: 0 PID: 1331 Comm: ip6tables Tainted: G
      	W  O 3.10.16 #3
      	[    5.148866] [<c0013528>] (unwind_backtrace+0x0/0xe0) from
      	[<c0010e70>] (show_stack+0x10/0x14)
      	[    5.157362] [<c0010e70>] (show_stack+0x10/0x14) from
      	[<c01a5e68>] (do_raw_spin_unlock+0x40/0xc8)
      	[    5.166125] [<c01a5e68>] (do_raw_spin_unlock+0x40/0xc8) from
      	[<c03ff8b4>] (_raw_spin_unlock+0x8/0x40)
      	[    5.175322] [<c03ff8b4>] (_raw_spin_unlock+0x8/0x40) from
      	[<c0203fcc>] (sirfsoc_uart_pio_rx_chars+0xa4/0xc0)
      	[    5.185120] [<c0203fcc>]
      	(sirfsoc_uart_pio_rx_chars+0xa4/0xc0) from [<c0204fb8>]
      	(sirfsoc_rx_tmo_process_tl+0xdc/0x1e0)
      	[    5.195875] [<c0204fb8>]
      	(sirfsoc_rx_tmo_process_tl+0xdc/0x1e0) from [<c0024b50>]
      	(tasklet_action+0x8c/0xec)
      	[    5.205673] [<c0024b50>] (tasklet_action+0x8c/0xec) from
      	[<c00242a8>] (__do_softirq+0xec/0x1d4)
      	[    5.214347] [<c00242a8>] (__do_softirq+0xec/0x1d4) from
      	[<c0024428>] (do_softirq+0x48/0x54)
      	[    5.222674] [<c0024428>] (do_softirq+0x48/0x54) from
      	[<c0024690>] (irq_exit+0x74/0xc0)
      	[    5.230573] [<c0024690>] (irq_exit+0x74/0xc0) from
      	[<c000e1e8>] (handle_IRQ+0x6c/0x90)
      	[    5.238465] [<c000e1e8>] (handle_IRQ+0x6c/0x90) from
      	[<c000d500>] (__irq_svc+0x40/0x70)
      	[    5.246446] [<c000d500>] (__irq_svc+0x40/0x70) from
      	[<c0092e7c>] (mark_page_accessed+0xc/0x68)
      	[    5.255034] [<c0092e7c>] (mark_page_accessed+0xc/0x68) from
      	[<c00a2a4c>] (unmap_single_vma+0x3bc/0x550)
      	[    5.264402] [<c00a2a4c>] (unmap_single_vma+0x3bc/0x550) from
      	[<c00a3b4c>] (unmap_vmas+0x44/0x54)
      	[    5.273164] [<c00a3b4c>] (unmap_vmas+0x44/0x54) from
      	[<c00a81a8>] (exit_mmap+0xc4/0x1e0)
      	[    5.281233] [<c00a81a8>] (exit_mmap+0xc4/0x1e0) from
      	[<c001bb78>] (mmput+0x3c/0xdc)
      	[    5.288868] [<c001bb78>] (mmput+0x3c/0xdc) from [<c0021b0c>]
      	(do_exit+0x30c/0x828)
      	[    5.296413] [<c0021b0c>] (do_exit+0x30c/0x828) from
      	[<c0022dac>] (do_group_exit+0x4c/0xb0)
      	[    5.304653] [<c0022dac>] (do_group_exit+0x4c/0xb0) from
      	[<c0022e20>] (__wake_up_parent+0x0/0x18)
      
      Root cause:
      the commit dropped uart_port->lock before calling tty_flip_buffer_push(), but in sirfsoc-uart,
      sirfsoc_uart_pio_rx_chars() can be called by sirfsoc_rx_tmo_process_tl(). here uart_port->lock
      has not been taken yet. so that caused unpaired lock/unlock.
      
      Solution:
      This patch is doing a quick fix for that, it adds spin_lock/unlock(&port->lock) protect to
      sirfsoc_uart_pio_rx_chars() in sirfsoc_rx_tmo_process_tl() to keep spin_lock/unlock in pair.
      Signed-off-by: default avatarQipan Li <Qipan.Li@csr.com>
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Cc: stable <stable@vger.kernel.org> # 3.12
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fb78b811
  13. 08 Jan, 2014 3 commits
  14. 26 Sep, 2013 1 commit
  15. 27 Aug, 2013 3 commits
    • Qipan Li's avatar
      serial: sirf: fix the amount of serial ports · b60dfbae
      Qipan Li authored
      SiRFprimaII has three uart ports and three USP-based ports, so there
      are totally six lines instead of five.
      Signed-off-by: default avatarQipan Li <Qipan.Li@csr.com>
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b60dfbae
    • Qipan Li's avatar
      serial: sirf: define macro for some magic numbers of USP · 459f15c4
      Qipan Li authored
      this patch clears some magic numbers for offset and bitshift
      of USP registers.
      Signed-off-by: default avatarQipan Li <Qipan.Li@csr.com>
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      459f15c4
    • Viresh Kumar's avatar
      tty: serial: sirfsoc: drop uart_port->lock before calling tty_flip_buffer_push() · 8b9ade9f
      Viresh Kumar authored
      The current driver triggers a lockdep warning for if tty_flip_buffer_push() is
      called with uart_port->lock locked. This never shows up on UP kernels and comes
      up only on SMP kernels.
      
      Crash looks like this (produced with samsung.c driver):
      
      -----
      [<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
      [<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
      [<c035da34>] (dump_stack+0x6c/0xac) from [<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8)
      [<c01b59ac>] (do_raw_spin_unlock+0xc4/0xd8) from [<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0)
      [<c03627e4>] (_raw_spin_unlock_irqrestore+0xc/0x38) from [<c020a1a8>] (s3c24xx_serial_rx_chars+0)
      [<c020a1a8>] (s3c24xx_serial_rx_chars+0x12c/0x260) from [<c020aae8>] (s3c64xx_serial_handle_irq+)
      [<c020aae8>] (s3c64xx_serial_handle_irq+0x48/0x60) from [<c006aaa0>] (handle_irq_event_percpu+0x)
      [<c006aaa0>] (handle_irq_event_percpu+0x50/0x194) from [<c006ac20>] (handle_irq_event+0x3c/0x5c)
      [<c006ac20>] (handle_irq_event+0x3c/0x5c) from [<c006d864>] (handle_fasteoi_irq+0x80/0x13c)
      [<c006d864>] (handle_fasteoi_irq+0x80/0x13c) from [<c006a4a4>] (generic_handle_irq+0x20/0x30)
      [<c006a4a4>] (generic_handle_irq+0x20/0x30) from [<c000f454>] (handle_IRQ+0x38/0x94)
      [<c000f454>] (handle_IRQ+0x38/0x94) from [<c0008538>] (gic_handle_irq+0x34/0x68)
      [<c0008538>] (gic_handle_irq+0x34/0x68) from [<c00123c0>] (__irq_svc+0x40/0x70)
      Exception stack(0xc04cdf70 to 0xc04cdfb8)
      df60:                                     00000000 00000000 0000166e 00000000
      df80: c04cc000 c050278f c050278f 00000001 c04d444c 410fc0f4 c03649b0 00000000
      dfa0: 00000001 c04cdfb8 c000f758 c000f75c 60070013 ffffffff
      [<c00123c0>] (__irq_svc+0x40/0x70) from [<c000f75c>] (arch_cpu_idle+0x28/0x30)
      [<c000f75c>] (arch_cpu_idle+0x28/0x30) from [<c0054888>] (cpu_startup_entry+0x5c/0x148)
      [<c0054888>] (cpu_startup_entry+0x5c/0x148) from [<c0497aa4>] (start_kernel+0x334/0x38c)
      BUG: spinlock lockup suspected on CPU#0, kworker/0:1/360
       lock: s3c24xx_serial_ports+0x1d8/0x370, .magic: dead4ead, .owner: <none>/-1, .owner_cpu: -1
      CPU: 0 PID: 360 Comm: kworker/0:1 Not tainted 3.11.0-rc6-next-20130819-00003-g75485f1 #2
      Workqueue: events flush_to_ldisc
      [<c0014d58>] (unwind_backtrace+0x0/0xf8) from [<c0011908>] (show_stack+0x10/0x14)
      [<c0011908>] (show_stack+0x10/0x14) from [<c035da34>] (dump_stack+0x6c/0xac)
      [<c035da34>] (dump_stack+0x6c/0xac) from [<c01b581c>] (do_raw_spin_lock+0x100/0x17c)
      [<c01b581c>] (do_raw_spin_lock+0x100/0x17c) from [<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28)
      [<c03628a0>] (_raw_spin_lock_irqsave+0x20/0x28) from [<c0203224>] (uart_start+0x18/0x34)
      [<c0203224>] (uart_start+0x18/0x34) from [<c01ef890>] (__receive_buf+0x4b4/0x738)
      [<c01ef890>] (__receive_buf+0x4b4/0x738) from [<c01efb44>] (n_tty_receive_buf2+0x30/0x98)
      [<c01efb44>] (n_tty_receive_buf2+0x30/0x98) from [<c01f2ba8>] (flush_to_ldisc+0xec/0x138)
      [<c01f2ba8>] (flush_to_ldisc+0xec/0x138) from [<c0031af0>] (process_one_work+0xfc/0x348)
      [<c0031af0>] (process_one_work+0xfc/0x348) from [<c0032138>] (worker_thread+0x138/0x37c)
      [<c0032138>] (worker_thread+0x138/0x37c) from [<c0037a7c>] (kthread+0xa4/0xb0)
      [<c0037a7c>] (kthread+0xa4/0xb0) from [<c000e5f8>] (ret_from_fork+0x14/0x3c)
      -----
      
      Release the port lock before calling tty_flip_buffer_push() and reacquire it
      after the call.
      
      Similar stuff was already done for few other drivers in the past, like:
      
      commit 2389b272
      Author: Thomas Gleixner <tglx@linutronix.de>
      Date:   Tue May 29 21:53:50 2007 +0100
      
          [ARM] 4417/1: Serial: Fix AMBA drivers locking
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8b9ade9f
  16. 20 Aug, 2013 3 commits
  17. 15 Aug, 2013 2 commits
  18. 12 Aug, 2013 3 commits
  19. 26 Jul, 2013 1 commit
  20. 06 Jun, 2013 1 commit
  21. 23 Apr, 2013 1 commit
  22. 18 Jan, 2013 1 commit
  23. 16 Jan, 2013 2 commits
    • Jiri Slaby's avatar
      TTY: switch tty_flip_buffer_push · 2e124b4a
      Jiri Slaby authored
      Now, we start converting tty buffer functions to actually use
      tty_port. This will allow us to get rid of the need of tty in many
      call sites. Only tty_port will needed and hence no more
      tty_port_tty_get in those paths.
      
      Now, the one where most of tty_port_tty_get gets removed:
      tty_flip_buffer_push.
      
      IOW we also closed all the races in drivers not using tty_port_tty_get
      at all yet.
      
      Also we move tty_flip_buffer_push declaration from include/linux/tty.h
      to include/linux/tty_flip.h to all others while we are changing it
      anyway.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2e124b4a
    • Barry Song's avatar
      serial: sirf: add support for new SiRFmarco SMP SoC · 5425e03f
      Barry Song authored
      CSR SiRFmarco's UART IP is same with SiRFprimaII except that
      it has two more uart ports.
      this patch makes the old driver support new SiRFmarco as well:
      1. add .compatible = "sirf,marco-uart" to OF match table
      2. add two ports in the port table
      3. take spin_lock in isr to avoid the conflict of threads opening
      uart on CPU1 and isr running on CPU0.
      For 3, we did see some problems on SiRFmarco as SiRFmarco is a
      SMP SoC but the old SiRFprimaII is UP.
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5425e03f