Re: [PATCH] serial: mctrl_gpio: Drop support for out1-gpios and out2-gpios

2016-04-22 Thread Peter Hurley
On 04/22/2016 08:10 AM, Geert Uytterhoeven wrote: > The OUT1 and OUT2 pins present on some legacy UARTs are basically GPIOs. > It doesn't make much sense to emulate GPIOs using other GPIOs, hence > drop support for that. Thanks Geert. Reviewed-by: Peter Hurley <pe...@hurleysoftware.com>

Re: [PATCH] serial: mctrl_gpio: Drop support for out1-gpios and out2-gpios

2016-04-22 Thread Peter Hurley
On 04/22/2016 08:10 AM, Geert Uytterhoeven wrote: > The OUT1 and OUT2 pins present on some legacy UARTs are basically GPIOs. > It doesn't make much sense to emulate GPIOs using other GPIOs, hence > drop support for that. Thanks Geert. Reviewed-by: Peter Hurley

Re: [PATCH V4] audit: add tty field to LOGIN event

2016-04-22 Thread Peter Hurley
ighand_struct (ie tsk->sighand). 2. The existing usage is always tsk==current 3. If the idea is to make this invulnerable to tsk being gone, then the usage is unsafe anyway. So ultimately (but not necessarily for this patch) I'd prefer that either a. audit use existing t

Re: [PATCH V4] audit: add tty field to LOGIN event

2016-04-22 Thread Peter Hurley
tsk->sighand). 2. The existing usage is always tsk==current 3. If the idea is to make this invulnerable to tsk being gone, then the usage is unsafe anyway. So ultimately (but not necessarily for this patch) I'd prefer that either a. audit use existing tty api instead of open-coding, or b.

Re: [PATCH 01/16] devpts: Attempting to get it right

2016-04-19 Thread Peter Hurley
On 04/19/2016 05:24 PM, Peter Hurley wrote: > On 04/19/2016 04:35 PM, Linus Torvalds wrote: >> On Tue, Apr 19, 2016 at 3:06 PM, Eric W. Biederman >> <ebied...@xmission.com> wrote: >>> >>> I have work inspired by this rolled into my code. I will post

Re: [PATCH 01/16] devpts: Attempting to get it right

2016-04-19 Thread Peter Hurley
On 04/19/2016 05:24 PM, Peter Hurley wrote: > On 04/19/2016 04:35 PM, Linus Torvalds wrote: >> On Tue, Apr 19, 2016 at 3:06 PM, Eric W. Biederman >> wrote: >>> >>> I have work inspired by this rolled into my code. I will post shortly >>> after a l

Re: [PATCH 01/16] devpts: Attempting to get it right

2016-04-19 Thread Peter Hurley
from teardown when the only open filp is /dev/tty. What I want to do instead (but not for -stable) is bump the inode reference at controlling tty association instead (either first qualifying open or ioctl(TIOCSCTTY)). That way it would always be the slave inode. This method is non-trivial though because it makes disassociation more complicated. Regards, Peter Hurley

Re: [PATCH 01/16] devpts: Attempting to get it right

2016-04-19 Thread Peter Hurley
y open filp is /dev/tty. What I want to do instead (but not for -stable) is bump the inode reference at controlling tty association instead (either first qualifying open or ioctl(TIOCSCTTY)). That way it would always be the slave inode. This method is non-trivial though because it makes disassociation more complicated. Regards, Peter Hurley

Re: Q: tty_open() && hangup

2016-04-15 Thread Peter Hurley
t hung_up_tty_fops() > right after tty_hung_up_p() returns F. __tty_hangup() will not have had visibility to this filp after tty_release(). > Don't we need something like below? Otherwise afaics tty_open() can > actually succeed (and clear TTY_HUPPED) after restart, but return with >

Re: Q: tty_open() && hangup

2016-04-15 Thread Peter Hurley
t hung_up_tty_fops() > right after tty_hung_up_p() returns F. __tty_hangup() will not have had visibility to this filp after tty_release(). > Don't we need something like below? Otherwise afaics tty_open() can > actually succeed (and clear TTY_HUPPED) after restart, but return with >

Re: 8250 dma issues ( was Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes)

2016-04-14 Thread Peter Hurley
ou never mix fast and tty buffers, and with an atomic > swap of port->fast_rx between tty_buffer queueing logic, discard and > ldisc->fast_rx pointers done when the ldisc is set or changes. Yes, that's one possible alternative. The drawback is that makes testing more difficult, but maybe the tradeoff would be worth it. Regards, Peter Hurley > There are very few cases where n_tty is the one that needs the optimized > path: uucp died a long time ago 8) > > Alan >

Re: 8250 dma issues ( was Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes)

2016-04-14 Thread Peter Hurley
ou never mix fast and tty buffers, and with an atomic > swap of port->fast_rx between tty_buffer queueing logic, discard and > ldisc->fast_rx pointers done when the ldisc is set or changes. Yes, that's one possible alternative. The drawback is that makes testing more difficult, but maybe the tradeoff would be worth it. Regards, Peter Hurley > There are very few cases where n_tty is the one that needs the optimized > path: uucp died a long time ago 8) > > Alan >

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-14 Thread Peter Hurley
On 04/12/2016 11:42 AM, Peter Hurley wrote: > On 04/12/2016 10:03 AM, Sebastian Andrzej Siewior wrote: >> On 04/11/2016 10:10 PM, Peter Hurley wrote: >>> On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: >>>> On 04/11/2016 07:53 PM, Peter Hurley wrote: >

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-14 Thread Peter Hurley
On 04/12/2016 11:42 AM, Peter Hurley wrote: > On 04/12/2016 10:03 AM, Sebastian Andrzej Siewior wrote: >> On 04/11/2016 10:10 PM, Peter Hurley wrote: >>> On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: >>>> On 04/11/2016 07:53 PM, Peter Hurley wrote: >

Re: omap uart + dma issues (Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes)

2016-04-13 Thread Peter Hurley
On 04/13/2016 04:11 AM, Sekhar Nori wrote: > On Wednesday 13 April 2016 05:30 AM, Peter Hurley wrote: > >>>> - generates spurious uart interrupt for every rx dma transaction >>>> (ie., necessitates acking every UART interrupt, even UART_IIR_NO_INT) >>>&g

Re: omap uart + dma issues (Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes)

2016-04-13 Thread Peter Hurley
On 04/13/2016 04:11 AM, Sekhar Nori wrote: > On Wednesday 13 April 2016 05:30 AM, Peter Hurley wrote: > >>>> - generates spurious uart interrupt for every rx dma transaction >>>> (ie., necessitates acking every UART interrupt, even UART_IIR_NO_INT) >>>&g

Re: [PATCH] audit: add tty field to LOGIN event

2016-04-13 Thread Peter Hurley
ernel/auditsc.c > @@ -1993,8 +1993,9 @@ static void audit_log_set_loginuid(kuid_t koldloginuid, > kuid_t kloginuid, > return; > audit_log_format(ab, "pid=%d uid=%u", task_pid_nr(current), uid); > audit_log_task_context(ab); > - audit_log_format(ab, " old-auid=%u auid=%u old-ses=%u ses=%u res=%d", > - oldloginuid, loginuid, oldsessionid, sessionid, !rc); tty = get_current_tty(); > + audit_log_format(ab, " old-auid=%u auid=%u tty=%s old-ses=%u ses=%u > res=%d", > + oldloginuid, loginuid, audit_get_tty(current), ..., tty_name(tty), > + oldsessionid, sessionid, !rc); tty_kref_put(tty); Regards, Peter Hurley > audit_log_end(ab); > } > >

Re: [PATCH] audit: add tty field to LOGIN event

2016-04-13 Thread Peter Hurley
auditsc.c > @@ -1993,8 +1993,9 @@ static void audit_log_set_loginuid(kuid_t koldloginuid, > kuid_t kloginuid, > return; > audit_log_format(ab, "pid=%d uid=%u", task_pid_nr(current), uid); > audit_log_task_context(ab); > - audit_log_format(ab, " old-auid=%u auid=%u old-ses=%u ses=%u res=%d", > - oldloginuid, loginuid, oldsessionid, sessionid, !rc); tty = get_current_tty(); > + audit_log_format(ab, " old-auid=%u auid=%u tty=%s old-ses=%u ses=%u > res=%d", > + oldloginuid, loginuid, audit_get_tty(current), ..., tty_name(tty), > + oldsessionid, sessionid, !rc); tty_kref_put(tty); Regards, Peter Hurley > audit_log_end(ab); > } > >

Re: Is there any race between flush_to_ldisc() and release_one_tty()?

2016-04-12 Thread Peter Hurley
Hi Prasad, Thanks for the report. On 04/12/2016 08:22 AM, Sodagudi Prasad wrote: > > Hi All, > > It looks like there is race between flush_to_ldisc() and release_one_tty(). Not necessarily. Driver could have destroyed the port prematurely. Or the driver could have rescheduled the input

Re: Is there any race between flush_to_ldisc() and release_one_tty()?

2016-04-12 Thread Peter Hurley
Hi Prasad, Thanks for the report. On 04/12/2016 08:22 AM, Sodagudi Prasad wrote: > > Hi All, > > It looks like there is race between flush_to_ldisc() and release_one_tty(). Not necessarily. Driver could have destroyed the port prematurely. Or the driver could have rescheduled the input

omap uart + dma issues (Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes)

2016-04-12 Thread Peter Hurley
On 04/12/2016 10:03 AM, Sebastian Andrzej Siewior wrote: > On 04/11/2016 10:10 PM, Peter Hurley wrote: >> On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: >>> On 04/11/2016 07:53 PM, Peter Hurley wrote: >>>> On 04/11/2016 01:18 AM, John Ogness wrote: >>

omap uart + dma issues (Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes)

2016-04-12 Thread Peter Hurley
On 04/12/2016 10:03 AM, Sebastian Andrzej Siewior wrote: > On 04/11/2016 10:10 PM, Peter Hurley wrote: >> On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: >>> On 04/11/2016 07:53 PM, Peter Hurley wrote: >>>> On 04/11/2016 01:18 AM, John Ogness wrote: >

8250 dma issues ( was Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes)

2016-04-12 Thread Peter Hurley
[ +to Heikki, Andy ] On 04/12/2016 10:03 AM, Sebastian Andrzej Siewior wrote: > On 04/11/2016 10:10 PM, Peter Hurley wrote: >> On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: >>> On 04/11/2016 07:53 PM, Peter Hurley wrote: [ elided parts not relevant to shared 8

8250 dma issues ( was Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes)

2016-04-12 Thread Peter Hurley
[ +to Heikki, Andy ] On 04/12/2016 10:03 AM, Sebastian Andrzej Siewior wrote: > On 04/11/2016 10:10 PM, Peter Hurley wrote: >> On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: >>> On 04/11/2016 07:53 PM, Peter Hurley wrote: [ elided parts not relevant to shared 8

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-12 Thread Peter Hurley
On 04/12/2016 10:03 AM, Sebastian Andrzej Siewior wrote: > On 04/11/2016 10:10 PM, Peter Hurley wrote: >> On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: >>> On 04/11/2016 07:53 PM, Peter Hurley wrote: >>>> On 04/11/2016 01:18 AM, John Ogness wrote: >>

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-12 Thread Peter Hurley
On 04/12/2016 10:03 AM, Sebastian Andrzej Siewior wrote: > On 04/11/2016 10:10 PM, Peter Hurley wrote: >> On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: >>> On 04/11/2016 07:53 PM, Peter Hurley wrote: >>>> On 04/11/2016 01:18 AM, John Ogness wrote: >

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-11 Thread Peter Hurley
On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: > On 04/11/2016 07:53 PM, Peter Hurley wrote: >> On 04/11/2016 01:18 AM, John Ogness wrote: >>> On 2016-04-05, Peter Hurley <pe...@hurleysoftware.com> wrote: >>>> On 03/31/2016 01:41 AM, John Ogne

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-11 Thread Peter Hurley
On 04/11/2016 11:31 AM, Sebastian Andrzej Siewior wrote: > On 04/11/2016 07:53 PM, Peter Hurley wrote: >> On 04/11/2016 01:18 AM, John Ogness wrote: >>> On 2016-04-05, Peter Hurley wrote: >>>> On 03/31/2016 01:41 AM, John Ogness wrote: >>>>> I

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-11 Thread Peter Hurley
On 04/11/2016 01:18 AM, John Ogness wrote: > On 2016-04-05, Peter Hurley <pe...@hurleysoftware.com> wrote: >> On 03/31/2016 01:41 AM, John Ogness wrote: >>> It has been observed that the TX-DMA can stall >> >> Does this happen on any other OMAP part besides am

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-11 Thread Peter Hurley
On 04/11/2016 01:18 AM, John Ogness wrote: > On 2016-04-05, Peter Hurley wrote: >> On 03/31/2016 01:41 AM, John Ogness wrote: >>> It has been observed that the TX-DMA can stall >> >> Does this happen on any other OMAP part besides am335x? >> I looked back over

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-11 Thread Peter Hurley
On 04/11/2016 02:01 AM, Cyrill Gorcunov wrote: > On Sun, Apr 10, 2016 at 10:43:28PM -0700, Peter Hurley wrote: >> Hi Cyrill, >> >> On 04/07/2016 05:53 AM, Cyrill Gorcunov wrote: >>> Currently when we checkpoint PTY connections we ignore data queued inside >&

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-11 Thread Peter Hurley
On 04/11/2016 02:01 AM, Cyrill Gorcunov wrote: > On Sun, Apr 10, 2016 at 10:43:28PM -0700, Peter Hurley wrote: >> Hi Cyrill, >> >> On 04/07/2016 05:53 AM, Cyrill Gorcunov wrote: >>> Currently when we checkpoint PTY connections we ignore data queued inside >&

Re: [PATCH] drivers/tty: fix BUG_ON when calls serial8250_suspend_port

2016-04-11 Thread Peter Hurley
s"; note that series also has two other patch dependencies which are detailed in the cover letter. Regards, Peter Hurley > The flags > will be overwritten with old value after it updates in uart_suspend_port(). > CPU A CPU B > in uart_s

Re: [PATCH] drivers/tty: fix BUG_ON when calls serial8250_suspend_port

2016-04-11 Thread Peter Hurley
s"; note that series also has two other patch dependencies which are detailed in the cover letter. Regards, Peter Hurley > The flags > will be overwritten with old value after it updates in uart_suspend_port(). > CPU A CPU B > in uart_s

Re: [PATCH v2 07/11] serial: 8250: enable AFE on ports where FIFO is 16 bytes

2016-04-11 Thread Peter Hurley
> Drop a FIFO size limitation to allow autoflow control be enabled on such > UARTs. > > While here, comment out UART_CAP_AFE for PORT_AR7 since it wasn't working and > it will be not a good idea to use it in conjunction with trigger level of 1 > byte. Reviewed-by: Peter Hurley <pe...@hurleysoftware.com>

Re: [PATCH v2 07/11] serial: 8250: enable AFE on ports where FIFO is 16 bytes

2016-04-11 Thread Peter Hurley
> Drop a FIFO size limitation to allow autoflow control be enabled on such > UARTs. > > While here, comment out UART_CAP_AFE for PORT_AR7 since it wasn't working and > it will be not a good idea to use it in conjunction with trigger level of 1 > byte. Reviewed-by: Peter Hurley

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-10 Thread Peter Hurley
up > in plain copying of buffer data. > > Strictly speaking, we could try handle it inside CRIU itself, as > Peter Hurley proposed (switch terminal to raw mode, read data, > and return original termios back) but in this case we may hit > the scenario when we read data and failed to

Re: [PATCH resend v2] tty: n_tty -- Add new TIOCPEEKRAW ioctl to peek unread data

2016-04-10 Thread Peter Hurley
up > in plain copying of buffer data. > > Strictly speaking, we could try handle it inside CRIU itself, as > Peter Hurley proposed (switch terminal to raw mode, read data, > and return original termios back) but in this case we may hit > the scenario when we read data and failed to

Re: [PATCH 2/2] tty: Remove stale parameter comment

2016-04-10 Thread Peter Hurley
On 04/10/2016 01:24 AM, Jiri Slaby wrote: > On 04/10/2016, 05:36 AM, Peter Hurley wrote: >> noctty was removed as a parameter by commit 216513411937586 > > It is actually 11e1d4aa4da. Right; not sure where that number came from. > >> ("tty: Consoli

Re: [PATCH 2/2] tty: Remove stale parameter comment

2016-04-10 Thread Peter Hurley
On 04/10/2016 01:24 AM, Jiri Slaby wrote: > On 04/10/2016, 05:36 AM, Peter Hurley wrote: >> noctty was removed as a parameter by commit 216513411937586 > > It is actually 11e1d4aa4da. Right; not sure where that number came from. > >> ("tty: Consoli

[PATCH 1/2] tty: Remove unused TTY_NUMBER() macro

2016-04-09 Thread Peter Hurley
TTY_NUMBER() has been unused since v2.5.71; removed by "[PATCH] callout removal: callout is gone". Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- drivers/tty/tty_io.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io

[PATCH 2/2] tty: Remove stale parameter comment

2016-04-09 Thread Peter Hurley
noctty was removed as a parameter by commit 216513411937586 ("tty: Consolidate noctty check in tty_open()"). Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- drivers/tty/tty_io.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/tty_io.c b/drivers/tt

[PATCH 1/2] tty: Remove unused TTY_NUMBER() macro

2016-04-09 Thread Peter Hurley
TTY_NUMBER() has been unused since v2.5.71; removed by "[PATCH] callout removal: callout is gone". Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 320dc4d..3cdd63b 100644 ---

[PATCH 2/2] tty: Remove stale parameter comment

2016-04-09 Thread Peter Hurley
noctty was removed as a parameter by commit 216513411937586 ("tty: Consolidate noctty check in tty_open()"). Signed-off-by: Peter Hurley --- drivers/tty/tty_io.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 3cdd63b..5097

[PATCH 4/8] tty: Replace ASYNC_CHECK_CD and update atomically

2016-04-09 Thread Peter Hurley
Replace ASYNC_CHECK_CD bit in the tty_port::flags field with TTY_PORT_CHECK_CD bit in the tty_port::iflags field. Introduce helpers tty_port_set_check_carrier() and tty_port_check_carrier() to abstract the atomic bit ops. Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- driver

[PATCH 1/8] tty: Define ASYNC_ replacement bits

2016-04-09 Thread Peter Hurley
and new, substitute bit definitions for the former ASYNC_* flags. Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- include/linux/tty.h| 16 +++- include/uapi/linux/tty_flags.h | 9 - 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/i

[PATCH 7/8] tty: mxser: Remove unused ASYNC_SHARE_IRQ flag

2016-04-09 Thread Peter Hurley
ASYNC*_SHARE_IRQ is no longer used; remove. Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- drivers/tty/mxser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 7e8c27b..98d2bd1 100644 --- a/drivers/tty/mxser.c +++ b/drive

[PATCH 3/8] tty: Replace ASYNC_NORMAL_ACTIVE bit and update atomically

2016-04-09 Thread Peter Hurley
; the state transitions are protected by the tty lock (which mutually excludes parallel open/close/hangup), and no user tests the active state while holding the port lock. Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- drivers/isdn/i4l/isdn_tty.c | 20 +--- drive

[PATCH 1/8] tty: Define ASYNC_ replacement bits

2016-04-09 Thread Peter Hurley
and new, substitute bit definitions for the former ASYNC_* flags. Signed-off-by: Peter Hurley --- include/linux/tty.h| 16 +++- include/uapi/linux/tty_flags.h | 9 - 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/include/linux/tty.h b/include

[PATCH 7/8] tty: mxser: Remove unused ASYNC_SHARE_IRQ flag

2016-04-09 Thread Peter Hurley
ASYNC*_SHARE_IRQ is no longer used; remove. Signed-off-by: Peter Hurley --- drivers/tty/mxser.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 7e8c27b..98d2bd1 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c @@ -2392,7 +2392,6

[PATCH 3/8] tty: Replace ASYNC_NORMAL_ACTIVE bit and update atomically

2016-04-09 Thread Peter Hurley
; the state transitions are protected by the tty lock (which mutually excludes parallel open/close/hangup), and no user tests the active state while holding the port lock. Signed-off-by: Peter Hurley --- drivers/isdn/i4l/isdn_tty.c | 20 +--- drivers/tty/amiserial.c | 2

[PATCH 4/8] tty: Replace ASYNC_CHECK_CD and update atomically

2016-04-09 Thread Peter Hurley
Replace ASYNC_CHECK_CD bit in the tty_port::flags field with TTY_PORT_CHECK_CD bit in the tty_port::iflags field. Introduce helpers tty_port_set_check_carrier() and tty_port_check_carrier() to abstract the atomic bit ops. Signed-off-by: Peter Hurley --- drivers/char/pcmcia/synclink_cs.c | 8

[PATCH 8/8] tty: core: Undefine ASYNC_* flags superceded by TTY_PORT* flags

2016-04-09 Thread Peter Hurley
Purposefully break out-of-tree driver compiles using kernel ASYNC_* bits which have been superceded by TTY_PORT* flags and their respective helper functions. Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- include/uapi/linux/tty_flags.h | 4 1 file changed, 4 insertions(+)

[PATCH 0/8] Replace kernel-defined ASYNC_ bits

2016-04-09 Thread Peter Hurley
Replace TTY_THROTTLED bit tests with tty_throttled()" Regards, Peter Hurley (8): tty: Define ASYNC_ replacement bits tty: Replace ASYNC_CTS_FLOW bit and update atomically tty: Replace ASYNC_NORMAL_ACTIVE bit and update atomically tty: Replace ASYNC_CHECK_CD and update atomically tt

[PATCH 6/8] tty: Replace ASYNC_INITIALIZED bit and update atomically

2016-04-09 Thread Peter Hurley
() are unnecessary as the state transitions are already mutually exclusive; the tty lock prevents concurrent open/close/hangup. Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- drivers/char/pcmcia/synclink_cs.c | 12 +- drivers/ipack/devices/ipoctal.c| 5 ++--- drivers/is

[PATCH 8/8] tty: core: Undefine ASYNC_* flags superceded by TTY_PORT* flags

2016-04-09 Thread Peter Hurley
Purposefully break out-of-tree driver compiles using kernel ASYNC_* bits which have been superceded by TTY_PORT* flags and their respective helper functions. Signed-off-by: Peter Hurley --- include/uapi/linux/tty_flags.h | 4 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux

[PATCH 0/8] Replace kernel-defined ASYNC_ bits

2016-04-09 Thread Peter Hurley
Replace TTY_THROTTLED bit tests with tty_throttled()" Regards, Peter Hurley (8): tty: Define ASYNC_ replacement bits tty: Replace ASYNC_CTS_FLOW bit and update atomically tty: Replace ASYNC_NORMAL_ACTIVE bit and update atomically tty: Replace ASYNC_CHECK_CD and update atomically tt

[PATCH 6/8] tty: Replace ASYNC_INITIALIZED bit and update atomically

2016-04-09 Thread Peter Hurley
() are unnecessary as the state transitions are already mutually exclusive; the tty lock prevents concurrent open/close/hangup. Signed-off-by: Peter Hurley --- drivers/char/pcmcia/synclink_cs.c | 12 +- drivers/ipack/devices/ipoctal.c| 5 ++--- drivers/isdn/i4l/isdn_tty.c| 10

[PATCH 5/8] tty: Replace ASYNC_SUSPENDED bit and update atomically

2016-04-09 Thread Peter Hurley
Replace ASYNC_SUSPENDED bit in the tty_port::flags field with TTY_PORT_SUSPENDED bit in the tty_port::iflags field. Introduce helpers tty_port_set_suspended() and tty_port_suspended() to abstract atomic bit ops. Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- drivers/s390/char/c

[PATCH 2/8] tty: Replace ASYNC_CTS_FLOW bit and update atomically

2016-04-09 Thread Peter Hurley
Replace ASYNC_CTS_FLOW bit in the tty_port::flags field with TTY_PORT_CTS_FLOW bit in the tty_port::iflags field. Add tty_port_set_cts_flow() helper to abstract the atomic bit ops. Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- drivers/char/pcmcia/synclink_cs.c | 5 + d

[PATCH 5/8] tty: Replace ASYNC_SUSPENDED bit and update atomically

2016-04-09 Thread Peter Hurley
Replace ASYNC_SUSPENDED bit in the tty_port::flags field with TTY_PORT_SUSPENDED bit in the tty_port::iflags field. Introduce helpers tty_port_set_suspended() and tty_port_suspended() to abstract atomic bit ops. Signed-off-by: Peter Hurley --- drivers/s390/char/con3215.c | 12

[PATCH 2/8] tty: Replace ASYNC_CTS_FLOW bit and update atomically

2016-04-09 Thread Peter Hurley
Replace ASYNC_CTS_FLOW bit in the tty_port::flags field with TTY_PORT_CTS_FLOW bit in the tty_port::iflags field. Add tty_port_set_cts_flow() helper to abstract the atomic bit ops. Signed-off-by: Peter Hurley --- drivers/char/pcmcia/synclink_cs.c | 5 + drivers/tty/amiserial.c

[PATCH] tty: Replace TTY_THROTTLED bit tests with tty_throttled()

2016-04-09 Thread Peter Hurley
Abstract TTY_THROTTLED bit tests with tty_throttled(). Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- drivers/char/pcmcia/synclink_cs.c | 2 +- drivers/mmc/card/sdio_uart.c | 2 +- drivers/net/usb/hso.c | 2 +- drivers/staging/fwserial/fwse

[PATCH] tty: Replace TTY_THROTTLED bit tests with tty_throttled()

2016-04-09 Thread Peter Hurley
Abstract TTY_THROTTLED bit tests with tty_throttled(). Signed-off-by: Peter Hurley --- drivers/char/pcmcia/synclink_cs.c | 2 +- drivers/mmc/card/sdio_uart.c | 2 +- drivers/net/usb/hso.c | 2 +- drivers/staging/fwserial/fwserial.c| 2 +- drivers/staging

[PATCH] tty: Replace TTY_IO_ERROR bit tests with tty_io_error()

2016-04-09 Thread Peter Hurley
Abstract TTY_IO_ERROR status test treewide with tty_io_error(). NB: tty->flags uses atomic bit ops; replace non-atomic bit test with test_bit(). Signed-off-by: Peter Hurley <pe...@hurleysoftware.com> --- v3: redo of an earlier patch titled "tty: Use test_bit() with tty->flags&q

[PATCH] tty: Replace TTY_IO_ERROR bit tests with tty_io_error()

2016-04-09 Thread Peter Hurley
Abstract TTY_IO_ERROR status test treewide with tty_io_error(). NB: tty->flags uses atomic bit ops; replace non-atomic bit test with test_bit(). Signed-off-by: Peter Hurley --- v3: redo of an earlier patch titled "tty: Use test_bit() with tty->flags" v2: rebase arch/ia64/hp

Re: [PATCH v1 06/12] serial: 8250_dma: stop ongoing RX DMA on exception

2016-04-08 Thread Peter Hurley
On 04/08/2016 01:07 AM, Andy Shevchenko wrote: > On Fri, Apr 8, 2016 at 2:54 AM, Peter Hurley <pe...@hurleysoftware.com> wrote: >> On 04/07/2016 01:37 PM, Andy Shevchenko wrote: >>> If we get an exeption interrupt. i.e. UART_IIR_RLSI, stop any ongoing RX DMA >>

Re: [PATCH v1 06/12] serial: 8250_dma: stop ongoing RX DMA on exception

2016-04-08 Thread Peter Hurley
On 04/08/2016 01:07 AM, Andy Shevchenko wrote: > On Fri, Apr 8, 2016 at 2:54 AM, Peter Hurley wrote: >> On 04/07/2016 01:37 PM, Andy Shevchenko wrote: >>> If we get an exeption interrupt. i.e. UART_IIR_RLSI, stop any ongoing RX DMA >>> transfer otherwise it mi

Re: [PATCH v1 09/12] serial: 8250_lpss: split LPSS driver to separate module

2016-04-08 Thread Peter Hurley
On 04/08/2016 01:17 AM, Andy Shevchenko wrote: > On Fri, Apr 8, 2016 at 4:42 AM, Peter Hurley <pe...@hurleysoftware.com> wrote: >> On 04/07/2016 01:37 PM, Andy Shevchenko wrote: >>> Intes SoCs, such as Braswell, have DesignWare UART. Split out to separate >>&g

Re: [PATCH v1 09/12] serial: 8250_lpss: split LPSS driver to separate module

2016-04-08 Thread Peter Hurley
On 04/08/2016 01:17 AM, Andy Shevchenko wrote: > On Fri, Apr 8, 2016 at 4:42 AM, Peter Hurley wrote: >> On 04/07/2016 01:37 PM, Andy Shevchenko wrote: >>> Intes SoCs, such as Braswell, have DesignWare UART. Split out to separate >>> module which also will be

Re: [PATCH v1 09/12] serial: 8250_lpss: split LPSS driver to separate module

2016-04-07 Thread Peter Hurley
On 04/07/2016 01:37 PM, Andy Shevchenko wrote: > Intes SoCs, such as Braswell, have DesignWare UART. Split out to separate > module which also will be used for Intel Quark later. What's the rationale? And this really isn't a split; this patch introduces a number of significant changes from the

Re: [PATCH v1 09/12] serial: 8250_lpss: split LPSS driver to separate module

2016-04-07 Thread Peter Hurley
On 04/07/2016 01:37 PM, Andy Shevchenko wrote: > Intes SoCs, such as Braswell, have DesignWare UART. Split out to separate > module which also will be used for Intel Quark later. What's the rationale? And this really isn't a split; this patch introduces a number of significant changes from the

Re: [PATCH v1 07/12] serial: 8250_dma: adjust DMA address of the UART

2016-04-07 Thread Peter Hurley
On 04/07/2016 01:37 PM, Andy Shevchenko wrote: > Some UARTs, e.g. one is used in Intel Quark, have a different address base for > DMA operations. Introduce an additional field in struct uart_8250_dma to cover > those cases. > > Signed-off-by: Andy Shevchenko >

Re: [PATCH v1 07/12] serial: 8250_dma: adjust DMA address of the UART

2016-04-07 Thread Peter Hurley
On 04/07/2016 01:37 PM, Andy Shevchenko wrote: > Some UARTs, e.g. one is used in Intel Quark, have a different address base for > DMA operations. Introduce an additional field in struct uart_8250_dma to cover > those cases. > > Signed-off-by: Andy Shevchenko > --- >

Re: [PATCH v1 05/12] serial: 8250_dma: switch to new dmaengine_terminate_* API

2016-04-07 Thread Peter Hurley
On 04/07/2016 01:37 PM, Andy Shevchenko wrote: > Convert dmaengine_terminate_all() calls to synchronous and asynchronous > versions where appropriate. Reviewed-by: Peter Hurley <pe...@hurleysoftware.com>

Re: [PATCH v1 05/12] serial: 8250_dma: switch to new dmaengine_terminate_* API

2016-04-07 Thread Peter Hurley
On 04/07/2016 01:37 PM, Andy Shevchenko wrote: > Convert dmaengine_terminate_all() calls to synchronous and asynchronous > versions where appropriate. Reviewed-by: Peter Hurley

Re: [PATCH v1 06/12] serial: 8250_dma: stop ongoing RX DMA on exception

2016-04-07 Thread Peter Hurley
On 04/07/2016 01:37 PM, Andy Shevchenko wrote: > If we get an exeption interrupt. i.e. UART_IIR_RLSI, stop any ongoing RX DMA > transfer otherwise it might generates more spurious interrupts and make port > unavailable anymore. Then how to know which rx byte the error is for if dma continues

Re: [PATCH v1 06/12] serial: 8250_dma: stop ongoing RX DMA on exception

2016-04-07 Thread Peter Hurley
On 04/07/2016 01:37 PM, Andy Shevchenko wrote: > If we get an exeption interrupt. i.e. UART_IIR_RLSI, stop any ongoing RX DMA > transfer otherwise it might generates more spurious interrupts and make port > unavailable anymore. Then how to know which rx byte the error is for if dma continues

Re: [PATCH v1 08/12] serial: 8250: enable AFE on ports where FIFO is 16 bytes

2016-04-07 Thread Peter Hurley
;= 16) { Let's just remove the fifosize test and rely on UART_CAP_AFE to enable AFE. Please remove comment from "In the case where ..." Also, I think the PORT_A7 port type should have UART_CAP_AFE commented out, especially since/if the trigger level is 1 byte. Regards, Peter Hurley > up->mcr &= ~UART_MCR_AFE; > if (termios->c_cflag & CRTSCTS) > up->mcr |= UART_MCR_AFE; >

Re: [PATCH v1 08/12] serial: 8250: enable AFE on ports where FIFO is 16 bytes

2016-04-07 Thread Peter Hurley
d rely on UART_CAP_AFE to enable AFE. Please remove comment from "In the case where ..." Also, I think the PORT_A7 port type should have UART_CAP_AFE commented out, especially since/if the trigger level is 1 byte. Regards, Peter Hurley > up->mcr &= ~UART_MCR_AFE; > if (termios->c_cflag & CRTSCTS) > up->mcr |= UART_MCR_AFE; >

Re: [PATCH v7 0/5] ACPI: parse the SPCR table

2016-04-06 Thread Peter Hurley
the assertion that SPCR + 16550 + MMIO automatically means 32-bit data width seems unlikely. In fact, I suspect the opposite is true; that before these arm64 designs, SPCR + 16550 + MMIO automatically meant 8-bit data width, which is why it's unspecified in the SPCR table. Regards, Peter Hurley

Re: [PATCH v7 0/5] ACPI: parse the SPCR table

2016-04-06 Thread Peter Hurley
the assertion that SPCR + 16550 + MMIO automatically means 32-bit data width seems unlikely. In fact, I suspect the opposite is true; that before these arm64 designs, SPCR + 16550 + MMIO automatically meant 8-bit data width, which is why it's unspecified in the SPCR table. Regards, Peter Hurley

Re: [bisect] Merge tag 'mmc-v4.6' of git://git.linaro.org/people/ulf.hansson/mmc (was [GIT PULL] MMC for v.4.6)

2016-04-05 Thread Peter Hurley
n is still /dev/mmcblk0p2. Note though that this particular bootscript can load add'l bootscripts from the boot partition; in this particular case, the eMMC root partition is set as a fixed UUID in the bootscript from the boot partition. Regards, Peter Hurley

Re: [bisect] Merge tag 'mmc-v4.6' of git://git.linaro.org/people/ulf.hansson/mmc (was [GIT PULL] MMC for v.4.6)

2016-04-05 Thread Peter Hurley
n is still /dev/mmcblk0p2. Note though that this particular bootscript can load add'l bootscripts from the boot partition; in this particular case, the eMMC root partition is set as a fixed UUID in the bootscript from the boot partition. Regards, Peter Hurley

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-04 Thread Peter Hurley
d pause dma, complete set_termios(), then resume dma which would keep everything nice and linear. Or even just drop DMA for the am335x and only use the normal 8250_dma support for newer OMAP designs. Regards, Peter Hurley > Commit message and forward port by John Ogness. > > Tested-by: John O

Re: [PATCH] tty: serial: 8250_omap: do not defer termios changes

2016-04-04 Thread Peter Hurley
os(), then resume dma which would keep everything nice and linear. Or even just drop DMA for the am335x and only use the normal 8250_dma support for newer OMAP designs. Regards, Peter Hurley > Commit message and forward port by John Ogness. > > Tested-by: John Ogness > Signed-off-by: Se

Re: [PATCH v3] Fix OpenSSH pty regression on close

2016-04-04 Thread Peter Hurley
pty, n_tty: Simplify input processing on final close > > 3) 1a48632ffed61352a7810ce089dc5a8bcd505a60 > pty: Fix input race when closing Reviewed-by: Peter Hurley <pe...@hurleysoftware.com>

Re: [PATCH v3] Fix OpenSSH pty regression on close

2016-04-04 Thread Peter Hurley
pty, n_tty: Simplify input processing on final close > > 3) 1a48632ffed61352a7810ce089dc5a8bcd505a60 > pty: Fix input race when closing Reviewed-by: Peter Hurley

Re: [PATCH v7 3/5] ACPI: parse SPCR and enable matching console

2016-04-04 Thread Peter Hurley
CPI/DT decision is made. > > Parse the ACPI SPCR table, setup earlycon if required, > enable specified console. > > Thanks to Peter Hurley for explaining how this should work. > > [1] > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html > [2]

Re: [PATCH v7 3/5] ACPI: parse SPCR and enable matching console

2016-04-04 Thread Peter Hurley
CPI/DT decision is made. > > Parse the ACPI SPCR table, setup earlycon if required, > enable specified console. > > Thanks to Peter Hurley for explaining how this should work. > > [1] > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0044a/index.html > [2]

Re: [PATCH v7 5/5] serial: pl011: add console matching function

2016-04-04 Thread Peter Hurley
able handler. Reviewed-by: Peter Hurley <pe...@hurleysoftware.com>

Re: [PATCH v7 5/5] serial: pl011: add console matching function

2016-04-04 Thread Peter Hurley
able handler. Reviewed-by: Peter Hurley

Re: [PATCH v7 1/5] of/serial: move earlycon early_param handling to serial

2016-04-04 Thread Peter Hurley
console until ACPI/DT decision is made. > > Rename the exported function to avoid clashing with the function from > arch/microblaze/kernel/prom.c Reviewed-by: Peter Hurley <pe...@hurleysoftware.com>

Re: [PATCH v7 1/5] of/serial: move earlycon early_param handling to serial

2016-04-04 Thread Peter Hurley
sion is made. > > Rename the exported function to avoid clashing with the function from > arch/microblaze/kernel/prom.c Reviewed-by: Peter Hurley

Re: [bisect] Merge tag 'mmc-v4.6' of git://git.linaro.org/people/ulf.hansson/mmc (was [GIT PULL] MMC for v.4.6)

2016-04-04 Thread Peter Hurley
On 04/04/2016 12:49 PM, Linus Torvalds wrote: > On Mon, Apr 4, 2016 at 12:29 PM, Peter Hurley <pe...@hurleysoftware.com> > wrote: >> >> Yeah, a straight revert of 520bd7a8b415 resumes normal service: > > Ok, so we have that as an option. > >> Should

Re: [bisect] Merge tag 'mmc-v4.6' of git://git.linaro.org/people/ulf.hansson/mmc (was [GIT PULL] MMC for v.4.6)

2016-04-04 Thread Peter Hurley
On 04/04/2016 12:49 PM, Linus Torvalds wrote: > On Mon, Apr 4, 2016 at 12:29 PM, Peter Hurley > wrote: >> >> Yeah, a straight revert of 520bd7a8b415 resumes normal service: > > Ok, so we have that as an option. > >> Should I send a proper revert? >

Re: tty: memory leak in tty_open

2016-04-04 Thread Peter Hurley
Hi Dmitry, On 04/04/2016 01:56 AM, Dmitry Vyukov wrote: > Hello, > > The following program causes a memory leak: Thanks for the report. This is the same problem fixed in 4.5 There was a merge snafu; Greg has the patch in his queue that fixes this for 4.6 Regards, Peter Hurley >

Re: tty: memory leak in tty_open

2016-04-04 Thread Peter Hurley
Hi Dmitry, On 04/04/2016 01:56 AM, Dmitry Vyukov wrote: > Hello, > > The following program causes a memory leak: Thanks for the report. This is the same problem fixed in 4.5 There was a merge snafu; Greg has the patch in his queue that fixes this for 4.6 Regards, Peter Hurley >

Re: [bisect] Merge tag 'mmc-v4.6' of git://git.linaro.org/people/ulf.hansson/mmc (was [GIT PULL] MMC for v.4.6)

2016-04-04 Thread Peter Hurley
On 04/04/2016 11:59 AM, Linus Torvalds wrote: > On Mon, Apr 4, 2016 at 4:29 AM, Ulf Hansson wrote: >> >> The commit that's likely to cause the regression is: >> 520bd7a8b415 ("mmc: core: Optimize boot time by detecting cards >> simultaneously"). > > Peter, mind testing if

Re: [bisect] Merge tag 'mmc-v4.6' of git://git.linaro.org/people/ulf.hansson/mmc (was [GIT PULL] MMC for v.4.6)

2016-04-04 Thread Peter Hurley
On 04/04/2016 11:59 AM, Linus Torvalds wrote: > On Mon, Apr 4, 2016 at 4:29 AM, Ulf Hansson wrote: >> >> The commit that's likely to cause the regression is: >> 520bd7a8b415 ("mmc: core: Optimize boot time by detecting cards >> simultaneously"). > > Peter, mind testing if you can revert that and

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