Re: [PATCH v3 2/5] tty: Introduce SER_RS485_SOFTWARE read-only flag for struct serial_rs485

2015-11-12 Thread Peter Hurley
sing data and some DMA implementations do not. Unfortunately, some advertise they support dmaengine_pause() but only for lossy uses like audio. Because the api hides this, the query interface for pause support is useless. Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2 3/3] tty: Add software emulated RS485 support for 8250

2015-11-12 Thread Peter Hurley
On 11/12/2015 07:34 AM, Matwey V. Kornilov wrote: > 2015-11-10 19:12 GMT+03:00 Peter Hurley : >> On 11/07/2015 05:09 AM, Matwey V. Kornilov wrote: >>> Implementation of software emulation of RS485 direction handling is based >>> on omap-serial driver. It is acts as the

Re: [PATCH] ARM: xip: Use correct symbol for end of ROM marker

2015-11-12 Thread Peter Hurley
urned on/off. */ #undef MODULES_VADDR -#define MODULES_VADDR (((unsigned long)_etext + ~PMD_MASK) & PMD_MASK) +#define MODULES_VADDR (((unsigned long)_edata_loc + ~PMD_MASK) & PMD_MASK) #endif Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] mmc: change to use kmalloc

2015-11-11 Thread Peter Hurley
; same? The patch fixes an inefficiency: explicitly zeroing memory that is then immediately overwritten 6 lines below is wasteful. Regards, Peter Hurley >> Signed-off-by: yalin wang >> --- >> drivers/mmc/card/block.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >&g

[PATCH] tty: Fix tty_send_xchar() lock order inversion

2015-11-11 Thread Peter Hurley
The correct lock order is atomic_write_lock => termios_rwsem, as established by tty_write() => n_tty_write(). Fixes: c274f6ef1c666 ("tty: Hold termios_rwsem for tcflow(TCIxxx)") Reported-and-Tested-by: Dmitry Vyukov Cc: # v3.18+ Signed-off-by: Peter Hurley --- drivers/tty

Re: deadlock between tty_write and tty_send_xchar

2015-11-11 Thread Peter Hurley
lock(&tty->termios_rwsem); > lock(&tty->atomic_write_lock); >lock(&tty->termios_rwsem); > lock(&tty->atomic_write_lock); > > *** DEADLOCK *** Thanks for the report, Dmitry. Please re-

Re: 4.3 serial driver crashes with console shortly after boot

2015-11-11 Thread Peter Hurley
On 11/10/2015 06:15 PM, Peter Hurley wrote: > On 11/10/2015 05:43 PM, Andi Kleen wrote: >> On Tue, Nov 10, 2015 at 11:39:57PM +0100, Andi Kleen wrote: >>>> I've just tried to reproduce this without success on my current >>>> tree which has some addition

Re: 4.3 serial driver crashes with console shortly after boot

2015-11-10 Thread Peter Hurley
tty: Remove drivers' extra tty_ldisc_flush() >>> >> Applying the three patches fixes the crash. >> I haven't tried to figure out which one did the trick. > > Actually I was wrong sorry. It still crashes, but now it doesn't > hang the system anymo

Re: [PATCH v2 3/3] tty: Add software emulated RS485 support for 8250

2015-11-10 Thread Peter Hurley
On 11/10/2015 11:25 AM, Matwey V. Kornilov wrote: > 2015-11-10 19:12 GMT+03:00 Peter Hurley : >> Hi Matwey, >> >> I noticed 3 other issues here; see below. >> >> On 11/07/2015 05:09 AM, Matwey V. Kornilov wrote: >>> Implementation of software emulation o

Re: [PATCH v2 3/3] tty: Add software emulated RS485 support for 8250

2015-11-10 Thread Peter Hurley
gt; 0) > + mdelay(p->port.rs485.delay_rts_after_send); > + serial_port_out(&p->port, UART_MCR, UART_MCR_RTS); As with the SER_RS485_RTS_ON_SEND, RTS should be driven to either 0 or 1 here as well (not just to 1). Regard

Re: 4.3 serial driver crashes with console shortly after boot

2015-11-09 Thread Peter Hurley
h I thought was fixed by: commit e144c58cad6667876173dd76977e9e6557e34941 Author: Peter Hurley Date: Sun Jul 12 21:05:26 2015 -0400 serial: core: Fix crashes while echoing when closing > The back trace is > flush_to_ldisc->n_tty_receive_buf2->n_tty_receive_buf_common-> >

Re: [PATCH v2 3/3] tty: Add software emulated RS485 support for 8250

2015-11-09 Thread Peter Hurley
On 11/09/2015 04:43 PM, Matwey V. Kornilov wrote: > 2015-11-10 0:30 GMT+03:00 Peter Hurley : >> On 11/09/2015 10:45 AM, Matwey V. Kornilov wrote: >>> 2015-11-09 17:40 GMT+03:00 Peter Hurley : >>>> On 11/08/2015 05:52 AM, Matwey V. Kornilov wrote: >>>>

Re: [PATCH v2 3/3] tty: Add software emulated RS485 support for 8250

2015-11-09 Thread Peter Hurley
On 11/09/2015 10:45 AM, Matwey V. Kornilov wrote: > 2015-11-09 17:40 GMT+03:00 Peter Hurley : >> On 11/08/2015 05:52 AM, Matwey V. Kornilov wrote: >>> 2015-11-07 19:03 GMT+03:00 Peter Hurley : >>>> On 11/07/2015 05:09 AM, Matwey V. Kornilov wro

Re: [PATCH v2 3/3] tty: Add software emulated RS485 support for 8250

2015-11-09 Thread Peter Hurley
On 11/08/2015 05:52 AM, Matwey V. Kornilov wrote: > 2015-11-07 19:03 GMT+03:00 Peter Hurley : >> Hi Matwey, >> >> On 11/07/2015 05:09 AM, Matwey V. Kornilov wrote: >>> Implementation of software emulation of RS485 direction handling is based >>> on omap-seri

[PATCH v2 4/4] tty: Remove drivers' extra tty_ldisc_flush()

2015-11-09 Thread Peter Hurley
The tty_port_close_start() helper already flushes the tty and ldisc buffers on final close; tty drivers which use this helper need not repeat tty_ldisc_flush(). Signed-off-by: Peter Hurley --- drivers/char/pcmcia/synclink_cs.c | 3 --- drivers/tty/amiserial.c | 2 -- drivers/tty

[PATCH v2 3/4] tty: Abstract and encapsulate tty->closing behavior

2015-11-09 Thread Peter Hurley
ductive. NB: ipwireless_tty_free() is completely bogus; freeing the tty (?!) with open, in-use file descriptors is laughable. Signed-off-by: Peter Hurley --- v2: Fixed tty_ldisc_closing() ld use found by Johannes Stezenbach drivers/isdn/i4l/isdn_tty.c | 2 +- drivers/s390/char/con3215

[PATCH v2 2/4] n_tty: Ignore all read data when closing

2015-11-09 Thread Peter Hurley
On final port close (and thus final tty close), only output flow control requests in the input data should be processed. Ignore all other input data, including parity errors, overruns and breaks. Signed-off-by: Peter Hurley --- drivers/tty/n_tty.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH v2 0/4] Replace tty->closing

2015-11-09 Thread Peter Hurley
found by Johannes Stezenbach Regards, Peter Hurley (4): tty: rocket: Remove private close_wait n_tty: Ignore all read data when closing tty: Abstract and encapsulate tty->closing behavior tty: Remove drivers' extra tty_ldisc_flush() drivers/char/pcmcia/synclink_cs.c | 3 --- d

[PATCH v2 1/4] tty: rocket: Remove private close_wait

2015-11-09 Thread Peter Hurley
This driver's private completion variable, close_wait, is no longer used for wait since "tty: Remove ASYNC_CLOSING checks in open()/hangup"; remove. Signed-off-by: Peter Hurley --- drivers/tty/rocket.c | 2 -- drivers/tty/rocket_int.h | 1 - 2 files changed, 3 deletions(-

Re: [PATCH 3/4] tty: Abstract and encapsulate tty->closing behavior

2015-11-09 Thread Peter Hurley
On 11/09/2015 04:12 AM, Johannes Stezenbach wrote: > On Sun, Nov 08, 2015 at 05:02:52PM -0500, Peter Hurley wrote: >> +void tty_ldisc_closing(struct tty_struct *tty) >> +{ >> +struct tty_ldisc *ld = tty_ldisc_ref(tty); >> + >> +if (ld->ops->closin

[PATCH 1/4] tty: rocket: Remove private close_wait

2015-11-08 Thread Peter Hurley
This driver's private completion variable, close_wait, is no longer used for wait since "tty: Remove ASYNC_CLOSING checks in open()/hangup"; remove. Signed-off-by: Peter Hurley --- drivers/tty/rocket.c | 2 -- drivers/tty/rocket_int.h | 1 - 2 files changed, 3 deletions(-

[PATCH 4/4] tty: Remove drivers' extra tty_ldisc_flush()

2015-11-08 Thread Peter Hurley
The tty_port_close_start() helper already flushes the tty and ldisc buffers on final close; tty drivers which use this helper need not repeat tty_ldisc_flush(). Signed-off-by: Peter Hurley --- drivers/char/pcmcia/synclink_cs.c | 3 --- drivers/tty/amiserial.c | 2 -- drivers/tty

[PATCH 3/4] tty: Abstract and encapsulate tty->closing behavior

2015-11-08 Thread Peter Hurley
ductive. NB: ipwireless_tty_free() is completely bogus; freeing the tty (?!) with open, in-use file descriptors is laughable. Signed-off-by: Peter Hurley --- drivers/isdn/i4l/isdn_tty.c | 2 +- drivers/s390/char/con3215.c | 3 +-- drivers/staging/dgap/dgap.c | 4 +--- drivers/

[PATCH 2/4] n_tty: Ignore all read data when closing

2015-11-08 Thread Peter Hurley
On final port close (and thus final tty close), only output flow control requests in the input data should be processed. Ignore all other input data, including parity errors, overruns and breaks. Signed-off-by: Peter Hurley --- drivers/tty/n_tty.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH 0/4] Replace tty->closing

2015-11-08 Thread Peter Hurley
tty drivers which open-code the close() method drivers/staging/dgnc/dgnc_tty.c drivers/staging/dgap/dgap.c drivers/tty/hvc/hvsi.c drivers/tty/serial/68328serial.c drivers/tty/serial/crisv10.c drivers/isdn/i4l/isdn_tty.c drivers/s390/char/con3215.c Regards, Peter Hurley (4): tty: rocket: Remove

Re: [PATCH 01/14] tty: Improve tty_debug() macro

2015-11-08 Thread Peter Hurley
Hi Joe, On 11/08/2015 01:51 PM, Joe Perches wrote: > On Sun, 2015-11-08 at 13:01 -0500, Peter Hurley wrote: >> Incorporate suggestions for tty core debug macro improvements >> - printk(KERN_DEBUG) => pr_debug() >> - ##args => ##__VA_ARGS__ >> - remove do

[PATCH 04/14] tty: core: Remove redundant oom message

2015-11-08 Thread Peter Hurley
kmalloc() already emits a diagnostic for failed allocations; remove tty-specific message. Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index aef9bc1..f463894 100644 --- a

[PATCH 02/14] tty: Make tty_paranoia_check() file scope

2015-11-08 Thread Peter Hurley
tty_paranoia_check() is only used within drivers/tty/tty_io.c; remove extern declaration in header and limit symbol to file scope. Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 2 +- include/linux/tty.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty

[PATCH 03/14] tty: synclink_gt: Rename tty_driver_name

2015-11-08 Thread Peter Hurley
Eliminate symbol name collision with new tty core function, tty_driver_name(). Signed-off-by: Peter Hurley --- drivers/tty/synclink_gt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index 6fc39fb..5505ea8 100644

[PATCH 06/14] tty: Define tty_*() printk macros

2015-11-08 Thread Peter Hurley
messages with unique context, or prefixed to the format when given. Signed-off-by: Peter Hurley --- drivers/tty/n_tty.c| 7 ++- drivers/tty/tty_io.c | 27 ++- drivers/tty/tty_port.c | 9 - include/linux/tty.h| 12 +++- 4 files changed, 27

[PATCH 11/14] tty: core: Prefer pr_* to printk(*)

2015-11-08 Thread Peter Hurley
Convert remaining printk() use to pr_*() when tty is unknown or unsafe to use. Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c| 6 ++ drivers/tty/tty_ioctl.c | 6 ++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index

[PATCH 10/14] tty: Remove unset_locked_termios() error message

2015-11-08 Thread Peter Hurley
With the refactor of 'locked' from parameter to local, it's now obvious locked cannot be NULL. Remove entire conditional. Signed-off-by: Peter Hurley --- drivers/tty/tty_ioctl.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tt

[PATCH 07/14] tty: Convert SAK messages to tty_notice()

2015-11-08 Thread Peter Hurley
Use tty_notice() for unified message format from the tty core. Fix each message to accurately reflect the cause of each termination. Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/tty

[PATCH 14/14] tty: core: Prefer dev_dbg() over pr_debug()

2015-11-08 Thread Peter Hurley
Where possible, use dev_dbg() instead of pr_debug() Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 479e9c2..9fa5a4f 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty

[PATCH 09/14] tty: core: Refactor parameters for unset_locked_termios() helper

2015-11-08 Thread Peter Hurley
Add tty as parameter to unset_locked_termios() and extract former parameters, termios and locked, as locals. Signed-off-by: Peter Hurley --- drivers/tty/tty_ioctl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c

[PATCH 12/14] tty: Remove __func__ from tty_debug() macro

2015-11-08 Thread Peter Hurley
not printed by dynamic debug, or when dynamic debug is not enabled. Signed-off-by: Peter Hurley --- drivers/tty/pty.c | 2 +- drivers/tty/tty_io.c| 14 +++--- drivers/tty/tty_ioctl.c | 2 +- include/linux/tty.h | 3 +-- 4 files changed, 10 insertions(+), 11 deletions

[PATCH 13/14] tty: Merge conditional + error message + WARN_ON()

2015-11-08 Thread Peter Hurley
WARN() does all of these things in one statement. Signed-off-by: Peter Hurley --- drivers/tty/tty_mutex.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/tty/tty_mutex.c b/drivers/tty/tty_mutex.c index 0efcf71..77703a3 100644 --- a/drivers/tty/tty_mutex.c

[PATCH 08/14] tty: core: Add driver name to invalid device registration message

2015-11-08 Thread Peter Hurley
Include the driver name in the tty_register_device_attr() error message for invalid index. Note that tty_err() cannot be used here because there is no tty; use pr_err(). Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a

[PATCH 01/14] tty: Improve tty_debug() macro

2015-11-08 Thread Peter Hurley
Incorporate suggestions for tty core debug macro improvements - printk(KERN_DEBUG) => pr_debug() - ##args => ##__VA_ARGS__ - remove do {} while() - output tty_name() first cc: Joe Perches Signed-off-by: Peter Hurley --- include/linux/tty.h | 7 ++- 1 file changed, 2 insertions

[PATCH 05/14] tty: core: Add helper fn to deref tty driver name

2015-11-08 Thread Peter Hurley
Similar to tty_name(), add tty_driver_name() helper to safely dereference tty->driver->name (otherwise return empty string). Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 7 +++ include/linux/tty.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/tty/tty_

[PATCH 00/14] tty core printk cleanup

2015-11-08 Thread Peter Hurley
hreads.com/lists/linux/kernel/2213266#2213266 Regards, Peter Hurley (14): tty: Improve tty_debug() macro tty: Make tty_paranoia_check() file scope tty: synclink_gt: Rename tty_driver_name tty: core: Remove redundant oom message tty: core: Add helper fn to deref tty driver name tty: D

[PATCH] n_tty: Clarify copy_from_read_buf()

2015-11-08 Thread Peter Hurley
Add a temporary for the computed source address and substitute where appropriate. No functional change. Signed-off-by: Peter Hurley --- drivers/tty/n_tty.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index b2b01d5

[PATCH] n_tty: Uninline tty_copy_to_user()

2015-11-08 Thread Peter Hurley
Merge the multiple tty_copy_to_user() calls into a single copy sequence within tty_copy_to_user(). Signed-off-by: Peter Hurley --- Requires: "tty: audit: Fix audit source" drivers/tty/n_tty.c | 33 ++--- 1 file changed, 18 insertions(+), 15 deletions(-)

[PATCH] tty: Simplify tty_set_ldisc() exit handling

2015-11-08 Thread Peter Hurley
Perform common exit for both successful and error exit handling in tty_set_ldisc(). Fixes unlikely possibility of failing to restart input kworker when switching to the same line discipline (noop case). Signed-off-by: Peter Hurley --- Requires: "tty: Fix direct use of tty buffer work"

[PATCH] tty: Remove unused SERIAL_DO_RESTART define

2015-11-08 Thread Peter Hurley
SERIAL_DO_RESTART is not used by these 3 drivers; remove. Signed-off-by: Peter Hurley --- drivers/tty/amiserial.c | 1 - drivers/tty/moxa.c| 1 - drivers/tty/serial/icom.c | 1 - 3 files changed, 3 deletions(-) diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index

[PATCH] tty: Remove dead tty_write_flush() declaration and macro

2015-11-08 Thread Peter Hurley
tty_write_flush() has no definition and the TTY_WRITE_FLUSH() macro is never invoked; remove. Signed-off-by: Peter Hurley --- include/linux/tty.h | 4 1 file changed, 4 deletions(-) diff --git a/include/linux/tty.h b/include/linux/tty.h index dcafb38..4b6c62e 100644 --- a/include/linux

[PATCH] tty: Only allow slave pty as controlling tty

2015-11-08 Thread Peter Hurley
A master pty should never be a controlling tty in Linux; if the master pty is specified to ioctl(TIOCSCTTY), silently substitute the slave pty as the controlling tty. Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v2] tty: audit: Fix audit source

2015-11-08 Thread Peter Hurley
The data to audit/record is in the 'from' buffer (ie., the input read buffer). Fixes: 72586c6061ab ("n_tty: Fix auditing support for cannonical mode") Cc: Laura Abbott Cc: Miloslav Trmač Cc: Signed-off-by: Peter Hurley --- v2: Fix rebase error, !CONFIG_AUDIT build fix

Re: [PATCH] tty: audit: Fix audit source

2015-11-08 Thread Peter Hurley
On 11/08/2015 08:01 AM, kbuild test robot wrote: > Hi Peter, > > [auto build test WARNING on: v4.3-rc7] > [also build test WARNING on: next-20151106] > > url: > https://github.com/0day-ci/linux/commits/Peter-Hurley/tty-audit-Fix-audit-source/20151108-205330 > config

[PATCH] tty: Fix direct use of tty buffer work

2015-11-08 Thread Peter Hurley
Recent abstraction of tty buffer work introduced api to manage tty input kworker; use it. Fixes: e176058f0de5 ("tty: Abstract tty buffer work") Signed-off-by: Peter Hurley --- drivers/tty/tty_ldisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/tty

[PATCH] tty: audit: Fix audit source

2015-11-08 Thread Peter Hurley
The data to audit/record is in the 'from' buffer (ie., the input read buffer). Fixes: 72586c6061ab ("n_tty: Fix auditing support for cannonical mode") Cc: Laura Abbott Cc: Miloslav Trmač Cc: Signed-off-by: Peter Hurley --- drivers/tty/n_tty.c | 2 +- drivers

Re: [PATCH v2 1/3] tty: Introduce UART_CAP_HW485

2015-11-07 Thread Peter Hurley
On 11/07/2015 04:10 PM, Matwey V. Kornilov wrote: > 2015-11-07 18:32 GMT+03:00 Peter Hurley : >> On 11/07/2015 07:39 AM, Matwey V. Kornilov wrote: >>> 2015-11-07 15:22 GMT+03:00 Peter Hurley : >>>> On 11/07/2015 05:09 AM, Matwey V. Kornilov wrote: >>>>&g

Re: [PATCH v2 3/3] tty: Add software emulated RS485 support for 8250

2015-11-07 Thread Peter Hurley
Hi Matwey, On 11/07/2015 05:09 AM, Matwey V. Kornilov wrote: > Implementation of software emulation of RS485 direction handling is based > on omap-serial driver. It is acts as the following. At transmission start, > RTS is set (if required) and receiver is off (if required). At transmission > sto

Re: [PATCH v2 1/3] tty: Introduce UART_CAP_HW485

2015-11-07 Thread Peter Hurley
On 11/07/2015 07:39 AM, Matwey V. Kornilov wrote: > 2015-11-07 15:22 GMT+03:00 Peter Hurley : >> On 11/07/2015 05:09 AM, Matwey V. Kornilov wrote: >>> Introduce new capability UART_CAP_HW485 to mark 8250 UARTs which have >>> hardware support of line direction control. &

Re: [PATCH v2 2/3] tty: Implement default fallback serial8250_rs485_config

2015-11-07 Thread Peter Hurley
On 11/07/2015 08:51 AM, Matwey V. Kornilov wrote: > 2015-11-07 15:29 GMT+03:00 Peter Hurley : >> Hi Matwey, >> >> On 11/07/2015 05:09 AM, Matwey V. Kornilov wrote: >>> When 8250 driver doesn't have its own hardware RS485 support and doesn't >>> wan

Re: [PATCH v2 2/3] tty: Implement default fallback serial8250_rs485_config

2015-11-07 Thread Peter Hurley
ops) 3. add a test for 8250 sub-driver override in serial8250_register_8250_port() Eg., if (up->port.rs485_config) uart->port.rs485_config = up->port.rs485_config; Regards, Peter Hurley > /* Take tx_loadsz from fifosize if it

Re: [PATCH v2 1/3] tty: Introduce UART_CAP_HW485

2015-11-07 Thread Peter Hurley
where only HW485 is acceptable)? Regards, Peter Hurley > Signed-off-by: Matwey V. Kornilov > --- > Changes since v1: > - Commit message has been wrapped > > drivers/tty/serial/8250/8250.h | 1 + > drivers/tty/serial/8250/8250_fintek.c | 1 + > drivers/tty/

Re: ptrace and pseudoterminals

2015-11-05 Thread Peter Hurley
On 11/05/2015 01:35 PM, Pavel Labath wrote: > On 5 November 2015 at 05:25, Peter Hurley wrote: >> On 11/04/2015 02:43 PM, Oleg Nesterov wrote: >>> Oh, I don't think "Automagically if ptrace" makes any sense... What makes >>> ptrace special? Afaics nothin

Re: [PATCH] serial: 8250_uniphier: add earlycon support

2015-11-05 Thread Peter Hurley
N_DECLARE(uart8250, early_serial8250_setup); > serial/8250/8250_early.c:EARLYCON_DECLARE(uart, early_serial8250_setup); > serial/msm_serial.c:EARLYCON_DECLARE(msm_serial, > msm_serial_early_console_setup); > serial/msm_serial.c:OF_EARLYCON_DECLARE(msm_serial, "qcom,msm-uart", > serial/msm_serial.

Re: ptrace and pseudoterminals

2015-11-05 Thread Peter Hurley
On 11/04/2015 02:43 PM, Oleg Nesterov wrote: > On 11/04, Peter Hurley wrote: >> >> Hi Pavel, >> >> On 11/03/2015 06:16 PM, Pavel Labath wrote: >>> Hello Oleg, everyone, >>> >>> I have noticed something, which may be considered a race in the &

Re: linux-next: Tree for Nov 4 (serial console & earlycon)

2015-11-04 Thread Peter Hurley
ll randconfig file is attached. Hi Randy, Thanks for the report. Should be fixed by http://www.spinics.net/lists/linux-serial/msg19275.html which isn't in Greg's tree yet. Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: ptrace and pseudoterminals

2015-11-04 Thread Peter Hurley
which would flush the workqueue (thus waiting for i/o completion). The debugger would fsync() before select() on the master. 2. Automagically for ptraced processes. The basic idea would be that writes to the slave end while a process was being ptraced would set state that would trigge

Re: [PATCH v3 0/3] serial: 8250_early: simplify serial_putc()

2015-10-30 Thread Peter Hurley
serial: 8250_early: confirm empty transmitter after sending characters serial: 8250_early: squash wait_for_xmitr() into serial_putc() drivers/tty/serial/8250/8250_early.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) For series Reviewed-by: Peter Hurley -- To

Re: [PATCH v2] serial: 8250_uniphier: add earlycon support

2015-10-30 Thread Peter Hurley
o prevent early8250_setup() from initializing the divisor register because port->uartclk does not match the frequency expected by this hardware. Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [PATCH] serial: 8250_uniphier: add earlycon support

2015-10-28 Thread Peter Hurley
gt; +OF_EARLYCON_DECLARE(uniphier_uart, "socionext,uniphier-uart", > + uniphier_early_console_setup); Please change the earlycon name to just "uniphier" or "uniphier8250"; eg., OF_EARLYCON_DECLARE(uniphier, "socionext,uniphier-uart",

Re: [PATCH] of/fdt: fix error checking for earlycon address

2015-10-28 Thread Peter Hurley
On 10/27/2015 04:46 PM, Rob Herring wrote: > On Fri, Oct 23, 2015 at 8:15 AM, Peter Hurley > wrote: >> Hi Masahiro, >> >> On 10/23/2015 07:47 AM, Masahiro Yamada wrote: >>> fdt_translate_address() returns OF_BAD_ADDR on error. It is defined as >>> a u

Re: [PATCH v2 1/2] serial: 8250_early: do not save and restore IER in write callback

2015-10-28 Thread Peter Hurley
On 10/27/2015 11:27 PM, Masahiro Yamada wrote: > Hi Peter, > > 2015-10-27 22:54 GMT+09:00 Peter Hurley : >> Hi Masahiro, >> >> On 10/24/2015 12:17 AM, Masahiro Yamada wrote: >>> The IER has already been masked in early_serial8250_setup(), there is >>>

Re: [PATCH v4] serial: support 16-bit register interface for console

2015-10-28 Thread Peter Hurley
ycon with it. > (Refer to arch/arm/boot/dts/uniphier-support-card.dtsi) Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-

Re: [PATCH] tty: serial: sa1100.c: use UPIO_MEM rather than SERIAL_IO_MEM

2015-10-28 Thread Peter Hurley
akage was occurring as contributors were changing the UPIO_* constant values. Regards, Peter Hurley > ret = -EINVAL; > if (sport->port.uartclk / 16 != ser->baud_base) > ret = -EINVAL; > -- To unsubscribe from this list: send the line "unsubsc

Re: [Intel-wired-lan] [PATCHv2] ixgbe: Wait for 1ms, not 1us, after RST

2015-10-27 Thread Peter Hurley
re not harmful. Use of usleep_range() would be unnecessary overkill for the purpose. Regards, Peter Hurley > --- > > I have tested your changes > > [Intel-wired-lan] [PATCHv2] ixgbe: Wait for 1ms, not 1us, after RST > > Project: net (net-current development queue) > &g

Re: [PATCH 06/15] serial/men_z135_uart: Deinline men_z135_reg_clr, save 176 bytes

2015-10-27 Thread Peter Hurley
s, Peter Hurley > Signed-off-by: Denys Vlasenko > CC: Greg Kroah-Hartman > CC: Peter Hurley > CC: Jiri Slaby > CC: linux-ser...@vger.kernel.org > --- > drivers/tty/serial/men_z135_uart.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/d

Re: [PATCH 09/15] serial/pxa: Deinline wait_for_xmitr, save 165 bytes

2015-10-27 Thread Peter Hurley
On 10/27/2015 01:46 PM, Denys Vlasenko wrote: > This function compiles to 141 bytes of machine code. Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 08/15] serial/omap-serial: Deinline wait_for_xmitr, save 165 bytes

2015-10-27 Thread Peter Hurley
On 10/27/2015 01:46 PM, Denys Vlasenko wrote: > This function compiles to 141 bytes of machine code. Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 07/15] serial/msm_serial: Deinline wait_for_xmitr, save 165 bytes

2015-10-27 Thread Peter Hurley
On 10/27/2015 01:46 PM, Denys Vlasenko wrote: > This function compiles to 141 bytes of machine code. Fails to apply to tty-next Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org M

Re: [PATCH 05/15] serial/m32r_sio: Deinline wait_for_xmitr, save 165 bytes

2015-10-27 Thread Peter Hurley
On 10/27/2015 01:46 PM, Denys Vlasenko wrote: > This function compiles to 141 bytes of machine code. Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 04/15] serial/fsl_lpuart: Deinline lpuart_transmit_buffer, save 176 bytes

2015-10-27 Thread Peter Hurley
On 10/27/2015 01:46 PM, Denys Vlasenko wrote: > This function compiles to 172 bytes of machine code. > > Signed-off-by: Denys Vlasenko > CC: Greg Kroah-Hartman > CC: Peter Hurley > CC: Jiri Slaby > CC: linux-ser...@vger.kernel.org > --- > drivers/tty/serial/fs

Re: [PATCH 01/15] cyclades: Deinline cyz_is_loaded, save 240 bytes

2015-10-27 Thread Peter Hurley
On 10/27/2015 01:46 PM, Denys Vlasenko wrote: > This function compiles to 58 bytes of machine code. Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 02/15] isicom: Deinline drop_dtr, save 112 bytes

2015-10-27 Thread Peter Hurley
On 10/27/2015 01:46 PM, Denys Vlasenko wrote: > This function compiles to 181 bytes of machine code. Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 00/15] drivers/tty/: Deinline smaller/less used functions

2015-10-27 Thread Peter Hurley
Hi Denys, On 10/27/2015 01:46 PM, Denys Vlasenko wrote: > For Peter's review. > (Pater, I removed a few patches which looked most problematic) I'd take 'Deinline finish_erasing, save 112 bytes' as well. Regards, Peter Hurley > Denys Vlasenko (15): > cyclades:

Re: [PATCH 03/15] tty: Deinline n_tty_receive_char_inline, save 224 bytes

2015-10-27 Thread Peter Hurley
On 10/27/2015 01:46 PM, Denys Vlasenko wrote: > This function compiles to 198 bytes of machine code. > > Signed-off-by: Denys Vlasenko > CC: Greg Kroah-Hartman > CC: Peter Hurley > CC: Jiri Slaby > CC: linux-ser...@vger.kernel.org > --- > drivers/tty/n_tty.c

Re: [PATCH] ixgbe: Wait for 1ms, not 1us, after RST

2015-10-27 Thread Peter Hurley
e ixgbe_reset_hw_x540() goes on to msleep(100) immediately after this busy-wait loop, this should instead be: msleep(1); Regards, Peter Hurley > ctrl = IXGBE_READ_REG(hw, IXGBE_CTRL); > if (!(ctrl & IXGBE_CTRL_RST_MASK)) >

Re: [PATCH 0/8] drivers/tty/: Deinline functions when it saves at least 300 bytes per function

2015-10-27 Thread Peter Hurley
| 2 +- > 6 files changed, 8 insertions(+), 8 deletions(-) For series, Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: Inline hunt results for 4.3.0-rc1

2015-10-27 Thread Peter Hurley
7;d like to eliminate in a different way. If you want to send those as a separate series, I could mark as reviewed the ok patches, indicate which ones to drop and which patches I'd be willing to rework. Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux

Re: [PATCH 2/2] serial: 8250_ingenic: allow to be independent of SERIAL_8250_CONSOLE

2015-10-27 Thread Peter Hurley
On 10/23/2015 09:31 AM, Masahiro Yamada wrote: > This UART driver should not depend on the console. They should be > orthogonal. > > Surround the earlycon code with CONFIG_SERIAL_EARLYCON conditional > and rip off "depends on SERIAL_8250_CONSOLE". Reviewed-by:

Re: [PATCH 1/2] serial: 8250_ingenic: delete redundant "select SERIAL_EARLYCON"

2015-10-27 Thread Peter Hurley
On 10/23/2015 09:31 AM, Masahiro Yamada wrote: > SERIAL_8250_INGENIC depends on SERIAL_8250_CONSOLE, which already > selects SERIAL_EARLYCON. > > This line is redundant. Reviewed-by: Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel&

Re: [PATCH v2 1/2] serial: 8250_early: do not save and restore IER in write callback

2015-10-27 Thread Peter Hurley
- /* Wait for transmitter to become empty and restore the IER */ > - wait_for_xmitr(port); This wait_for_xmitr() change needs to be in patch 2/2. Regards, Peter Hurley > - > - if (ier) > - serial8250_early_out(port, UART_IER, ier); > } > > static

Re: [PATCH v3] serial: support 16-bit register interface for console

2015-10-27 Thread Peter Hurley
on is to use earlycon with it. > (Refer to arch/arm/boot/dts/uniphier-support-card.dtsi) As I noted in reviewing v2, the patch hunk below does not apply. You must rebase your changes on top of Greg's tty-next tree. Regards, Peter Hurley > diff --git a/drivers/tty/serial/serial_core.c

Re: [PATCH] of/fdt: fix error checking for earlycon address

2015-10-23 Thread Peter Hurley
size_t (which is the proper type for handling addresses as integers) and that type was propagated through early_init_dt_scan_chosen_serial => of_setup_earlycon. Regards, Peter Hurley PS - It seems that there is a new user of fdt_translate_address() in the

Re: [PATCH] serial: 8250_early: do not save and restore IER in write callback

2015-10-23 Thread Peter Hurley
ok with me, but please split this into 2 patches so reverting either one in case of regression is trivial. Regards, Peter Hurley > Signed-off-by: Masahiro Yamada > --- > > drivers/tty/serial/8250/8250_early.c | 20 ++-- > 1 file changed, 2 insertions(+), 18 deletion

Re: console vs earlycon ?

2015-10-21 Thread Peter Hurley
On 10/21/2015 03:00 PM, Arnd Bergmann wrote: > On Wednesday 21 October 2015 11:32:15 Peter Hurley wrote: >> On 10/21/2015 10:13 AM, Arnd Bergmann wrote: >>> On Wednesday 21 October 2015 09:53:47 Peter Hurley wrote: >>>> I'm assuming the issue with trying to

Re: [PATCH v2 2/2] serial: earlycon: allow to specify uartclk in earlycon kernel-parameter

2015-10-21 Thread Peter Hurley
n my legacy x86 workstation, the bootloader does not initialize the h/w so when I want 8250 earlycon, I must specify the baud rate. Regards, Peter Hurley -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More ma

Re: console vs earlycon ?

2015-10-21 Thread Peter Hurley
On 10/21/2015 10:13 AM, Arnd Bergmann wrote: > On Wednesday 21 October 2015 09:53:47 Peter Hurley wrote: >> On 10/21/2015 06:36 AM, Arnd Bergmann wrote: >>> On Wednesday 21 October 2015 18:30:05 Masahiro Yamada wrote: >>>>> >>>>>> I am

Re: [PATCH] Fix data loss in cdc-acm

2015-10-21 Thread Peter Hurley
On 10/21/2015 08:09 AM, Peter Hurley wrote: > Be aware that while the N_TTY line discipline ensures that put_char() > and write() usage will not be interleaved without flush_chars(), other > line disciplines might not, so at least be sure that driver won't > crash if that happen

Re: Missing wait_event_killable_timeout?

2015-10-21 Thread Peter Hurley
s patch look reasonable? Where is the in-tree user? Without that, someone will notice this isn't being used and will remove it. Regards, Peter Hurley > diff --git a/include/linux/wait.h b/include/linux/wait.h > index 1e1bf9f..8419986 100644 > --- a/include/linux/wait.h > +++ b/

Re: console vs earlycon ?

2015-10-21 Thread Peter Hurley
it until the uart is added by the tty driver > and calls of_console_check() to add the default console device. I'm assuming the issue with trying to get console_init() working is because the dummy color console causes the earlycon to be disabled? I fixed that once before for

Re: console vs earlycon ?

2015-10-21 Thread Peter Hurley
iver. >Is it meaningless to implement console_initcall() as well as earlycon? Probed drivers should only implement earlycon and console. 8250 sub-drivers should only implement earlycon and/or console if the base 8250 earlycon and/or console are not operational. Regards, Peter Hur

Re: [PATCH v2 2/2] serial: earlycon: allow to specify uartclk in earlycon kernel-parameter

2015-10-21 Thread Peter Hurley
On 10/20/2015 09:20 PM, Masahiro Yamada wrote: > Hi Peter, > (+ Rob Herring, Stefan Agner) > > 2015-10-20 23:00 GMT+09:00 Peter Hurley : >> On 10/19/2015 11:36 PM, Masahiro Yamada wrote: >>> The input clock frequency varies from device to device, but the >>&g

Re: [PATCH] Fix data loss in cdc-acm

2015-10-21 Thread Peter Hurley
On 10/21/2015 06:12 AM, Oliver Neukum wrote: > On Tue, 2015-10-20 at 14:16 -0400, Peter Hurley wrote: >> ECHO is on by default and the cdc-acm driver does not implement the >> put_char() and flush_chars() tty driver methods, which made the >> problem >> _way worse_, sinc

Re: [PATCH] Fix data loss in cdc-acm

2015-10-20 Thread Peter Hurley
On 08/05/2015 01:36 PM, Peter Hurley wrote: > On 07/22/2015 06:53 PM, Sven Brauch wrote: >> On 23/07/15 00:12, Peter Hurley wrote: >>> The premature unthrottle actually leads to the data loss but the throttling >>> with a mere 2K left is _way too late_. >> Ok, yes,

Re: [PATCH v2 2/2] serial: earlycon: allow to specify uartclk in earlycon kernel-parameter

2015-10-20 Thread Peter Hurley
On 10/19/2015 11:36 PM, Masahiro Yamada wrote: > The input clock frequency varies from device to device, but the > earlycon uses the fixed frequency (BASE_BAUD * 16). It makes > impossible to set the correct divisor to the register. So the bootloader hasn't setup the serial port? > This commit

<    1   2   3   4   5   6   7   8   9   10   >