1/3: Remove USR 56K voice modem specific PCI table entry.
Subsystems (3)
PATCH 1/1 1/3: Remove USR 56K voice modem specific PCI table entry.
Jordan Breeding confirms that our serial PCI detection algorithms now correctly determine this device, and doesn't require a specific entry.
drivers/serial/8250_pci.c +0 -7
@@ -1802,13 +1802,6 @@ pbn_b1_1_115200 },/* -* 3Com US Robotics 56k Voice Internal PCI model 5610 -*/ - {PCI_VENDOR_ID_USR ,0x1008 , -PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , - pbn_b0_1_115200 }, - -/* * Titan Electronic cards * The 400L and 800L have a custom setup quirk. */
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [PATCH] 2/3: Console initcalls return int, zero for success.
drivers/serial/68328serial.c +2 -1
@@ -1691,9 +1691,10 @@ }; -static void __init m68328_console_init (void ) +static int __init m68328_console_init (void ) {register_console (&m68328_driver); +return 0 ; }console_initcall (m68328_console_init);
drivers/serial/amba.c +2 -1
@@ -705,9 +705,10 @@ .index = -1, }; -static void __init ambauart_console_init (void ) +static int __init ambauart_console_init (void ) {register_console (&amba_console); +return 0 ; }console_initcall (ambauart_console_init);
drivers/serial/anakin.c +2 -2
@@ -502,10 +502,10 @@ .index = -1, }; -static void __init -anakin_console_init (void ) +static int __init anakin_console_init (void ) {register_console (&anakin_console); +return 0 ; }console_initcall (anakin_console_init);
drivers/serial/clps711x.c +2 -1
@@ -567,9 +567,10 @@ .index = -1, }; -static void __init clps711xuart_console_init (void ) +static int __init clps711xuart_console_init (void ) {register_console (&clps711x_console); +return 0 ; }console_initcall (clps711xuart_console_init);
drivers/serial/mcfserial.c +2 -1
@@ -1853,9 +1853,10 @@ .index = -1, }; -static void __init mcfrs_console_init (void ) +static int __init mcfrs_console_init (void ) {register_console (&mcfrs_console); +return 0 ; }console_initcall (mcfrs_console_init);
drivers/serial/sa1100.c +2 -1
@@ -836,10 +836,11 @@ .index = -1, }; -static void __init sa1100_rs_console_init (void ) +static int __init sa1100_rs_console_init (void ) {sa1100_init_ports ();register_console (&sa1100_console); +return 0 ; }console_initcall (sa1100_rs_console_init);
drivers/serial/uart00.c +2 -1
@@ -645,9 +645,10 @@ .index = 0, }; -static void __init uart00_console_init (void ) +static int __init uart00_console_init (void ) {register_console (&uart00_console); +return 0 ; }console_initcall (uart00_console_init);
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Re: [PATCH] 3/3: Move make modem control signals accessible to line discplines
We also parse modem control signals in the tty layer, and fail with EINVAL if the driver does not provide the methods. All tty drivers which require modem control support should be updated to provide the new tiocmset and tiocmget methods.
** Note: there is some janitorial work which needs done to convert
the other serial drivers to use this TIOCM code - it should be a nice project for some of the janitors.
drivers/char/tty_io.c +57 -0
@@ -1691,6 +1691,55 @@return 0 ; } +static int +tty_tiocmget (struct tty_struct *tty,struct file *file,unsigned long arg) +{ +int retval = -EINVAL ; + +if (tty->driver.tiocmget) { + retval = tty->driver.tiocmget (tty, file); + +if (retval >=0 ) + retval =put_user (retval, (int *)arg); + } +return retval; +} + +static int +tty_tiocmset (struct tty_struct *tty,struct file *file,unsigned int cmd, +unsigned long arg) +{ +int retval = -EINVAL ; + +if (tty->driver.tiocmset) { +unsigned int set, clear, val; + + retval =get_user (val, (unsigned int *)arg); +if (retval) +return retval; + + set = clear =0 ; +switch (cmd) { +case TIOCMBIS : + set = val; +break ; +case TIOCMBIC : + clear = val; +break ; +case TIOCMSET : + set = val; + clear = ~val; +break ; + } + + set &=TIOCM_DTR |TIOCM_RTS |TIOCM_OUT1 |TIOCM_OUT2 ; + clear &=TIOCM_DTR |TIOCM_RTS |TIOCM_OUT1 |TIOCM_OUT2 ; + + retval = tty->driver.tiocmset (tty, file, set, clear); + } +return retval; +} +/* * Split this up, as gcc can choke on it otherwise.. */
@@ -1816,6 +1865,14 @@return 0 ;case TCSBRKP :/* support for POSIX tcsendbreak() */ return send_break (tty, arg ? arg*(HZ /10 ) :HZ /4 ); + +case TIOCMGET : +return tty_tiocmget (tty, file, arg); + +case TIOCMSET : +case TIOCMBIC : +case TIOCMBIS : +return tty_tiocmset (tty, file, cmd, arg); }if (tty->driver.ioctl) {int retval = (tty->driver.ioctl)(tty, file, cmd, arg);
drivers/net/irda/irtty-sir.c +14 -17
@@ -180,32 +180,29 @@static int irtty_set_dtr_rts (struct sir_dev *dev,int dtr,int rts) {struct sirtty_cb *priv = dev->priv; -int arg =0 ; +int set =0 ; +int clear =0 ; ASSERT(priv != NULL, return -1;); ASSERT(priv->magic == IRTTY_MAGIC, return -1;); -#ifdef TIOCM_OUT2 /* Not defined for ARM */ - arg =TIOCM_OUT2 ; -#endif if (rts) - arg |=TIOCM_RTS ; + set |=TIOCM_RTS ; +else + clear |=TIOCM_RTS ;if (dtr) - arg |=TIOCM_DTR ; + set |=TIOCM_DTR ; +else + clear |=TIOCM_DTR ;/* -* The ioctl() function, or actually set_modem_info() in serial.c -* expects a pointer to the argument in user space. This is working -* here because we are always called from the kIrDAd thread which -* has set_fs(KERNEL_DS) permanently set. Therefore copy_from_user() -* is happy with our arg-parameter being local here in kernel space. +* We can't use ioctl() because it expects a non-null file structure, +* and we don't have that here. +* This function is not yet defined for all tty driver, so +* let's be careful... Jean II */ - -lock_kernel (); -if (priv->tty->driver.ioctl (priv->tty,NULL ,TIOCMSET , (unsigned long ) &arg)) { -IRDA_DEBUG (2 ,"%s(), error doing ioctl!\n" , __FUNCTION__); - } -unlock_kernel (); + ASSERT(priv->tty->driver.tiocmset != NULL, return -1;); + priv->tty->driver.tiocmset (priv->tty,NULL , set, clear);return 0 ; }
drivers/serial/core.c +29 -41
105 lines not on this page · raw message
include/linux/tty_driver.h +3 -0
@@ -172,6 +172,9 @@ int count, int *eof, void *data);int (*write_proc)(struct file *file,const char *buffer,unsigned long count,void *data); +int (*tiocmget)(struct tty_struct *tty,struct file *file); +int (*tiocmset)(struct tty_struct *tty,struct file *file, +unsigned int set,unsigned int clear);struct list_head tty_drivers; };
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html