taglinefilesource code
portp658drivers/char/istallion.cstatic int  stli_initopen(stlibrd_t *brdp, stliport_t *portp);
portp659drivers/char/istallion.cstatic int  stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait);
portp660drivers/char/istallion.cstatic int  stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait);
portp661drivers/char/istallion.cstatic int  stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp);
portp664drivers/char/istallion.cstatic int  stli_setport(stliport_t *portp);
portp665drivers/char/istallion.cstatic int  stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
portp666drivers/char/istallion.cstatic void  stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
portp667drivers/char/istallion.cstatic void  stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp);
portp668drivers/char/istallion.cstatic void  stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp);
portp671drivers/char/istallion.cstatic void  stli_read(stlibrd_t *brdp, stliport_t *portp);
portp672drivers/char/istallion.cstatic void  stli_getserial(stliport_t *portp, struct serial_struct *sp);
portp673drivers/char/istallion.cstatic int  stli_setserial(stliport_t *portp, struct serial_struct *sp);
portp675drivers/char/istallion.cstatic int  stli_getportstats(stliport_t *portp, comstats_t *cp);
portp676drivers/char/istallion.cstatic int  stli_clrportstats(stliport_t *portp, comstats_t *cp);
portp787drivers/char/istallion.cstliport_t  *portp;
portp829drivers/char/istallion.cportp = brdp->ports[j];
portp830drivers/char/istallion.cif (portp != (stliport_t *) NULL) {
portp831drivers/char/istallion.cif (portp->tty != (struct tty_struct *) NULL)
portp832drivers/char/istallion.ctty_hangup(portp->tty);
portp833drivers/char/istallion.ckfree_s(portp, sizeof(stliport_t));
portp870drivers/char/istallion.cstliport_t  *portp;
portp891drivers/char/istallion.cportp = brdp->ports[portnr];
portp892drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp894drivers/char/istallion.cif (portp->devnr < 1)
portp903drivers/char/istallion.cif (portp->flags & ASYNC_CLOSING) {
portp904drivers/char/istallion.cinterruptible_sleep_on(&portp->close_wait);
portp905drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp916drivers/char/istallion.cportp->tty = tty;
portp917drivers/char/istallion.ctty->driver_data = portp;
portp918drivers/char/istallion.cportp->refcount++;
portp920drivers/char/istallion.cwhile (test_bit(ST_INITIALIZING, &portp->state)) {
portp923drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp926drivers/char/istallion.cif ((portp->flags & ASYNC_INITIALIZED) == 0) {
portp927drivers/char/istallion.cset_bit(ST_INITIALIZING, &portp->state);
portp928drivers/char/istallion.cif ((rc = stli_initopen(brdp, portp)) >= 0) {
portp929drivers/char/istallion.cportp->flags |= ASYNC_INITIALIZED;
portp932drivers/char/istallion.cclear_bit(ST_INITIALIZING, &portp->state);
portp933drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp944drivers/char/istallion.cif (portp->flags & ASYNC_CLOSING) {
portp945drivers/char/istallion.cinterruptible_sleep_on(&portp->close_wait);
portp946drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp957drivers/char/istallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp959drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE) {
portp960drivers/char/istallion.cif ((portp->flags & ASYNC_SESSION_LOCKOUT) &&
portp961drivers/char/istallion.c(portp->session != current->session))
portp963drivers/char/istallion.cif ((portp->flags & ASYNC_PGRP_LOCKOUT) &&
portp964drivers/char/istallion.c(portp->pgrp != current->pgrp))
portp967drivers/char/istallion.cportp->flags |= ASYNC_CALLOUT_ACTIVE;
portp970drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp973drivers/char/istallion.cif ((rc = stli_waitcarrier(brdp, portp, filp)) != 0)
portp976drivers/char/istallion.cportp->flags |= ASYNC_NORMAL_ACTIVE;
portp979drivers/char/istallion.cif ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
portp981drivers/char/istallion.c*tty->termios = portp->normaltermios;
portp983drivers/char/istallion.c*tty->termios = portp->callouttermios;
portp984drivers/char/istallion.cstli_setport(portp);
portp987drivers/char/istallion.cportp->session = current->session;
portp988drivers/char/istallion.cportp->pgrp = current->pgrp;
portp997drivers/char/istallion.cstliport_t  *portp;
portp1004drivers/char/istallion.cportp = tty->driver_data;
portp1005drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1014drivers/char/istallion.cif (portp->refcount-- > 1) {
portp1019drivers/char/istallion.cportp->flags |= ASYNC_CLOSING;
portp1021drivers/char/istallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp1022drivers/char/istallion.cportp->normaltermios = *tty->termios;
portp1023drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp1024drivers/char/istallion.cportp->callouttermios = *tty->termios;
portp1035drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1036drivers/char/istallion.cif (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE)
portp1037drivers/char/istallion.ctty_wait_until_sent(tty, portp->closing_wait);
portp1040drivers/char/istallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp1041drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1042drivers/char/istallion.cstli_rawclose(brdp, portp, 0, 0);
portp1044drivers/char/istallion.cstli_mkasysigs(&portp->asig, 0, 0);
portp1045drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state))
portp1046drivers/char/istallion.cset_bit(ST_DOSIGS, &portp->state);
portp1048drivers/char/istallion.cstli_sendcmd(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1050drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp1051drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp1055drivers/char/istallion.cset_bit(ST_DOFLUSHRX, &portp->state);
portp1060drivers/char/istallion.cportp->tty = (struct tty_struct *) NULL;
portp1062drivers/char/istallion.cif (portp->openwaitcnt) {
portp1063drivers/char/istallion.cif (portp->close_delay)
portp1064drivers/char/istallion.cstli_delay(portp->close_delay);
portp1065drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp1068drivers/char/istallion.cportp->flags &= ~(ASYNC_CALLOUT_ACTIVE | ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
portp1069drivers/char/istallion.cwake_up_interruptible(&portp->close_wait);
portp1083drivers/char/istallion.cstatic int stli_initopen(stlibrd_t *brdp, stliport_t *portp)
portp1091drivers/char/istallion.cprintk("stli_initopen(brdp=%x,portp=%x)\n", (int) brdp, (int) portp);
portp1094drivers/char/istallion.cif ((rc = stli_rawopen(brdp, portp, 0, 1)) < 0)
portp1100drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETNOTIFY, &nt, sizeof(asynotify_t), 0)) < 0)
portp1103drivers/char/istallion.ctty = portp->tty;
portp1106drivers/char/istallion.cstli_mkasyport(portp, &aport, tty->termios);
portp1107drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0)) < 0)
portp1110drivers/char/istallion.cset_bit(ST_GETSIGS, &portp->state);
portp1111drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0)
portp1113drivers/char/istallion.cif (clear_bit(ST_GETSIGS, &portp->state))
portp1114drivers/char/istallion.cportp->sigs = stli_mktiocm(portp->asig.sigvalue);
portp1115drivers/char/istallion.cstli_mkasysigs(&portp->asig, 1, 1);
portp1116drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0)
portp1131drivers/char/istallion.cstatic int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait)
portp1140drivers/char/istallion.cprintk("stli_rawopen(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait);
portp1155drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1160drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1169drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp1173drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1174drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1175drivers/char/istallion.c*bits |= portp->portbit;
portp1188drivers/char/istallion.cset_bit(ST_OPENING, &portp->state);
portp1189drivers/char/istallion.cwhile (test_bit(ST_OPENING, &portp->state)) {
portp1194drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1198drivers/char/istallion.cif ((rc == 0) && (portp->rc != 0))
portp1211drivers/char/istallion.cstatic int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait)
portp1220drivers/char/istallion.cprintk("stli_rawclose(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait);
portp1231drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1236drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1244drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp1248drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1249drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1250drivers/char/istallion.c*bits |= portp->portbit;
portp1253drivers/char/istallion.cset_bit(ST_CLOSING, &portp->state);
portp1264drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1269drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1273drivers/char/istallion.cif ((rc == 0) && (portp->rc != 0))
portp1287drivers/char/istallion.cstatic int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback)
portp1292drivers/char/istallion.cprintk("stli_cmdwait(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d,copyback=%d)\n", (int) brdp, (int) portp, (int) cmd, (int) arg, size, copyback);
portp1297drivers/char/istallion.cwhile (test_bit(ST_CMDING, &portp->state)) {
portp1302drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1305drivers/char/istallion.cstli_sendcmd(brdp, portp, cmd, arg, size, copyback);
portp1307drivers/char/istallion.cwhile (test_bit(ST_CMDING, &portp->state)) {
portp1312drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1316drivers/char/istallion.cif (portp->rc != 0)
portp1328drivers/char/istallion.cstatic int stli_setport(stliport_t *portp)
portp1334drivers/char/istallion.cprintk("stli_setport(portp=%x)\n", (int) portp);
portp1337drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1339drivers/char/istallion.cif (portp->tty == (struct tty_struct *) NULL)
portp1341drivers/char/istallion.cif ((portp->brdnr < 0) && (portp->brdnr >= stli_nrbrds))
portp1343drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1347drivers/char/istallion.cstli_mkasyport(portp, &aport, portp->tty->termios);
portp1348drivers/char/istallion.creturn(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0));
portp1378drivers/char/istallion.cstatic int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp)
portp1384drivers/char/istallion.cprintk("stli_waitcarrier(brdp=%x,portp=%x,filp=%x)\n", (int) brdp, (int) portp, (int) filp);
portp1391drivers/char/istallion.cportp->openwaitcnt++;
portp1392drivers/char/istallion.cif (portp->refcount > 0)
portp1393drivers/char/istallion.cportp->refcount--;
portp1396drivers/char/istallion.cif ((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) {
portp1397drivers/char/istallion.cstli_mkasysigs(&portp->asig, 1, 1);
portp1398drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0)
portp1401drivers/char/istallion.cif (tty_hung_up_p(filp) || ((portp->flags & ASYNC_INITIALIZED) == 0)) {
portp1402drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp1408drivers/char/istallion.cif (((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) &&
portp1409drivers/char/istallion.c((portp->flags & ASYNC_CLOSING) == 0) &&
portp1410drivers/char/istallion.c((portp->tty->termios->c_cflag & CLOCAL) ||
portp1411drivers/char/istallion.c(portp->sigs & TIOCM_CD))) {
portp1418drivers/char/istallion.cinterruptible_sleep_on(&portp->open_wait);
portp1422drivers/char/istallion.cportp->refcount++;
portp1423drivers/char/istallion.cportp->openwaitcnt--;
portp1443drivers/char/istallion.cstliport_t    *portp;
portp1456drivers/char/istallion.cportp = tty->driver_data;
portp1457drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1459drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1461drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1481drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1486drivers/char/istallion.clen = (head >= tail) ? (portp->txsize - (head - tail) - 1) : (tail - head - 1);
portp1503drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1508drivers/char/istallion.csize = portp->txsize;
portp1519drivers/char/istallion.cshbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset);
portp1534drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1536drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1541drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1542drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1543drivers/char/istallion.c*bits |= portp->portbit;
portp1544drivers/char/istallion.cset_bit(ST_TXBUSY, &portp->state);
portp1595drivers/char/istallion.cstliport_t    *portp;
portp1620drivers/char/istallion.cportp = tty->driver_data;
portp1621drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1623drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1625drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1633drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1638drivers/char/istallion.csize = portp->txsize;
portp1649drivers/char/istallion.cshbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset);
portp1665drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1668drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1673drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1674drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1675drivers/char/istallion.c*bits |= portp->portbit;
portp1676drivers/char/istallion.cset_bit(ST_TXBUSY, &portp->state);
portp1687drivers/char/istallion.cstliport_t    *portp;
portp1705drivers/char/istallion.cportp = tty->driver_data;
portp1706drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1708drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1710drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1717drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq;
portp1722drivers/char/istallion.clen = (head >= tail) ? (portp->txsize - (head - tail)) : (tail - head);
portp1747drivers/char/istallion.cstliport_t    *portp;
portp1760drivers/char/istallion.cportp = tty->driver_data;
portp1761drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1763drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1765drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1772drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq;
portp1777drivers/char/istallion.clen = (head >= tail) ? (head - tail) : (portp->txsize - (tail - head));
portp1778drivers/char/istallion.cif ((len == 0) && test_bit(ST_TXBUSY, &portp->state))
portp1792drivers/char/istallion.cstatic void stli_getserial(stliport_t *portp, struct serial_struct *sp)
portp1798drivers/char/istallion.cprintk("stli_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1803drivers/char/istallion.csio.line = portp->portnr;
portp1805drivers/char/istallion.csio.flags = portp->flags;
portp1806drivers/char/istallion.csio.baud_base = portp->baud_base;
portp1807drivers/char/istallion.csio.close_delay = portp->close_delay;
portp1808drivers/char/istallion.csio.closing_wait = portp->closing_wait;
portp1809drivers/char/istallion.csio.custom_divisor = portp->custom_divisor;
portp1813drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1828drivers/char/istallion.cstatic int stli_setserial(stliport_t *portp, struct serial_struct *sp)
portp1834drivers/char/istallion.cprintk("stli_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1839drivers/char/istallion.cif ((sio.baud_base != portp->baud_base) ||
portp1840drivers/char/istallion.c(sio.close_delay != portp->close_delay) ||
portp1841drivers/char/istallion.c((sio.flags & ~ASYNC_USR_MASK) != (portp->flags & ~ASYNC_USR_MASK)))
portp1845drivers/char/istallion.cportp->flags = (portp->flags & ~ASYNC_USR_MASK) | (sio.flags & ASYNC_USR_MASK);
portp1846drivers/char/istallion.cportp->baud_base = sio.baud_base;
portp1847drivers/char/istallion.cportp->close_delay = sio.close_delay;
portp1848drivers/char/istallion.cportp->closing_wait = sio.closing_wait;
portp1849drivers/char/istallion.cportp->custom_divisor = sio.custom_divisor;
portp1851drivers/char/istallion.cif ((rc = stli_setport(portp)) < 0)
portp1860drivers/char/istallion.cstliport_t  *portp;
portp1871drivers/char/istallion.cportp = tty->driver_data;
portp1872drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1874drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1876drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1888drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0);
portp1896drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0);
portp1911drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0)
portp1913drivers/char/istallion.cval = stli_mktiocm(portp->asig.sigvalue);
portp1920drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 1 : -1), ((arg & TIOCM_RTS) ? 1 : -1));
portp1921drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1927drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 0 : -1), ((arg & TIOCM_RTS) ? 0 : -1));
portp1928drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1934drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 1 : 0), ((arg & TIOCM_RTS) ? 1 : 0));
portp1935drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1940drivers/char/istallion.cstli_getserial(portp, (struct serial_struct *) arg);
portp1944drivers/char/istallion.crc = stli_setserial(portp, (struct serial_struct *) arg);
portp1948drivers/char/istallion.cput_fs_long(portp->pflag, (unsigned long *) arg);
portp1952drivers/char/istallion.cportp->pflag = get_fs_long((unsigned long *) arg);
portp1953drivers/char/istallion.cstli_setport(portp);
portp1958drivers/char/istallion.crc = stli_getportstats(portp, (comstats_t *) arg);
portp1962drivers/char/istallion.crc = stli_clrportstats(portp, (comstats_t *) arg);
portp1988drivers/char/istallion.cstliport_t  *portp;
portp1999drivers/char/istallion.cportp = tty->driver_data;
portp2000drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2002drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2004drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp2012drivers/char/istallion.cstli_mkasyport(portp, &aport, tiosp);
portp2013drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0);
portp2014drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((tiosp->c_cflag & CBAUD) ? 1 : 0), -1);
portp2015drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp2019drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2036drivers/char/istallion.cstliport_t  *portp;
portp2044drivers/char/istallion.cportp = tty->driver_data;
portp2045drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2048drivers/char/istallion.cset_bit(ST_RXSTOP, &portp->state);
portp2061drivers/char/istallion.cstliport_t  *portp;
portp2069drivers/char/istallion.cportp = tty->driver_data;
portp2070drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2073drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp2086drivers/char/istallion.cstliport_t  *portp;
portp2095drivers/char/istallion.cportp = tty->driver_data;
portp2096drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2098drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2100drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp2107drivers/char/istallion.cstli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t));
portp2119drivers/char/istallion.cstliport_t  *portp;
portp2129drivers/char/istallion.cportp = tty->driver_data;
portp2130drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2132drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2134drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp2141drivers/char/istallion.cstli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t));
portp2158drivers/char/istallion.cstliport_t  *portp;
portp2164drivers/char/istallion.cportp = (stliport_t *) arg;
portp2165drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2167drivers/char/istallion.cif (portp->tty == (struct tty_struct *) NULL)
portp2169drivers/char/istallion.ctty_hangup(portp->tty);
portp2183drivers/char/istallion.cstliport_t  *portp;
portp2193drivers/char/istallion.cportp = tty->driver_data;
portp2194drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2196drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2198drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp2202drivers/char/istallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp2206drivers/char/istallion.cif (! test_bit(ST_CLOSING, &portp->state))
portp2207drivers/char/istallion.cstli_rawclose(brdp, portp, 0, 0);
portp2209drivers/char/istallion.cstli_mkasysigs(&portp->asig, 0, 0);
portp2210drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2211drivers/char/istallion.cset_bit(ST_DOSIGS, &portp->state);
portp2212drivers/char/istallion.cset_bit(ST_DOFLUSHTX, &portp->state);
portp2213drivers/char/istallion.cset_bit(ST_DOFLUSHRX, &portp->state);
portp2215drivers/char/istallion.cstli_sendcmd(brdp, portp, A_SETSIGNALSF, &portp->asig, sizeof(asysigs_t), 0);
portp2220drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp2221drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp2224drivers/char/istallion.cportp->tty = (struct tty_struct *) NULL;
portp2225drivers/char/istallion.cportp->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
portp2226drivers/char/istallion.cportp->refcount = 0;
portp2227drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2241drivers/char/istallion.cstliport_t  *portp;
portp2251drivers/char/istallion.cportp = tty->driver_data;
portp2252drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2254drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2256drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp2267drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2268drivers/char/istallion.cset_bit(ST_DOFLUSHTX, &portp->state);
portp2271drivers/char/istallion.cif (test_bit(ST_DOFLUSHRX, &portp->state)) {
portp2273drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2275drivers/char/istallion.cstli_sendcmd(brdp, portp, A_FLUSH, &ftype, sizeof(unsigned long), 0);
portp2296drivers/char/istallion.cstatic void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback)
portp2304drivers/char/istallion.cprintk("stli_sendcmd(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d,copyback=%d)\n", (int) brdp, (int) portp, (int) cmd, (int) arg, size, copyback);
portp2310drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2317drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp2321drivers/char/istallion.cportp->argp = arg;
portp2322drivers/char/istallion.cportp->argsize = size;
portp2328drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp2329drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp2330drivers/char/istallion.c*bits |= portp->portbit;
portp2331drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2346drivers/char/istallion.cstatic inline void stli_read(stlibrd_t *brdp, stliport_t *portp)
portp2355drivers/char/istallion.cprintk("stli_read(brdp=%x,portp=%d)\n", (int) brdp, (int) portp);
portp2358drivers/char/istallion.cif (test_bit(ST_RXSTOP, &portp->state))
portp2360drivers/char/istallion.ctty = portp->tty;
portp2364drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq;
portp2369drivers/char/istallion.csize = portp->rxsize;
portp2379drivers/char/istallion.cshbuf = (volatile char *) EBRDGETMEMPTR(brdp, portp->rxoffset);
portp2396drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq;
portp2400drivers/char/istallion.cset_bit(ST_RXING, &portp->state);
portp2413drivers/char/istallion.cstatic inline void stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp)
portp2417drivers/char/istallion.cif (test_bit(ST_DOSIGS, &portp->state)) {
portp2418drivers/char/istallion.cif (test_bit(ST_DOFLUSHTX, &portp->state) && test_bit(ST_DOFLUSHRX, &portp->state))
portp2420drivers/char/istallion.celse if (test_bit(ST_DOFLUSHTX, &portp->state))
portp2422drivers/char/istallion.celse if (test_bit(ST_DOFLUSHRX, &portp->state))
portp2426drivers/char/istallion.cclear_bit(ST_DOFLUSHTX, &portp->state);
portp2427drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2428drivers/char/istallion.cclear_bit(ST_DOSIGS, &portp->state);
portp2429drivers/char/istallion.cmemcpy((void *) &(cp->args[0]), (void *) &portp->asig, sizeof(asysigs_t));
portp2432drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2433drivers/char/istallion.c} else if (test_bit(ST_DOFLUSHTX, &portp->state) || test_bit(ST_DOFLUSHRX, &portp->state)) {
portp2434drivers/char/istallion.ccmd = ((test_bit(ST_DOFLUSHTX, &portp->state)) ? FLUSHTX : 0);
portp2435drivers/char/istallion.ccmd |= ((test_bit(ST_DOFLUSHRX, &portp->state)) ? FLUSHRX : 0);
portp2436drivers/char/istallion.cclear_bit(ST_DOFLUSHTX, &portp->state);
portp2437drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2441drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2461drivers/char/istallion.cstliport_t    *portp;
portp2469drivers/char/istallion.cportp = brdp->ports[(channr - 1)];
portp2470drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp2476drivers/char/istallion.cif (test_bit(ST_OPENING, &portp->state)) {
portp2482drivers/char/istallion.cportp->rc = rc;
portp2483drivers/char/istallion.cclear_bit(ST_OPENING, &portp->state);
portp2484drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2491drivers/char/istallion.cif (test_bit(ST_CLOSING, &portp->state)) {
portp2497drivers/char/istallion.cportp->rc = rc;
portp2498drivers/char/istallion.cclear_bit(ST_CLOSING, &portp->state);
portp2499drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2507drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2512drivers/char/istallion.cif (portp->argp != (void *) NULL) {
portp2513drivers/char/istallion.cmemcpy(portp->argp, (void *) &(cp->args[0]), portp->argsize);
portp2514drivers/char/istallion.cportp->argp = (void *) NULL;
portp2517drivers/char/istallion.cportp->rc = rc;
portp2518drivers/char/istallion.cclear_bit(ST_CMDING, &portp->state);
portp2519drivers/char/istallion.cstli_dodelaycmd(portp, cp);
portp2520drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2534drivers/char/istallion.ctty = portp->tty;
portp2537drivers/char/istallion.coldsigs = portp->sigs;
portp2538drivers/char/istallion.cportp->sigs = stli_mktiocm(nt.sigvalue);
portp2539drivers/char/istallion.cclear_bit(ST_GETSIGS, &portp->state);
portp2540drivers/char/istallion.cif ((portp->sigs & TIOCM_CD) && ((oldsigs & TIOCM_CD) == 0))
portp2541drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2542drivers/char/istallion.cif ((oldsigs & TIOCM_CD) && ((portp->sigs & TIOCM_CD) == 0)) {
portp2543drivers/char/istallion.cif (! ((portp->flags & ASYNC_CALLOUT_ACTIVE) &&
portp2544drivers/char/istallion.c(portp->flags & ASYNC_CALLOUT_NOHUP))) {
portp2546drivers/char/istallion.cqueue_task_irq_off(&portp->tqhangup, &tq_scheduler);
portp2552drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp2561drivers/char/istallion.cif ((nt.data & DT_RXBREAK) && (portp->rxmarkmsk & BRKINT)) {
portp2568drivers/char/istallion.cif (portp->flags & ASYNC_SAK)
portp2578drivers/char/istallion.cstli_read(brdp, portp);
portp2590drivers/char/istallion.cif ((!donerx) && test_bit(ST_RXING, &portp->state)) {
portp2591drivers/char/istallion.cclear_bit(ST_RXING, &portp->state);
portp2592drivers/char/istallion.cstli_read(brdp, portp);
portp2614drivers/char/istallion.cstliport_t    *portp;
portp2677drivers/char/istallion.cportp = brdp->ports[(channr - 1)];
portp2678drivers/char/istallion.cif (test_bit(ST_OPENING, &portp->state) ||
portp2679drivers/char/istallion.ctest_bit(ST_CLOSING, &portp->state) ||
portp2680drivers/char/istallion.ctest_bit(ST_CMDING, &portp->state) ||
portp2681drivers/char/istallion.ctest_bit(ST_TXBUSY, &portp->state)) {
portp2682drivers/char/istallion.cslavereq |= portp->reqbit;
portp2706drivers/char/istallion.cstatic void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp)
portp2709drivers/char/istallion.cprintk("stli_mkasyport(portp=%x,pp=%x,tiosp=%d)\n", (int) portp, (int) pp, (int) tiosp);
portp2727drivers/char/istallion.cif ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
portp2729drivers/char/istallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
portp2731drivers/char/istallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
portp2732drivers/char/istallion.cpp->baudout = (portp->baud_base / portp->custom_divisor);
portp2794drivers/char/istallion.cportp->rxmarkmsk = 0;
portp2798drivers/char/istallion.cportp->rxmarkmsk |= BRKINT;
portp2803drivers/char/istallion.cpp->pflag = portp->pflag;
portp2864drivers/char/istallion.cstliport_t  *portp;
portp2872drivers/char/istallion.cportp = (stliport_t *) stli_memalloc(sizeof(stliport_t));
portp2873drivers/char/istallion.cif (portp == (stliport_t *) NULL) {
portp2878drivers/char/istallion.cmemset(portp, 0, sizeof(stliport_t));
portp2879drivers/char/istallion.cportp->portnr = i;
portp2880drivers/char/istallion.cportp->brdnr = brdp->brdnr;
portp2881drivers/char/istallion.cportp->panelnr = panelnr;
portp2882drivers/char/istallion.cportp->baud_base = STL_BAUDBASE;
portp2883drivers/char/istallion.cportp->close_delay = STL_CLOSEDELAY;
portp2884drivers/char/istallion.cportp->closing_wait = 30 * HZ;
portp2885drivers/char/istallion.cportp->tqhangup.routine = stli_dohangup;
portp2886drivers/char/istallion.cportp->tqhangup.data = portp;
portp2887drivers/char/istallion.cportp->normaltermios = stli_deftermios;
portp2888drivers/char/istallion.cportp->callouttermios = stli_deftermios;
portp2894drivers/char/istallion.cbrdp->ports[i] = portp;
portp3740drivers/char/istallion.cstliport_t    *portp;
portp3791drivers/char/istallion.cportp = brdp->ports[portnr];
portp3792drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp3794drivers/char/istallion.cportp->devnr = i;
portp3795drivers/char/istallion.cportp->addr = memp->offset;
portp3796drivers/char/istallion.cportp->reqbit = (unsigned char) (0x1 << (i * 8 / nrdevs));
portp3797drivers/char/istallion.cportp->portidx = (unsigned char) (i / 8);
portp3798drivers/char/istallion.cportp->portbit = (unsigned char) (0x1 << (i % 8));
portp3807drivers/char/istallion.cportp = brdp->ports[portnr];
portp3808drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp3810drivers/char/istallion.cif (portp->addr == 0)
portp3812drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp3814drivers/char/istallion.cportp->rxsize = ap->rxq.size;
portp3815drivers/char/istallion.cportp->txsize = ap->txq.size;
portp3816drivers/char/istallion.cportp->rxoffset = ap->rxq.offset;
portp3817drivers/char/istallion.cportp->txoffset = ap->txq.offset;
portp4337drivers/char/istallion.cstatic int stli_getportstats(stliport_t *portp, comstats_t *cp)
portp4342drivers/char/istallion.cif (portp == (stliport_t *) NULL) {
portp4344drivers/char/istallion.cportp = stli_getport(stli_comstats.brd, stli_comstats.panel, stli_comstats.port);
portp4345drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp4349drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp4353drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_GETSTATS, &stli_cdkstats, sizeof(asystats_t), 1)) < 0)
portp4356drivers/char/istallion.cstli_comstats.state = portp->state;
portp4357drivers/char/istallion.cstli_comstats.flags = portp->flags;
portp4358drivers/char/istallion.cif (portp->tty != (struct tty_struct *) NULL) {
portp4359drivers/char/istallion.cstli_comstats.ttystate = portp->tty->flags;
portp4360drivers/char/istallion.cstli_comstats.cflags = portp->tty->termios->c_cflag;
portp4361drivers/char/istallion.cstli_comstats.iflags = portp->tty->termios->c_iflag;
portp4362drivers/char/istallion.cstli_comstats.oflags = portp->tty->termios->c_oflag;
portp4363drivers/char/istallion.cstli_comstats.lflags = portp->tty->termios->c_lflag;
portp4364drivers/char/istallion.cstli_comstats.rxbuffered = portp->tty->flip.count;
portp4404drivers/char/istallion.cstatic int stli_clrportstats(stliport_t *portp, comstats_t *cp)
portp4409drivers/char/istallion.cif (portp == (stliport_t *) NULL) {
portp4411drivers/char/istallion.cportp = stli_getport(stli_comstats.brd, stli_comstats.panel, stli_comstats.port);
portp4412drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp4416drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp4420drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_CLEARSTATS, 0, 0, 0)) < 0)
portp4424drivers/char/istallion.cstli_comstats.brd = portp->brdnr;
portp4425drivers/char/istallion.cstli_comstats.panel = portp->panelnr;
portp4426drivers/char/istallion.cstli_comstats.port = portp->portnr;
portp499drivers/char/stallion.cstatic void  stl_getserial(stlport_t *portp, struct serial_struct *sp);
portp500drivers/char/stallion.cstatic int  stl_setserial(stlport_t *portp, struct serial_struct *sp);
portp502drivers/char/stallion.cstatic int  stl_getportstats(stlport_t *portp, comstats_t *cp);
portp503drivers/char/stallion.cstatic int  stl_clrportstats(stlport_t *portp, comstats_t *cp);
portp504drivers/char/stallion.cstatic void  stl_setreg(stlport_t *portp, int regnr, int value);
portp505drivers/char/stallion.cstatic int  stl_getreg(stlport_t *portp, int regnr);
portp506drivers/char/stallion.cstatic int  stl_updatereg(stlport_t *portp, int regnr, int value);
portp507drivers/char/stallion.cstatic void  stl_setport(stlport_t *portp, struct termios *tiosp);
portp508drivers/char/stallion.cstatic int  stl_getsignals(stlport_t *portp);
portp509drivers/char/stallion.cstatic void  stl_setsignals(stlport_t *portp, int dtr, int rts);
portp510drivers/char/stallion.cstatic void  stl_ccrwait(stlport_t *portp);
portp511drivers/char/stallion.cstatic void  stl_enablerxtx(stlport_t *portp, int rx, int tx);
portp512drivers/char/stallion.cstatic void  stl_startrxtx(stlport_t *portp, int rx, int tx);
portp513drivers/char/stallion.cstatic void  stl_disableintrs(stlport_t *portp);
portp514drivers/char/stallion.cstatic void  stl_sendbreak(stlport_t *portp, long len);
portp515drivers/char/stallion.cstatic int  stl_waitcarrier(stlport_t *portp, struct file *filp);
portp575drivers/char/stallion.cstlport_t  *portp;
portp613drivers/char/stallion.cportp = panelp->ports[k];
portp614drivers/char/stallion.cif (portp != (stlport_t *) NULL) {
portp615drivers/char/stallion.cif (portp->tty != (struct tty_struct *) NULL)
portp616drivers/char/stallion.cstl_hangup(portp->tty);
portp617drivers/char/stallion.cif (portp->tx.buf != (char *) NULL)
portp618drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp619drivers/char/stallion.ckfree_s(portp, sizeof(stlport_t));
portp666drivers/char/stallion.cstlport_t  *portp;
portp695drivers/char/stallion.cportp = brdp->panels[panelnr]->ports[portnr];
portp696drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp703drivers/char/stallion.cportp->tty = tty;
portp704drivers/char/stallion.ctty->driver_data = portp;
portp705drivers/char/stallion.cportp->refcount++;
portp707drivers/char/stallion.cif ((portp->flags & ASYNC_INITIALIZED) == 0) {
portp708drivers/char/stallion.cif (portp->tx.buf == (char *) NULL) {
portp709drivers/char/stallion.cportp->tx.buf = (char *) stl_memalloc(STL_TXBUFSIZE);
portp710drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp712drivers/char/stallion.cportp->tx.head = portp->tx.buf;
portp713drivers/char/stallion.cportp->tx.tail = portp->tx.buf;
portp715drivers/char/stallion.cstl_setport(portp, tty->termios);
portp716drivers/char/stallion.cportp->sigs = stl_getsignals(portp);
portp717drivers/char/stallion.cstl_setsignals(portp, 1, 1);
portp718drivers/char/stallion.cstl_enablerxtx(portp, 1, 1);
portp719drivers/char/stallion.cstl_startrxtx(portp, 1, 0);
portp721drivers/char/stallion.cportp->flags |= ASYNC_INITIALIZED;
portp730drivers/char/stallion.cif (portp->flags & ASYNC_CLOSING) {
portp731drivers/char/stallion.cinterruptible_sleep_on(&portp->close_wait);
portp732drivers/char/stallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp743drivers/char/stallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp745drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE) {
portp746drivers/char/stallion.cif ((portp->flags & ASYNC_SESSION_LOCKOUT) &&
portp747drivers/char/stallion.c(portp->session != current->session))
portp749drivers/char/stallion.cif ((portp->flags & ASYNC_PGRP_LOCKOUT) &&
portp750drivers/char/stallion.c(portp->pgrp != current->pgrp))
portp753drivers/char/stallion.cportp->flags |= ASYNC_CALLOUT_ACTIVE;
portp756drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp759drivers/char/stallion.cif ((rc = stl_waitcarrier(portp, filp)) != 0)
portp762drivers/char/stallion.cportp->flags |= ASYNC_NORMAL_ACTIVE;
portp765drivers/char/stallion.cif ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
portp767drivers/char/stallion.c*tty->termios = portp->normaltermios;
portp769drivers/char/stallion.c*tty->termios = portp->callouttermios;
portp770drivers/char/stallion.cstl_setport(portp, tty->termios);
portp773drivers/char/stallion.cportp->session = current->session;
portp774drivers/char/stallion.cportp->pgrp = current->pgrp;
portp785drivers/char/stallion.cstatic int stl_waitcarrier(stlport_t *portp, struct file *filp)
portp791drivers/char/stallion.cprintk("stl_waitcarrier(portp=%x,filp=%x)\n", (int) portp, (int) filp);
portp798drivers/char/stallion.cportp->openwaitcnt++;
portp799drivers/char/stallion.cif (portp->refcount > 0)
portp800drivers/char/stallion.cportp->refcount--;
portp803drivers/char/stallion.cif ((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0)
portp804drivers/char/stallion.cstl_setsignals(portp, 1, 1);
portp805drivers/char/stallion.cif (tty_hung_up_p(filp) || ((portp->flags & ASYNC_INITIALIZED) == 0)) {
portp806drivers/char/stallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp812drivers/char/stallion.cif (((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) &&
portp813drivers/char/stallion.c((portp->flags & ASYNC_CLOSING) == 0) &&
portp814drivers/char/stallion.c((portp->tty->termios->c_cflag & CLOCAL) ||
portp815drivers/char/stallion.c(portp->sigs & TIOCM_CD))) {
portp822drivers/char/stallion.cinterruptible_sleep_on(&portp->open_wait);
portp826drivers/char/stallion.cportp->refcount++;
portp827drivers/char/stallion.cportp->openwaitcnt--;
portp837drivers/char/stallion.cstlport_t  *portp;
portp844drivers/char/stallion.cportp = tty->driver_data;
portp845drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp854drivers/char/stallion.cif (portp->refcount-- > 1) {
portp859drivers/char/stallion.cportp->refcount = 0;
portp860drivers/char/stallion.cportp->flags |= ASYNC_CLOSING;
portp862drivers/char/stallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp863drivers/char/stallion.cportp->normaltermios = *tty->termios;
portp864drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp865drivers/char/stallion.cportp->callouttermios = *tty->termios;
portp873drivers/char/stallion.cif (test_bit(ASYI_TXBUSY, &portp->istate)) {
portp874drivers/char/stallion.cif (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE)
portp875drivers/char/stallion.ctty_wait_until_sent(tty, portp->closing_wait);
portp878drivers/char/stallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp879drivers/char/stallion.cstl_disableintrs(portp);
portp881drivers/char/stallion.cstl_setsignals(portp, 0, 0);
portp882drivers/char/stallion.cstl_enablerxtx(portp, 0, 0);
portp884drivers/char/stallion.cportp->istate = 0;
portp885drivers/char/stallion.cif (portp->tx.buf != (char *) NULL) {
portp886drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp887drivers/char/stallion.cportp->tx.buf = (char *) NULL;
portp888drivers/char/stallion.cportp->tx.head = (char *) NULL;
portp889drivers/char/stallion.cportp->tx.tail = (char *) NULL;
portp897drivers/char/stallion.cportp->tty = (struct tty_struct *) NULL;
portp899drivers/char/stallion.cif (portp->openwaitcnt) {
portp900drivers/char/stallion.cif (portp->close_delay)
portp901drivers/char/stallion.cstl_delay(portp->close_delay);
portp902drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp905drivers/char/stallion.cportp->flags &= ~(ASYNC_CALLOUT_ACTIVE | ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
portp906drivers/char/stallion.cwake_up_interruptible(&portp->close_wait);
portp939drivers/char/stallion.cstlport_t  *portp;
portp951drivers/char/stallion.cportp = tty->driver_data;
portp952drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp954drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp965drivers/char/stallion.chead = portp->tx.head;
portp966drivers/char/stallion.ctail = portp->tx.tail;
portp980drivers/char/stallion.chead = portp->tx.head;
portp981drivers/char/stallion.ctail = portp->tx.tail;
portp984drivers/char/stallion.cstlen = STL_TXBUFSIZE - (head - portp->tx.buf);
portp999drivers/char/stallion.cif (head >= (portp->tx.buf + STL_TXBUFSIZE)) {
portp1000drivers/char/stallion.chead = portp->tx.buf;
portp1004drivers/char/stallion.cportp->tx.head = head;
portp1006drivers/char/stallion.cclear_bit(ASYI_TXLOW, &portp->istate);
portp1007drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp1016drivers/char/stallion.cstlport_t  *portp;
portp1026drivers/char/stallion.cportp = tty->driver_data;
portp1027drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1029drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1032drivers/char/stallion.chead = portp->tx.head;
portp1033drivers/char/stallion.ctail = portp->tx.tail;
portp1040drivers/char/stallion.cif (head >= (portp->tx.buf + STL_TXBUFSIZE))
portp1041drivers/char/stallion.chead = portp->tx.buf;
portp1043drivers/char/stallion.cportp->tx.head = head;
portp1056drivers/char/stallion.cstlport_t  *portp;
portp1064drivers/char/stallion.cportp = tty->driver_data;
portp1065drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1067drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1071drivers/char/stallion.cif (tty->stopped || tty->hw_stopped || (portp->tx.head == portp->tx.tail))
portp1074drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp1081drivers/char/stallion.cstlport_t  *portp;
portp1090drivers/char/stallion.cportp = tty->driver_data;
portp1091drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1093drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1096drivers/char/stallion.chead = portp->tx.head;
portp1097drivers/char/stallion.ctail = portp->tx.tail;
portp1114drivers/char/stallion.cstlport_t  *portp;
portp1124drivers/char/stallion.cportp = tty->driver_data;
portp1125drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1127drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1130drivers/char/stallion.chead = portp->tx.head;
portp1131drivers/char/stallion.ctail = portp->tx.tail;
portp1133drivers/char/stallion.cif ((size == 0) && test_bit(ASYI_TXBUSY, &portp->istate))
portp1144drivers/char/stallion.cstatic void stl_getserial(stlport_t *portp, struct serial_struct *sp)
portp1150drivers/char/stallion.cprintk("stl_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1155drivers/char/stallion.csio.line = portp->portnr;
portp1156drivers/char/stallion.csio.port = portp->ioaddr;
portp1157drivers/char/stallion.csio.flags = portp->flags;
portp1158drivers/char/stallion.csio.baud_base = portp->baud_base;
portp1159drivers/char/stallion.csio.close_delay = portp->close_delay;
portp1160drivers/char/stallion.csio.closing_wait = portp->closing_wait;
portp1161drivers/char/stallion.csio.custom_divisor = portp->custom_divisor;
portp1165drivers/char/stallion.cbrdp = stl_brds[portp->brdnr];
portp1180drivers/char/stallion.cstatic int stl_setserial(stlport_t *portp, struct serial_struct *sp)
portp1185drivers/char/stallion.cprintk("stl_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1190drivers/char/stallion.cif ((sio.baud_base != portp->baud_base) ||
portp1191drivers/char/stallion.c(sio.close_delay != portp->close_delay) ||
portp1192drivers/char/stallion.c((sio.flags & ~ASYNC_USR_MASK) != (portp->flags & ~ASYNC_USR_MASK)))
portp1196drivers/char/stallion.cportp->flags = (portp->flags & ~ASYNC_USR_MASK) | (sio.flags & ASYNC_USR_MASK);
portp1197drivers/char/stallion.cportp->baud_base = sio.baud_base;
portp1198drivers/char/stallion.cportp->close_delay = sio.close_delay;
portp1199drivers/char/stallion.cportp->closing_wait = sio.closing_wait;
portp1200drivers/char/stallion.cportp->custom_divisor = sio.custom_divisor;
portp1201drivers/char/stallion.cstl_setport(portp, portp->tty->termios);
portp1209drivers/char/stallion.cstlport_t  *portp;
portp1219drivers/char/stallion.cportp = tty->driver_data;
portp1220drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1230drivers/char/stallion.cstl_sendbreak(portp, 250);
portp1236drivers/char/stallion.cstl_sendbreak(portp, (arg ? (arg * 100) : 250));
portp1251drivers/char/stallion.cval = (unsigned long) stl_getsignals(portp);
portp1258drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 1 : -1), ((arg & TIOCM_RTS) ? 1 : -1));
portp1264drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 0 : -1), ((arg & TIOCM_RTS) ? 0 : -1));
portp1270drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 1 : 0), ((arg & TIOCM_RTS) ? 1 : 0));
portp1275drivers/char/stallion.cstl_getserial(portp, (struct serial_struct *) arg);
portp1279drivers/char/stallion.crc = stl_setserial(portp, (struct serial_struct *) arg);
portp1283drivers/char/stallion.crc = stl_getportstats(portp, (comstats_t *) arg);
portp1287drivers/char/stallion.crc = stl_clrportstats(portp, (comstats_t *) arg);
portp1308drivers/char/stallion.cstlport_t  *portp;
portp1317drivers/char/stallion.cportp = tty->driver_data;
portp1318drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1325drivers/char/stallion.cstl_setport(portp, tiosp);
portp1326drivers/char/stallion.cstl_setsignals(portp, ((tiosp->c_cflag & (CBAUD & ~CBAUDEX)) ? 1 : 0), -1);
portp1332drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1344drivers/char/stallion.cstlport_t  *portp;
portp1353drivers/char/stallion.cportp = tty->driver_data;
portp1354drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1359drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1360drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1362drivers/char/stallion.cstl_ccrwait(portp);
portp1363drivers/char/stallion.cstl_setreg(portp, CCR, CCR_SENDSCHR2);
portp1364drivers/char/stallion.cportp->stats.rxxoff++;
portp1365drivers/char/stallion.cstl_ccrwait(portp);
portp1368drivers/char/stallion.cstl_setreg(portp, MCOR1, (stl_getreg(portp, MCOR1) & 0xf0));
portp1369drivers/char/stallion.cstl_setreg(portp, MSVR2, 0);
portp1370drivers/char/stallion.cportp->stats.rxrtsoff++;
portp1372drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1384drivers/char/stallion.cstlport_t  *portp;
portp1393drivers/char/stallion.cportp = tty->driver_data;
portp1394drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1399drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1400drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1402drivers/char/stallion.cstl_ccrwait(portp);
portp1403drivers/char/stallion.cstl_setreg(portp, CCR, CCR_SENDSCHR1);
portp1404drivers/char/stallion.cportp->stats.rxxon++;
portp1405drivers/char/stallion.cstl_ccrwait(portp);
portp1414drivers/char/stallion.cstl_setreg(portp, MCOR1, (stl_getreg(portp, MCOR1) | FIFO_RTSTHRESHOLD));
portp1415drivers/char/stallion.cstl_setreg(portp, MSVR2, MSVR2_RTS);
portp1416drivers/char/stallion.cportp->stats.rxrtson++;
portp1418drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1431drivers/char/stallion.cstlport_t  *portp;
portp1439drivers/char/stallion.cportp = tty->driver_data;
portp1440drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1443drivers/char/stallion.cstl_startrxtx(portp, -1, 0);
portp1454drivers/char/stallion.cstlport_t  *portp;
portp1462drivers/char/stallion.cportp = tty->driver_data;
portp1463drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1466drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp1479drivers/char/stallion.cstlport_t  *portp;
portp1487drivers/char/stallion.cportp = tty->driver_data;
portp1488drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1491drivers/char/stallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp1492drivers/char/stallion.cstl_disableintrs(portp);
portp1494drivers/char/stallion.cstl_setsignals(portp, 0, 0);
portp1495drivers/char/stallion.cstl_enablerxtx(portp, 0, 0);
portp1497drivers/char/stallion.cportp->istate = 0;
portp1499drivers/char/stallion.cif (portp->tx.buf != (char *) NULL) {
portp1500drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp1501drivers/char/stallion.cportp->tx.buf = (char *) NULL;
portp1502drivers/char/stallion.cportp->tx.head = (char *) NULL;
portp1503drivers/char/stallion.cportp->tx.tail = (char *) NULL;
portp1506drivers/char/stallion.cportp->tty = (struct tty_struct *) NULL;
portp1507drivers/char/stallion.cportp->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
portp1508drivers/char/stallion.cportp->refcount = 0;
portp1509drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1516drivers/char/stallion.cstlport_t  *portp;
portp1525drivers/char/stallion.cportp = tty->driver_data;
portp1526drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1531drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1532drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1533drivers/char/stallion.cstl_ccrwait(portp);
portp1534drivers/char/stallion.cstl_setreg(portp, CCR, CCR_TXFLUSHFIFO);
portp1535drivers/char/stallion.cstl_ccrwait(portp);
portp1536drivers/char/stallion.cportp->tx.tail = portp->tx.head;
portp1537drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1553drivers/char/stallion.cstatic int stl_getreg(stlport_t *portp, int regnr)
portp1555drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1556drivers/char/stallion.creturn(inb(portp->ioaddr + EREG_DATA));
portp1559drivers/char/stallion.cstatic void stl_setreg(stlport_t *portp, int regnr, int value)
portp1561drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1562drivers/char/stallion.coutb(value, portp->ioaddr + EREG_DATA);
portp1565drivers/char/stallion.cstatic int stl_updatereg(stlport_t *portp, int regnr, int value)
portp1567drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1568drivers/char/stallion.cif (inb(portp->ioaddr + EREG_DATA) != value) {
portp1569drivers/char/stallion.coutb(value, portp->ioaddr + EREG_DATA);
portp1591drivers/char/stallion.cstlport_t  *portp;
portp1605drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1612drivers/char/stallion.cif (portp->brklen != 0) {
portp1613drivers/char/stallion.cif (portp->brklen > 0) {
portp1614drivers/char/stallion.coutb((TDR + portp->uartaddr), ioaddr);
portp1619drivers/char/stallion.coutb(portp->brklen, (ioaddr + EREG_DATA));
portp1622drivers/char/stallion.cportp->brklen = -1;
portp1625drivers/char/stallion.coutb((COR2 + portp->uartaddr), ioaddr);
portp1627drivers/char/stallion.cportp->brklen = 0;
portp1631drivers/char/stallion.chead = portp->tx.head;
portp1632drivers/char/stallion.ctail = portp->tx.tail;
portp1634drivers/char/stallion.cif ((len == 0) || ((len < STL_TXBUFLOW) && (test_bit(ASYI_TXLOW, &portp->istate) == 0))) {
portp1635drivers/char/stallion.cset_bit(ASYI_TXLOW, &portp->istate);
portp1636drivers/char/stallion.cqueue_task_irq_off(&portp->tqueue, &tq_scheduler);
portp1640drivers/char/stallion.coutb((SRER + portp->uartaddr), ioaddr);
portp1646drivers/char/stallion.cclear_bit(ASYI_TXBUSY, &portp->istate);
portp1651drivers/char/stallion.cportp->stats.txtotal += len;
portp1652drivers/char/stallion.cstlen = MIN(len, ((portp->tx.buf + STL_TXBUFSIZE) - tail));
portp1653drivers/char/stallion.coutb((TDR + portp->uartaddr), ioaddr);
portp1657drivers/char/stallion.cif (tail >= (portp->tx.buf + STL_TXBUFSIZE))
portp1658drivers/char/stallion.ctail = portp->tx.buf;
portp1663drivers/char/stallion.cportp->tx.tail = tail;
portp1667drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1685drivers/char/stallion.cstlport_t    *portp;
portp1701drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1702drivers/char/stallion.ctty = portp->tty;
portp1705drivers/char/stallion.coutb((RDCR + portp->uartaddr), ioaddr);
portp1709drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1711drivers/char/stallion.cportp->stats.rxlost += len;
portp1712drivers/char/stallion.cportp->stats.rxtotal += len;
portp1716drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1723drivers/char/stallion.cportp->stats.rxtotal += len;
portp1727drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1731drivers/char/stallion.cportp->stats.rxparity++;
portp1733drivers/char/stallion.cportp->stats.rxframing++;
portp1735drivers/char/stallion.cportp->stats.rxoverrun++;
portp1737drivers/char/stallion.cportp->stats.rxbreaks++;
portp1740drivers/char/stallion.cportp->stats.txxon++;
portp1742drivers/char/stallion.cportp->stats.txxoff++;
portp1745drivers/char/stallion.cif ((tty != (struct tty_struct *) NULL) && ((portp->rxignoremsk & status) == 0)) {
portp1746drivers/char/stallion.cif (portp->rxmarkmsk & status) {
portp1750drivers/char/stallion.cif (portp->flags & ASYNC_SAK)
portp1780drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1794drivers/char/stallion.cstlport_t  *portp;
portp1807drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1809drivers/char/stallion.coutb((MISR + portp->uartaddr), ioaddr);
portp1812drivers/char/stallion.cset_bit(ASYI_DCDCHANGE, &portp->istate);
portp1813drivers/char/stallion.cqueue_task_irq_off(&portp->tqueue, &tq_scheduler);
portp1814drivers/char/stallion.cportp->stats.modem++;
portp1817drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1971drivers/char/stallion.cstlport_t    *portp;
portp1975drivers/char/stallion.cportp = private;
portp1977drivers/char/stallion.cprintk("stl_offintr(portp=%x)\n", (int) portp);
portp1980drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1982drivers/char/stallion.ctty = portp->tty;
portp1986drivers/char/stallion.cif (test_bit(ASYI_TXLOW, &portp->istate)) {
portp1991drivers/char/stallion.cif (test_bit(ASYI_DCDCHANGE, &portp->istate)) {
portp1992drivers/char/stallion.cclear_bit(ASYI_DCDCHANGE, &portp->istate);
portp1993drivers/char/stallion.coldsigs = portp->sigs;
portp1994drivers/char/stallion.cportp->sigs = stl_getsignals(portp);
portp1995drivers/char/stallion.cif ((portp->sigs & TIOCM_CD) && ((oldsigs & TIOCM_CD) == 0))
portp1996drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1997drivers/char/stallion.cif ((oldsigs & TIOCM_CD) && ((portp->sigs & TIOCM_CD) == 0)) {
portp1998drivers/char/stallion.cif (! ((portp->flags & ASYNC_CALLOUT_ACTIVE) &&
portp1999drivers/char/stallion.c(portp->flags & ASYNC_CALLOUT_NOHUP))) {
portp2013drivers/char/stallion.cstatic void stl_ccrwait(stlport_t *portp)
portp2018drivers/char/stallion.cif (stl_getreg(portp, CCR) == 0) {
portp2023drivers/char/stallion.cprintk("STALLION: cd1400 device not responding, port=%d panel=%d brd=%d\n", portp->portnr, portp->panelnr, portp->brdnr);
portp2033drivers/char/stallion.cstatic void stl_setport(stlport_t *portp, struct termios *tiosp)
portp2058drivers/char/stallion.cbrdp = stl_brds[portp->brdnr];
portp2067drivers/char/stallion.cportp->rxignoremsk = 0;
portp2069drivers/char/stallion.cportp->rxignoremsk |= (ST_PARITY | ST_FRAMING | ST_OVERRUN);
portp2073drivers/char/stallion.cportp->rxignoremsk |= ST_BREAK;
portp2077drivers/char/stallion.cportp->rxmarkmsk = ST_OVERRUN;
portp2079drivers/char/stallion.cportp->rxmarkmsk |= (ST_PARITY | ST_FRAMING);
portp2081drivers/char/stallion.cportp->rxmarkmsk |= ST_BREAK;
portp2141drivers/char/stallion.cif ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
portp2143drivers/char/stallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
portp2145drivers/char/stallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
portp2146drivers/char/stallion.cbaudrate = (portp->baud_base / portp->custom_divisor);
portp2153drivers/char/stallion.cclkdiv = ((portp->clk / stl_cd1400clkdivs[clk]) / baudrate);
portp2193drivers/char/stallion.cprintk("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", portp->portnr, portp->panelnr, portp->brdnr);
portp2202drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2203drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x3));
portp2204drivers/char/stallion.csrer = stl_getreg(portp, SRER);
portp2205drivers/char/stallion.cstl_setreg(portp, SRER, 0);
portp2206drivers/char/stallion.cif (stl_updatereg(portp, COR1, cor1))
portp2208drivers/char/stallion.cif (stl_updatereg(portp, COR2, cor2))
portp2210drivers/char/stallion.cif (stl_updatereg(portp, COR3, cor3))
portp2213drivers/char/stallion.cstl_ccrwait(portp);
portp2214drivers/char/stallion.cstl_setreg(portp, CCR, CCR_CORCHANGE);
portp2216drivers/char/stallion.cstl_setreg(portp, COR4, cor4);
portp2217drivers/char/stallion.cstl_setreg(portp, COR5, cor5);
portp2218drivers/char/stallion.cstl_setreg(portp, MCOR1, mcor1);
portp2219drivers/char/stallion.cstl_setreg(portp, MCOR2, mcor2);
portp2221drivers/char/stallion.cstl_setreg(portp, TCOR, clk);
portp2222drivers/char/stallion.cstl_setreg(portp, TBPR, div);
portp2223drivers/char/stallion.cstl_setreg(portp, RCOR, clk);
portp2224drivers/char/stallion.cstl_setreg(portp, RBPR, div);
portp2226drivers/char/stallion.cstl_setreg(portp, SCHR1, tiosp->c_cc[VSTART]);
portp2227drivers/char/stallion.cstl_setreg(portp, SCHR2, tiosp->c_cc[VSTOP]);
portp2228drivers/char/stallion.cstl_setreg(portp, SCHR3, tiosp->c_cc[VSTART]);
portp2229drivers/char/stallion.cstl_setreg(portp, SCHR4, tiosp->c_cc[VSTOP]);
portp2230drivers/char/stallion.cstl_setreg(portp, RTPR, rtpr);
portp2231drivers/char/stallion.cmcor1 = stl_getreg(portp, MSVR1);
portp2233drivers/char/stallion.cportp->sigs |= TIOCM_CD;
portp2235drivers/char/stallion.cportp->sigs &= ~TIOCM_CD;
portp2236drivers/char/stallion.cstl_setreg(portp, SRER, ((srer & ~sreroff) | sreron));
portp2237drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2247drivers/char/stallion.cstatic void stl_setsignals(stlport_t *portp, int dtr, int rts)
portp2253drivers/char/stallion.cprintk("stl_setsignals(portp=%x,dtr=%d,rts=%d)\n", (int) portp, dtr, rts);
portp2265drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2266drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2268drivers/char/stallion.cstl_setreg(portp, MSVR2, msvr2);
portp2270drivers/char/stallion.cstl_setreg(portp, MSVR1, msvr1);
portp2271drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2281drivers/char/stallion.cstatic int stl_getsignals(stlport_t *portp)
portp2288drivers/char/stallion.cprintk("stl_getsignals(portp=%x)\n", (int) portp);
portp2293drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2294drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2295drivers/char/stallion.cmsvr1 = stl_getreg(portp, MSVR1);
portp2296drivers/char/stallion.cmsvr2 = stl_getreg(portp, MSVR2);
portp2297drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2315drivers/char/stallion.cstatic void stl_enablerxtx(stlport_t *portp, int rx, int tx)
portp2321drivers/char/stallion.cprintk("stl_enablerxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx);
portp2336drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2337drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2338drivers/char/stallion.cstl_ccrwait(portp);
portp2339drivers/char/stallion.cstl_setreg(portp, CCR, ccr);
portp2340drivers/char/stallion.cstl_ccrwait(portp);
portp2341drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2351drivers/char/stallion.cstatic void stl_startrxtx(stlport_t *portp, int rx, int tx)
portp2357drivers/char/stallion.cprintk("stl_startrxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx);
portp2375drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2376drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2377drivers/char/stallion.cstl_setreg(portp, SRER, ((stl_getreg(portp, SRER) & ~sreroff) | sreron));
portp2378drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2380drivers/char/stallion.cset_bit(ASYI_TXBUSY, &portp->istate);
portp2390drivers/char/stallion.cstatic void stl_disableintrs(stlport_t *portp)
portp2395drivers/char/stallion.cprintk("stl_disableintrs(portp=%x)\n", (int) portp);
portp2399drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2400drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2401drivers/char/stallion.cstl_setreg(portp, SRER, 0);
portp2402drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2408drivers/char/stallion.cstatic void stl_sendbreak(stlport_t *portp, long len)
portp2413drivers/char/stallion.cprintk("stl_sendbreak(portp=%x,len=%d)\n", (int) portp, (int) len);
portp2418drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2419drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2420drivers/char/stallion.cstl_setreg(portp, COR2, (stl_getreg(portp, COR2) | COR2_ETC));
portp2421drivers/char/stallion.cstl_setreg(portp, SRER, ((stl_getreg(portp, SRER) & ~SRER_TXDATA) | SRER_TXEMPTY));
portp2422drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2424drivers/char/stallion.cportp->brklen = (len > 255) ? 255 : len;
portp2425drivers/char/stallion.cportp->stats.txbreaks++;
portp2471drivers/char/stallion.cstlport_t  *portp;
portp2530drivers/char/stallion.cportp = (stlport_t *) stl_memalloc(sizeof(stlport_t));
portp2531drivers/char/stallion.cif (portp == (stlport_t *) NULL) {
portp2535drivers/char/stallion.cmemset(portp, 0, sizeof(stlport_t));
portp2536drivers/char/stallion.cportp->portnr = i;
portp2537drivers/char/stallion.cportp->brdnr = panelp->brdnr;
portp2538drivers/char/stallion.cportp->panelnr = panelp->panelnr;
portp2539drivers/char/stallion.cportp->ioaddr = ioaddr;
portp2540drivers/char/stallion.cportp->uartaddr = (i & 0x04) << 5;
portp2541drivers/char/stallion.cportp->pagenr = panelp->pagenr + (i >> 3);
portp2542drivers/char/stallion.cportp->clk = brdp->clk;
portp2543drivers/char/stallion.cportp->baud_base = STL_BAUDBASE;
portp2544drivers/char/stallion.cportp->close_delay = STL_CLOSEDELAY;
portp2545drivers/char/stallion.cportp->closing_wait = 30 * HZ;
portp2546drivers/char/stallion.cportp->normaltermios = stl_deftermios;
portp2547drivers/char/stallion.cportp->callouttermios = stl_deftermios;
portp2548drivers/char/stallion.cportp->tqueue.routine = stl_offintr;
portp2549drivers/char/stallion.cportp->tqueue.data = portp;
portp2550drivers/char/stallion.cportp->stats.brd = portp->brdnr;
portp2551drivers/char/stallion.cportp->stats.panel = portp->panelnr;
portp2552drivers/char/stallion.cportp->stats.port = portp->portnr;
portp2553drivers/char/stallion.cstl_setreg(portp, CAR, (i & 0x03));
portp2554drivers/char/stallion.cstl_setreg(portp, LIVR, (i << 3));
portp2555drivers/char/stallion.cportp->hwid = stl_getreg(portp, GFRCR);
portp2556drivers/char/stallion.cpanelp->ports[i] = portp;
portp3020drivers/char/stallion.cstatic int stl_getportstats(stlport_t *portp, comstats_t *cp)
portp3024drivers/char/stallion.cif (portp == (stlport_t *) NULL) {
portp3026drivers/char/stallion.cportp = stl_getport(stl_comstats.brd, stl_comstats.panel, stl_comstats.port);
portp3027drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp3031drivers/char/stallion.cportp->stats.state = portp->istate;
portp3032drivers/char/stallion.cportp->stats.flags = portp->flags;
portp3033drivers/char/stallion.cportp->stats.hwid = portp->hwid;
portp3034drivers/char/stallion.cif (portp->tty != (struct tty_struct *) NULL) {
portp3035drivers/char/stallion.cportp->stats.ttystate = portp->tty->flags;
portp3036drivers/char/stallion.cportp->stats.cflags = portp->tty->termios->c_cflag;
portp3037drivers/char/stallion.cportp->stats.iflags = portp->tty->termios->c_iflag;
portp3038drivers/char/stallion.cportp->stats.oflags = portp->tty->termios->c_oflag;
portp3039drivers/char/stallion.cportp->stats.lflags = portp->tty->termios->c_lflag;
portp3040drivers/char/stallion.cportp->stats.rxbuffered = portp->tty->flip.count;
portp3042drivers/char/stallion.cportp->stats.ttystate = 0;
portp3043drivers/char/stallion.cportp->stats.cflags = 0;
portp3044drivers/char/stallion.cportp->stats.iflags = 0;
portp3045drivers/char/stallion.cportp->stats.oflags = 0;
portp3046drivers/char/stallion.cportp->stats.lflags = 0;
portp3047drivers/char/stallion.cportp->stats.rxbuffered = 0;
portp3050drivers/char/stallion.chead = portp->tx.head;
portp3051drivers/char/stallion.ctail = portp->tx.tail;
portp3052drivers/char/stallion.cportp->stats.txbuffered = ((head >= tail) ? (head - tail) : (STL_TXBUFSIZE - (tail - head)));
portp3054drivers/char/stallion.cportp->stats.signals = (unsigned long) stl_getsignals(portp);
portp3056drivers/char/stallion.cmemcpy_tofs(cp, &portp->stats, sizeof(comstats_t));
portp3066drivers/char/stallion.cstatic int stl_clrportstats(stlport_t *portp, comstats_t *cp)
portp3068drivers/char/stallion.cif (portp == (stlport_t *) NULL) {
portp3070drivers/char/stallion.cportp = stl_getport(stl_comstats.brd, stl_comstats.panel, stl_comstats.port);
portp3071drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp3075drivers/char/stallion.cmemset(&portp->stats, 0, sizeof(comstats_t));
portp3076drivers/char/stallion.cportp->stats.brd = portp->brdnr;
portp3077drivers/char/stallion.cportp->stats.panel = portp->panelnr;
portp3078drivers/char/stallion.cportp->stats.port = portp->portnr;
portp3079drivers/char/stallion.cmemcpy_tofs(cp, &portp->stats, sizeof(comstats_t));