1. 23 9月, 2011 4 次提交
    • J
      TTY: serial, fix includes in some drivers · ee160a38
      Jiri Slaby 提交于
      linux/tty_flip.h is included in linux/serial_core.h. But this may (and
      will) change in the future. Then we would get build errors such as:
      .../tty/serial/max3107.c: In function ‘put_data_to_circ_buf’:
      .../tty/serial/max3107.c:149:2: error: implicit declaration of function ‘tty_insert_flip_string’
      
      So fix all the drviers which call tty flip buffer helpers to really
      include linux/tty_flip.h. And also make sure that those include
      linux/tty.h when operating with struct tty_struct.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ee160a38
    • J
      TTY: serial, remove dead code from 68328 · 2c16a353
      Jiri Slaby 提交于
      The code is dead at least since 2002. So remove it to not distort git
      grep output (about port.tty usage).
      
      Remove the whole do_softirq tasklet as it's noop now.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Alan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2c16a353
    • N
      TTY: serial: Move mutex_unlock in uart_close function · 55956216
      Nobuhiro Iwamatsu 提交于
      When mutex_lock is not called, mutex_unlock is sometimes called.
      This deletes unnecessary goto and makes modifications so that
      mutex_unlock is called.
      
      [    8.304000] WARNING: at kernel/muex-debug.c:78
      [    8.304000] Modules linked in:
      [    8.304000]
      [    8.304000] Pid : 114, Comm:                 modprobe
      [    8.304000] CPU : 0                  Not tainted  (3.1.0-rc3-next-20110826 #810)
      [    8.304000]
      [    8.304000] PC is at debug_mutex_unlock+0xf4/0x120
      [    8.304000] PR is at debug_mutex_unlock+0xe6/0x120
      [    8.304000] PC  : 80051114 SP  : 9f02de58 SR  : 400081f1 TEA : 295cf4f2
      [    8.304000] R0  : 00000001 R1  : 00000000 R2  : 0000000f R3  : 00000000
      [    8.304000] R4  : 9fc63158 R5  : 00000000 R6  : 00000001 R7  : 9fe1de78
      [    8.304000] R8  : 805c6b2c R9  : 80003920 R10 : 00000000 R11 : 805c6b2c
      [    8.304000] R12 : 80425ca0 R13 : 00000000 R14 : 9f02de58
      [    8.304000] MACH: 00000003 MACL: 00000000 GBR : 296e1678 PR  : 80051106
      [    8.304000]
      [    8.304000] Call trace:
      [    8.304000]  [<804236c6>] __mutex_unlock_slowpath+0x46/0x120
      [    8.304000]  [<804237aa>] mutex_unlock+0xa/0x20
      [    8.304000]  [<80240ed6>] uart_close+0x76/0x2c0
      [    8.304000]  [<80223b98>] tty_release+0xf8/0x5c0
      [    8.304000]  [<800a93a6>] lookup_object+0x26/0xa0
      [    8.304000]  [<80063f6a>] call_rcu+0x8a/0xc0
      [    8.304000]  [<800a944a>] put_object+0x2a/0x60
      [    8.304000]  [<80003920>] arch_local_irq_restore+0x0/0x40
      [    8.304000]  [<800af320>] fput+0x180/0x2c0
      [    8.304000]  [<800af248>] fput+0xa8/0x2c0
      [    8.304000]  [<800ab1a8>] filp_close+0x48/0xc0
      [    8.304000]  [<800ab29a>] sys_close+0x7a/0x100
      [    8.304000]  [<8000825a>] syscall_call+0xc/0x10
      [    8.304000]  [<800ab220>] sys_close+0x0/0x100
      [    8.304000]
      [    8.304000] Code:
      [    8.304000]   8005110e:  mov.l     @r1, r1
      [    8.304000]   80051110:  tst       r1, r1
      [    8.304000]   80051112:  bf        80051116
      [    8.304000] ->80051114:  trapa     #62
      [    8.304000]   80051116:  mov.l     @r8, r1
      [    8.304000]   80051118:  tst       r1, r1
      [    8.304000]   8005111a:  bt.s      8005104c
      [    8.304000]   8005111c:  mov       #0, r1
      [    8.304000]   8005111e:  bra       80051056
      [    8.304000]
      [    8.304000] ---[ end trace e8f8e04c313f429b ]---
      Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      55956216
    • M
      serial: pxa: work around for errata #20 · e44aabd6
      Marcus Folkesson 提交于
      Errata E20: UART: Character Timeout interrupt remains set under certain
      software conditions.
      
      Implication: The software servicing the UART can be trapped in an infinite loop.
      Signed-off-by: NMarcus Folkesson <marcus.folkesson@gmail.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e44aabd6
  2. 27 8月, 2011 6 次提交
  3. 26 8月, 2011 3 次提交
    • J
      TTY: use tty_wait_until_sent_from_close in other drivers · 0b058353
      Jiri Slaby 提交于
      Let's use the newly added helper to avoid stalls in drivers which are
      not yet ported to tty_port helpers.
      
      Those which are broken (call tty_wait_until_sent with irqs disabled)
      are left untouched. They are in a deeper trouble than we are trying to
      solve here. This includes amiserial, 68328serial, 68360serial and
      crisv10.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0b058353
    • J
      TTY: serial, move locking in uart_close · bafb0bd2
      Jiri Slaby 提交于
      So now, when we handle CLOSING flag, there is no point to hold
      port->mutex over the start of uart_close.
      
      Yes, there are still several things to reason about:
      * port->count etc is and always was protected by a spinlock
      * ->stop_rx is protected by a spinlock. Otherwise it would
        race with interrupts.
      * uart_wait_until_sent -- that one is already called without
        port->mutex from set_termios and tty_set_ldisc. Should anything
        be protected there, it would be tx_empty. And by a spinlock.
        8250 does this internally...
      
      This step is needed to fix system stalls. To not create an AB-BA lock
      dependency (see next patches).
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      bafb0bd2
    • J
      TTY: serial, use ASYNCB_CLOSING in uart_close · 426929f8
      Jiri Slaby 提交于
      We need to move port->mutex locking after wait_until_sent in
      uart_close (for rationale see next patches). But if we did it now, we
      would introduce a race between close and open. This is exactly why
      port->mutex is locked at the top of uart_close.
      
      To avoid the race, we add ASYNCB_CLOSING to uart_close. Like every
      other sane TTY driver. Thanks to tty_port_block_til_ready used in
      uart_open we will have this for free. Then we can move the port->mutex
      lock.
      
      Also note that this will make the conversion to tty_port helpers
      easier. They are currently handling ASYNC_CLOSING flag correctly.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      426929f8
  4. 25 8月, 2011 8 次提交
  5. 24 8月, 2011 12 次提交
  6. 08 8月, 2011 1 次提交
  7. 04 8月, 2011 1 次提交
    • G
      dt: remove of_alias_get_id() reference · 9e191b22
      Grant Likely 提交于
      of_alias_get_id() is broken and being reverted.  Remove the reference
      to it and replace with a single incrementing id number.
      
      There is no risk of regression here on the imx driver since the imx
      change to use of_alias_get_id() is commit 22698aa2, "serial/imx: add
      device tree probe support" which is new for v3.1, and it won't get
      used unless CONFIG_OF is enabled and the board is booted using a
      device tree.  A single incrementing integer is sufficient for now.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NShawn Guo <shawn.guo@linaro.org>
      9e191b22
  8. 27 7月, 2011 3 次提交
  9. 20 7月, 2011 1 次提交
  10. 18 7月, 2011 1 次提交
    • N
      ARM: mach-s3c2400: delete · 632b7cf6
      Nicolas Pitre 提交于
      On Tue, 28 Jun 2011, Ben Dooks wrote:
      
      > On Tue, Jun 28, 2011 at 11:22:57PM +0200, Arnd Bergmann wrote:
      >
      > > On a related note, what about mach-s3c2400? It seems to be even more
      > > incomplete.
      >
      > Probably the same fate awaits that. It is so old that there's little
      > incentive to do anything with it.
      
      So out it goes as well.
      
      The PORT_S3C2400 definition in include/linux/serial_core.h is left there
      to prevent a reuse of the same number for another port type.
      Signed-off-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      632b7cf6