1. 11 7月, 2014 14 次提交
  2. 10 7月, 2014 11 次提交
  3. 20 6月, 2014 3 次提交
    • R
      tty/serial: fix 8250 early console option passing to regular console · 60efcf04
      Rob Herring 提交于
      In the conversion to generic early console, the passing of options from
      the early 8250 console to the regular ttyS console was broken. This
      resulted in the baud rate changing when switching consoles during boot.
      
      This feature allows specifying a single console option on the kernel
      command line rather than both an early console and regular serial tty
      console. It would be nice to generalize this feature. However, it only
      works if the correct baud rate can be probed early which is not the
      case on many platforms which have non-standard UART clock rates. So for
      now, this is left as an 8250 specific feature.
      Reported-and-tested-by: NTony Luck <tony.luck@intel.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      60efcf04
    • P
      tty: Correct INPCK handling · 66528f90
      Peter Hurley 提交于
      If INPCK is not set, input parity detection should be disabled. This means
      parity errors should not be received from the tty driver, and the data
      received should be treated normally.
      
      SUS v3, 11.2.2, General Terminal Interface - Input Modes, states:
        "If INPCK is set, input parity checking shall be enabled. If INPCK is
         not set, input parity checking shall be disabled, allowing output parity
         generation without input parity errors. Note that whether input parity
         checking is enabled or disabled is independent of whether parity detection
         is enabled or disabled (see Control Modes). If parity detection is enabled
         but input parity checking is disabled, the hardware to which the terminal
         is connected shall recognize the parity bit, but the terminal special file
         shall not check whether or not this bit is correctly set."
      
      Ignore parity errors reported by the tty driver when INPCK is not set, and
      handle the received data normally.
      
      Fixes: Bugzilla #71681, 'Improvement of n_tty_receive_parity_error from n_tty.c'
      Reported-by: NIvan <athlon_@mail.ru>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      66528f90
    • P
      serial: Fix IGNBRK handling · ef8b9ddc
      Peter Hurley 提交于
      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: NIvan <athlon_@mail.ru>
      Signed-off-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ef8b9ddc
  4. 18 6月, 2014 2 次提交
  5. 07 6月, 2014 5 次提交
    • R
      sysrq,rcu: suppress RCU stall warnings while sysrq runs · 722773af
      Rik van Riel 提交于
      Some sysrq handlers can run for a long time, because they dump a lot of
      data onto a serial console.  Having RCU stall warnings pop up in the
      middle of them only makes the problem worse.
      
      This patch temporarily disables RCU stall warnings while a sysrq request
      is handled.
      Signed-off-by: NRik van Riel <riel@redhat.com>
      Suggested-by: NPaul McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Madper Xie <cxie@redhat.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Richard Weinberger <richard@nod.at>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      722773af
    • R
      sysrq: rcu-ify __handle_sysrq · 984d74a7
      Rik van Riel 提交于
      Echoing values into /proc/sysrq-trigger seems to be a popular way to get
      information out of the kernel.  However, dumping information about
      thousands of processes, or hundreds of CPUs to serial console can result
      in IRQs being blocked for minutes, resulting in various kinds of cascade
      failures.
      
      The most common failure is due to interrupts being blocked for a very
      long time.  This can lead to things like failed IO requests, and other
      things the system cannot easily recover from.
      
      This problem is easily fixable by making __handle_sysrq use RCU instead
      of spin_lock_irqsave.
      
      This leaves the warning that RCU grace periods have not elapsed for a
      long time, but the system will come back from that automatically.
      
      It also leaves sysrq-from-irq-context when the sysrq keys are pressed,
      but that is probably desired since people want that to work in
      situations where the system is already hosed.
      
      The callers of register_sysrq_key and unregister_sysrq_key appear to be
      capable of sleeping.
      Signed-off-by: NRik van Riel <riel@redhat.com>
      Reported-by: NMadper Xie <cxie@redhat.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      984d74a7
    • D
      vt: Don't ignore unbind errors in vt_unbind · f418f2ec
      Daniel Vetter 提交于
      Otherwise the loop will never stop since we don't make any
      forward progress. Noticed while breaking this accidentally
      in a painful attempt to make vga_con unregistering work.
      
      With this patch we'll bail out on the first attempt, which
      at least leaves a useful enough system behind for debugging.
      Livelocks on console_lock just aren't fun.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f418f2ec
    • D
      vt: Fix up unregistration of vt drivers · d9c660e7
      Daniel Vetter 提交于
      A bunch of issues:
      - We should not kick out the default console (which is tracked in
        conswitchp), so check for that.
      - Add better error codes so callers can differentiate between "something
        went wrong" and "your driver isn't registered already". i915 needs
        that so it doesn't fall over when reloading the driver and hence
        vga_con is already unregistered.
      - There's a mess with the driver flags: What we need to check for is
        that the driver isn't used any more, i.e. unbound completely (FLAG_INIT).
        And not whether it's the boot console or not (which is the only one
        which doesn't have FLAG_MODULE). Otherwise there's no way to kick
        out the boot console, which i915 wants to do to prevent havoc with
        vga_con interferring (which tends to hang machines).
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d9c660e7
    • D
      vt: Fix replacement console check when unbinding · 249f7b3e
      Daniel Vetter 提交于
      I don't fully understand the magic of the vt register/unregister
      logic, but apparently everything but the inital console (as set
      in the conswitchp pointer) is marked with FLAG_MODULE. Which means
      if something unregistered the boot vt driver (e.g. i915.ko kicking
      out vga_con) there's nothing left when trying to unbind e.g. fbcon
      through sysfs.
      
      But in most cases have the dummy console hanging around besides the
      boot console, so this test is fairly dubious. What we actually want is
      simply a different console than the one we want to unbind.
      
      v2: Correct the commit message to clarify that the dummy console isn't
      always around, but only in most cases (David).
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NDavid Herrmann <dh.herrmann@gmail.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      249f7b3e
  6. 05 6月, 2014 1 次提交
  7. 03 6月, 2014 1 次提交
  8. 30 5月, 2014 3 次提交