Dan Carpenter | 25 Jul 14:20 2014
Picon

re: serial: sc16is7xx

Hello Jon Ringle,

The patch dfeae619d781: "serial: sc16is7xx" from Apr 24, 2014, leads
to the following static checker warning:

	drivers/tty/serial/sc16is7xx.c:1168 sc16is7xx_probe()
	warn: 's->clk' isn't an ERR_PTR

drivers/tty/serial/sc16is7xx.c
  1167  out_clk:
  1168          if (!IS_ERR(s->clk))
                     ^^^^^^^^^^^^^
This check isn't needed because we return directly but also I don't
think we ever set s->clk so it is leaked on the remove() path as well.

  1169                  clk_disable_unprepare(s->clk);
  1170  
  1171          return ret;
  1172  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Yoshihiro YUNOMAE | 23 Jul 08:06 2014
Picon

[PATCH] serial/core: Fix too big allocation for attribute member

Current code allocates too much data for tty_groups member of uart_port struct,
so fix it.

Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez <at> hitachi.com>
CC: Greg Kroah-Hartman <gregkh <at> linuxfoundation.org>
CC: Dan Carpenter <dan.carpenter <at> oracle.com>
---
 drivers/tty/serial/serial_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 4af764c..8ded213 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
 <at>  <at>  -2617,7 +2617,7  <at>  <at>  int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
 	if (uport->attr_group)
 		num_groups++;

-	uport->tty_groups = kcalloc(num_groups, sizeof(**uport->tty_groups),
+	uport->tty_groups = kcalloc(num_groups, sizeof(*uport->tty_groups),
 				    GFP_KERNEL);
 	if (!uport->tty_groups) {
 		ret = -ENOMEM;

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Dirk Behme | 23 Jul 06:10 2014
Picon

Mainline commit "serial: Test for no tx data on tx restart" not correct for i.MX6?

Hi,

this is a question regarding the i.MX6 part (drivers/tty/serial/imx.c) 
of the commit

serial: Test for no tx data on tx restart

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c557d392fbf5badd693ea1946a4317c87a26a716

Talking with some i.MX6 experts about this, I've got the comment

-- cut --
The imx serial driver part of this commit isn't correct
as imx.c sends x_char in irq handler, not in imx_start_tx(),
-- cut --

What do you think?

Best regards

Dirk

P.S.: I don't have the initial post in my inbox, so sorry for the new 
thread.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

(Continue reading)

Mark Brown | 21 Jul 17:50 2014

[PATCH] exynos: serial clear and set big endian fix

From: Victor Kamensky <victor.kamensky <at> linaro.org>

The Samsung serial driver uses __set_bit and __clear_bit functions
directly with h/w registers but these functions do not account for any
difference between the endianess of the CPU and the hardware so if
running in big endian mode we need to byte swap.  Handle this by
wrapping these functions with open coded versions when configured for
big endian.

[Rewrote commit message -- broonie]

Signed-off-by: Victor Kamensky <victor.kamensky <at> linaro.org>
Signed-off-by: Mark Brown <broonie <at> linaro.org>
---
 drivers/tty/serial/samsung.c | 43 +++++++++++++++++++++++++++++++++++++++----
 1 file changed, 39 insertions(+), 4 deletions(-)

diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index 8df6c173d6ed..7191adefe40e 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
 <at>  <at>  -78,6 +78,41  <at>  <at>  static void dbg(const char *fmt, ...)
 #define S3C24XX_SERIAL_MAJOR	204
 #define S3C24XX_SERIAL_MINOR	64

+#ifndef CONFIG_CPU_BIG_ENDIAN /* little endian */
+static inline void __hw_set_bit(int nr, volatile unsigned long *addr)
+{
+	__set_bit(nr, addr);
+}
(Continue reading)

Grant Edwards | 16 Jul 19:20 2014
Picon

tcflow(TCOON/TCOOFF) vs. received XON/XOFF characters

I'm working on the regression test appliction I use to test the serial
drivers I maintain, and I've run into a problem with interaction
between tcflow(TCOON/TCOOFF) and XON/XOFF using bog-standard 16x50
UARTs and the normal in-kernel driver.

When I call tcflow(TCOOFF) on a tty device and then write data to that
tty device, the data isn't sent. That's what I expect. But, when an
XON is then received by that port, it does not start the tx data.

Conversly, when a serial port receives an XOFF, it stops sending
data as it should, but a subsequent call to tcflow(TCOON) does not
casue it to start sending data.

Am I misunderstanding how tcflow(TCOxxx) is supposed to interact with
XON/XOFF flow control?

Or is something broken in the tty layer or uart driver?

--

-- 
Grant Edwards               grant.b.edwards        Yow! This is a NO-FRILLS
                                  at               flight -- hold th' CANADIAN
                              gmail.com            BACON!!

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Yoshihiro YUNOMAE | 16 Jul 03:19 2014
Picon

[ PATCH V9 0/2] serial/uart/8250: Introduce tunable RX trigger I/F

Hi Greg,

This patch set introduces tunable RX interrupt trigger I/F for 8250 serials.
I used Greg's patch(*1) as 1st patch in this version, and applied 2nd patch
of previous version.

Would you review this patch set?

Thanks!

Note:
I cleaned up Greg's patch as follows:
 - Delete extra line break
 - Use kcalloc instead of kmalloc
 - sizeof(struct attribute_group *) => sizeof(**uport->tty_groups)

*1: https://lkml.org/lkml/2014/7/12/177

<Change log>

Changes in V9:
 [2/2]
 -  Use attr_group instead of dev_spec_attr_group of uart_port structure

Changes in V8:
 - Split V7's patch up into 2 patches

Changes in V7:
 - Add Documentation
 - Change I/F name from rx_int_trig to rx_trig_bytes because the name
(Continue reading)

Tobias Klauser | 15 Jul 17:26 2014
Picon

[PATCH] serial: altera_jtaguart: Adpot uart_console_write()

Follow commit 2970b7f5ea3c ("serial: altera: Adopt
uart_console_write()") and don't open code the LF to LFCR conversion in
altera_jtaguart either. Use uart_console_write() instead.

Cc: Daniel Thompson <daniel.thompson <at> linaro.org>
Signed-off-by: Tobias Klauser <tklauser <at> distanz.ch>
---
 drivers/tty/serial/altera_jtaguart.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/tty/serial/altera_jtaguart.c b/drivers/tty/serial/altera_jtaguart.c
index e7d1aaf..afe2e75 100644
--- a/drivers/tty/serial/altera_jtaguart.c
+++ b/drivers/tty/serial/altera_jtaguart.c
 <at>  <at>  -304,7 +304,7  <at>  <at>  static struct altera_jtaguart altera_jtaguart_ports[ALTERA_JTAGUART_MAXPORTS];
 #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE)

 #if defined(CONFIG_SERIAL_ALTERA_JTAGUART_CONSOLE_BYPASS)
-static void altera_jtaguart_console_putc(struct console *co, const char c)
+static void altera_jtaguart_console_putc(struct console *co, int c)
 {
 	struct uart_port *port = &(altera_jtaguart_ports + co->index)->port;
 	unsigned long status;
 <at>  <at>  -325,7 +325,7  <at>  <at>  static void altera_jtaguart_console_putc(struct console *co, const char c)
 	spin_unlock_irqrestore(&port->lock, flags);
 }
 #else
-static void altera_jtaguart_console_putc(struct console *co, const char c)
+static void altera_jtaguart_console_putc(struct console *co, int c)
 {
(Continue reading)

Andy Shevchenko | 14 Jul 13:26 2014
Picon

[PATCH v2] serial: 8250: introduce up_to_u8250p() helper

It helps to cast struct uart_port to struct uart_8250_port at runtime.

Signed-off-by: Andy Shevchenko <andriy.shevchenko <at> linux.intel.com>
---
Since v1:
- use inline function instead of a macro
 drivers/tty/serial/8250/8250_core.c | 57 +++++++++++++------------------------
 drivers/tty/serial/8250/8250_dw.c   |  8 ++++--
 drivers/tty/serial/8250/8250_fsl.c  |  3 +-
 drivers/tty/serial/8250/8250_pci.c  |  6 ++--
 include/linux/serial_8250.h         |  5 ++++
 5 files changed, 32 insertions(+), 47 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 7a91c6d..0da0145 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
 <at>  <at>  -439,8 +439,7  <at>  <at>  static int exar_handle_irq(struct uart_port *port);

 static void set_io_from_upio(struct uart_port *p)
 {
-	struct uart_8250_port *up =
-		container_of(p, struct uart_8250_port, port);
+	struct uart_8250_port *up = up_to_u8250p(p);

 	up->dl_read = default_serial_dl_read;
 	up->dl_write = default_serial_dl_write;
 <at>  <at>  -1277,8 +1276,7  <at>  <at>  static inline void __stop_tx(struct uart_8250_port *p)

 static void serial8250_stop_tx(struct uart_port *port)
(Continue reading)

Jingchang Lu | 14 Jul 11:41 2014

[PATCHv2 0/2] tty: serial: fsl_lpuart: add 32-bit register support and dt-binding

This two patches change the fsl-lpuart dt-binding to exact SoC product revision
and add 32-bit big-endian register interface support which can be found on
Freescale LS1021A SoC platform.

---
changes in v2:
Fix undifined lpuart32_reg error.

----------------------------------------------------------------
Jingchang Lu (2):
      dt-binding: fsl-lpuart: use exact SoC revision to document binding
      tty: serial: fsl_lpuart: add 32-bit register interface support

 Documentation/devicetree/bindings/serial/fsl-lpuart.txt |   6 +-
 drivers/tty/serial/fsl_lpuart.c                         | 645 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 642 insertions(+), 9 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Andy Shevchenko | 14 Jul 10:41 2014
Picon

[PATCH] serial: 8250: introduce up_to_u8250p() macro

It helps to convert struct uart_port to struct uart_8250_port.

Signed-off-by: Andy Shevchenko <andriy.shevchenko <at> linux.intel.com>
---
 drivers/tty/serial/8250/8250_core.c | 57 +++++++++++++------------------------
 drivers/tty/serial/8250/8250_dw.c   |  8 ++++--
 drivers/tty/serial/8250/8250_fsl.c  |  3 +-
 drivers/tty/serial/8250/8250_pci.c  |  6 ++--
 include/linux/serial_8250.h         |  2 ++
 5 files changed, 29 insertions(+), 47 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 7a91c6d..0da0145 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
 <at>  <at>  -439,8 +439,7  <at>  <at>  static int exar_handle_irq(struct uart_port *port);

 static void set_io_from_upio(struct uart_port *p)
 {
-	struct uart_8250_port *up =
-		container_of(p, struct uart_8250_port, port);
+	struct uart_8250_port *up = up_to_u8250p(p);

 	up->dl_read = default_serial_dl_read;
 	up->dl_write = default_serial_dl_write;
 <at>  <at>  -1277,8 +1276,7  <at>  <at>  static inline void __stop_tx(struct uart_8250_port *p)

 static void serial8250_stop_tx(struct uart_port *port)
 {
-	struct uart_8250_port *up =
(Continue reading)

Greg KH | 12 Jul 22:47 2014

[GIT PULL] TTY/Serial fixes for 3.16-rc5

The following changes since commit cd3de83f147601356395b57a8673e9c5ff1e59d1:

  Linux 3.16-rc4 (2014-07-06 12:37:51 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git/ tags/tty-3.16-rc5

for you to fetch changes up to 34c4eda809e1efb16c554c07bb5df4c8ace9424e:

  serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a0 (2014-07-11 17:45:12 -0700)

----------------------------------------------------------------
TTY/Serial fixes for 3.16-rc5

Here are some small serial fixes that resolve some reported problems
that started in 3.15 with some serial drivers.  And there's a new dt
binding for a serial driver, which was all that was needed for the
renesas serial driver.

Signed-off-by: Greg Kroah-Hartman <gregkh <at> linuxfoundation.org>

----------------------------------------------------------------
Peter Hurley (3):
      serial: Test for no tx data on tx restart
      serial: arc_uart: Use uart_circ_empty() for open-coded comparison
      serial: imx: Fix build breakage

Simon Horman (1):
      serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and sh73a0
(Continue reading)


Gmane