Char: rocket, switch long delay to sleep
Subsystems (2)
PATCH 1/7 Char: rocket, switch long delay to sleep
rocket, switch long delay to sleep
Don't busy wait for whole 1s when registering some rocket modems. Sleep instead since we are not in atomic.
---
commit a9b06d9c7a580246dc328e96f31039d932bca47c
tree eb2e25299ebce29c89efa19c3014d41f742454c0
parent 5b07d82896b4d783e76f82dab6c4ba162545e414
author Jiri Slaby <[email protected]> Sat, 20 Oct 2007 11:51:04 +0200 committer Jiri Slaby <[email protected]> Fri, 09 Nov 2007 22:21:49 +0100
drivers/char/rocket.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/char/rocket.c +4 -4
@@ -2191,10 +2191,10 @@ static __init int register_PCI(int i, struct pci_dev *dev) num_chan = ports_per_aiop;for (chan =0 ; chan < num_chan; chan++)sPCIModemReset (ctlp, chan,1 ); -mdelay (500 ); +msleep (500 );for (chan =0 ; chan < num_chan; chan++)sPCIModemReset (ctlp, chan,0 ); -mdelay (500 ); +msleep (500 );rmSpeakerReset (ctlp, rocketModel[i].model); }return (1 );
@@ -2309,10 +2309,10 @@ static int __init init_ISA(int i) total_num_chan = num_chan;for (chan =0 ; chan < num_chan; chan++)sModemReset (ctlp, chan,1 ); -mdelay (500 ); +msleep (500 );for (chan =0 ; chan < num_chan; chan++)sModemReset (ctlp, chan,0 ); -mdelay (500 ); +msleep (500 );strcpy (rocketModel[i].modelString,"RocketModem ISA" ); }else {strcpy (rocketModel[i].modelString,"RocketPort ISA" );
PATCH 2/7 Char: rocket, printk cleanup
rocket, printk cleanup
- add KERN_ level to each print
- change some levels appropriately
- add \n at the ends where missing
- change two complex printks into dev_info, where the original info is printed automatically
---
commit c0e0b8a247ca469f85e51867fb11b5dbc19dace7
tree cd0bea2e5da957ac4131e04b9c2c9dd7fcddf653
parent a9b06d9c7a580246dc328e96f31039d932bca47c
author Jiri Slaby <[email protected]> Sat, 20 Oct 2007 21:58:17 +0200 committer Jiri Slaby <[email protected]> Fri, 09 Nov 2007 22:25:15 +0100
drivers/char/rocket.c | 89 ++++++++++++++++++++++++--------------------- drivers/char/rocket_int.h | 6 ++- 2 files changed, 51 insertions(+), 44 deletions(-)
drivers/char/rocket.c +48 -41
@@ -305,8 +305,8 @@ static inline int rocket_paranoia_check(struct r_port *info,if (!info)return 1 ;if (info->magic !=RPORT_MAGIC ) { -printk (KERN_INFO "Warning: bad magic number for rocketport struct in %s\n" , - routine); +printk (KERN_WARNING "Warning: bad magic number for rocketport " +"struct in %s\n" , routine);return 1 ; }#endif
@@ -328,7 +328,7 @@ static void rp_do_receive(struct r_port *info, ToRecv =sGetRxCnt (cp);#ifdef ROCKET_DEBUG_INTR -printk (KERN_INFO "rp_do_receive(%d)..." , ToRecv); +printk (KERN_INFO "rp_do_receive(%d)...\n" , ToRecv);#endif if (ToRecv ==0 )return ;
@@ -341,7 +341,7 @@ static void rp_do_receive(struct r_port *info,if (ChanStatus & (RXFOVERFL |RXBREAK |RXFRAME |RXPARITY )) {if (!(ChanStatus &STATMODE )) {#ifdef ROCKET_DEBUG_RECEIVE -printk (KERN_INFO "Entering STATMODE..." ); +printk (KERN_INFO "Entering STATMODE...\n" );#endif ChanStatus |=STATMODE ;sEnRxStatusMode (cp);
@@ -355,15 +355,15 @@ static void rp_do_receive(struct r_port *info,*/ if (ChanStatus &STATMODE ) {#ifdef ROCKET_DEBUG_RECEIVE -printk (KERN_INFO "Ignore %x, read %x..." , info->ignore_status_mask, - info->read_status_mask); +printk (KERN_INFO "Ignore %x, read %x...\n" , + info->ignore_status_mask, info->read_status_mask);#endif while (ToRecv) {char flag; CharNStat =sInW (sGetTxRxDataIO (cp));#ifdef ROCKET_DEBUG_RECEIVE -printk (KERN_INFO "%x..." , CharNStat); +printk (KERN_INFO "%x...\n" , CharNStat);#endif if (CharNStat &STMBREAKH ) CharNStat &= ~(STMFRAMEH |STMPARITYH );
@@ -435,12 +435,13 @@ static void rp_do_transmit(struct r_port *info)unsigned long flags;#ifdef ROCKET_DEBUG_INTR -printk (KERN_INFO "rp_do_transmit " ); +printk (KERN_DEBUG "%s\n" , __func__);#endif if (!info)return ;if (!info->tty) { -printk (KERN_INFO "rp: WARNING rp_do_transmit called with info->tty==NULL\n" ); +printk (KERN_WARNING "rp: WARNING %s called with " +"info->tty==NULL\n" , __func__);clear_bit ((info->aiop *8 ) + info->chan, (void *) &xmit_flags[info->board]);return ; }
@@ -464,7 +465,7 @@ static void rp_do_transmit(struct r_port *info) info->xmit_cnt -= c; info->xmit_fifo_room -= c;#ifdef ROCKET_DEBUG_INTR -printk (KERN_INFO "tx %d chars..." , c); +printk (KERN_INFO "tx %d chars...\n" , c);#endif }
@@ -481,7 +482,7 @@ static void rp_do_transmit(struct r_port *info)spin_unlock_irqrestore (&info->slock, flags);#ifdef ROCKET_DEBUG_INTR -printk (KERN_INFO "(%d,%d,%d,%d)..." , info->xmit_cnt, info->xmit_head, +printk (KERN_DEBUG "(%d,%d,%d,%d)...\n" , info->xmit_cnt, info->xmit_head, info->xmit_tail, info->xmit_fifo_room);#endif }
@@ -501,11 +502,13 @@ static void rp_handle_port(struct r_port *info)return ;if ((info->flags &ROCKET_INITIALIZED ) ==0 ) { -printk (KERN_INFO "rp: WARNING: rp_handle_port called with info->flags & NOT_INIT\n" ); +printk (KERN_WARNING "rp: WARNING: rp_handle_port called with " +"info->flags & NOT_INIT\n" );return ; }if (!info->tty) { -printk (KERN_INFO "rp: WARNING: rp_handle_port called with info->tty==NULL\n" ); +printk (KERN_WARNING "rp: WARNING: rp_handle_port called with " +"info->tty==NULL\n" );return ; } cp = &info->channel;
@@ -513,7 +516,7 @@ static void rp_handle_port(struct r_port *info) IntMask =sGetChanIntID (cp) & info->intmask;#ifdef ROCKET_DEBUG_INTR -printk (KERN_INFO "rp_interrupt %02x..." , IntMask); +printk (KERN_INFO "rp_interrupt %02x...\n" , IntMask);#endif ChanStatus =sGetChanStatus (cp);if (IntMask &RXF_TRIG ) {/* Rx FIFO trigger level */
@@ -521,7 +524,7 @@ static void rp_handle_port(struct r_port *info) }if (IntMask &DELTA_CD ) {/* CD change */ #if (defined(ROCKET_DEBUG_OPEN ) || defined(ROCKET_DEBUG_INTR ) || defined(ROCKET_DEBUG_HANGUP )) -printk (KERN_INFO "ttyR%d CD now %s..." , info->line, +printk (KERN_INFO "ttyR%d CD now %s...\n" , info->line, (ChanStatus &CD_ACT ) ?"on" :"off" );#endif if (!(ChanStatus &CD_ACT ) && info->cd_status) {
@@ -638,7 +641,8 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev)/* Get a r_port struct for the port, fill it in and save it globally, indexed by line number */ info =kzalloc (sizeof (struct r_port ),GFP_KERNEL );if (!info) { -printk (KERN_INFO "Couldn't allocate info struct for line #%d\n" , line); +printk (KERN_ERR "Couldn't allocate info struct for line #%d\n" , + line);return ; }
@@ -668,7 +672,8 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev) info->intmask =RXF_TRIG |TXFIFO_MT |SRC_INT |DELTA_CD |DELTA_CTS |DELTA_DSR ;if (sInitChan (ctlp, &info->channel, aiop, chan) ==0 ) { -printk (KERN_INFO "RocketPort sInitChan(%d, %d, %d) failed!\n" , board, aiop, chan); +printk (KERN_ERR "RocketPort sInitChan(%d, %d, %d) failed!\n" , + board, aiop, chan);kfree (info);return ; }
@@ -1007,7 +1012,8 @@ static int rp_open(struct tty_struct *tty, struct file *filp)atomic_inc (&rp_num_ports_open);#ifdef ROCKET_DEBUG_OPEN -printk (KERN_INFO "rocket mod++ = %d..." ,atomic_read (&rp_num_ports_open)); +printk (KERN_INFO "rocket mod++ = %d...\n" , +atomic_read (&rp_num_ports_open));#endif }#ifdef ROCKET_DEBUG_OPEN
@@ -1103,13 +1109,13 @@ static void rp_close(struct tty_struct *tty, struct file *filp)* one, we've got real problems, since it means the * serial port won't be shutdown. */ -printk (KERN_INFO "rp_close: bad serial port count; tty->count is 1, " -"info->count is %d\n" , info->count); +printk (KERN_WARNING "rp_close: bad serial port count; " +"tty->count is 1, info->count is %d\n" , info->count); info->count =1 ; }if (--info->count <0 ) { -printk (KERN_INFO "rp_close: bad serial port count for ttyR%d: %d\n" , - info->line, info->count); +printk (KERN_WARNING "rp_close: bad serial port count for " +"ttyR%d: %d\n" , info->line, info->count); info->count =0 ; }if (info->count) {
@@ -1184,7 +1190,8 @@ static void rp_close(struct tty_struct *tty, struct file *filp)atomic_dec (&rp_num_ports_open);#ifdef ROCKET_DEBUG_OPEN -printk (KERN_INFO "rocket mod-- = %d..." ,atomic_read (&rp_num_ports_open)); +printk (KERN_INFO "rocket mod-- = %d...\n" , +atomic_read (&rp_num_ports_open));printk (KERN_INFO "rp_close ttyR%d complete shutdown\n" , info->line);#endif
@@ -1569,9 +1576,9 @@ static void rp_wait_until_sent(struct tty_struct *tty, int timeout) orig_jiffies = jiffies;#ifdef ROCKET_DEBUG_WAIT_UNTIL_SENT -printk (KERN_INFO "In RP_wait_until_sent(%d) (jiff=%lu)..." , timeout, +printk (KERN_INFO "In RP_wait_until_sent(%d) (jiff=%lu)...\n" , timeout, jiffies); -printk (KERN_INFO "cps=%d..." , info->cps); +printk (KERN_INFO "cps=%d...\n" , info->cps);#endif while (1 ) { txcnt =sGetTxCnt (cp);
@@ -1592,7 +1599,8 @@ static void rp_wait_until_sent(struct tty_struct *tty, int timeout)if (check_time ==0 ) check_time =1 ;#ifdef ROCKET_DEBUG_WAIT_UNTIL_SENT -printk (KERN_INFO "txcnt = %d (jiff=%lu,check=%d)..." , txcnt, jiffies, check_time); +printk (KERN_INFO "txcnt = %d (jiff=%lu,check=%d)...\n" , txcnt, + jiffies, check_time);#endif msleep_interruptible (jiffies_to_msecs (check_time));if (signal_pending (current))
@@ -1616,7 +1624,7 @@ static void rp_hangup(struct tty_struct *tty)return ;#if (defined(ROCKET_DEBUG_OPEN ) || defined(ROCKET_DEBUG_HANGUP )) -printk (KERN_INFO "rp_hangup of ttyR%d..." , info->line); +printk (KERN_INFO "rp_hangup of ttyR%d...\n" , info->line);#endif rp_flush_buffer (tty);if (info->flags &ROCKET_CLOSING )
@@ -1664,7 +1672,7 @@ static void rp_put_char(struct tty_struct *tty, unsigned char ch)mutex_lock (&info->write_mtx);#ifdef ROCKET_DEBUG_WRITE -printk (KERN_INFO "rp_put_char %c..." , ch); +printk (KERN_INFO "rp_put_char %c...\n" , ch);#endif spin_lock_irqsave (&info->slock, flags);
@@ -1709,7 +1717,7 @@ static int rp_write(struct tty_struct *tty,return -ERESTARTSYS ;#ifdef ROCKET_DEBUG_WRITE -printk (KERN_INFO "rp_write %d chars..." , count); +printk (KERN_INFO "rp_write %d chars...\n" , count);#endif cp = &info->channel;
@@ -1798,7 +1806,7 @@ static int rp_write_room(struct tty_struct *tty)if (ret <0 ) ret =0 ;#ifdef ROCKET_DEBUG_WRITE -printk (KERN_INFO "rp_write_room returns %d..." , ret); +printk (KERN_INFO "rp_write_room returns %d...\n" , ret);#endif return ret; }
@@ -1818,7 +1826,7 @@ static int rp_chars_in_buffer(struct tty_struct *tty) cp = &info->channel;#ifdef ROCKET_DEBUG_WRITE -printk (KERN_INFO "rp_chars_in_buffer returns %d..." , info->xmit_cnt); +printk (KERN_INFO "rp_chars_in_buffer returns %d...\n" , info->xmit_cnt);#endif return info->xmit_cnt; }
@@ -2161,14 +2169,11 @@ static __init int register_PCI(int i, struct pci_dev *dev)for (aiop =0 ; aiop < max_num_aiops; aiop++) ctlp->AiopNumChan[aiop] = ports_per_aiop; -printk ("Comtrol PCI controller #%d ID 0x%x found in bus:slot:fn %s at address %04lx, " -"%d AIOP(s) (%s)\n" , i, dev->device,pci_name (dev), - rcktpt_io_addr[i], num_aiops, rocketModel[i].modelString); -printk (KERN_INFO "Installing %s, creating /dev/ttyR%d - %ld\n" , - rocketModel[i].modelString, - rocketModel[i].startingPortNumber, - rocketModel[i].startingPortNumber + - rocketModel[i].numPorts -1 ); +dev_info (&dev->dev,"comtrol PCI controller #%d found at " +"address %04lx, %d AIOP(s) (%s), creating ttyR%d - %ld\n" , + i, rcktpt_io_addr[i], num_aiops, rocketModel[i].modelString, + rocketModel[i].startingPortNumber, + rocketModel[i].startingPortNumber + rocketModel[i].numPorts-1 );if (num_aiops <=0 ) { rcktpt_io_addr[i] =0 ;
@@ -2240,7 +2245,9 @@ static int __init init_ISA(int i)/* Reserve the IO region */ if (!request_region (rcktpt_io_addr[i],64 ,"Comtrol RocketPort" )) { -printk (KERN_INFO "Unable to reserve IO region for configured ISA RocketPort at address 0x%lx, board not installed...\n" , rcktpt_io_addr[i]); +printk (KERN_ERR "Unable to reserve IO region for configured " +"ISA RocketPort at address 0x%lx, board not " +"installed...\n" , rcktpt_io_addr[i]); rcktpt_io_addr[i] =0 ;return (0 ); }
@@ -2480,7 +2487,7 @@ static void rp_cleanup_module(void) retval =tty_unregister_driver (rocket_driver);if (retval) -printk (KERN_INFO "Error %d while trying to unregister " +printk (KERN_ERR "Error %d while trying to unregister " "rocketport driver\n" , -retval);for (i =0 ; i <MAX_RP_PORTS ; i++)
drivers/char/rocket_int.h +3 -3
@@ -42,7 +42,7 @@ typedef unsigned int DWordIO_t;static inline void sOutB (unsigned short port,unsigned char value) {#ifdef ROCKET_DEBUG_IO -printk ("sOutB(%x, %x)..." , port, value); +printk (KERN_DEBUG "sOutB(%x, %x)...\n" , port, value);#endif outb_p (value, port); }
@@ -50,7 +50,7 @@ static inline void sOutB(unsigned short port, unsigned char value)static inline void sOutW (unsigned short port,unsigned short value) {#ifdef ROCKET_DEBUG_IO -printk ("sOutW(%x, %x)..." , port, value); +printk (KERN_DEBUG "sOutW(%x, %x)...\n" , port, value);#endif outw_p (value, port); }
@@ -58,7 +58,7 @@ static inline void sOutW(unsigned short port, unsigned short value)static inline void sOutDW (unsigned short port,unsigned long value) {#ifdef ROCKET_DEBUG_IO -printk ("sOutDW(%x, %lx)..." , port, value); +printk (KERN_DEBUG "sOutDW(%x, %lx)...\n" , port, value);#endif outl_p (cpu_to_le32 (value), port); }
Re: [PATCH 2/7] Char: rocket, printk cleanup
drivers/char/rocket.c static void rp_do_receive(struct r_port *info, · line 331
Quoted 2 lines
drivers/char/rocket.c +1
-1-printk (KERN_INFO "rp_do_receive(%d)..." , ToRecv); +printk (KERN_INFO "rp_do_receive(%d)...\n" , ToRecv);
The missing \n was intentional looking at the old code, and meant you got a lot of trace per line for debugging. The KERN_ additions are the breakage here.
We might as well just lose them, we have proper debuggers now and they are useless with \n, and pretty useless without.
PATCH 3/7 Char: rocket, remove useless macros
In reply to Jiri Slabyrocket, remove useless macros
---
commit 585adae2019a87909ec738cbd414a330afbe04a8
tree cb170c8236ae0e49b81b50c305fa221aeb4315c2
parent c0e0b8a247ca469f85e51867fb11b5dbc19dace7
author Jiri Slaby <[email protected]> Sat, 20 Oct 2007 22:18:40 +0200 committer Jiri Slaby <[email protected]> Fri, 09 Nov 2007 22:26:05 +0100
drivers/char/rocket.c | 11 ++--------- drivers/char/rocket_int.h | 18 ------------------ 2 files changed, 2 insertions(+), 27 deletions(-)
drivers/char/rocket.c +2 -9
@@ -40,12 +40,6 @@*/ /****** Defines ******/ -#ifdef PCI_NUM_RESOURCES -#define PCI_BASE_ADDRESS (dev, r) ((dev)->resource[r].start) -#else -#define PCI_BASE_ADDRESS (dev, r) ((dev)->base_address[r]) -#endif -#define ROCKET_PARANOIA_CHECK #define ROCKET_DISABLE_SIMUSAGE
@@ -981,7 +975,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)CHANNEL_t *cp;unsigned long page; - line =TTY_GET_LINE (tty); + line = tty->index;if ((line <0 ) || (line >=MAX_RP_PORTS ) || ((info = rp_table[line]) ==NULL ))return -ENXIO ;
@@ -1166,8 +1160,7 @@ static void rp_close(struct tty_struct *tty, struct file *filp)if (C_HUPCL (tty))sClrDTR (cp); -if (TTY_DRIVER_FLUSH_BUFFER_EXISTS (tty)) -TTY_DRIVER_FLUSH_BUFFER (tty); +rp_flush_buffer (tty);tty_ldisc_flush (tty);
drivers/char/rocket_int.h +0 -18
@@ -105,12 +105,6 @@ static inline unsigned short sInW(unsigned short port)#define AIOPID_NULL -1/* no AIOP or channel exists */ #define AIOPID_0001 0x0001/* AIOP release 1 */ -#define NULLDEV -1/* identifies non-existant device */ -#define NULLCTL -1/* identifies non-existant controller */ -#define NULLCTLPTR (CONTROLLER_T *)0/* identifies non-existant controller */ -#define NULLAIOP -1/* identifies non-existant AIOP */ -#define NULLCHAN -1/* identifies non-existant channel */ -/************************************************************************ Global Register Offsets - Direct Access - Fixed values ************************************************************************/
@@ -1187,9 +1181,6 @@ struct r_port {#define ROCKET_CLOSING 0x40000000/* Serial port is closing */ #define ROCKET_NORMAL_ACTIVE 0x20000000/* Normal port is active */ -/* tty subtypes */ -#define SERIAL_TYPE_NORMAL 1 -/* * Assigned major numbers for the Comtrol Rocketport */
@@ -1240,12 +1231,3 @@ struct r_port {/* Compact PCI device */ #define PCI_DEVICE_ID_CRP16INTF 0x0903/* Rocketport Compact PCI 16 port w/external I/F */ -#define TTY_GET_LINE (t) t->index -#define TTY_DRIVER_MINOR_START (t) t->driver->minor_start -#define TTY_DRIVER_SUBTYPE (t) t->driver->subtype -#define TTY_DRIVER_NAME (t) t->driver->name -#define TTY_DRIVER_NAME_BASE (t) t->driver->name_base -#define TTY_DRIVER_FLUSH_BUFFER_EXISTS (t) t->driver->flush_buffer -#define TTY_DRIVER_FLUSH_BUFFER (t) t->driver->flush_buffer(t) - -
Re: [PATCH 3/7] Char: rocket, remove useless macros
Quoted 3 lines · On Fri, 9 Nov 2007 18:36:08 -0500 Jiri Slaby <[email protected]> wrote:
rocket, remove useless macros
Signed-off-by Jiri Slaby <[email protected]>
I'd just done some of that in my tree too. I have some other changes but they don't overlap (termios and a very very minor auth fix)
PATCH 4/7 Char: char/serial, remove SERIAL_TYPE_NORMAL redefines
In reply to Jiri Slabychar/serial, remove SERIAL_TYPE_NORMAL redefines
---
commit d927dc37e63aa8347e596052615b85ff4936b3e2
tree 0c62b277b0a1b414cd1ac911de0f65b0ebcfd216
parent 585adae2019a87909ec738cbd414a330afbe04a8
author Jiri Slaby <[email protected]> Sat, 20 Oct 2007 22:35:24 +0200 committer Jiri Slaby <[email protected]> Fri, 09 Nov 2007 22:33:04 +0100
drivers/char/epca.h | 1 - drivers/char/esp.c | 3 --- drivers/char/ip2/ip2main.c | 3 --- drivers/char/mxser.c | 3 --- drivers/char/serial167.c | 2 -- drivers/char/sx.h | 2 -- drivers/serial/68328serial.c | 3 --- drivers/serial/crisv10.c | 5 ----- include/linux/isicom.h | 2 -- 9 files changed, 0 insertions(+), 24 deletions(-)
drivers/char/epca.h +0 -1
@@ -77,7 +77,6 @@ static char *board_desc[] =#define ON 1#define FEPTIMEOUT 200000 -#define SERIAL_TYPE_NORMAL 1#define SERIAL_TYPE_INFO 3#define EPCA_EVENT_HANGUP 1#define EPCA_MAGIC 0x5c6df104L
drivers/char/esp.c +0 -3
@@ -111,9 +111,6 @@ static char serial_version[] __initdata = "2.2";static struct tty_driver *esp_driver; -/* serial subtype definitions */ -#define SERIAL_TYPE_NORMAL 1 -/* * Serial driver configuration section. Here are the various options: *
drivers/char/ip2/ip2main.c +0 -3
@@ -153,9 +153,6 @@ static char *pcVersion = "1.2.14";static char *pcDriver_name ="ip2" ;static char *pcIpl ="ip2ipl" ; -/* Serial subtype definitions */ -#define SERIAL_TYPE_NORMAL 1 -// cheezy kludge or genius - you decide? int ip2_loadmain (int *,int *,unsigned char *,int );static unsigned char *Fip_firmware;
drivers/char/mxser.c +0 -3
@@ -81,9 +81,6 @@#define MXSER_ERR_IRQ_CONFLIT -3#define MXSER_ERR_VECTOR -4 -#define SERIAL_TYPE_NORMAL 1 -#define SERIAL_TYPE_CALLOUT 2 -#define WAKEUP_CHARS 256#define UART_MCR_AFE 0x20
drivers/char/serial167.c +0 -2
@@ -90,8 +90,6 @@#define STD_COM_FLAGS (0) -#define SERIAL_TYPE_NORMAL 1 -static struct tty_driver *cy_serial_driver;extern int serial_console;static struct cyclades_port *serial_console_info =NULL ;
drivers/char/sx.h +0 -2
@@ -88,8 +88,6 @@ struct vpd_prom {#define IS_CF_BOARD (board) (board->flags & (SX_CFISA_BOARD | SX_CFPCI_BOARD)) -#define SERIAL_TYPE_NORMAL 1 -/* The SI processor clock is required to calculate the cc_int_count register value for the SI cards. */ #define SI_PROCESSOR_CLOCK 25000000
drivers/serial/68328serial.c +0 -3
@@ -84,9 +84,6 @@ extern wait_queue_head_t keypress_wait;struct tty_driver *serial_driver; -/* serial subtype definitions */ -#define SERIAL_TYPE_NORMAL 1 -/* number of characters left in xmit buffer before we ask for more */ #define WAKEUP_CHARS 256
drivers/serial/crisv10.c +0 -5
@@ -68,11 +68,6 @@ static char *serial_version = "$Revision: 1.25 $";struct tty_driver *serial_driver; -/* serial subtype definitions */ -#ifndef SERIAL_TYPE_NORMAL -#define SERIAL_TYPE_NORMAL 1 -#endif -/* number of characters left in xmit buffer before we ask for more */ #define WAKEUP_CHARS 256
include/linux/isicom.h +0 -2
@@ -37,8 +37,6 @@#define BOARD_COUNT 4#define PORT_COUNT (BOARD_COUNT*16) -#define SERIAL_TYPE_NORMAL 1 -/* character sizes */ #define ISICOM_CS5 0x0000
PATCH 5/7 Char: mxser_new, ioaddresses are ulong
In reply to Jiri Slabymxser_new, ioaddresses are ulong
To not pass ulong address as int parameter, switch it to ulong.
---
commit f412e3e0d4d012b7b57e381ae85ddfb1b5fc99bf
tree 3c00698655cc3b6fd7a99139607578a34358093d
parent d927dc37e63aa8347e596052615b85ff4936b3e2
author Jiri Slaby <[email protected]> Sat, 20 Oct 2007 22:56:49 +0200 committer Jiri Slaby <[email protected]> Fri, 09 Nov 2007 22:34:26 +0100
drivers/char/mxser_new.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/mxser_new.c +1 -1
@@ -320,7 +320,7 @@ static struct mxser_mon_ext mon_data_ext;static int mxser_set_baud_method[MXSER_PORTS +1 ];#ifdef CONFIG_PCI -static int __devinit CheckIsMoxaMust (int io) +static int __devinit CheckIsMoxaMust (unsigned long io) {u8 oldmcr, hwid;int i;
PATCH 6/7 Char: stallion, fix compiler warnings
In reply to Jiri Slabystallion, fix compiler warnings
Don't emit warnings on 64 bit platforms from min(). sizeof() on those is not uint, neither 2 pointers difference, cast it to uint by min_t in both cases.
---
commit 7a411a4d1729e34bd7dc6697a8eedec7dd989c32
tree 2422610e5f3cdde71c9a5cec4d134baf9b72daa5
parent f412e3e0d4d012b7b57e381ae85ddfb1b5fc99bf
author Jiri Slaby <[email protected]> Tue, 23 Oct 2007 12:47:28 +0200 committer Jiri Slaby <[email protected]> Fri, 09 Nov 2007 22:36:31 +0100
drivers/char/stallion.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/char/stallion.c +6 -4
@@ -3546,7 +3546,8 @@ static void stl_cd1400txisr(struct stlpanel *panelp, int ioaddr) }else { len =min (len,CD1400_TXFIFOSIZE ); portp->stats.txtotal += len; - stlen =min (len, ((portp->tx.buf +STL_TXBUFSIZE ) - tail)); + stlen = min_t(unsigned int, len, + (portp->tx.buf +STL_TXBUFSIZE ) - tail);outb ((TDR + portp->uartaddr), ioaddr);outsb ((ioaddr +EREG_DATA ), tail, stlen); len -= stlen;
@@ -3599,7 +3600,7 @@ static void stl_cd1400rxisr(struct stlpanel *panelp, int ioaddr)outb ((RDCR + portp->uartaddr), ioaddr); len =inb (ioaddr +EREG_DATA );if (tty ==NULL || (buflen =tty_buffer_request_room (tty, len)) ==0 ) { - len =min (len,sizeof (stl_unwanted)); + len = min_t(unsigned int, len, sizeof(stl_unwanted));outb ((RDSR + portp->uartaddr), ioaddr);insb ((ioaddr +EREG_DATA ), &stl_unwanted[0 ], len); portp->stats.rxlost += len;
@@ -4465,7 +4466,8 @@ static void stl_sc26198txisr(struct stlport *portp) }else { len =min (len,SC26198_TXFIFOSIZE ); portp->stats.txtotal += len; - stlen =min (len, ((portp->tx.buf +STL_TXBUFSIZE ) - tail)); + stlen = min_t(unsigned int, len, + (portp->tx.buf +STL_TXBUFSIZE ) - tail);outb (GTXFIFO , (ioaddr +XP_ADDR ));outsb ((ioaddr +XP_DATA ), tail, stlen); len -= stlen;
@@ -4506,7 +4508,7 @@ static void stl_sc26198rxisr(struct stlport *portp, unsigned int iack)if ((iack &IVR_TYPEMASK ) ==IVR_RXDATA ) {if (tty ==NULL || (buflen =tty_buffer_request_room (tty, len)) ==0 ) { - len =min (len,sizeof (stl_unwanted)); + len = min_t(unsigned int, len, sizeof(stl_unwanted));outb (GRXFIFO , (ioaddr +XP_ADDR ));insb ((ioaddr +XP_DATA ), &stl_unwanted[0 ], len); portp->stats.rxlost += len;
PATCH 7/7 Char: riscom8, change rc_init_drivers prototype
In reply to Jiri Slabyriscom8, change rc_init_drivers prototype
Let compiler decide if the rc_init_drivers function will be inlined and mark it as __init, because it's called only from __init function.
---
commit da1c9104ea38d0ca6e5ce0ee9be8cb6adff0ee71
tree 6878cf4f80d1e7bd4aa81a188dff5d13761ed867
parent 7a411a4d1729e34bd7dc6697a8eedec7dd989c32
author Jiri Slaby <[email protected]> Sat, 27 Oct 2007 00:31:26 +0200 committer Jiri Slaby <[email protected]> Fri, 09 Nov 2007 22:40:52 +0100
drivers/char/riscom8.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/char/riscom8.c +1 -1
@@ -1618,7 +1618,7 @@ static const struct tty_operations riscom_ops = { .tiocmset = rc_tiocmset, }; -static inline int rc_init_drivers (void ) +static int __init rc_init_drivers (void ) {int error;int i;