1. 04 May, 2013 1 commit
  2. 01 Mar, 2013 1 commit
    • Tkhai Kirill's avatar
      sunsu: Fix panic in case of nonexistent port at "console=ttySY" cmdline option · cb29529e
      Tkhai Kirill authored
      If a machine has X (X < 4) sunsu ports and cmdline
      option "console=ttySY" is passed, where X < Y <= 4,
      than the following panic happens:
      Unable to handle kernel NULL pointer dereference
      TPC: <sunsu_console_setup+0x78/0xe0>
      RPC: <sunsu_console_setup+0x74/0xe0>
      I7: <register_console+0x378/0x3e0>
      Call Trace:
       [0000000000453a38] register_console+0x378/0x3e0
       [0000000000576fa0] uart_add_one_port+0x2e0/0x340
       [000000000057af40] su_probe+0x160/0x2e0
       [00000000005b8a4c] platform_drv_probe+0xc/0x20
       [00000000005b6c2c] driver_probe_device+0x12c/0x220
       [00000000005b6da8] __driver_attach+0x88/0xa0
       [00000000005b4df4] bus_for_each_dev+0x54/0xa0
       [00000000005b5a54] bus_add_driver+0x154/0x260
       [00000000005b7190] driver_register+0x50/0x180
       [00000000006d250c] sunsu_init+0x18c/0x1e0
       [00000000006c2668] do_one_initcall+0xe8/0x160
       [00000000006c282c] kernel_init_freeable+0x12c/0x1e0
       [0000000000603764] kernel_init+0x4/0x100
       [0000000000405f64] ret_from_syscall+0x1c/0x2c
       [0000000000000000]           (null)
      1)Fix the panic;
      2)Increment registered port number every successful
      Signed-off-by: default avatarKirill Tkhai <tkhai@yandex.ru>
      CC: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  3. 15 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:
      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
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    • Jiri Slaby's avatar
      TTY: switch tty_insert_flip_char · 92a19f9c
      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.
      tty_insert_flip_char is the next one to proceed. This one is used all
      over the code, so the patch is huge.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
  4. 21 Nov, 2012 3 commits
  5. 05 Sep, 2012 2 commits
  6. 28 Mar, 2012 1 commit
  7. 10 Feb, 2012 1 commit
  8. 10 Jun, 2011 1 commit
  9. 28 Feb, 2011 1 commit
  10. 13 Jan, 2011 1 commit
    • Greg Kroah-Hartman's avatar
      tty: move drivers/serial/ to drivers/tty/serial/ · ab4382d2
      Greg Kroah-Hartman authored
      The serial drivers are really just tty drivers, so move them to
      drivers/tty/ to make things a bit neater overall.
      This is part of the tty/serial driver movement proceedure as proposed by
      Arnd Bergmann and approved by everyone involved a number of months ago.
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Rogier Wolff <R.E.Wolff@bitwizard.nl>
      Cc: Michael H. Warfield <mhw@wittsend.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
  11. 06 Aug, 2010 1 commit
  12. 24 Jul, 2010 1 commit
  13. 28 Jun, 2010 1 commit
    • Grant Likely's avatar
      sparc/of: Move of_device fields into struct pdev_archdata · 1636f8ac
      Grant Likely authored
      This patch moves SPARC architecture specific data members out of
      struct of_device and into the pdev_archdata structure.  The reason
      for this change is to unify the struct of_device definition amongst
      all the architectures.  It also remvoes the .sysdata, .slot, .portid
      and .clock_freq properties because they aren't actually used by
      A subsequent patch will replace struct of_device entirely with struct
      platform_device and the of_platform support code will share common
      routines with the platform bus (but the bus instances themselves can
      remain separate).
      This patch also adds 'struct resources *resource' and num_resources
      to match the fields defined in struct platform_device.  After this
      change, 'struct platform_device' can be used as a drop-in replacement
      for 'struct of_platform'.
      This change is in preparation for merging the of_platform_bus_type
      with the platform_bus_type.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
  14. 26 May, 2010 1 commit
    • David S. Miller's avatar
      sunsu: Fix use after free in su_remove(). · 9616ff43
      David S. Miller authored
      Real serial port 'up' objects are statically allocated from an
      array in the driver.  Keyboard and mouse ports, on the other
      hand, are dynamically allocated.
      Unfortunately, we free these dynamic 'up' objects before we unmap the
      I/O registers.
      Rearrange su_remove() so that this does not happen.
      Noticed by Julia Lawall.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  15. 22 May, 2010 1 commit
    • Grant Likely's avatar
      of: Remove duplicate fields from of_platform_driver · 4018294b
      Grant Likely authored
      .name, .match_table and .owner are duplicated in both of_platform_driver
      and device_driver.  This patch is a removes the extra copies from struct
      of_platform_driver and converts all users to the device_driver members.
      This patch is a pretty mechanical change.  The usage model doesn't change
      and if any drivers have been missed, or if anything has been fixed up
      incorrectly, then it will fail with a compile time error, and the fixup
      will be trivial.  This patch looks big and scary because it touches so
      many files, but it should be pretty safe.
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
      Acked-by: default avatarSean MacLennan <smaclennan@pikatech.com>
  16. 18 May, 2010 1 commit
  17. 30 Mar, 2010 1 commit
    • Tejun Heo's avatar
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo authored
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      The script does the followings.
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
      The conversion was done in the following steps.
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
      6. percpu.h was updated not to include slab.h.
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Guess-its-ok-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
  18. 29 Mar, 2010 1 commit
    • Julia Lawall's avatar
      drivers/serial/sunsu.c: Correct use after free · c4a3987f
      Julia Lawall authored
      The of_iounmap is at the out_unmap label, but at that point up has already
      been freed.  The free cannot be moved to the out_unmap label, because that
      label is reachable from cases where up should not be freed.  So the call to
      of_iounmap is just duplicated, and the goto converted to a return.
      A simplified version of the semantic match that finds this problem is as
      follows: (http://coccinelle.lip6.fr/
      // <smpl>
      expression x,e;
      identifier f;
      iterator I;
      statement S;
      ... when != &x
          when != x = e
          when != I(x,...) S
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  19. 24 Nov, 2009 4 commits
  20. 19 Sep, 2009 2 commits
  21. 08 Apr, 2009 1 commit
  22. 31 Aug, 2008 1 commit
  23. 11 Aug, 2008 1 commit
  24. 20 Jul, 2008 2 commits
  25. 02 May, 2008 1 commit
    • David S. Miller's avatar
      serial: Fix sparc driver name strings. · 32039f49
      David S. Miller authored
      They were all "serial" so if multiple of these drivers registered,
      we'd trigger sysfs directory creation errors:
      [    1.695793] proc_dir_entry 'serial' already registered
      [    1.695839] Call Trace:
      [    1.831891]  [00000000004f2534] create_proc_entry+0x7c/0x98
      [    1.833608]  [00000000004f3a58] proc_tty_register_driver+0x40/0x70
      [    1.833663]  [0000000000594700] tty_register_driver+0x1fc/0x208
      [    1.835371]  [00000000005aade4] uart_register_driver+0x134/0x16c
      [    1.841762]  [00000000005ac274] sunserial_register_minors+0x34/0x68
      [    1.841818]  [00000000007db2a4] sunsu_init+0xf8/0x150
      [    1.867697]  [00000000007c62a4] kernel_init+0x190/0x330
      [    1.939147]  [0000000000426cf8] kernel_thread+0x38/0x48
      [    1.939198]  [00000000006a0d90] rest_init+0x18/0x5c
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  26. 12 Dec, 2007 1 commit
    • Martin Habets's avatar
      [SERIAL] sparc: Infrastructure to fix section mismatch bugs. · 58d784a5
      Martin Habets authored
      This patch against 2.6.23 sparc-2.6.git contains a number of minor
      cleanups of the sparc serial drivers.  Initially I fixed this build
      WARNING: vmlinux.o(.text+0x107a2c): Section mismatch: reference to .init.text:add_preferred_console (between 'sunserial_console_match' and 'sunserial_console_termios')
      which is done by declaring sunserial_console_match() as __init.  This
      resulted in build warnings on sunserial_current_minor.  To resolve
      these the variable was changed so it is no longer global, and to hide
      operations on it inside 2 new functions. These functions handle the
      UART minor handling code that is common to all sparc serial drivers.
      These changes allowed to clean up the uart counters in all the sparc
      serial drivers, and the administration of minor device numbers.
      Lastly, sunserial_console_termios() does not need to be exported since
      it is only called from non-modular code.
      Sadly, the following build warning still exists:
      WARNING: vmlinux.o(__ksymtab+0x2910): Section mismatch: reference to .init.text:sunserial_console_match (between '__ksymtab_sunserial_console_match' and '__ksymtab_sunserial_unregister_minors')
      This could be resolved by not exporting sunserial_console_match(), but
      this is not possible at the moment because it is being called from
      modular code. On the other hand, this is a bogus warning since it
      comes from a ksymtab section.
      Signed-off-by: default avatarMartin Habets <errandir_news@mph.eclipse.co.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  27. 26 Aug, 2007 1 commit
  28. 20 Jul, 2007 1 commit
    • David S. Miller's avatar
      [SPARC]: Fix serial console device detection. · c73fcc84
      David S. Miller authored
      The current scheme works on static interpretation of text names, which
      is wrong.
      The output-device setting, for example, must be resolved via an alias
      or similar to a full path name to the console device.
      Paths also contain an optional set of 'options', which starts with a
      colon at the end of the path.  The option area is used to specify
      which of two serial ports ('a' or 'b') the path refers to when a
      device node drives multiple ports.  'a' is assumed if the option
      specification is missing.
      This was caught by the UltraSPARC-T1 simulator.  The 'output-device'
      property was set to 'ttya' and we didn't pick upon the fact that this
      is an OBP alias set to '/virtual-devices/console'.  Instead we saw it
      as the first serial console device, instead of the hypervisor console.
      The infrastructure is now there to take advantage of this to resolve
      the console correctly even in multi-head situations in fbcon too.
      Thanks to Greg Onufer for the bug report.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
  29. 16 Jul, 2007 1 commit
  30. 07 May, 2007 1 commit
  31. 26 Apr, 2007 1 commit