Re: [PATCH v5 05/10] serial: termbits: ADDRB to indicate 9th bit addressing mode

2022-04-26 Thread Ilpo Järvinen
On Tue, 26 Apr 2022, Greg KH wrote:

> On Tue, Apr 26, 2022 at 05:01:31PM +0300, Ilpo Järvinen wrote:
> > 
> > ADDRB value is the same for all archs (it's just this octal vs hex 
> > notation I've followed as per the nearby defines within the same file
> > which makes them look different).
> > 
> > Should I perhaps add to my cleanup list conversion of all those octal ones 
> > to hex?
> 
> Argh, yes, please, let's do that now, I totally missed that.  Will let
> us see how to unify them as well.

Unifying them might turn out impractical, here's a rough idea now many
copies ... | uniq -c finds for the defines (based on more aggressively 
cleaned up lines than the patch will have):
 89 1
 74 2
 14 3
 58 4
 11 5
 54 6
There just tends to be 1 or 2 archs which are different from the others.

...I'll send the actual octal-to-hex patch once the arch builds complete.

-- 
 i.


Re: [PATCH v5 05/10] serial: termbits: ADDRB to indicate 9th bit addressing mode

2022-04-26 Thread Greg KH
On Tue, Apr 26, 2022 at 05:01:31PM +0300, Ilpo Järvinen wrote:
> One additional thing below I missed on the first read.
> 
> On Tue, 26 Apr 2022, Ilpo Järvinen wrote:
> > On Tue, 26 Apr 2022, Greg KH wrote:
> > 
> > > On Tue, Apr 26, 2022 at 03:24:43PM +0300, Ilpo Järvinen wrote:
> > > > Add ADDRB to termbits to indicate 9th bit addressing mode. This change
> > > > is necessary for supporting devices with RS485 multipoint addressing
> > > > [*]. A later patch in the patch series adds support for Synopsys
> > > > Designware UART capable for 9th bit addressing mode. In this mode, 9th
> > > > bit is used to indicate an address (byte) within the communication
> > > > line. The 9th bit addressing mode is selected using ADDRB introduced by
> > > > an earlier patch.
> > > > 
> > > > [*] Technically, RS485 is just an electronic spec and does not itself
> > > > specify the 9th bit addressing mode but 9th bit seems at least
> > > > "semi-standard" way to do addressing with RS485.
> > > > 
> > > > Cc: linux-...@vger.kernel.org
> > > > Cc: Ivan Kokshaysky 
> > > > Cc: Matt Turner 
> > > > Cc: linux-al...@vger.kernel.org
> > > > Cc: Thomas Bogendoerfer 
> > > > Cc: linux-m...@vger.kernel.org
> > > > Cc: "James E.J. Bottomley" 
> > > > Cc: Helge Deller 
> > > > Cc: linux-par...@vger.kernel.org
> > > > Cc: Michael Ellerman 
> > > > Cc: Benjamin Herrenschmidt 
> > > > Cc: Paul Mackerras 
> > > > Cc: linuxppc-dev@lists.ozlabs.org
> > > > Cc: "David S. Miller" 
> > > > Cc: sparcli...@vger.kernel.org
> > > > Cc: Arnd Bergmann 
> > > > Cc: linux-a...@vger.kernel.org
> > > > Cc: linux-...@vger.kernel.org
> > > > Signed-off-by: Ilpo Järvinen 
> > > > ---
> 
> > > >  #define CMSPAR0100  /* mark or space (stick) 
> > > > parity */
> > > >  #define CRTSCTS   0200  /* flow control */
> > > >  
> > > > diff --git a/arch/powerpc/include/uapi/asm/termbits.h 
> > > > b/arch/powerpc/include/uapi/asm/termbits.h
> > > > index ed18bc61f63d..c6a033732f39 100644
> > > > --- a/arch/powerpc/include/uapi/asm/termbits.h
> > > > +++ b/arch/powerpc/include/uapi/asm/termbits.h
> > > > @@ -171,6 +171,7 @@ struct ktermios {
> > > >  #define HUPCL  0004
> > > >  
> > > >  #define CLOCAL 0010
> > > > +#define ADDRB  0040/* address bit */
> > > >  #define CMSPAR   0100  /* mark or space (stick) parity 
> > > > */
> > > >  #define CRTSCTS  0200  /* flow control */
> > > >  
> > > > diff --git a/arch/sparc/include/uapi/asm/termbits.h 
> > > > b/arch/sparc/include/uapi/asm/termbits.h
> > > > index ce5ad5d0f105..5eb1d547b5c4 100644
> > > > --- a/arch/sparc/include/uapi/asm/termbits.h
> > > > +++ b/arch/sparc/include/uapi/asm/termbits.h
> > > > @@ -201,6 +201,7 @@ struct ktermios {
> > > >  #define B350  0x1012
> > > >  #define B400  0x1013  */
> > > >  #define CIBAUD   0x100f  /* input baud rate (not used) */
> > > > +#define ADDRB0x2000  /* address bit */
> > > >  #define CMSPAR   0x4000  /* mark or space (stick) parity */
> > > >  #define CRTSCTS  0x8000  /* flow control */
> > > 
> > > Why all the different values?  Can't we pick one and use it for all
> > > arches?  Having these be different in different arches and userspace
> > > should not be a thing for new fields, right?
> 
> ADDRB value is the same for all archs (it's just this octal vs hex 
> notation I've followed as per the nearby defines within the same file
> which makes them look different).
> 
> Should I perhaps add to my cleanup list conversion of all those octal ones 
> to hex?

Argh, yes, please, let's do that now, I totally missed that.  Will let
us see how to unify them as well.

thanks,

greg k-h


Re: [PATCH v5 05/10] serial: termbits: ADDRB to indicate 9th bit addressing mode

2022-04-26 Thread Ilpo Järvinen
One additional thing below I missed on the first read.

On Tue, 26 Apr 2022, Ilpo Järvinen wrote:
> On Tue, 26 Apr 2022, Greg KH wrote:
> 
> > On Tue, Apr 26, 2022 at 03:24:43PM +0300, Ilpo Järvinen wrote:
> > > Add ADDRB to termbits to indicate 9th bit addressing mode. This change
> > > is necessary for supporting devices with RS485 multipoint addressing
> > > [*]. A later patch in the patch series adds support for Synopsys
> > > Designware UART capable for 9th bit addressing mode. In this mode, 9th
> > > bit is used to indicate an address (byte) within the communication
> > > line. The 9th bit addressing mode is selected using ADDRB introduced by
> > > an earlier patch.
> > > 
> > > [*] Technically, RS485 is just an electronic spec and does not itself
> > > specify the 9th bit addressing mode but 9th bit seems at least
> > > "semi-standard" way to do addressing with RS485.
> > > 
> > > Cc: linux-...@vger.kernel.org
> > > Cc: Ivan Kokshaysky 
> > > Cc: Matt Turner 
> > > Cc: linux-al...@vger.kernel.org
> > > Cc: Thomas Bogendoerfer 
> > > Cc: linux-m...@vger.kernel.org
> > > Cc: "James E.J. Bottomley" 
> > > Cc: Helge Deller 
> > > Cc: linux-par...@vger.kernel.org
> > > Cc: Michael Ellerman 
> > > Cc: Benjamin Herrenschmidt 
> > > Cc: Paul Mackerras 
> > > Cc: linuxppc-dev@lists.ozlabs.org
> > > Cc: "David S. Miller" 
> > > Cc: sparcli...@vger.kernel.org
> > > Cc: Arnd Bergmann 
> > > Cc: linux-a...@vger.kernel.org
> > > Cc: linux-...@vger.kernel.org
> > > Signed-off-by: Ilpo Järvinen 
> > > ---

> > >  #define CMSPAR0100  /* mark or space (stick) parity 
> > > */
> > >  #define CRTSCTS   0200  /* flow control */
> > >  
> > > diff --git a/arch/powerpc/include/uapi/asm/termbits.h 
> > > b/arch/powerpc/include/uapi/asm/termbits.h
> > > index ed18bc61f63d..c6a033732f39 100644
> > > --- a/arch/powerpc/include/uapi/asm/termbits.h
> > > +++ b/arch/powerpc/include/uapi/asm/termbits.h
> > > @@ -171,6 +171,7 @@ struct ktermios {
> > >  #define HUPCL0004
> > >  
> > >  #define CLOCAL   0010
> > > +#define ADDRB0040/* address bit */
> > >  #define CMSPAR 0100  /* mark or space (stick) parity 
> > > */
> > >  #define CRTSCTS0200  /* flow control */
> > >  
> > > diff --git a/arch/sparc/include/uapi/asm/termbits.h 
> > > b/arch/sparc/include/uapi/asm/termbits.h
> > > index ce5ad5d0f105..5eb1d547b5c4 100644
> > > --- a/arch/sparc/include/uapi/asm/termbits.h
> > > +++ b/arch/sparc/include/uapi/asm/termbits.h
> > > @@ -201,6 +201,7 @@ struct ktermios {
> > >  #define B350  0x1012
> > >  #define B400  0x1013  */
> > >  #define CIBAUD 0x100f  /* input baud rate (not used) */
> > > +#define ADDRB  0x2000  /* address bit */
> > >  #define CMSPAR 0x4000  /* mark or space (stick) parity */
> > >  #define CRTSCTS0x8000  /* flow control */
> > 
> > Why all the different values?  Can't we pick one and use it for all
> > arches?  Having these be different in different arches and userspace
> > should not be a thing for new fields, right?

ADDRB value is the same for all archs (it's just this octal vs hex 
notation I've followed as per the nearby defines within the same file
which makes them look different).

Should I perhaps add to my cleanup list conversion of all those octal ones 
to hex?

> > > diff --git a/drivers/char/pcmcia/synclink_cs.c 
> > > b/drivers/char/pcmcia/synclink_cs.c
> > > index 78baba55a8b5..d179b9b57a25 100644
> > > --- a/drivers/char/pcmcia/synclink_cs.c
> > > +++ b/drivers/char/pcmcia/synclink_cs.c
> > > @@ -2287,6 +2287,8 @@ static void mgslpc_set_termios(struct tty_struct 
> > > *tty, struct ktermios *old_term
> > >   == RELEVANT_IFLAG(old_termios->c_iflag)))
> > > return;
> > >  
> > > + tty->termios.c_cflag &= ~ADDRB;
> > 
> > Having to do this for all drivers feels wrong.  It isn't needed for any
> > other flag, right?
> 
> My understanding is that it would be needed for other flags too, it's just 
> that many drivers probably haven't cared enough. Some drivers certainly 
> clear a few flags they don't support while others don't clear any but
> it's also challenging to determine it which flags which driver supports. 
> How bad the impact is per flag varies.
> 
> > That makes me really not like this change as it
> > feels very ackward and
> > yet-another-thing-a-serial-driver-has-to-remember.
> 
> It would be nice to have some mask for supported bits per driver. But it
> will be challenging to add at this point and I'm far from sure I could get 
> them right per driver even if carefully trying to.
> 
> > And as you are wanting to pass this bit to userspace, where is that
> > documented?
> 
> Ah, I probably should add it to driver-api/serial/driver.rst too but ADDRB
> is certainly mentioned alongside with other addressing mode documentation
> I wrote for the later changes in this series.

-- 
 i.

Re: [PATCH v5 05/10] serial: termbits: ADDRB to indicate 9th bit addressing mode

2022-04-26 Thread Ilpo Järvinen
On Tue, 26 Apr 2022, Greg KH wrote:

> On Tue, Apr 26, 2022 at 03:24:43PM +0300, Ilpo Järvinen wrote:
> > Add ADDRB to termbits to indicate 9th bit addressing mode. This change
> > is necessary for supporting devices with RS485 multipoint addressing
> > [*]. A later patch in the patch series adds support for Synopsys
> > Designware UART capable for 9th bit addressing mode. In this mode, 9th
> > bit is used to indicate an address (byte) within the communication
> > line. The 9th bit addressing mode is selected using ADDRB introduced by
> > an earlier patch.
> > 
> > [*] Technically, RS485 is just an electronic spec and does not itself
> > specify the 9th bit addressing mode but 9th bit seems at least
> > "semi-standard" way to do addressing with RS485.
> > 
> > Cc: linux-...@vger.kernel.org
> > Cc: Ivan Kokshaysky 
> > Cc: Matt Turner 
> > Cc: linux-al...@vger.kernel.org
> > Cc: Thomas Bogendoerfer 
> > Cc: linux-m...@vger.kernel.org
> > Cc: "James E.J. Bottomley" 
> > Cc: Helge Deller 
> > Cc: linux-par...@vger.kernel.org
> > Cc: Michael Ellerman 
> > Cc: Benjamin Herrenschmidt 
> > Cc: Paul Mackerras 
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Cc: "David S. Miller" 
> > Cc: sparcli...@vger.kernel.org
> > Cc: Arnd Bergmann 
> > Cc: linux-a...@vger.kernel.org
> > Cc: linux-...@vger.kernel.org
> > Signed-off-by: Ilpo Järvinen 
> > ---
> >  arch/alpha/include/uapi/asm/termbits.h   | 1 +
> >  arch/mips/include/uapi/asm/termbits.h| 1 +
> >  arch/parisc/include/uapi/asm/termbits.h  | 1 +
> >  arch/powerpc/include/uapi/asm/termbits.h | 1 +
> >  arch/sparc/include/uapi/asm/termbits.h   | 1 +
> >  drivers/char/pcmcia/synclink_cs.c| 2 ++
> >  drivers/ipack/devices/ipoctal.c  | 2 ++
> >  drivers/mmc/core/sdio_uart.c | 2 ++
> >  drivers/net/usb/hso.c| 3 ++-
> >  drivers/s390/char/tty3270.c  | 3 +++
> >  drivers/staging/greybus/uart.c   | 2 ++
> >  drivers/tty/amiserial.c  | 6 +-
> >  drivers/tty/moxa.c   | 1 +
> >  drivers/tty/mxser.c  | 1 +
> >  drivers/tty/serial/serial_core.c | 2 ++
> >  drivers/tty/synclink_gt.c| 2 ++
> >  drivers/tty/tty_ioctl.c  | 2 ++
> >  drivers/usb/class/cdc-acm.c  | 2 ++
> >  drivers/usb/serial/usb-serial.c  | 6 --
> >  include/uapi/asm-generic/termbits.h  | 1 +
> >  net/bluetooth/rfcomm/tty.c   | 2 ++
> >  21 files changed, 40 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/alpha/include/uapi/asm/termbits.h 
> > b/arch/alpha/include/uapi/asm/termbits.h
> > index 4575ba34a0ea..0c123e715486 100644
> > --- a/arch/alpha/include/uapi/asm/termbits.h
> > +++ b/arch/alpha/include/uapi/asm/termbits.h
> > @@ -180,6 +180,7 @@ struct ktermios {
> >  #define HUPCL  0004
> >  
> >  #define CLOCAL 0010
> > +#define ADDRB  0040/* address bit */
> >  #define CMSPAR   0100  /* mark or space (stick) parity 
> > */
> >  #define CRTSCTS  0200  /* flow control */
> >  
> > diff --git a/arch/mips/include/uapi/asm/termbits.h 
> > b/arch/mips/include/uapi/asm/termbits.h
> > index dfeffba729b7..4732d31b0e4e 100644
> > --- a/arch/mips/include/uapi/asm/termbits.h
> > +++ b/arch/mips/include/uapi/asm/termbits.h
> > @@ -182,6 +182,7 @@ struct ktermios {
> >  #define B350 0010016
> >  #define B400 0010017
> >  #define CIBAUD   00200360  /* input baud rate */
> > +#define ADDRB0040  /* address bit */
> >  #define CMSPAR   0100  /* mark or space (stick) parity */
> >  #define CRTSCTS  0200  /* flow control */
> >  
> > diff --git a/arch/parisc/include/uapi/asm/termbits.h 
> > b/arch/parisc/include/uapi/asm/termbits.h
> > index 40e920f8d683..d6bbd10d92ba 100644
> > --- a/arch/parisc/include/uapi/asm/termbits.h
> > +++ b/arch/parisc/include/uapi/asm/termbits.h
> > @@ -159,6 +159,7 @@ struct ktermios {
> >  #define  B350 0010016
> >  #define  B400 0010017
> >  #define CIBAUD00200360 /* input baud rate */
> > +#define ADDRB0040  /* address bit */
> 
> tabs where the rest were not?
> 
> >  #define CMSPAR0100  /* mark or space (stick) parity */
> >  #define CRTSCTS   0200  /* flow control */
> >  
> > diff --git a/arch/powerpc/include/uapi/asm/termbits.h 
> > b/arch/powerpc/include/uapi/asm/termbits.h
> > index ed18bc61f63d..c6a033732f39 100644
> > --- a/arch/powerpc/include/uapi/asm/termbits.h
> > +++ b/arch/powerpc/include/uapi/asm/termbits.h
> > @@ -171,6 +171,7 @@ struct ktermios {
> >  #define HUPCL  0004
> >  
> >  #define CLOCAL 0010
> > +#define ADDRB  0040/* address bit */
> >  #define CMSPAR   0100  /* mark or space (stick) parity 
> > */
> >  #define CRTSCTS  0200  /* flow control */
> >  
> > 

Re: [PATCH v5 05/10] serial: termbits: ADDRB to indicate 9th bit addressing mode

2022-04-26 Thread Greg KH
On Tue, Apr 26, 2022 at 03:24:43PM +0300, Ilpo Järvinen wrote:
> Add ADDRB to termbits to indicate 9th bit addressing mode. This change
> is necessary for supporting devices with RS485 multipoint addressing
> [*]. A later patch in the patch series adds support for Synopsys
> Designware UART capable for 9th bit addressing mode. In this mode, 9th
> bit is used to indicate an address (byte) within the communication
> line. The 9th bit addressing mode is selected using ADDRB introduced by
> an earlier patch.
> 
> [*] Technically, RS485 is just an electronic spec and does not itself
> specify the 9th bit addressing mode but 9th bit seems at least
> "semi-standard" way to do addressing with RS485.
> 
> Cc: linux-...@vger.kernel.org
> Cc: Ivan Kokshaysky 
> Cc: Matt Turner 
> Cc: linux-al...@vger.kernel.org
> Cc: Thomas Bogendoerfer 
> Cc: linux-m...@vger.kernel.org
> Cc: "James E.J. Bottomley" 
> Cc: Helge Deller 
> Cc: linux-par...@vger.kernel.org
> Cc: Michael Ellerman 
> Cc: Benjamin Herrenschmidt 
> Cc: Paul Mackerras 
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: "David S. Miller" 
> Cc: sparcli...@vger.kernel.org
> Cc: Arnd Bergmann 
> Cc: linux-a...@vger.kernel.org
> Cc: linux-...@vger.kernel.org
> Signed-off-by: Ilpo Järvinen 
> ---
>  arch/alpha/include/uapi/asm/termbits.h   | 1 +
>  arch/mips/include/uapi/asm/termbits.h| 1 +
>  arch/parisc/include/uapi/asm/termbits.h  | 1 +
>  arch/powerpc/include/uapi/asm/termbits.h | 1 +
>  arch/sparc/include/uapi/asm/termbits.h   | 1 +
>  drivers/char/pcmcia/synclink_cs.c| 2 ++
>  drivers/ipack/devices/ipoctal.c  | 2 ++
>  drivers/mmc/core/sdio_uart.c | 2 ++
>  drivers/net/usb/hso.c| 3 ++-
>  drivers/s390/char/tty3270.c  | 3 +++
>  drivers/staging/greybus/uart.c   | 2 ++
>  drivers/tty/amiserial.c  | 6 +-
>  drivers/tty/moxa.c   | 1 +
>  drivers/tty/mxser.c  | 1 +
>  drivers/tty/serial/serial_core.c | 2 ++
>  drivers/tty/synclink_gt.c| 2 ++
>  drivers/tty/tty_ioctl.c  | 2 ++
>  drivers/usb/class/cdc-acm.c  | 2 ++
>  drivers/usb/serial/usb-serial.c  | 6 --
>  include/uapi/asm-generic/termbits.h  | 1 +
>  net/bluetooth/rfcomm/tty.c   | 2 ++
>  21 files changed, 40 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/alpha/include/uapi/asm/termbits.h 
> b/arch/alpha/include/uapi/asm/termbits.h
> index 4575ba34a0ea..0c123e715486 100644
> --- a/arch/alpha/include/uapi/asm/termbits.h
> +++ b/arch/alpha/include/uapi/asm/termbits.h
> @@ -180,6 +180,7 @@ struct ktermios {
>  #define HUPCL0004
>  
>  #define CLOCAL   0010
> +#define ADDRB0040/* address bit */
>  #define CMSPAR 0100  /* mark or space (stick) parity 
> */
>  #define CRTSCTS0200  /* flow control */
>  
> diff --git a/arch/mips/include/uapi/asm/termbits.h 
> b/arch/mips/include/uapi/asm/termbits.h
> index dfeffba729b7..4732d31b0e4e 100644
> --- a/arch/mips/include/uapi/asm/termbits.h
> +++ b/arch/mips/include/uapi/asm/termbits.h
> @@ -182,6 +182,7 @@ struct ktermios {
>  #define   B350 0010016
>  #define   B400 0010017
>  #define CIBAUD 00200360  /* input baud rate */
> +#define ADDRB  0040  /* address bit */
>  #define CMSPAR 0100  /* mark or space (stick) parity */
>  #define CRTSCTS0200  /* flow control */
>  
> diff --git a/arch/parisc/include/uapi/asm/termbits.h 
> b/arch/parisc/include/uapi/asm/termbits.h
> index 40e920f8d683..d6bbd10d92ba 100644
> --- a/arch/parisc/include/uapi/asm/termbits.h
> +++ b/arch/parisc/include/uapi/asm/termbits.h
> @@ -159,6 +159,7 @@ struct ktermios {
>  #define  B350 0010016
>  #define  B400 0010017
>  #define CIBAUD00200360   /* input baud rate */
> +#define ADDRB  0040  /* address bit */

tabs where the rest were not?

>  #define CMSPAR0100  /* mark or space (stick) parity */
>  #define CRTSCTS   0200  /* flow control */
>  
> diff --git a/arch/powerpc/include/uapi/asm/termbits.h 
> b/arch/powerpc/include/uapi/asm/termbits.h
> index ed18bc61f63d..c6a033732f39 100644
> --- a/arch/powerpc/include/uapi/asm/termbits.h
> +++ b/arch/powerpc/include/uapi/asm/termbits.h
> @@ -171,6 +171,7 @@ struct ktermios {
>  #define HUPCL0004
>  
>  #define CLOCAL   0010
> +#define ADDRB0040/* address bit */
>  #define CMSPAR 0100  /* mark or space (stick) parity 
> */
>  #define CRTSCTS0200  /* flow control */
>  
> diff --git a/arch/sparc/include/uapi/asm/termbits.h 
> b/arch/sparc/include/uapi/asm/termbits.h
> index ce5ad5d0f105..5eb1d547b5c4 100644
> --- a/arch/sparc/include/uapi/asm/termbits.h
> +++ 

[PATCH v5 05/10] serial: termbits: ADDRB to indicate 9th bit addressing mode

2022-04-26 Thread Ilpo Järvinen
Add ADDRB to termbits to indicate 9th bit addressing mode. This change
is necessary for supporting devices with RS485 multipoint addressing
[*]. A later patch in the patch series adds support for Synopsys
Designware UART capable for 9th bit addressing mode. In this mode, 9th
bit is used to indicate an address (byte) within the communication
line. The 9th bit addressing mode is selected using ADDRB introduced by
an earlier patch.

[*] Technically, RS485 is just an electronic spec and does not itself
specify the 9th bit addressing mode but 9th bit seems at least
"semi-standard" way to do addressing with RS485.

Cc: linux-...@vger.kernel.org
Cc: Ivan Kokshaysky 
Cc: Matt Turner 
Cc: linux-al...@vger.kernel.org
Cc: Thomas Bogendoerfer 
Cc: linux-m...@vger.kernel.org
Cc: "James E.J. Bottomley" 
Cc: Helge Deller 
Cc: linux-par...@vger.kernel.org
Cc: Michael Ellerman 
Cc: Benjamin Herrenschmidt 
Cc: Paul Mackerras 
Cc: linuxppc-dev@lists.ozlabs.org
Cc: "David S. Miller" 
Cc: sparcli...@vger.kernel.org
Cc: Arnd Bergmann 
Cc: linux-a...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Signed-off-by: Ilpo Järvinen 
---
 arch/alpha/include/uapi/asm/termbits.h   | 1 +
 arch/mips/include/uapi/asm/termbits.h| 1 +
 arch/parisc/include/uapi/asm/termbits.h  | 1 +
 arch/powerpc/include/uapi/asm/termbits.h | 1 +
 arch/sparc/include/uapi/asm/termbits.h   | 1 +
 drivers/char/pcmcia/synclink_cs.c| 2 ++
 drivers/ipack/devices/ipoctal.c  | 2 ++
 drivers/mmc/core/sdio_uart.c | 2 ++
 drivers/net/usb/hso.c| 3 ++-
 drivers/s390/char/tty3270.c  | 3 +++
 drivers/staging/greybus/uart.c   | 2 ++
 drivers/tty/amiserial.c  | 6 +-
 drivers/tty/moxa.c   | 1 +
 drivers/tty/mxser.c  | 1 +
 drivers/tty/serial/serial_core.c | 2 ++
 drivers/tty/synclink_gt.c| 2 ++
 drivers/tty/tty_ioctl.c  | 2 ++
 drivers/usb/class/cdc-acm.c  | 2 ++
 drivers/usb/serial/usb-serial.c  | 6 --
 include/uapi/asm-generic/termbits.h  | 1 +
 net/bluetooth/rfcomm/tty.c   | 2 ++
 21 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/arch/alpha/include/uapi/asm/termbits.h 
b/arch/alpha/include/uapi/asm/termbits.h
index 4575ba34a0ea..0c123e715486 100644
--- a/arch/alpha/include/uapi/asm/termbits.h
+++ b/arch/alpha/include/uapi/asm/termbits.h
@@ -180,6 +180,7 @@ struct ktermios {
 #define HUPCL  0004
 
 #define CLOCAL 0010
+#define ADDRB  0040/* address bit */
 #define CMSPAR   0100  /* mark or space (stick) parity */
 #define CRTSCTS  0200  /* flow control */
 
diff --git a/arch/mips/include/uapi/asm/termbits.h 
b/arch/mips/include/uapi/asm/termbits.h
index dfeffba729b7..4732d31b0e4e 100644
--- a/arch/mips/include/uapi/asm/termbits.h
+++ b/arch/mips/include/uapi/asm/termbits.h
@@ -182,6 +182,7 @@ struct ktermios {
 #define B350 0010016
 #define B400 0010017
 #define CIBAUD   00200360  /* input baud rate */
+#define ADDRB0040  /* address bit */
 #define CMSPAR   0100  /* mark or space (stick) parity */
 #define CRTSCTS  0200  /* flow control */
 
diff --git a/arch/parisc/include/uapi/asm/termbits.h 
b/arch/parisc/include/uapi/asm/termbits.h
index 40e920f8d683..d6bbd10d92ba 100644
--- a/arch/parisc/include/uapi/asm/termbits.h
+++ b/arch/parisc/include/uapi/asm/termbits.h
@@ -159,6 +159,7 @@ struct ktermios {
 #define  B350 0010016
 #define  B400 0010017
 #define CIBAUD00200360 /* input baud rate */
+#define ADDRB0040  /* address bit */
 #define CMSPAR0100  /* mark or space (stick) parity */
 #define CRTSCTS   0200  /* flow control */
 
diff --git a/arch/powerpc/include/uapi/asm/termbits.h 
b/arch/powerpc/include/uapi/asm/termbits.h
index ed18bc61f63d..c6a033732f39 100644
--- a/arch/powerpc/include/uapi/asm/termbits.h
+++ b/arch/powerpc/include/uapi/asm/termbits.h
@@ -171,6 +171,7 @@ struct ktermios {
 #define HUPCL  0004
 
 #define CLOCAL 0010
+#define ADDRB  0040/* address bit */
 #define CMSPAR   0100  /* mark or space (stick) parity */
 #define CRTSCTS  0200  /* flow control */
 
diff --git a/arch/sparc/include/uapi/asm/termbits.h 
b/arch/sparc/include/uapi/asm/termbits.h
index ce5ad5d0f105..5eb1d547b5c4 100644
--- a/arch/sparc/include/uapi/asm/termbits.h
+++ b/arch/sparc/include/uapi/asm/termbits.h
@@ -201,6 +201,7 @@ struct ktermios {
 #define B350  0x1012
 #define B400  0x1013  */
 #define CIBAUD   0x100f  /* input baud rate (not used) */
+#define ADDRB0x2000  /* address bit */
 #define CMSPAR   0x4000  /* mark or space (stick) parity */
 #define CRTSCTS  0x8000  /* flow control */
 
diff --git a/drivers/char/pcmcia/synclink_cs.c