1. 16 Jun, 2016 1 commit
    • Arnd Bergmann's avatar
      isdn: eicon: fix old-style declarations · ac565065
      Arnd Bergmann authored
      Modern C standards expect the '__inline__' keyword to come before the return
      type in a declaration, and we get many warnings for this with "make W=1"
      because the eicon driver has this in a header file:
      
      eicon/divasmain.c:448:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:453:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:458:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:463:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:468:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/divasmain.c:473:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/platform.h:274:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      eicon/platform.h:280:1: error: '__inline__' is not at beginning of declaration [-Werror=old-style-declaration]
      
      A similar warning gets printed for the diva_os_register_io_port()
      declaration, because 'register' is interpreted as a keyword instead
      of a variable name:
      
      In file included from eicon/diva_didd.c:21:0:
      eicon/platform.h:206:1: error: 'register' is not at beginning of declaration [-Werror=old-style-declaration]
      Signed-off-by: 's avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      ac565065
  2. 08 May, 2016 1 commit
  3. 04 May, 2016 1 commit
  4. 30 Apr, 2016 4 commits
  5. 13 Apr, 2016 1 commit
  6. 27 Mar, 2016 1 commit
  7. 20 Mar, 2016 1 commit
  8. 14 Mar, 2016 2 commits
  9. 05 Mar, 2016 2 commits
    • Arnd Bergmann's avatar
      isdn: i4l: move active-isdn drivers to staging · a921e9bd
      Arnd Bergmann authored
      The icn, act2000 and pcbit drivers are all for very old hardware,
      and it is highly unlikely that anyone is actually still using them
      on modern kernels, if at all.
      
      All three drivers apparently are for hardware that predates PCI
      being the common connector, as they are ISA-only and active
      PCI ISDN cards were widely available in the 1990s.
      
      Looking through the git logs, it I cannot find any indication of a
      patch to any of these drivers that has been tested on real hardware,
      only cleanups or global API changes.
      Signed-off-by: 's avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: 's avatarKarsten Keil <isdn@linux-pingi.de>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a921e9bd
    • Arnd Bergmann's avatar
      isdn: icn: remove a #warning · 01ed1e15
      Arnd Bergmann authored
      The icn driver currently produces an unconditional #warning whenever
      we build it, introduced by Karsten Keil back in 2003:
      
       #warning TODO test headroom or use skb->nb to flag ACK
      
      Karsten's original commit (from BitKeeper) contains this description:
      
          - here are lot of bugs left, so ISDN is not stable yet but
            I think it's really time to fix it, even if it need some cycles
            to get it right (normally I'm only send patches if it works 100% for
            me).
          - I add some additional #warnings to address places which need fixing
            (I hope that some of the other ISDN developer jump in)
      
      Apparently this has not happened, and it is unlikely that it ever will,
      given that the driver doesn't seem to work. No substantial bug fixes
      other than janitorial cleanups have happened in the driver since then,
      and I see no indication that anyone who patched it had the hardware.
      
      We should probably either remove the driver, or remove all of i4l,
      but for now, this shuts up the distracting #warning by turning it
      into a comment.
      Signed-off-by: 's avatarArnd Bergmann <arnd@arndb.de>
      Link: http://git.meleeweb.net/linux.git/commit/?id=b0deac0886b0056765afd149e9834373b38e096bSigned-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      01ed1e15
  10. 19 Feb, 2016 1 commit
    • Paul Bolle's avatar
      ser_gigaset: use container_of() instead of detour · 8d2c3ab4
      Paul Bolle authored
      The purpose of gigaset_device_release() is to kfree() the struct
      ser_cardstate that contains our struct device. This is done via a bit of
      a detour. First we make our struct device's driver_data point to the
      container of our struct ser_cardstate (which is a struct cardstate). In
      gigaset_device_release() we then retrieve that driver_data again. And
      after that we finally kfree() the struct ser_cardstate that was saved in
      the struct cardstate.
      
      All of this can be achieved much easier by using container_of() to get
      from our struct device to its container, struct ser_cardstate. Do so.
      
      Note that at the time the detour was implemented commit b8b2c7d8
      ("base/platform: assert that dev_pm_domain callbacks are called
      unconditionally") had just entered the tree. That commit disconnected
      our platform_device and our platform_driver. These were reconnected
      again in v4.5-rc2 through commit 25cad69f ("base/platform: Fix
      platform drivers with no probe callback"). And one of the consequences
      of that fix was that it broke the detour via driver_data. That's because
      it made __device_release_driver() stop being a NOP for our struct device
      and actually do stuff again. One of the things it now does, is setting
      our driver_data to NULL. That, in turn, makes it impossible for
      gigaset_device_release() to get to our struct cardstate. Which has the
      net effect of leaking a struct ser_cardstate at every call of this
      driver's tty close() operation. So using container_of() has the
      additional benefit of actually working.
      Reported-by: 's avatarDmitry Vyukov <dvyukov@google.com>
      Tested-by: 's avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: 's avatarPaul Bolle <pebolle@tiscali.nl>
      Acked-by: 's avatarTilman Schmidt <tilman@imap.cc>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      8d2c3ab4
  11. 18 Feb, 2016 2 commits
    • Anton Protopopov's avatar
      mISDN: prevent possible NULL pointer dereference · e60b13e4
      Anton Protopopov authored
      A return value of the bchannel_get_rxbuf() function is compared with the
      positive ENOMEM value instead of the negative -ENOMEM value to detect a
      memory allocation problem. Thus, after a possible memory allocation
      failure the bc->bch.rx_skb will be NULL which will lead to a NULL
      pointer dereference.
      Signed-off-by: 's avatarAnton Protopopov <a.s.protopopov@gmail.com>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      e60b13e4
    • Alison Schofield's avatar
      isdn: divamnt: use y2038-safe ktime_get_ts64() for trace data timestamps · 096f6262
      Alison Schofield authored
      divamnt stores a start_time at module init and uses it to calculate
      elapsed time. The elapsed time, stored in secs and usecs, is part of
      the trace data the driver maintains for the DIVA Server ISDN cards.
      No change to the format of that time data is required.
      
      To avoid overflow on 32-bit systems use ktime_get_ts64() to return
      the elapsed monotonic time since system boot.
      
      This is a change from real to monotonic time. Since the driver only
      stores elapsed time, monotonic time is sufficient and more robust
      against real time clock changes. These new monotonic values can be
      more useful for debugging because they can be easily compared to
      other monotonic timestamps.
      
      Note elaspsed time values will now start at system boot time rather
      than module load time, so they will differ slightly from previously
      reported values.
      
      Remove declaration and init of previously unused time constants:
      start_sec, start_usec.
      Signed-off-by: 's avatarAlison Schofield <amsfield22@gmail.com>
      Reviewed-by: 's avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      096f6262
  12. 28 Jan, 2016 1 commit
  13. 08 Jan, 2016 1 commit
  14. 15 Dec, 2015 5 commits
  15. 01 Dec, 2015 1 commit
    • Arnd Bergmann's avatar
      isdn: remove spellcaster driver · 6cc56834
      Arnd Bergmann authored
      The 'sc' ISDN driver relies on using readl() to access ISA I/O memory.
      This has been deprecated and produced warnings since linux-2.3.23,
      disabled by default since 2.4.10 and finally removed in 2.6.5.
      
      I found this because the compiling the driver for ARM produces
      a warning:
      
      In file included from ../drivers/isdn/sc/includes.h:8:0,
                       from ../drivers/isdn/sc/init.c:13:
      ../arch/arm/include/asm/io.h:115:21: note: expected 'const volatile void *' but argument is of type 'long unsigned int'
      
      It is pretty clear that this driver has not been used for a long time
      and there is no point fixing it now, so let's remove it.
      Signed-off-by: 's avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      6cc56834
  16. 25 Nov, 2015 1 commit
    • Christoph Biedl's avatar
      isdn: Partially revert debug format string usage clean up · 19cebbcb
      Christoph Biedl authored
      Commit 35a4a573 ("isdn: clean up debug format string usage") introduced
      a safeguard to avoid accidential format string interpolation of data
      when calling debugl1 or HiSax_putstatus. This did however not take into
      account VHiSax_putstatus (called by HiSax_putstatus) does *not* call
      vsprintf if the head parameter is NULL - the format string is treated
      as plain text then instead. As a result, the string "%s" is processed
      literally, and the actual information is lost. This affects the isdnlog
      userspace program which stopped logging information since that commit.
      
      So revert the HiSax_putstatus invocations to the previous state.
      
      Fixes: 35a4a573 ("isdn: clean up debug format string usage")
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Signed-off-by: 's avatarChristoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      19cebbcb
  17. 02 Nov, 2015 2 commits
  18. 22 Oct, 2015 2 commits
    • Karsten Keil's avatar
      mISDN: fix OOM condition for sending queued I-Frames · c96356a9
      Karsten Keil authored
      The old code did not check the return value of skb_clone().
      The extra skb_clone() is not needed at all, if using skb_realloc_headroom()
      instead, which gives us a private copy with enough headroom as well.
      We need to requeue the original skb if the call failed, because we cannot
      inform upper layers about the data loss. Restructure the code to minimise
      rollback effort if it happens.
      This fix kernel bug #86091
      
      Thanks to Insu Yun <wuninsu@gmail.com> to remind me on this issue.
      Signed-off-by: 's avatarKarsten Keil <keil@b1-systems.de>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      c96356a9
    • Karsten Keil's avatar
      ISDN: fix OOM condition for sending queued I-Frames · c7a7c95e
      Karsten Keil authored
      The skb_clone() return value was not checked and the skb_realloc_headroom()
      usage was wrong, the old skb was not freed. It turned out, that the
      skb_clone is not needed at all, the skb_realloc_headroom() will create a
      private copy with enough headroom and the original SKB can be used for the
      ACK queue.
      We need to requeue the original skb if the call failed, since the upper
      layer cannot be informed about memory shortage.
      
      Thanks to Insu Yun <wuninsu@gmail.com> to remind me on this issue.
      Signed-off-by: 's avatarKarsten Keil <keil@b1-systems.de>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      c7a7c95e
  19. 17 Oct, 2015 1 commit
    • Peter Hurley's avatar
      tty: Remove tty_wait_until_sent_from_close() · 79c1faa4
      Peter Hurley authored
      tty_wait_until_sent_from_close() drops the tty lock while waiting
      for the tty driver to finish sending previously accepted data (ie.,
      data remaining in its write buffer and transmit fifo).
      
      tty_wait_until_sent_from_close() was added by commit a57a7bf3
      ("TTY: define tty_wait_until_sent_from_close") to prevent the entire
      tty subsystem from being unable to open new ttys while waiting for
      one tty to close while output drained.
      
      However, since commit 0911261d ("tty: Don't take tty_mutex for tty
      count changes"), holding a tty lock while closing does not prevent other
      ttys from being opened/closed/hung up, but only prevents lifetime event
      changes for the tty under lock.
      
      Holding the tty lock while waiting for output to drain does prevent
      parallel non-blocking opens (O_NONBLOCK) from advancing or returning
      while the tty lock is held. However, all parallel opens _already_
      block even if the tty lock is dropped while closing and the parallel
      open advances. Blocking in open has been in mainline since at least 2.6.29
      (see tty_port_block_til_ready(); note the test for O_NONBLOCK is _after_
      the wait while ASYNC_CLOSING).
      
      IOW, before this patch a non-blocking open will sleep anyway for the
      _entire_ duration of a parallel hardware shutdown, and when it wakes, the
      error return will cause a release of its tty, and it will restart with
      a fresh attempt to open. Similarly with a blocking open that is already
      waiting; when it's woken, the hardware shutdown has already completed
      to ASYNC_INITIALIZED is not set, which forces a release and restart as
      well.
      
      So, holding the tty lock across the _entire_ close (which is what this
      patch does), even while waiting for output to drain, is equivalent to
      the current outcome wrt parallel opens.
      
      Cc: Alan Cox <alan@linux.intel.com>
      Cc: David Laight <David.Laight@aculab.com>
      CC: Arnd Bergmann <arnd@arndb.de>
      CC: Karsten Keil <isdn@linux-pingi.de>
      CC: linuxppc-dev@lists.ozlabs.org
      Signed-off-by: 's avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      79c1faa4
  20. 13 Oct, 2015 1 commit
  21. 22 Sep, 2015 1 commit
  22. 10 Aug, 2015 2 commits
  23. 07 Aug, 2015 1 commit
  24. 15 Jul, 2015 2 commits
  25. 21 Jun, 2015 1 commit
    • Nicolai Stange's avatar
      isdn: disable HiSax NetJet driver on microblaze arch · 7b48f457
      Nicolai Stange authored
      Fix an allmodconfig compilation failer on microblaze due to big endian
      architectures being apparently unsupported by the NetJet code:
        drivers/isdn/hisax/nj_s.c: In function 'setup_netjet_s':
        drivers/isdn/hisax/nj_s.c:265:2:
            error: #error "not running on big endian machines now"
      
      Modify the relevant Kconfig such that the NetJet code is not built on
      microblaze anymore.
      
      Note that endianess on microblaze is not determined through Kconfig,
      but by means of a compiler provided CPP macro, namely __MICROBLAZEEL__.
      However, gcc defaults to big endianess on that platform.
      Signed-off-by: 's avatarNicolai Stange <nicstange@gmail.com>
      Acked-by: 's avatarJean Delvare <jdelvare@suse.de>
      Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
      7b48f457
  26. 07 Jun, 2015 1 commit