Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-31 Thread Andy Shevchenko
On Fri, Mar 31, 2017 at 4:54 PM, Olliver Schinagl wrote: > On 30-03-17 11:56, Andy Shevchenko wrote: >> On Wed, 2017-03-29 at 20:44 +0200, Olliver Schinagl wrote: >> Looking to implementation I would rather go with some helper like >> >> int serial_in_IIR(port, [additional mask]) >> { >> return

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-31 Thread Olliver Schinagl
Hey Andy, On 30-03-17 11:56, Andy Shevchenko wrote: On Wed, 2017-03-29 at 20:44 +0200, Olliver Schinagl wrote: It seems that at some point, someone made the assumption that the UART Interrupt ID Register was a bitfield and started to check if certain bits where set. Actually however the regist

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-31 Thread Olliver Schinagl
Hey Ted, On 30-03-17 16:11, Theodore Ts'o wrote: While you're fixing this, there's a bug in samples/vfio-mdev/mtty.c: u8 ier = mdev_state->s[index].uart_reg[UART_IER]; *buf = 0; mutex_lock(&mdev_state->rxtx_lock); /* Interrupt pri

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-30 Thread Olliver Schinagl
Hey Vignesh, On March 30, 2017 9:57:19 AM CEST, Vignesh R wrote: > > >On Thursday 30 March 2017 12:13 PM, Olliver Schinagl wrote: >> >> >> On March 30, 2017 8:15:29 AM CEST, Vignesh R wrote: >>> Hi, >>> >>> On Thursday 30 March 2017 12:14 AM, Olliver Schinagl wrote: diff --git a/include/u

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-30 Thread Theodore Ts'o
While you're fixing this, there's a bug in samples/vfio-mdev/mtty.c: u8 ier = mdev_state->s[index].uart_reg[UART_IER]; *buf = 0; mutex_lock(&mdev_state->rxtx_lock); /* Interrupt priority 1: Parity, overrun, framing or break */

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-30 Thread kbuild test robot
Hi Olliver, [auto build test WARNING on tty/tty-testing] [also build test WARNING on v4.11-rc4 next-20170330] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Olliver-Schinagl/serial-Do-not-treat-

Re: [kbuild-all] [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-30 Thread Fengguang Wu
On Thu, Mar 30, 2017 at 01:32:51PM +0300, Andy Shevchenko wrote: On Thu, 2017-03-30 at 18:22 +0800, kbuild test robot wrote:    drivers/net//irda/smsc-ircc2.c: > > drivers/net//irda/smsc-ircc2.c: Just out of my curiosity, why do we have // in some reports? Log shows the bisect runs

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-30 Thread Andy Shevchenko
On Thu, 2017-03-30 at 18:22 +0800, kbuild test robot wrote: >    drivers/net//irda/smsc-ircc2.c: > > > drivers/net//irda/smsc-ircc2.c: Just out of my curiosity, why do we have // in some reports? -- Andy Shevchenko Intel Finland Oy

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-30 Thread kbuild test robot
Hi Olliver, [auto build test ERROR on tty/tty-testing] [also build test ERROR on v4.11-rc4 next-20170330] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Olliver-Schinagl/serial-Do-not-treat-the-

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-30 Thread kbuild test robot
Hi Olliver, [auto build test ERROR on tty/tty-testing] [also build test ERROR on v4.11-rc4 next-20170329] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Olliver-Schinagl/serial-Do-not-treat-the-

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-30 Thread Andy Shevchenko
On Wed, 2017-03-29 at 20:44 +0200, Olliver Schinagl wrote: > It seems that at some point, someone made the assumption that the UART > Interrupt ID Register was a bitfield and started to check if certain > bits where set. > > Actually however the register contains interrupt ID's where only the > MS

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-30 Thread Vignesh R
On Thursday 30 March 2017 12:13 PM, Olliver Schinagl wrote: > > > On March 30, 2017 8:15:29 AM CEST, Vignesh R wrote: >> Hi, >> >> On Thursday 30 March 2017 12:14 AM, Olliver Schinagl wrote: >>> diff --git a/include/uapi/linux/serial_reg.h >> b/include/uapi/linux/serial_reg.h >>> index 5db7688

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-29 Thread Olliver Schinagl
On March 30, 2017 8:15:29 AM CEST, Vignesh R wrote: >Hi, > >On Thursday 30 March 2017 12:14 AM, Olliver Schinagl wrote: >> diff --git a/include/uapi/linux/serial_reg.h >b/include/uapi/linux/serial_reg.h >> index 5db76880b4ad..489522389a10 100644 >> --- a/include/uapi/linux/serial_reg.h >> +++ b/

Re: [PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-29 Thread Vignesh R
Hi, On Thursday 30 March 2017 12:14 AM, Olliver Schinagl wrote: > diff --git a/include/uapi/linux/serial_reg.h b/include/uapi/linux/serial_reg.h > index 5db76880b4ad..489522389a10 100644 > --- a/include/uapi/linux/serial_reg.h > +++ b/include/uapi/linux/serial_reg.h > @@ -31,18 +31,18 @@ > #defin

[PATCH] serial: Do not treat the IIR register as a bitfield

2017-03-29 Thread Olliver Schinagl
It seems that at some point, someone made the assumption that the UART Interrupt ID Register was a bitfield and started to check if certain bits where set. Actually however the register contains interrupt ID's where only the MSB seems to be used singular and the rest share at least one bit. Thus d