1. 18 3月, 2014 3 次提交
  2. 01 3月, 2014 1 次提交
  3. 09 12月, 2013 1 次提交
  4. 27 7月, 2013 1 次提交
  5. 21 5月, 2013 1 次提交
  6. 16 4月, 2013 1 次提交
    • F
      serial_core.c: add put_device() after device_find_child() · 5a65dcc0
      Federico Vaga 提交于
      The serial core uses device_find_child() but does not drop the reference to
      the retrieved child after using it. This patch add the missing put_device().
      
      What I have done to test this issue.
      
      I used a machine with an AMBA PL011 serial driver. I tested the patch on
      next-20120408 because the last branch [next-20120415] does not boot on this
      board.
      
      For test purpose, I added some pr_info() messages to print the refcount
      after device_find_child() (lines: 1937,2009), and after put_device()
      (lines: 1947, 2021).
      
      Boot the machine *without* put_device(). Then:
      
      echo reboot > /sys/power/disk
      echo disk > /sys/power/state
      [   87.058575] uart_suspend_port:1937 refcount 4
      [   87.058582] uart_suspend_port:1947 refcount 4
      [   87.098083] uart_resume_port:2009refcount 5
      [   87.098088] uart_resume_port:2021 refcount 5
      
      echo disk > /sys/power/state
      [  103.055574] uart_suspend_port:1937 refcount 6
      [  103.055580] uart_suspend_port:1947 refcount 6
      [  103.095322] uart_resume_port:2009 refcount 7
      [  103.095327] uart_resume_port:2021 refcount 7
      
      echo disk > /sys/power/state
      [  252.459580] uart_suspend_port:1937 refcount 8
      [  252.459586] uart_suspend_port:1947 refcount 8
      [  252.499611] uart_resume_port:2009 refcount 9
      [  252.499616] uart_resume_port:2021 refcount 9
      
      The refcount continuously increased.
      
      Boot the machine *with* this patch. Then:
      
      echo reboot > /sys/power/disk
      echo disk > /sys/power/state
      [  159.333559] uart_suspend_port:1937 refcount 4
      [  159.333566] uart_suspend_port:1947 refcount 3
      [  159.372751] uart_resume_port:2009 refcount 4
      [  159.372755] uart_resume_port:2021 refcount 3
      
      echo disk > /sys/power/state
      [  185.713614] uart_suspend_port:1937 refcount 4
      [  185.713621] uart_suspend_port:1947 refcount 3
      [  185.752935] uart_resume_port:2009 refcount 4
      [  185.752940] uart_resume_port:2021 refcount 3
      
      echo disk > /sys/power/state
      [  207.458584] uart_suspend_port:1937 refcount 4
      [  207.458591] uart_suspend_port:1947 refcount 3
      [  207.498598] uart_resume_port:2009 refcount 4
      [  207.498605] uart_resume_port:2021 refcount 3
      
      The refcount correctly handled.
      Signed-off-by: NFederico Vaga <federico.vaga@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5a65dcc0
  7. 10 4月, 2013 1 次提交
    • A
      procfs: new helper - PDE_DATA(inode) · d9dda78b
      Al Viro 提交于
      The only part of proc_dir_entry the code outside of fs/proc
      really cares about is PDE(inode)->data.  Provide a helper
      for that; static inline for now, eventually will be moved
      to fs/proc, along with the knowledge of struct proc_dir_entry
      layout.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      d9dda78b
  8. 14 2月, 2013 3 次提交
  9. 16 1月, 2013 5 次提交
  10. 27 11月, 2012 1 次提交
  11. 16 11月, 2012 2 次提交
  12. 04 11月, 2012 4 次提交
  13. 31 10月, 2012 3 次提交
  14. 27 9月, 2012 1 次提交
    • A
      tty/serial/core: Introduce poll_init callback · c7f3e708
      Anton Vorontsov 提交于
      It was noticed that polling drivers (like KGDB) are not able to use
      serial ports if the ports were not previously initialized via console.
      I.e.  when booting with console=ttyAMA0 kgdboc=ttyAMA0, everything works
      fine, but with console=ttyFOO kgdboc=ttyAMA0, the kgdboc doesn't work.
      
      This is because we don't initialize the hardware. Calling ->startup() is
      not an option, because drivers request interrupts there, and drivers
      fail to handle situations when tty isn't opened with interrupts enabled.
      
      So, we have to implement a new callback (actually, tty_ops already have
      a similar callback), which does everything needed to initialize just the
      hardware.
      Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c7f3e708
  15. 22 9月, 2012 1 次提交
  16. 07 9月, 2012 3 次提交
  17. 06 9月, 2012 2 次提交
  18. 14 8月, 2012 1 次提交
    • J
      TTY: use tty_port_register_device · 734cc178
      Jiri Slaby 提交于
      Currently we have no way to assign tty->port while performing tty
      installation. There are two ways to provide the link tty_struct =>
      tty_port. Either by calling tty_port_install from tty->ops->install or
      tty_port_register_device called instead of tty_register_device when
      the device is being set up after connected.
      
      In this patch we modify most of the drivers to do the latter. When the
      drivers use tty_register_device and we have tty_port already, we
      switch to tty_port_register_device. So we have the tty_struct =>
      tty_port link for free for those.
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      734cc178
  19. 27 7月, 2012 1 次提交
  20. 17 7月, 2012 1 次提交
  21. 13 6月, 2012 1 次提交
  22. 16 5月, 2012 1 次提交
  23. 15 5月, 2012 1 次提交