1
0
Fork 0
Commit Graph

547263 Commits (ba172c70451ed6688a31e27d8bb5a4631c2003de)

Author SHA1 Message Date
Geert Uytterhoeven ba172c7045 serial: sh-sci: Use incrementing pointers instead of stack array
There's no need to keep all buffer and DMA pointers on the stack.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 47b0e94a67 serial: sh-sci: Use tty_insert_flip_string() for DMA receive
Switch from using tty_buffer_request_room() and looping over
tty_insert_flip_char() to tty_insert_flip_string().
Keep track of buffer overruns in the icount structure, like
serial_core.c does.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 0533502d25 serial: sh-sci: Pass scatterlist to sci_dma_rx_push()
Currently sci_dma_rx_push() has to find the active scatterlist itself,
but in some cases the caller already knows.

Hence let the caller pass the scatterlist, and introduce a helper to
find the active DMA request while we're at it.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 04928b79d2 serial: sh-sci: Fix race condition between RX worker and cleanup
During serial port shutdown, the DMA receive worker function may still
be called after the receive DMA cleanup function has been called.
Fix this race condition between work_fn_rx() and sci_rx_dma_release() by
acquiring the port's spinlock in sci_rx_dma_release().
This requires releasing the spinlock in work_fn_rx() before calling (any
function that may call) sci_rx_dma_release().

Terminate all active receive DMA descriptors to release them, and to
make sure no more completions come in.

Do the same in sci_tx_dma_release() for symmetry, although the serial
upper layer will no longer submit more data at this point of time.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Kazuya Mizuguchi 0907c1004f serial: sh-sci: Fix exclusion of work_fn_rx and sci_dma_rx_complete
There is a problem when the sci_dma_rx_complete() is processed
before cancel process of work_fn_rx() completes by rx_timer_fn().
This patch locks work_fn_rx().

Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 47aceb927f serial: sh-sci: Do not resubmit DMA descriptors
Resubmission of DMA descriptors is explicitly forbidden by the DMA
engine API.

Hence pass DMA_CTRL_ACK to dmaengine_prep_slave_sg(), and prepare a new
DMA descriptor instead of reusing the old one.
Remove sci_port.desc_rx[], as there's no longer a need to access the
active descriptor.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 658daa95b6 serial: sh-sci: Simplify sci_submit_rx() error handling
Simplify the error handling in sci_submit_rx() by
  - Moving it to the end of the function,
  - Just calling dmaengine_terminate_all() instead of calling
    async_tx_ack() for all already submitted descriptors.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 32f2ce031f serial: sh-sci: Stop acknowledging DMA transmit completions
As dmaengine_prep_slave_sg() is called with the DMA_CTRL_ACK flag set
for DMA transmit requests, there's no need to explicitly acknowledge DMA
transmit requests in the DMA transmit completion callback.

Hence remove the call to async_tx_ack(), and remove the now unused
dma_async_tx_descriptor pointer in the sci_port structure.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 565dd11aa7 serial: sh-sci: Switch to generic DMA residue handling
Convert the SCI driver from the SHDMAE-specific partial DMA transfer
handling to the generic dmaengine residual data framework.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 3e14670c06 serial: sh-sci: Use DMA submission helpers instead of open-coding
Replace open-coded
  - calls to dma_async_tx_descriptor.tx_submit() by calls to the
    dmaengine_submit() helper,
  - dma_cookie_t comparisons by calls to dma_submit_error().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 2e301474f1 serial: sh-sci: Fix TX buffer mapping leak
The mapped transmit buffer is never unmapped. This leaks quite some
mappings, as the mapping is done in uart_ops.startup(), i.e. every time
the device is opened. Unmap the buffer on device close.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 79904420b7 serial: sh-sci: Switch to dma_map_single() for DMA transmission
Simplify the DMA transmit code by using dma_map_single() instead of
constantly modifying the single-entry scatterlist to match what's
currently being transmitted.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 092248aa32 serial: sh-sci: Use min_t()/max_t() instead of casts
When comparing differently sized types, it's better to use
min_t()/max_t() than adding casts.

Also use "unsigned int" instead of "int", as that's the right type for
the length of an SG entry.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 8e14ba8f8b serial: sh-sci: Use correct device for DMA mapping with IOMMU
To function correctly in the presence of an IOMMU, the DMA buffers must
be managed using the DMA channel's device instead of the platform
device's device.

Make sure to free the DMA memory before releasing the channel, not
after.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven b925802026 serial: sh-sci: Handle DMA init failures inside sci_request_dma()
Let sci_request_dma() handle failures to initialize DMA itself.
This way sci_tx_dma_release() and sci_rx_dma_release() don't have to
consider partial initialization, and thus don't need to reset DMA
addresses to DMA_ERROR_CODE, which is not 100% portable access
architectures.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven f5835c1d0e serial: sh-sci: Improve comments for DMA timeout calculation
Reformat, grammar improvements, use "ms" instead of "msec".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven beb9487b0c serial: sh-sci: Improve DMA error messages
Make the life of the driver developer/debugger easier:
  - Add __func__ prefix to identical messages,
  - Add DMA directions to messages,
  - Add TX failure messages,
  - Always use "cookie %d" for DMA cookies,
  - "#%d" is reserved for the DMA cookie/descriptor index.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Yoshihiro Shimoda 908030727b serial: sh-sci: Return IRQ_HANDLED when overrun if detected
This patch fix an issue that the driver may cause "nobody cared" IRQ
when this driver detects the overrun flag only.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven e0a12a27e8 serial: sh-sci: Remove bogus sci_handle_fifo_overrun() call on (H)SCIF
Commit 8b6ff84c2d ("serial: sh-sci: Fix R-Car SCIF and HSCIF
overrun handling") added overrun handling for (H)SCIF using the SCLSR
register, but also accidentally added a bogus call to
sci_handle_fifo_overrun() in the receive interrupt path.

Remove it again.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 4205463ce1 serial: sh-sci: Remove useless memory allocation failure printks
Printing an error on memory allocation failures is unnecessary.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven d3184e6886 serial: sh-sci: Make sci_regmap[] const
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven d56a91e812 serial: sh-sci: Make sci_irq_desc[] const
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven f84b6bdcab serial: sh-sci: Improve readability of sampling rate configuration
Reorder sampling_rate assignment for consistency in all cases of the
switch statement.
Avoid using the ternary conditional operator to make it more clear that
the value is overridden by platform data.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven b933bd3200 serial: sh-sci: Drop path in reference to serial_core.c
serial_core.c was moved from drivers/serial/ to drivers/tty/serial/ a
while ago. Remove the path to make it move-proof.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 2944a331b7 serial: sh-sci: Use SCSMR_CKS instead of hardcoded literal 3
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 54af5001e1 serial: sh-sci: Use SCIF_DR instead of hardcoded literal 1
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven 5da0f46874 serial: sh-sci: Correct SCIF_ERROR_CLEAR for plain SCIF
SCIF_ERROR_CLEAR includes SCIFA_ORER, which exists only on SCIFA/SCIFB
and SCIF on sh7705/sh7720/sh7721.

To fix this:
  1. Remove SCIFA_ORER from the definition of SCIF_ERROR_CLEAR,
  2. During initialization, store the error clear mask to use,
     incorporating the overrun bit only if it applies to the SCxSR
     register.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven a9efeca613 serial: sh-sci: Prevent compiler warnings on 64-bit
Expressions involving "BIT(...)" create values of type "long", which is
64-bit on 64-bit.  Hence "~BIT(...)" no longer fits in 32-bit, which
will cause future compiler warnings when assigning to 32-bit variables:

    drivers/tty/serial/sh-sci.c: In function 'sci_init_single':
    drivers/tty/serial/sh-sci.h:58:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
     #define SCI_ERROR_CLEAR ~(SCI_RESERVED | SCI_PER | SCI_FER | SCI_ORER)
			     ^
    drivers/tty/serial/sh-sci.c:2325:27: note: in expansion of macro 'SCI_ERROR_CLEAR'
       sci_port->error_clear = SCI_ERROR_CLEAR;

As these values are (at most) 32-bit register values anyway, cast them
to "u32" at the definition level to prevent such compiler warnings.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Geert Uytterhoeven a1b5b43ffb serial: sh-sci: Replace buggy big #ifdef by runtime logic
The #ifdef logic to clear SCxSR bits using RMW on SCIFA/SCIFB and SCIF
variants with some SCIFA features (sh7705/SH7720/sh7721) has several
drawbacks:
  - It wasn't updated for newer R-Mobile variants (APE6),
  - It doesn't correctly handle SoCs with both SCIF and SCIFA/B (e.g.
    R-Car Gen2, but also legacy sh7723/sh7724),
  - It doesn't play well with ARM multi-platform kernels: on R-Car Gen2,
    SCIF/SCIFA/SCIFB/HSCIF were handled differently, depending on
    whether r8a7740 or sh73a0 support was enabled or not,

Replace the #ifdef logic by runtime logic to fix this.

SCIFA/SCIFB and SCIF on sh7705/sh7720/sh7721 use RMW to clear error
bits, other variants use plain stores, as before.

Note that this changes behavior for SCIFA on sh7723/sh7724 (these SoCs
have both SCIF and SCIFA), which didn't use RMW before.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:33:48 +01:00
Taichi Kageyama 9a23a1d10b serial: 8250: Fix autoconfig_irq() to avoid race conditions
The following race conditions can happen when a serial port is used
as console.

Case1: CPU_B is used to detect an interrupt from a serial port,
       but it can have interrupts disabled during the waiting time.
Case2: CPU_B clears UART_IER just after CPU_A sets UART_IER and then
       a serial port may not make an interrupt.
Case3: CPU_A sets UART_IER just after CPU_B clears UART_IER.
       This is an unexpected behavior for serial8250_console_write().

CPU_A [autoconfig_irq]      |  CPU_B [serial8250_console_write]
----------------------------|---------------------------------------
                            |
probe_irq_on()              |  spin_lock_irqsave(&port->lock,)
serial_outp(,UART_IER,0x0f) |  serial_out(,UART_IER,0)
udelay(20);                 |  uart_console_write()
probe_irq_off()             |
                            |  spin_unlock_irqrestore(&port->lock,)

Case1 and 2 can make autoconfig_irq() failed.
In these cases, the console doesn't work in interrupt mode and
"input overrun" (which can make operation mistakes) can happen
on some systems. Especially in the Case1, It is known that the
problem happens with high rate every boot once it occurs
because the boot sequence is always almost same.

port mutex makes sure that the autoconfig operation is exclusive of
any other concurrent HW access except by the console operation.
console lock is required in autoconfig_irq().

Signed-off-by: Taichi Kageyama <t-kageyama@cp.jp.nec.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:30:20 +01:00
Uwe Kleine-König e4b4e3176f serial: mpc52xx: add delay after resetting transmitter to fix broken chars
This fixes receiving broken characters on the console from an MPC5125
system when systemd comes up which repeatedly opens and shuts down the
console device.

Trial and error with the needed interval showed that 500 us are good
enough most of the time when using 38400 Bd, so I think 1 ms is a good
compromise between fixing the issue and not penalize faster setups too
much.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:27:56 +01:00
Paul Gortmaker 0b1dd999b6 drivers/tty: make serial 8250_lpc18xx.c Kconfig a tristate
The Kconfig currently controlling compilation of this code is:

8250/Kconfig:config SERIAL_8250_LPC18XX
8250/Kconfig:        bool "NXP LPC18xx/43xx serial port support"

...meaning that it currently is not being built as a module by anyone.

When targetting orphaned modular code in non-modular drivers, this
came up.  Joachim indicated that the driver was actually meant to
be tristate but ended up bool by accident.  So here we make it
tristate instead of removing the modular code that was essentially
orphaned.

Suggested-by: Joachim Eastwood <manabian@gmail.com>
Cc: Jiri Slaby <jslaby@suse.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:27:56 +01:00
Paul Gortmaker 128a3d0603 drivers/tty: make serial/mpsc.c driver explicitly non-modular
The Kconfig for this driver is currently:

config SERIAL_MPSC
        bool "Marvell MPSC serial port support"

...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

We leave some tags like MODULE_AUTHOR for documentation purposes.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:27:56 +01:00
Paul Gortmaker 4b07dd3df3 drivers/tty: make hvc_console.c explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/tty/hvc/Kconfig:config HVC_DRIVER
drivers/tty/hvc/Kconfig:        bool

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only, even
though someone bothered to comment that the code was not used.

Unlike other changes, this driver binds in w/o using module_init,
so we dont have init ordering concerns with this commit.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:27:56 +01:00
Paul Gortmaker 3bce6f6434 drivers/tty: make sysrq.c slightly more explicitly non-modular
The Kconfig currently controlling compilation of this code is:

config.debug:config MAGIC_SYSRQ
      bool "Magic SysRq key"

...meaning that it currently is not being built as a module by anyone.

Lets remove the traces of modularity we can so that when reading the
driver there is less doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

We don't delete the module.h include since other parts of the file are
using content from there.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:27:56 +01:00
Paul Gortmaker 7154988fec drivers/tty: make pty.c slightly more explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/tty/Kconfig:config LEGACY_PTYS
drivers/tty/Kconfig:    bool "Legacy (BSD) PTY support"

...and:

drivers/tty/Kconfig:config UNIX98_PTYS
drivers/tty/Kconfig:    bool "Unix98 PTY support" if EXPERT

combined with this:

obj-$(CONFIG_LEGACY_PTYS)       += pty.o
obj-$(CONFIG_UNIX98_PTYS)       += pty.o

...meaning that it currently is not being built as a module by anyone.

Lets remove the traces of modularity we can so that when reading the
driver there is less doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

We don't delete the module.h include since other parts of the file are
using content from there.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:27:56 +01:00
Maciej S. Szmigiero e4fda3a042 serial: don't register CIR serial ports
CIR type serial ports aren't real serial ports.

This is just a way to prevent legacy 8250 serial
driver from probing and eventually binding some
resources.

Since in current state such ports aren't providing
any real functionality and it is not possible
to change their type via setserial/ioctl(TIOCSSERIAL)
(due to UPF_FIXED_PORT flag set on them)
it is simpler and cleaner to not register them at all
with serial core.

Print a short message in this case so it is known
to user what has happened.

This way checks for PORT_8250_CIR in serial port
callbacks can be removed too, since they won't
ever be called.

Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:23:52 +01:00
Sebastian Andrzej Siewior 658e2ebce5 serial: 8250_omap: check how many bytes were injected
The function tty_insert_flip_string() returns an int and as such it
might fail. So the result is that I kindly asked to insert 48 bytes and
the function only insterted 32.
I have no idea what to do with the remaining 16 so I think dropping them
is the only option. I also increase the buf_overrun counter so userpace
has a clue that we lost bytes.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 17:23:52 +01:00
Linus Torvalds 9ffecb1028 Linux 4.3-rc3 2015-09-27 07:50:08 -04:00
Linus Torvalds 162e6df47c Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
 "Two bugfixes from Andy addressing at least some of the subtle NMI
  related wreckage which has been reported by Sasha Levin"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/nmi/64: Fix a paravirt stack-clobbering bug in the NMI code
  x86/paravirt: Replace the paravirt nop with a bona fide empty function
2015-09-27 06:51:42 -04:00
Linus Torvalds 5a6bdf06bb Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fix from Thomass Gleixner:
 "A bugfix for the atmel aic5 irq chip driver which caches the wrong
  data and thereby breaking resume"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/atmel-aic5: Use per chip mask caches in mask/unmask()
2015-09-27 06:50:23 -04:00
Linus Torvalds c905929ac9 Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Pull ARM fixes from Russell King:
 "Just two fixes: wire up the new system calls added during the last
  merge window, and fix another user access site"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: alignment: fix alignment handling for uaccess changes
  ARM: wire up new syscalls
2015-09-27 06:48:48 -04:00
Linus Torvalds 685b5f1de6 ARM: SoC fixes for v4.3-rc
Our first real batch of fixes this release cycle. There's a collection of
 them here:
 
 - A fixup for a build breakage that hits on arm64 allmodconfig in QCOM SCM
   firmware drivers
 - MMC fixes for OMAP that had quite a bit of breakage this merge window.
 - Misc build/warning fixes on PXA and OMAP
 - A couple of minor fixes for Beagleboard X15 which is now starting to see
   a few more users in the wild
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWB3+pAAoJEIwa5zzehBx36sAP/idEfXiZJiriXSLcU1AkWo23
 PAeIiIpENn6tbYrI0ogN+I63uNE9TkrWP/us9ZlPqQJOG29DVyol0YuAEmT3VSeo
 hColJInE2450fPxFw7hKOWnQ2En30fI5cIHUHzDNJl1Tn2liE4K2FuenSLmf34KH
 XQ2VkNMjj8uM9C0UMy/Tescm3r4LYKk9NXVG+oWDkw1PVdFMsBIE1Vo7KLWGJ6Ta
 Ig6Ub2A2ag1usJjjaTNJsbU4WRxHk37/r+psDzyTTxhp9ulS0uer84K7pqW7AVWn
 NsTUI83z3grKvnQrlTNKu7WCJH4Q+Xgru05mV3yhEoza+X7RhMAWX7zAgq7D3fDX
 mRT4L5RLZJZ8GDsWS35BMxBOOi3uxfPUtT1k2YobJeQYKaHaE06S5K9BMbaPCV6M
 d7ShNGuESz9RRLRDQFYaCqhZHyYoWxS1o0gczoEqB9/piPS7Fv7rQ1tujEU+/o8r
 8uwN6zYmcUJJykn+NxPP6Qskc4vWT+nQaGOp7YKkUFrh6wgssIOlU1HoYfPssjbM
 A0LHFZ1vRNFxtdnPhSi9A5IvVg4ST2G47MSV46ifplWzGyJXbDxuBV1/sCxbfUFn
 FRXt5FakkkbhTm/PsC9Dd/CYBx1HMlGoAP6nvmMccmmvWKTfEzjkuyTDhPWGihZN
 ZSos4D3kdlKnEtRZYfrx
 =ThcO
 -----END PGP SIGNATURE-----

Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Our first real batch of fixes this release cycle.  Nothing really
  concerning, and diffstat is a bit inflated due to some DT contents
  moving around on STi platforms.

  There's a collection of them here:

   - A fixup for a build breakage that hits on arm64 allmodconfig in
     QCOM SCM firmware drivers
   - MMC fixes for OMAP that had quite a bit of breakage this merge
     window.
   - Misc build/warning fixes on PXA and OMAP
   - A couple of minor fixes for Beagleboard X15 which is now starting
     to see a few more users in the wild"

* tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
  ARM: sti: dt: adapt DT to fix probe/bind issues in DRM driver
  ARM: dts: fix omap2+ address translation for pbias
  firmware: qcom: scm: Add function stubs for ARM64
  ARM: dts: am57xx-beagle-x15: use palmas-usb for USB2
  ARM: omap2plus_defconfig: enable GPIO_PCA953X
  ARM: dts: omap5-uevm.dts: fix i2c5 pinctrl offsets
  ARM: OMAP2+: AM43XX: Enable autoidle for clks in am43xx_init_late
  ARM: dts: am57xx-beagle-x15: Update Phy supplies
  ARM: pxa: balloon3: Fix build error
  ARM: dts: Fixup model name for HP t410 dts
  ARM: dts: DRA7: fix a typo in ethernet
  ARM: omap2plus_defconfig: make PCF857x built-in
  ARM: dts: Use ti,pbias compatible string for pbias
  ARM: OMAP5: Cleanup options for SoC only build
  ARM: DRA7: Select missing options for SoC only build
  ARM: OMAP2+: board-generic: Remove stale of_irq macros
  ARM: OMAP4+: PM: erratum is used by OMAP5 and DRA7 as well
  ARM: dts: omap3-igep: Move eth IRQ pinmux to IGEPv2 common dtsi
  ARM: dts: am57xx-beagle-x15: Add wakeup irq for mcp79410
  ARM: dts: am335x-phycore-som: Fix mpu voltage
  ...
2015-09-27 06:45:18 -04:00
Linus Torvalds 69ea8b8577 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fixes from Steve French:
 "Four fixes from testing at the recent SMB3 Plugfest including two
  important authentication ones (one fixes authentication problems to
  some popular servers when clock times differ more than two hours
  between systems, the other fixes Kerberos authentication for SMB3)"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  fix encryption error checks on mount
  [SMB3] Fix sec=krb5 on smb3 mounts
  cifs: use server timestamp for ntlmv2 authentication
  disabling oplocks/leases via module parm enable_oplocks broken for SMB3
2015-09-27 06:42:54 -04:00
Olof Johansson e46fc90ec2 ARM: pxa: fixes for v4.3
These fixes are mainly regression fixes triggered by irq changes,
 common clock framework introduction and sound side-effect of
 other platforms.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJV/nW0AAoJEAP2et0duMsSAP0QAKqFrk4GyRNTFxDQNBj43jrS
 3dHtbbTp04sf/RotcGbPPfGvWkv4LAc4CGYnMC3lXZw64HdIHtuHiiwrj3eeuoH9
 zw0xJpbzcHyu25i9wrOY06WgJ4TfTwqfBhhZZ9xoYs8XjuhbKxOP/X7ytSQ56aK9
 iyYCiE4sB4Ikgiu9iOvoztqo3SgtLuK7HYIgV5XASbVqtco4pLfq0upTbfkOesqw
 V9/+rnG5IaHAxgxuCT/UFg4uP1mW0W8EgC4UGi+Vi2MPQ5kmUwSSTmCcIYGryBem
 etJth5b8Q0AEnlEnx5plAhCPskpU7YkPCticQAmQkdU3fJC09+rzkgV66dOi64Mz
 f6YfGH/UXaHZjYZqIDRStN+Bp7HKJRBXNTtRUFfRFY40mKQFrcyrxPmYWIAiwY+E
 62O2/qzMMuycxlQo7xhH00qEK9oB2VfshhqXKRHWDhKyAjPbvhF6h0tnHBJSsPzi
 HJRtzs5dHtCqYBjVY21U391D7IA5lEck4cOExvVRbe1dn2eGbOZcLTS+caZbzhEy
 ulYbS4QZvtFTh7+dRhpG0jTuxIjMbZskogvOSET/wNuZewu7IrFMZt8ySPFbHwDs
 h5i+TZVfxcXu8kv+C5rT5q0bAP18p8dzowgzODh5iQpwTLahZ7tUPJmF+sC3QuSd
 zAOeAqKy3RQ8NL74LMPo
 =fNDY
 -----END PGP SIGNATURE-----

Merge tag 'pxa-fixes-v4.3' of https://github.com/rjarzmik/linux into fixes

ARM: pxa: fixes for v4.3

These fixes are mainly regression fixes triggered by irq changes,
common clock framework introduction and sound side-effect of
other platforms.

* tag 'pxa-fixes-v4.3' of https://github.com/rjarzmik/linux:
  ARM: pxa: balloon3: Fix build error
  ARM: pxa: ssp: Fix build error by removing originally incorrect DT binding
  ARM: pxa: fix DFI bus lockups on startup

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-09-26 22:23:26 -07:00
Olof Johansson b8ba826f8d Fixes for omaps for v4.3-rc cycle:
- Two more patches to fix most of the MMC regressions with the
   PBIAS regulator changes. At least two MMC driver related issues
   still seems to remain for omap3 legacy booting and omap4 duovero.
   Note that the dts changes depend on a recent regulator fix, and
   are based on the regulator commit now in mainline kernel
 
 - Enable autoidle for am43xx clocks to prevent clocks from staying
   always on
 
 - Fix i2c5 pinctrl offsets for omap5-uevm
 
 - Enable PCA953X as that's needed for HDMI to work on omap5
 
 - Update phy supplies for beagle x15 beta board
 
 - Use palmas-usb for on beagle x15 to start using the related
   driver that recently got merged
 -
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJWBKnGAAoJEBvUPslcq6Vzps4QAIJGO+P3Fivcaso+1Spw41ib
 tTQUgF5dGX1It7HageKyd8mk9d5ywlZ3iFCJKuxdJAZfzSzdW6QdF/XKvH5K26nO
 +imDQV/WdGYcgKGQWvkMGbaWIcqxkSU1Wk/VWIlibXd875vVE5Koit5yvtQZTt19
 Xxk7Sj3ADCQ+WTgh+k/hFlvypjbKnWfV2HvCZ+tPPDHQA0IVejAfWn4u3jmcx6S9
 VY1CnU5NzQNNLmXaYwuUSKYFnipfrljsNvZfwLvVFYOfApWOAKpWzs2GdX161TJx
 oZdMhSVwJ9gBGRGhv33GXNouVmq4aEesXwg8M0fd8WpWWXVDI8SkEgALU9eghgGx
 Z41OuJIXS9udgqQdfwK2EUrynKKhQ/R1ywAM4SHyGCbs+FO3yAE8Gxgot/cnaGGx
 xJkog31VkHfG2ucGjBMaMJQ9oJfCtyT9tTdpHOnaKVrnn/7ZQwDbRR/npsTaA1Vg
 6EZvcYJpkmQ8Z/wYdMVvHrbzZ5GY/FRsRo8MwADmarLGRJ8aN+T3ZXik/cFmEqu+
 UN2OkOWn0i/OTdw8ED7pzvTMFr/mOZW1G51cj9W/uuVrA5nEmIWxrlVYm90aiE65
 Qz+f+qcTiVFFatpEq9CUhxsvOiDZ9gbBW130f/hmrkKm3PziAla3V1n+nOcO6/IF
 UBINOYy30yfDDccmbpnS
 =UnKL
 -----END PGP SIGNATURE-----

Merge tag 'omap-for-v4.3/fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Fixes for omaps for v4.3-rc cycle:

- Two more patches to fix most of the MMC regressions with the
  PBIAS regulator changes. At least two MMC driver related issues
  still seems to remain for omap3 legacy booting and omap4 duovero.
  Note that the dts changes depend on a recent regulator fix, and
  are based on the regulator commit now in mainline kernel

- Enable autoidle for am43xx clocks to prevent clocks from staying
  always on

- Fix i2c5 pinctrl offsets for omap5-uevm

- Enable PCA953X as that's needed for HDMI to work on omap5

- Update phy supplies for beagle x15 beta board

- Use palmas-usb for on beagle x15 to start using the related
  driver that recently got merged

* tag 'omap-for-v4.3/fixes-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: dts: fix omap2+ address translation for pbias
  ARM: dts: am57xx-beagle-x15: use palmas-usb for USB2
  ARM: omap2plus_defconfig: enable GPIO_PCA953X
  ARM: dts: omap5-uevm.dts: fix i2c5 pinctrl offsets
  ARM: OMAP2+: AM43XX: Enable autoidle for clks in am43xx_init_late
  ARM: dts: am57xx-beagle-x15: Update Phy supplies
  regulator: pbias: program pbias register offset in pbias driver
  ARM: omap2plus_defconfig: Enable MUSB DMA support
  ARM: DRA752: Add ID detect for ES2.0
  ARM: OMAP3: vc: fix 'or' always true warning
  ARM: OMAP2+: Fix booting if no timer parent clock is available
  ARM: OMAP2+: omap-device: fix race deferred probe of omap_hsmmc vs omap_device_late_init

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-09-26 22:22:31 -07:00
Linus Torvalds d8cc3972b2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fixes from Herbert Xu:
 "This fixes the following issues:

   - check the return value of platform_get_irq as signed int in xgene.

   - skip adf_dev_restore on virtual functions in qat.

   - fix double-free with backlogged requests in marvell_cesa"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  hwrng: xgene - fix handling platform_get_irq
  crypto: qat - VF should never trigger SBR on PH
  crypto: marvell - properly handle CRYPTO_TFM_REQ_MAY_BACKLOG-flagged requests
2015-09-26 21:05:23 -04:00
Linus Torvalds c91d707295 Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
 "This includes a iser-target series from Jenny + Sagi @ Mellanox that
  addresses the few remaining active I/O shutdown bugs, along with a
  patch to support zero-copy for immediate data payloads that gives a
  nice performance improvement for small block WRITEs.

  Also included are some recent >= v4.2 regression bug-fixes.  The most
  notable is a RCU conversion regression for SPC-3 PR registrations, and
  recent removal of obsolete RFC-3720 markers that introduced a login
  regression bug with MSFT iSCSI initiators.

  Thanks to everyone who has been testing + reporting bugs for v4.x"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  iscsi-target: Avoid OFMarker + IFMarker negotiation
  target: Make TCM_WRITE_PROTECT failure honor D_SENSE bit
  target: Fix target_sense_desc_format NULL pointer dereference
  target: Propigate backend read-only to core_tpg_add_lun
  target: Fix PR registration + APTPL RCU conversion regression
  iser-target: Skip data copy if all the command data comes as immediate
  iser-target: Change the recv buffers posting logic
  iser-target: Fix pending connections handling in target stack shutdown sequnce
  iser-target: Remove np_ prefix from isert_np members
  iser-target: Remove unused variables
  iser-target: Put the reference on commands waiting for unsol data
  iser-target: remove command with state ISTATE_REMOVE
2015-09-26 21:02:42 -04:00
Linus Torvalds bcba282ab3 USB fixes for 4.3-rc3
Here are some USB driver fixes for 4.3-rc3.
 
 There's the usual assortment of new device ids, combined with xhci and
 gadget driver fixes.  Full details in the shortlog.  All of these have
 been in linux-next with no reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlYGzJ0ACgkQMUfUDdst+yneGACgxrj/ZJGgY09tkItvvejHoYrF
 tgQAoI/cRL7C9aoWt7DjMxmbFnQE8hC7
 =jsj/
 -----END PGP SIGNATURE-----

Merge tag 'usb-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are some USB driver fixes for 4.3-rc3.

  There's the usual assortment of new device ids, combined with xhci and
  gadget driver fixes.  Full details in the shortlog.  All of these have
  been in linux-next with no reported problems"

* tag 'usb-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (34 commits)
  MAINTAINERS: remove amd5536udc USB gadget driver maintainer
  USB: whiteheat: fix potential null-deref at probe
  xhci: init command timeout timer earlier to avoid deleting it uninitialized
  xhci: change xhci 1.0 only restrictions to support xhci 1.1
  usb: xhci: exit early in xhci_setup_device() if we're halted or dying
  usb: xhci: stop everything on the first call to xhci_stop
  usb: xhci: Clear XHCI_STATE_DYING on start
  usb: xhci: lock mutex on xhci_stop
  xhci: Move xhci_pme_quirk() behind #ifdef CONFIG_PM
  xhci: give command abortion one more chance before killing xhci
  usb: Use the USB_SS_MULT() macro to get the burst multiplier.
  usb: dwc3: gadget: Fix BUG in RT config
  usb: musb: fix cppi channel teardown for isoch transfer
  usb: phy: isp1301: Export I2C module alias information
  usb: gadget: drop null test before destroy functions
  usb: gadget: dummy_hcd: in transfer(), return data sent, not limit
  usb: gadget: dummy_hcd: fix rescan logic for transfer
  usb: gadget: dummy_hcd: fix unneeded else-if condition
  usb: gadget: dummy_hcd: emulate sending zlp in packet logic
  usb: musb: dsps: fix polling in device-only mode
  ...
2015-09-26 21:00:28 -04:00
Linus Torvalds fb740f9bab TTY/Serial driver fix for 4.3-rc3
Here is one serial driver fix for 4.3-rc3 that resolves a module loading
 issue due to splitting up of the 8250 driver into smaller pieces.  It's
 been in linux-next with no reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlYGzDcACgkQMUfUDdst+ymPYQCfYBt3kC2L/hzKWlkAlDmWKDQ+
 dVQAn3boCixXmujGQnLliLEbCAU3p4xP
 =Onb3
 -----END PGP SIGNATURE-----

Merge tag 'tty-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull serial driver fix from Greg KH:
 "Here is one serial driver fix for 4.3-rc3 that resolves a module
  loading issue due to splitting up of the 8250 driver into smaller
  pieces.  It's been in linux-next with no reported problems"

* tag 'tty-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: serial: Add missing module license for 8250_base.ko
2015-09-26 20:58:38 -04:00