1. 13 Feb, 2014 8 commits
    • Joe Schultz's avatar
      serial: 8250: Support XR17V35x fraction divisor · 45a7bd63
      Joe Schultz authored
      The Exar XR17V35x family of UARTs have an additional fractional divisor
      register (DLD) which was not being used. Calculate and set this
      register for these devices to reduce their baud rate error.
      Signed-off-by: default avatarJoe Schultz <jschultz@xes-inc.com>
      Signed-off-by: default avatarAaron Sierra <asierra@xes-inc.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      45a7bd63
    • Peter Hurley's avatar
      n_tty: Fix stale echo output · e2613be5
      Peter Hurley authored
      When echoes cannot be flushed to output (usually because the tty
      has no more write room) and L_ECHO is subsequently turned off, then
      when L_ECHO is turned back on, stale echoes are output.
      
      Output completed echoes regardless of the L_ECHO setting:
        1. before normal writes to that tty
        2. if the tty was stopped by soft flow control and is being
           restarted
      Reported-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Cc: <stable@vger.kernel.org> # 3.13.x
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e2613be5
    • Qipan Li's avatar
      serial: sirf: fix kernel panic caused by unpaired spinlock · fb78b811
      Qipan Li authored
      commit 8b9ade9f coming from Viresh Kumar "tty: serial: sirfsoc: drop
      uart_port->lock before calling tty_flip_buffer_push()" broke sirfsoc uart
      driver by knic:
      
      	[    5.129122] BUG: spinlock already unlocked on CPU#0, ip6tables/1331
      	[    5.132554]  lock: sirfsoc_uart_ports+0x4/0x8a0, .magic: dead4ead,
      	.owner: <none>/-1, .owner_cpu: -1
      	[    5.141651] CPU: 0 PID: 1331 Comm: ip6tables Tainted: G
      	W  O 3.10.16 #3
      	[    5.148866] [<c0013528>] (unwind_backtrace+0x0/0xe0) from
      	[<c0010e70>] (show_stack+0x10/0x14)
      	[    5.157362] [<c0010e70>] (show_stack+0x10/0x14) from
      	[<c01a5e68>] (do_raw_spin_unlock+0x40/0xc8)
      	[    5.166125] [<c01a5e68>] (do_raw_spin_unlock+0x40/0xc8) from
      	[<c03ff8b4>] (_raw_spin_unlock+0x8/0x40)
      	[    5.175322] [<c03ff8b4>] (_raw_spin_unlock+0x8/0x40) from
      	[<c0203fcc>] (sirfsoc_uart_pio_rx_chars+0xa4/0xc0)
      	[    5.185120] [<c0203fcc>]
      	(sirfsoc_uart_pio_rx_chars+0xa4/0xc0) from [<c0204fb8>]
      	(sirfsoc_rx_tmo_process_tl+0xdc/0x1e0)
      	[    5.195875] [<c0204fb8>]
      	(sirfsoc_rx_tmo_process_tl+0xdc/0x1e0) from [<c0024b50>]
      	(tasklet_action+0x8c/0xec)
      	[    5.205673] [<c0024b50>] (tasklet_action+0x8c/0xec) from
      	[<c00242a8>] (__do_softirq+0xec/0x1d4)
      	[    5.214347] [<c00242a8>] (__do_softirq+0xec/0x1d4) from
      	[<c0024428>] (do_softirq+0x48/0x54)
      	[    5.222674] [<c0024428>] (do_softirq+0x48/0x54) from
      	[<c0024690>] (irq_exit+0x74/0xc0)
      	[    5.230573] [<c0024690>] (irq_exit+0x74/0xc0) from
      	[<c000e1e8>] (handle_IRQ+0x6c/0x90)
      	[    5.238465] [<c000e1e8>] (handle_IRQ+0x6c/0x90) from
      	[<c000d500>] (__irq_svc+0x40/0x70)
      	[    5.246446] [<c000d500>] (__irq_svc+0x40/0x70) from
      	[<c0092e7c>] (mark_page_accessed+0xc/0x68)
      	[    5.255034] [<c0092e7c>] (mark_page_accessed+0xc/0x68) from
      	[<c00a2a4c>] (unmap_single_vma+0x3bc/0x550)
      	[    5.264402] [<c00a2a4c>] (unmap_single_vma+0x3bc/0x550) from
      	[<c00a3b4c>] (unmap_vmas+0x44/0x54)
      	[    5.273164] [<c00a3b4c>] (unmap_vmas+0x44/0x54) from
      	[<c00a81a8>] (exit_mmap+0xc4/0x1e0)
      	[    5.281233] [<c00a81a8>] (exit_mmap+0xc4/0x1e0) from
      	[<c001bb78>] (mmput+0x3c/0xdc)
      	[    5.288868] [<c001bb78>] (mmput+0x3c/0xdc) from [<c0021b0c>]
      	(do_exit+0x30c/0x828)
      	[    5.296413] [<c0021b0c>] (do_exit+0x30c/0x828) from
      	[<c0022dac>] (do_group_exit+0x4c/0xb0)
      	[    5.304653] [<c0022dac>] (do_group_exit+0x4c/0xb0) from
      	[<c0022e20>] (__wake_up_parent+0x0/0x18)
      
      Root cause:
      the commit dropped uart_port->lock before calling tty_flip_buffer_push(), but in sirfsoc-uart,
      sirfsoc_uart_pio_rx_chars() can be called by sirfsoc_rx_tmo_process_tl(). here uart_port->lock
      has not been taken yet. so that caused unpaired lock/unlock.
      
      Solution:
      This patch is doing a quick fix for that, it adds spin_lock/unlock(&port->lock) protect to
      sirfsoc_uart_pio_rx_chars() in sirfsoc_rx_tmo_process_tl() to keep spin_lock/unlock in pair.
      Signed-off-by: default avatarQipan Li <Qipan.Li@csr.com>
      Signed-off-by: default avatarBarry Song <Baohua.Song@csr.com>
      Cc: stable <stable@vger.kernel.org> # 3.12
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fb78b811
    • Dmitry Eremin-Solenikov's avatar
      serial: 8250_pci: unbreak last serial ports on NetMos 9865 cards · 333c085e
      Dmitry Eremin-Solenikov authored
      Aparently 9865 uses standard BAR encoding scheme (unlike 99xx cards).
      Current pci_netmos_9900_setup() uses wrong BAR indices for the 9865 PCI
      device, function 2. Using standard BAR indices makes all 6 ports work
      for me. Thus disable the NetMos 9900 quirk for NetMos 9865 pci device.
      
      For the reference, here is the relevant part of lspci for my device:
      
      02:07.0 Serial controller: MosChip Semiconductor Technology Ltd. PCI
      9865 Multi-I/O Controller (prog-if 02 [16550])
      	Subsystem: Device a000:1000
      	Flags: bus master, medium devsel, latency 32, IRQ 17
      	I/O ports at ac00 [size=8]
      	Memory at fcfff000 (32-bit, non-prefetchable) [size=4K]
      	Memory at fcffe000 (32-bit, non-prefetchable) [size=4K]
      	Capabilities: [48] Power Management version 2
      	Kernel driver in use: serial
      
      02:07.1 Serial controller: MosChip Semiconductor Technology Ltd. PCI
      9865 Multi-I/O Controller (prog-if 02 [16550])
      	Subsystem: Device a000:1000
      	Flags: bus master, medium devsel, latency 32, IRQ 18
      	I/O ports at a800 [size=8]
      	Memory at fcffd000 (32-bit, non-prefetchable) [size=4K]
      	Memory at fcffc000 (32-bit, non-prefetchable) [size=4K]
      	Capabilities: [48] Power Management version 2
      	Kernel driver in use: serial
      
      02:07.2 Communication controller: MosChip Semiconductor Technology Ltd.
      PCI 9865 Multi-I/O Controller
      	Subsystem: Device a000:3004
      	Flags: bus master, medium devsel, latency 32, IRQ 19
      	I/O ports at a400 [size=8]
      	I/O ports at a000 [size=8]
      	I/O ports at 9c00 [size=8]
      	I/O ports at 9800 [size=8]
      	Memory at fcffb000 (32-bit, non-prefetchable) [size=4K]
      	Capabilities: [48] Power Management version 2
      	Kernel driver in use: serial
      Signed-off-by: default avatarDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      333c085e
    • Peter Hurley's avatar
      n_tty: Fix poll() when TIME_CHAR and MIN_CHAR == 0 · a5934804
      Peter Hurley authored
      Commit eafbe67f,
        n_tty: Refactor input_available_p() by call site
      broke poll() when TIME_CHAR(tty) and MIN_CHAR(tty) are both 0.
      
      When TIME_CHAR and MIN_CHAR are both 0, input is available if the
      read_cnt is 1 (not 0).
      Reported-by: default avatarEric Dumazet <edumazet@google.com>
      Tested-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarStephane Eranian <eranian@google.com>
      Tested-by: default avatarDavid Ahern <dsahern@gmail.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a5934804
    • Michael Grzeschik's avatar
      serial: omap: fix rs485 probe on defered pinctrl · a64c1a1c
      Michael Grzeschik authored
      If the gpio is not yet available we better also
      defer the probing in the rs485 case.
      Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
      Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a64c1a1c
    • Mika Westerberg's avatar
      serial: 8250_dw: fix compilation warning when !CONFIG_PM_SLEEP · 13b949f0
      Mika Westerberg authored
      CONFIG_PM will be set if either or both CONFIG_PM_SLEEP and
      CONFIG_PM_RUNTIME is set. Compiling the driver with !CONFIG_PM_SLEEP causes
      following compilation warnings:
      
      drivers/tty/serial/8250/8250_dw.c:404:12: warning: ‘dw8250_suspend’ defined but not used [-Wunused-function]
      drivers/tty/serial/8250/8250_dw.c:413:12: warning: ‘dw8250_resume’ defined but not used [-Wunused-function]
      
      Fix this by using CONFIG_PM_SLEEP instead.
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      13b949f0
    • Markus Pargmann's avatar
      serial: omap-serial: Move info message to probe function · ce6acca6
      Markus Pargmann authored
      Currently the info message about a missing wakeirq for uart is printed
      every time the serial driver's startup function is called. This happens
      multiple times and not just once.
      
      This can cause lots of extra messages at boot time, slowing things down.  It is
      caused by commit 2a0b965c (serial: omap: Add support for optional wake-up)
      which was applied for v3.13-rc1.
      
      This patch moves the infomessage to the probe function to display it
      only once.
      Reported-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
      Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Cc: stable <stable@vger.kernel.org> # 3.13
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ce6acca6
  2. 07 Feb, 2014 3 commits
    • Hannes Reinecke's avatar
      tty: Set correct tty name in 'active' sysfs attribute · d8a5dc30
      Hannes Reinecke authored
      The 'active' sysfs attribute should refer to the currently active tty
      devices the console is running on, not the currently active console.
      
      The console structure doesn't refer to any device in sysfs, only the tty
      the console is running on has.  So we need to print out the tty names in
      'active', not the console names.
      
      This resolves an issue on s390 platforms in determining the correct
      console device to use.
      
      Cc: Lennart Poettering <lennart@poettering.net>
      Cc: Kay Sievers <kay@vrfy.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: default avatarWerner Fink <werner@suse.de>
      Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d8a5dc30
    • Lars Poeschel's avatar
      tty: n_gsm: Fix for modems with brk in modem status control · 3ac06b90
      Lars Poeschel authored
      3GPP TS 07.10 states in section 5.4.6.3.7:
      "The length byte contains the value 2 or 3 ... depending on the break
      signal." The break byte is optional and if it is sent, the length is
      3. In fact the driver was not able to work with modems that send this
      break byte in their modem status control message. If the modem just
      sends the break byte if it is really set, then weird things might
      happen.
      The code for deconding the modem status to the internal linux
      presentation in gsm_process_modem has already a big comment about
      this 2 or 3 byte length thing and it is already able to decode the
      brk, but the code calling the gsm_process_modem function in
      gsm_control_modem does not encode it and hand it over the right way.
      This patch fixes this.
      Without this fix if the modem sends the brk byte in it's modem status
      control message the driver will hang when opening a muxed channel.
      Signed-off-by: default avatarLars Poeschel <poeschel@lemonage.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3ac06b90
    • Paul Gortmaker's avatar
      drivers/tty/hvc: don't use module_init in non-modular hyp. console code · 4fedd0bf
      Paul Gortmaker authored
      The HVC_OPAL/RTAS/UDBG/XEN options are all bool, and hence their support
      is either present or absent.  It will never be modular, so using
      module_init as an alias for __initcall is rather misleading.
      
      Fix this up now, so that we can relocate module_init from
      init.h into module.h in the future.  If we don't do this, we'd
      have to add module.h to obviously non-modular code, and that
      would be a worse thing.
      
      Note that direct use of __initcall is discouraged, vs. one
      of the priority categorized subgroups.  As __initcall gets
      mapped onto device_initcall, our use of device_initcall
      directly in this change means that the runtime impact is
      zero -- it will remain at level 6 in initcall ordering.
      
      Also the __exitcall functions have been outright deleted since
      they are only ever of interest to UML, and UML will never be
      using any of this code.
      
      Cc: Richard Weinberger <richard@nod.at>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      Acked-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4fedd0bf
  3. 03 Feb, 2014 4 commits
    • Linus Torvalds's avatar
      Linus 3.14-rc1 · 38dbfb59
      Linus Torvalds authored
      38dbfb59
    • Linus Torvalds's avatar
      Merge branch 'parisc-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 69048e01
      Linus Torvalds authored
      Pull parisc updates from Helge Deller:
       "The three major changes in this patchset is a implementation for
        flexible userspace memory maps, cache-flushing fixes (again), and a
        long-discussed ABI change to make EWOULDBLOCK the same value as
        EAGAIN.
      
        parisc has been the only platform where we had EWOULDBLOCK != EAGAIN
        to keep HP-UX compatibility.  Since we will probably never implement
        full HP-UX support, we prefer to drop this compatibility to make it
        easier for us with Linux userspace programs which mostly never checked
        for both values.  We don't expect major fall-outs because of this
        change, and if we face some, we will simply rebuild the necessary
        applications in the debian archives"
      
      * 'parisc-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: add flexible mmap memory layout support
        parisc: Make EWOULDBLOCK be equal to EAGAIN on parisc
        parisc: convert uapi/asm/stat.h to use native types only
        parisc: wire up sched_setattr and sched_getattr
        parisc: fix cache-flushing
        parisc/sti_console: prefer Linux fonts over built-in ROM fonts
      69048e01
    • Mikulas Patocka's avatar
      hpfs: optimize quad buffer loading · 1c0b8a7a
      Mikulas Patocka authored
      HPFS needs to load 4 consecutive 512-byte sectors when accessing the
      directory nodes or bitmaps.  We can't switch to 2048-byte block size
      because files are allocated in the units of 512-byte sectors.
      
      Previously, the driver would allocate a 2048-byte area using kmalloc,
      copy the data from four buffers to this area and eventually copy them
      back if they were modified.
      
      In the current implementation of the buffer cache, buffers are allocated
      in the pagecache.  That means that 4 consecutive 512-byte buffers are
      stored in consecutive areas in the kernel address space.  So, we don't
      need to allocate extra memory and copy the content of the buffers there.
      
      This patch optimizes the code to avoid copying the buffers.  It checks
      if the four buffers are stored in contiguous memory - if they are not,
      it falls back to allocating a 2048-byte area and copying data there.
      Signed-off-by: default avatarMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c0b8a7a
    • Mikulas Patocka's avatar
      hpfs: remember free space · 2cbe5c76
      Mikulas Patocka authored
      Previously, hpfs scanned all bitmaps each time the user asked for free
      space using statfs.  This patch changes it so that hpfs scans the
      bitmaps only once, remembes the free space and on next invocation of
      statfs it returns the value instantly.
      
      New versions of wine are hammering on the statfs syscall very heavily,
      making some games unplayable when they're stored on hpfs, with load
      times in minutes.
      
      This should be backported to the stable kernels because it fixes
      user-visible problem (excessive level load times in wine).
      Signed-off-by: default avatarMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2cbe5c76
  4. 02 Feb, 2014 12 commits
  5. 01 Feb, 2014 12 commits
  6. 31 Jan, 2014 1 commit
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-3.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 8a1f006a
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights:
      
         - Fix several races in nfs_revalidate_mapping
         - NFSv4.1 slot leakage in the pNFS files driver
         - Stable fix for a slot leak in nfs40_sequence_done
         - Don't reject NFSv4 servers that support ACLs with only ALLOW aces"
      
      * tag 'nfs-for-3.14-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        nfs: initialize the ACL support bits to zero.
        NFSv4.1: Cleanup
        NFSv4.1: Clean up nfs41_sequence_done
        NFSv4: Fix a slot leak in nfs40_sequence_done
        NFSv4.1 free slot before resending I/O to MDS
        nfs: add memory barriers around NFS_INO_INVALID_DATA and NFS_INO_INVALIDATING
        NFS: Fix races in nfs_revalidate_mapping
        sunrpc: turn warn_gssd() log message into a dprintk()
        NFS: fix the handling of NFS_INO_INVALID_DATA flag in nfs_revalidate_mapping
        nfs: handle servers that support only ALLOW ACE type.
      8a1f006a