patch-2.2.15 linux/drivers/char/istallion.c
Next file: linux/drivers/char/joystick/joy-creative.c
Previous file: linux/drivers/char/isicom.c
Back to the patch index
Back to the overall index
- Lines: 112
- Date:
Fri Apr 21 12:46:03 2000
- Orig file:
v2.2.14/drivers/char/istallion.c
- Orig date:
Sat Aug 14 02:25:39 1999
diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/drivers/char/istallion.c linux/drivers/char/istallion.c
@@ -3,8 +3,8 @@
/*
* istallion.c -- stallion intelligent multiport serial driver.
*
- * Copyright (C) 1996-1999 Stallion Technologies (support@stallion.oz.au).
- * Copyright (C) 1994-1996 Greg Ungerer (gerg@stallion.oz.au).
+ * Copyright (C) 1996-2000 Stallion Technologies (support@stallion.oz.au)
+ * Copyright (C) 1994-1996 Greg Ungerer.
*
* This code is loosely based on the Linux serial driver, written by
* Linus Torvalds, Theodore T'so and others.
@@ -167,7 +167,7 @@
*/
static char *stli_drvtitle = "Stallion Intelligent Multiport Serial Driver";
static char *stli_drvname = "istallion";
-static char *stli_drvversion = "5.5.1";
+static char *stli_drvversion = "5.6.0";
static char *stli_serialname = "ttyE";
static char *stli_calloutname = "cue";
@@ -383,7 +383,7 @@
/*
* Define the module agruments.
*/
-MODULE_AUTHOR("Greg Ungerer");
+MODULE_AUTHOR("Stallion Technologies (support@stallion.oz.au)");
MODULE_DESCRIPTION("Stallion Intelligent Multiport Serial Driver");
MODULE_PARM(board0, "1-3s");
@@ -711,6 +711,8 @@
static int stli_getportstats(stliport_t *portp, comstats_t *cp);
static int stli_portcmdstats(stliport_t *portp);
static int stli_clrportstats(stliport_t *portp, comstats_t *cp);
+static int stli_geticounters(stliport_t *portp,
+ struct serial_icounter_struct *cp);
static int stli_getportstruct(unsigned long arg);
static int stli_getbrdstruct(unsigned long arg);
static void *stli_memalloc(int len);
@@ -2170,6 +2172,13 @@
sizeof(comstats_t))) == 0)
rc = stli_clrportstats(portp, (comstats_t *) arg);
break;
+ case TIOCGICOUNT:
+ if ((rc = verify_area(VERIFY_WRITE, (void *) arg,
+ sizeof(struct serial_icounter_struct *))) == 0)
+ rc = stli_geticounters(portp,
+ (struct serial_icounter_struct *) arg);
+ break;
+
case TIOCSERCONFIG:
case TIOCSERGWILD:
case TIOCSERSWILD:
@@ -2489,6 +2498,7 @@
restore_flags(flags);
wake_up_interruptible(&tty->write_wait);
+ wake_up_interruptible(&tty->poll_wait);
if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty->ldisc.write_wakeup)
(tty->ldisc.write_wakeup)(tty);
@@ -3025,6 +3035,7 @@
EBRDENABLE(brdp);
}
wake_up_interruptible(&tty->write_wait);
+ wake_up_interruptible(&tty->poll_wait);
}
}
@@ -3375,6 +3386,9 @@
portp->closing_wait = 30 * HZ;
portp->tqhangup.routine = stli_dohangup;
portp->tqhangup.data = portp;
+ portp->open_wait = 0;
+ portp->close_wait = 0;
+ portp->raw_wait = 0;
portp->normaltermios = stli_deftermios;
portp->callouttermios = stli_deftermios;
panelport++;
@@ -5138,6 +5152,33 @@
copy_to_user(cp, &stli_comstats, sizeof(comstats_t));
return(0);
+}
+
+static int stli_geticounters(stliport_t *portp,
+ struct serial_icounter_struct *icp)
+{
+ struct serial_icounter_struct icount;
+ comstats_t *s = &stli_comstats;
+ int rc;
+
+ if ((rc = stli_portcmdstats(portp)) < 0)
+ return(rc);
+
+ memset(&icount, 0, sizeof(icount));
+
+ /*
+ * we only support a subset of the icounters - the others are handled
+ * by the uart and we don't get interrupted for them
+ */
+ icount.dcd = s->modem;
+ icount.rx = s->rxtotal;
+ icount.tx = s->txtotal;
+ icount.frame = s->rxframing;
+ icount.overrun = s->rxoverrun;
+ icount.parity = s->rxparity;
+ icount.brk = s->rxbreaks;
+
+ return (copy_to_user(icp, &icount, sizeof(icount)));
}
/*****************************************************************************/
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)