taglinefilesource code
portp648drivers/char/istallion.cstatic int  stli_initopen(stlibrd_t *brdp, stliport_t *portp);
portp649drivers/char/istallion.cstatic int  stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait);
portp650drivers/char/istallion.cstatic int  stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait);
portp651drivers/char/istallion.cstatic int  stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp);
portp654drivers/char/istallion.cstatic int  stli_setport(stliport_t *portp);
portp655drivers/char/istallion.cstatic int  stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
portp656drivers/char/istallion.cstatic void  stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
portp657drivers/char/istallion.cstatic void  stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp);
portp658drivers/char/istallion.cstatic void  stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp);
portp661drivers/char/istallion.cstatic void  stli_read(stlibrd_t *brdp, stliport_t *portp);
portp662drivers/char/istallion.cstatic void  stli_getserial(stliport_t *portp, struct serial_struct *sp);
portp663drivers/char/istallion.cstatic int  stli_setserial(stliport_t *portp, struct serial_struct *sp);
portp772drivers/char/istallion.cstliport_t  *portp;
portp814drivers/char/istallion.cportp = brdp->ports[j];
portp815drivers/char/istallion.cif (portp != (stliport_t *) NULL) {
portp816drivers/char/istallion.cif (portp->tty != (struct tty_struct *) NULL)
portp817drivers/char/istallion.ctty_hangup(portp->tty);
portp818drivers/char/istallion.ckfree_s(portp, sizeof(stliport_t));
portp855drivers/char/istallion.cstliport_t  *portp;
portp876drivers/char/istallion.cportp = brdp->ports[portnr];
portp877drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp879drivers/char/istallion.cif (portp->devnr < 1)
portp888drivers/char/istallion.cif (portp->flags & ASYNC_CLOSING) {
portp889drivers/char/istallion.cinterruptible_sleep_on(&portp->close_wait);
portp890drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp901drivers/char/istallion.cportp->tty = tty;
portp902drivers/char/istallion.ctty->driver_data = portp;
portp903drivers/char/istallion.cportp->refcount++;
portp905drivers/char/istallion.cwhile (test_bit(ST_INITIALIZING, &portp->state)) {
portp908drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp911drivers/char/istallion.cif ((portp->flags & ASYNC_INITIALIZED) == 0) {
portp912drivers/char/istallion.cset_bit(ST_INITIALIZING, &portp->state);
portp913drivers/char/istallion.cif ((rc = stli_initopen(brdp, portp)) >= 0) {
portp914drivers/char/istallion.cportp->flags |= ASYNC_INITIALIZED;
portp917drivers/char/istallion.cclear_bit(ST_INITIALIZING, &portp->state);
portp918drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp929drivers/char/istallion.cif (portp->flags & ASYNC_CLOSING) {
portp930drivers/char/istallion.cinterruptible_sleep_on(&portp->close_wait);
portp931drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp942drivers/char/istallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp944drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE) {
portp945drivers/char/istallion.cif ((portp->flags & ASYNC_SESSION_LOCKOUT) &&
portp946drivers/char/istallion.c(portp->session != current->session))
portp948drivers/char/istallion.cif ((portp->flags & ASYNC_PGRP_LOCKOUT) &&
portp949drivers/char/istallion.c(portp->pgrp != current->pgrp))
portp952drivers/char/istallion.cportp->flags |= ASYNC_CALLOUT_ACTIVE;
portp955drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp958drivers/char/istallion.cif ((rc = stli_waitcarrier(brdp, portp, filp)) != 0)
portp961drivers/char/istallion.cportp->flags |= ASYNC_NORMAL_ACTIVE;
portp964drivers/char/istallion.cif ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
portp966drivers/char/istallion.c*tty->termios = portp->normaltermios;
portp968drivers/char/istallion.c*tty->termios = portp->callouttermios;
portp969drivers/char/istallion.cstli_setport(portp);
portp972drivers/char/istallion.cportp->session = current->session;
portp973drivers/char/istallion.cportp->pgrp = current->pgrp;
portp982drivers/char/istallion.cstliport_t  *portp;
portp989drivers/char/istallion.cportp = tty->driver_data;
portp990drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp999drivers/char/istallion.cif (portp->refcount-- > 1) {
portp1004drivers/char/istallion.cportp->flags |= ASYNC_CLOSING;
portp1006drivers/char/istallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp1007drivers/char/istallion.cportp->normaltermios = *tty->termios;
portp1008drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp1009drivers/char/istallion.cportp->callouttermios = *tty->termios;
portp1020drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1021drivers/char/istallion.cif (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE)
portp1022drivers/char/istallion.ctty_wait_until_sent(tty, portp->closing_wait);
portp1025drivers/char/istallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp1026drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1027drivers/char/istallion.cstli_rawclose(brdp, portp, 0, 0);
portp1029drivers/char/istallion.cstli_mkasysigs(&portp->asig, 0, 0);
portp1030drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state))
portp1031drivers/char/istallion.cset_bit(ST_DOSIGS, &portp->state);
portp1033drivers/char/istallion.cstli_sendcmd(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1035drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp1036drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp1040drivers/char/istallion.cset_bit(ST_DOFLUSHRX, &portp->state);
portp1045drivers/char/istallion.cportp->tty = (struct tty_struct *) NULL;
portp1047drivers/char/istallion.cif (portp->openwaitcnt) {
portp1048drivers/char/istallion.cif (portp->close_delay)
portp1049drivers/char/istallion.cstli_delay(portp->close_delay);
portp1050drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp1053drivers/char/istallion.cportp->flags &= ~(ASYNC_CALLOUT_ACTIVE | ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
portp1054drivers/char/istallion.cwake_up_interruptible(&portp->close_wait);
portp1068drivers/char/istallion.cstatic int stli_initopen(stlibrd_t *brdp, stliport_t *portp)
portp1076drivers/char/istallion.cprintk("stli_initopen(brdp=%x,portp=%x)\n", (int) brdp, (int) portp);
portp1079drivers/char/istallion.cif ((rc = stli_rawopen(brdp, portp, 0, 1)) < 0)
portp1085drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETNOTIFY, &nt, sizeof(asynotify_t), 0)) < 0)
portp1088drivers/char/istallion.ctty = portp->tty;
portp1091drivers/char/istallion.cstli_mkasyport(portp, &aport, tty->termios);
portp1092drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0)) < 0)
portp1095drivers/char/istallion.cset_bit(ST_GETSIGS, &portp->state);
portp1096drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0)
portp1098drivers/char/istallion.cif (clear_bit(ST_GETSIGS, &portp->state))
portp1099drivers/char/istallion.cportp->sigs = stli_mktiocm(portp->asig.sigvalue);
portp1100drivers/char/istallion.cstli_mkasysigs(&portp->asig, 1, 1);
portp1101drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0)
portp1116drivers/char/istallion.cstatic int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait)
portp1125drivers/char/istallion.cprintk("stli_rawopen(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait);
portp1140drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1145drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1154drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp1158drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1159drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1160drivers/char/istallion.c*bits |= portp->portbit;
portp1173drivers/char/istallion.cset_bit(ST_OPENING, &portp->state);
portp1174drivers/char/istallion.cwhile (test_bit(ST_OPENING, &portp->state)) {
portp1179drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1183drivers/char/istallion.cif ((rc == 0) && (portp->rc != 0))
portp1196drivers/char/istallion.cstatic int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait)
portp1205drivers/char/istallion.cprintk("stli_rawclose(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait);
portp1216drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1221drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1229drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp1233drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1234drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1235drivers/char/istallion.c*bits |= portp->portbit;
portp1238drivers/char/istallion.cset_bit(ST_CLOSING, &portp->state);
portp1249drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1254drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1258drivers/char/istallion.cif ((rc == 0) && (portp->rc != 0))
portp1272drivers/char/istallion.cstatic int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback)
portp1277drivers/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);
portp1282drivers/char/istallion.cwhile (test_bit(ST_CMDING, &portp->state)) {
portp1287drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1290drivers/char/istallion.cstli_sendcmd(brdp, portp, cmd, arg, size, copyback);
portp1292drivers/char/istallion.cwhile (test_bit(ST_CMDING, &portp->state)) {
portp1297drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1301drivers/char/istallion.cif (portp->rc != 0)
portp1313drivers/char/istallion.cstatic int stli_setport(stliport_t *portp)
portp1319drivers/char/istallion.cprintk("stli_setport(portp=%x)\n", (int) portp);
portp1322drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1324drivers/char/istallion.cif (portp->tty == (struct tty_struct *) NULL)
portp1326drivers/char/istallion.cif ((portp->brdnr < 0) && (portp->brdnr >= stli_nrbrds))
portp1328drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1332drivers/char/istallion.cstli_mkasyport(portp, &aport, portp->tty->termios);
portp1333drivers/char/istallion.creturn(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0));
portp1363drivers/char/istallion.cstatic int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp)
portp1369drivers/char/istallion.cprintk("stli_waitcarrier(brdp=%x,portp=%x,filp=%x)\n", (int) brdp, (int) portp, (int) filp);
portp1376drivers/char/istallion.cportp->openwaitcnt++;
portp1377drivers/char/istallion.cif (portp->refcount > 0)
portp1378drivers/char/istallion.cportp->refcount--;
portp1381drivers/char/istallion.cif ((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) {
portp1382drivers/char/istallion.cstli_mkasysigs(&portp->asig, 1, 1);
portp1383drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0)
portp1386drivers/char/istallion.cif (tty_hung_up_p(filp) || ((portp->flags & ASYNC_INITIALIZED) == 0)) {
portp1387drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp1393drivers/char/istallion.cif (((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) &&
portp1394drivers/char/istallion.c((portp->flags & ASYNC_CLOSING) == 0) &&
portp1395drivers/char/istallion.c((portp->tty->termios->c_cflag & CLOCAL) ||
portp1396drivers/char/istallion.c(portp->sigs & TIOCM_CD))) {
portp1403drivers/char/istallion.cinterruptible_sleep_on(&portp->open_wait);
portp1407drivers/char/istallion.cportp->refcount++;
portp1408drivers/char/istallion.cportp->openwaitcnt--;
portp1428drivers/char/istallion.cstliport_t    *portp;
portp1441drivers/char/istallion.cportp = tty->driver_data;
portp1442drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1444drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1446drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1466drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1471drivers/char/istallion.clen = (head >= tail) ? (portp->txsize - (head - tail) - 1) : (tail - head - 1);
portp1488drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1493drivers/char/istallion.csize = portp->txsize;
portp1504drivers/char/istallion.cshbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset);
portp1519drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1521drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1526drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1527drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1528drivers/char/istallion.c*bits |= portp->portbit;
portp1529drivers/char/istallion.cset_bit(ST_TXBUSY, &portp->state);
portp1580drivers/char/istallion.cstliport_t    *portp;
portp1605drivers/char/istallion.cportp = tty->driver_data;
portp1606drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1608drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1610drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1618drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1623drivers/char/istallion.csize = portp->txsize;
portp1634drivers/char/istallion.cshbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset);
portp1650drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1653drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1658drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1659drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1660drivers/char/istallion.c*bits |= portp->portbit;
portp1661drivers/char/istallion.cset_bit(ST_TXBUSY, &portp->state);
portp1672drivers/char/istallion.cstliport_t    *portp;
portp1690drivers/char/istallion.cportp = tty->driver_data;
portp1691drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1693drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1695drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1702drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq;
portp1707drivers/char/istallion.clen = (head >= tail) ? (portp->txsize - (head - tail)) : (tail - head);
portp1732drivers/char/istallion.cstliport_t    *portp;
portp1745drivers/char/istallion.cportp = tty->driver_data;
portp1746drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1748drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1750drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1757drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq;
portp1762drivers/char/istallion.clen = (head >= tail) ? (head - tail) : (portp->txsize - (tail - head));
portp1763drivers/char/istallion.cif ((len == 0) && test_bit(ST_TXBUSY, &portp->state))
portp1777drivers/char/istallion.cstatic void stli_getserial(stliport_t *portp, struct serial_struct *sp)
portp1783drivers/char/istallion.cprintk("stli_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1788drivers/char/istallion.csio.line = portp->portnr;
portp1790drivers/char/istallion.csio.flags = portp->flags;
portp1791drivers/char/istallion.csio.baud_base = portp->baud_base;
portp1792drivers/char/istallion.csio.close_delay = portp->close_delay;
portp1793drivers/char/istallion.csio.closing_wait = portp->closing_wait;
portp1794drivers/char/istallion.csio.custom_divisor = portp->custom_divisor;
portp1798drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1813drivers/char/istallion.cstatic int stli_setserial(stliport_t *portp, struct serial_struct *sp)
portp1819drivers/char/istallion.cprintk("stli_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1824drivers/char/istallion.cif ((sio.baud_base != portp->baud_base) ||
portp1825drivers/char/istallion.c(sio.close_delay != portp->close_delay) ||
portp1826drivers/char/istallion.c((sio.flags & ~ASYNC_USR_MASK) != (portp->flags & ~ASYNC_USR_MASK)))
portp1830drivers/char/istallion.cportp->flags = (portp->flags & ~ASYNC_USR_MASK) | (sio.flags & ASYNC_USR_MASK);
portp1831drivers/char/istallion.cportp->baud_base = sio.baud_base;
portp1832drivers/char/istallion.cportp->close_delay = sio.close_delay;
portp1833drivers/char/istallion.cportp->closing_wait = sio.closing_wait;
portp1834drivers/char/istallion.cportp->custom_divisor = sio.custom_divisor;
portp1836drivers/char/istallion.cif ((rc = stli_setport(portp)) < 0)
portp1845drivers/char/istallion.cstliport_t  *portp;
portp1856drivers/char/istallion.cportp = tty->driver_data;
portp1857drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1859drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1861drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1873drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0);
portp1881drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0);
portp1896drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0)
portp1898drivers/char/istallion.cval = stli_mktiocm(portp->asig.sigvalue);
portp1905drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 1 : -1), ((arg & TIOCM_RTS) ? 1 : -1));
portp1906drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1912drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 0 : -1), ((arg & TIOCM_RTS) ? 0 : -1));
portp1913drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1919drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 1 : 0), ((arg & TIOCM_RTS) ? 1 : 0));
portp1920drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1925drivers/char/istallion.cstli_getserial(portp, (struct serial_struct *) arg);
portp1929drivers/char/istallion.crc = stli_setserial(portp, (struct serial_struct *) arg);
portp1933drivers/char/istallion.cput_fs_long(portp->pflag, (unsigned long *) arg);
portp1937drivers/char/istallion.cportp->pflag = get_fs_long((unsigned long *) arg);
portp1938drivers/char/istallion.cstli_setport(portp);
portp1965drivers/char/istallion.cstliport_t  *portp;
portp1976drivers/char/istallion.cportp = tty->driver_data;
portp1977drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1979drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1981drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp1989drivers/char/istallion.cstli_mkasyport(portp, &aport, tiosp);
portp1990drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0);
portp1991drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((tiosp->c_cflag & CBAUD) ? 1 : 0), -1);
portp1992drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1996drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2013drivers/char/istallion.cstliport_t  *portp;
portp2021drivers/char/istallion.cportp = tty->driver_data;
portp2022drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2025drivers/char/istallion.cset_bit(ST_RXSTOP, &portp->state);
portp2038drivers/char/istallion.cstliport_t  *portp;
portp2046drivers/char/istallion.cportp = tty->driver_data;
portp2047drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2050drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp2063drivers/char/istallion.cstliport_t  *portp;
portp2072drivers/char/istallion.cportp = tty->driver_data;
portp2073drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2075drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2077drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp2084drivers/char/istallion.cstli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t));
portp2096drivers/char/istallion.cstliport_t  *portp;
portp2106drivers/char/istallion.cportp = tty->driver_data;
portp2107drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2109drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2111drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp2118drivers/char/istallion.cstli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t));
portp2135drivers/char/istallion.cstliport_t  *portp;
portp2141drivers/char/istallion.cportp = (stliport_t *) arg;
portp2142drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2144drivers/char/istallion.cif (portp->tty == (struct tty_struct *) NULL)
portp2146drivers/char/istallion.ctty_hangup(portp->tty);
portp2160drivers/char/istallion.cstliport_t  *portp;
portp2170drivers/char/istallion.cportp = tty->driver_data;
portp2171drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2173drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2175drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp2179drivers/char/istallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp2183drivers/char/istallion.cif (! test_bit(ST_CLOSING, &portp->state))
portp2184drivers/char/istallion.cstli_rawclose(brdp, portp, 0, 0);
portp2186drivers/char/istallion.cstli_mkasysigs(&portp->asig, 0, 0);
portp2187drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2188drivers/char/istallion.cset_bit(ST_DOSIGS, &portp->state);
portp2189drivers/char/istallion.cset_bit(ST_DOFLUSHTX, &portp->state);
portp2190drivers/char/istallion.cset_bit(ST_DOFLUSHRX, &portp->state);
portp2192drivers/char/istallion.cstli_sendcmd(brdp, portp, A_SETSIGNALSF, &portp->asig, sizeof(asysigs_t), 0);
portp2197drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp2198drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp2201drivers/char/istallion.cportp->tty = (struct tty_struct *) NULL;
portp2202drivers/char/istallion.cportp->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
portp2203drivers/char/istallion.cportp->refcount = 0;
portp2204drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2218drivers/char/istallion.cstliport_t  *portp;
portp2228drivers/char/istallion.cportp = tty->driver_data;
portp2229drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2231drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2233drivers/char/istallion.cbrdp = stli_brds[portp->brdnr];
portp2244drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2245drivers/char/istallion.cset_bit(ST_DOFLUSHTX, &portp->state);
portp2248drivers/char/istallion.cif (test_bit(ST_DOFLUSHRX, &portp->state)) {
portp2250drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2252drivers/char/istallion.cstli_sendcmd(brdp, portp, A_FLUSH, &ftype, sizeof(unsigned long), 0);
portp2273drivers/char/istallion.cstatic void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback)
portp2281drivers/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);
portp2287drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2294drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp2298drivers/char/istallion.cportp->argp = arg;
portp2299drivers/char/istallion.cportp->argsize = size;
portp2305drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp2306drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp2307drivers/char/istallion.c*bits |= portp->portbit;
portp2308drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2323drivers/char/istallion.cstatic inline void stli_read(stlibrd_t *brdp, stliport_t *portp)
portp2332drivers/char/istallion.cprintk("stli_read(brdp=%x,portp=%d)\n", (int) brdp, (int) portp);
portp2335drivers/char/istallion.cif (test_bit(ST_RXSTOP, &portp->state))
portp2337drivers/char/istallion.ctty = portp->tty;
portp2341drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq;
portp2346drivers/char/istallion.csize = portp->rxsize;
portp2356drivers/char/istallion.cshbuf = (volatile char *) EBRDGETMEMPTR(brdp, portp->rxoffset);
portp2373drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq;
portp2377drivers/char/istallion.cset_bit(ST_RXING, &portp->state);
portp2390drivers/char/istallion.cstatic inline void stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp)
portp2394drivers/char/istallion.cif (test_bit(ST_DOSIGS, &portp->state)) {
portp2395drivers/char/istallion.cif (test_bit(ST_DOFLUSHTX, &portp->state) && test_bit(ST_DOFLUSHRX, &portp->state))
portp2397drivers/char/istallion.celse if (test_bit(ST_DOFLUSHTX, &portp->state))
portp2399drivers/char/istallion.celse if (test_bit(ST_DOFLUSHRX, &portp->state))
portp2403drivers/char/istallion.cclear_bit(ST_DOFLUSHTX, &portp->state);
portp2404drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2405drivers/char/istallion.cclear_bit(ST_DOSIGS, &portp->state);
portp2406drivers/char/istallion.cmemcpy((void *) &(cp->args[0]), (void *) &portp->asig, sizeof(asysigs_t));
portp2409drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2410drivers/char/istallion.c} else if (test_bit(ST_DOFLUSHTX, &portp->state) || test_bit(ST_DOFLUSHRX, &portp->state)) {
portp2411drivers/char/istallion.ccmd = ((test_bit(ST_DOFLUSHTX, &portp->state)) ? FLUSHTX : 0);
portp2412drivers/char/istallion.ccmd |= ((test_bit(ST_DOFLUSHRX, &portp->state)) ? FLUSHRX : 0);
portp2413drivers/char/istallion.cclear_bit(ST_DOFLUSHTX, &portp->state);
portp2414drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2418drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2438drivers/char/istallion.cstliport_t    *portp;
portp2446drivers/char/istallion.cportp = brdp->ports[(channr - 1)];
portp2447drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp2453drivers/char/istallion.cif (test_bit(ST_OPENING, &portp->state)) {
portp2459drivers/char/istallion.cportp->rc = rc;
portp2460drivers/char/istallion.cclear_bit(ST_OPENING, &portp->state);
portp2461drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2468drivers/char/istallion.cif (test_bit(ST_CLOSING, &portp->state)) {
portp2474drivers/char/istallion.cportp->rc = rc;
portp2475drivers/char/istallion.cclear_bit(ST_CLOSING, &portp->state);
portp2476drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2484drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2489drivers/char/istallion.cif (portp->argp != (void *) NULL) {
portp2490drivers/char/istallion.cmemcpy(portp->argp, (void *) &(cp->args[0]), portp->argsize);
portp2491drivers/char/istallion.cportp->argp = (void *) NULL;
portp2494drivers/char/istallion.cportp->rc = rc;
portp2495drivers/char/istallion.cclear_bit(ST_CMDING, &portp->state);
portp2496drivers/char/istallion.cstli_dodelaycmd(portp, cp);
portp2497drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2511drivers/char/istallion.ctty = portp->tty;
portp2514drivers/char/istallion.coldsigs = portp->sigs;
portp2515drivers/char/istallion.cportp->sigs = stli_mktiocm(nt.sigvalue);
portp2516drivers/char/istallion.cclear_bit(ST_GETSIGS, &portp->state);
portp2517drivers/char/istallion.cif ((portp->sigs & TIOCM_CD) && ((oldsigs & TIOCM_CD) == 0))
portp2518drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2519drivers/char/istallion.cif ((oldsigs & TIOCM_CD) && ((portp->sigs & TIOCM_CD) == 0)) {
portp2520drivers/char/istallion.cif (! ((portp->flags & ASYNC_CALLOUT_ACTIVE) &&
portp2521drivers/char/istallion.c(portp->flags & ASYNC_CALLOUT_NOHUP))) {
portp2523drivers/char/istallion.cqueue_task_irq_off(&portp->tqhangup, &tq_scheduler);
portp2529drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp2538drivers/char/istallion.cif ((nt.data & DT_RXBREAK) && (portp->rxmarkmsk & BRKINT)) {
portp2545drivers/char/istallion.cif (portp->flags & ASYNC_SAK)
portp2555drivers/char/istallion.cstli_read(brdp, portp);
portp2567drivers/char/istallion.cif ((!donerx) && test_bit(ST_RXING, &portp->state)) {
portp2568drivers/char/istallion.cclear_bit(ST_RXING, &portp->state);
portp2569drivers/char/istallion.cstli_read(brdp, portp);
portp2591drivers/char/istallion.cstliport_t    *portp;
portp2654drivers/char/istallion.cportp = brdp->ports[(channr - 1)];
portp2655drivers/char/istallion.cif (test_bit(ST_OPENING, &portp->state) ||
portp2656drivers/char/istallion.ctest_bit(ST_CLOSING, &portp->state) ||
portp2657drivers/char/istallion.ctest_bit(ST_CMDING, &portp->state) ||
portp2658drivers/char/istallion.ctest_bit(ST_TXBUSY, &portp->state)) {
portp2659drivers/char/istallion.cslavereq |= portp->reqbit;
portp2683drivers/char/istallion.cstatic void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp)
portp2686drivers/char/istallion.cprintk("stli_mkasyport(portp=%x,pp=%x,tiosp=%d)\n", (int) portp, (int) pp, (int) tiosp);
portp2704drivers/char/istallion.cif ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
portp2706drivers/char/istallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
portp2708drivers/char/istallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
portp2709drivers/char/istallion.cpp->baudout = (portp->baud_base / portp->custom_divisor);
portp2771drivers/char/istallion.cportp->rxmarkmsk = 0;
portp2775drivers/char/istallion.cportp->rxmarkmsk |= BRKINT;
portp2780drivers/char/istallion.cpp->pflag = portp->pflag;
portp2841drivers/char/istallion.cstliport_t  *portp;
portp2849drivers/char/istallion.cportp = (stliport_t *) stli_memalloc(sizeof(stliport_t));
portp2850drivers/char/istallion.cif (portp == (stliport_t *) NULL) {
portp2855drivers/char/istallion.cmemset(portp, 0, sizeof(stliport_t));
portp2856drivers/char/istallion.cportp->portnr = i;
portp2857drivers/char/istallion.cportp->brdnr = brdp->brdnr;
portp2858drivers/char/istallion.cportp->panelnr = panelnr;
portp2859drivers/char/istallion.cportp->baud_base = STL_BAUDBASE;
portp2860drivers/char/istallion.cportp->close_delay = STL_CLOSEDELAY;
portp2861drivers/char/istallion.cportp->closing_wait = 30 * HZ;
portp2862drivers/char/istallion.cportp->tqhangup.routine = stli_dohangup;
portp2863drivers/char/istallion.cportp->tqhangup.data = portp;
portp2864drivers/char/istallion.cportp->normaltermios = stli_deftermios;
portp2865drivers/char/istallion.cportp->callouttermios = stli_deftermios;
portp2871drivers/char/istallion.cbrdp->ports[i] = portp;
portp3715drivers/char/istallion.cstliport_t    *portp;
portp3766drivers/char/istallion.cportp = brdp->ports[portnr];
portp3767drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp3769drivers/char/istallion.cportp->devnr = i;
portp3770drivers/char/istallion.cportp->addr = memp->offset;
portp3771drivers/char/istallion.cportp->reqbit = (unsigned char) (0x1 << (i * 8 / nrdevs));
portp3772drivers/char/istallion.cportp->portidx = (unsigned char) (i / 8);
portp3773drivers/char/istallion.cportp->portbit = (unsigned char) (0x1 << (i % 8));
portp3782drivers/char/istallion.cportp = brdp->ports[portnr];
portp3783drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp3785drivers/char/istallion.cif (portp->addr == 0)
portp3787drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp3789drivers/char/istallion.cportp->rxsize = ap->rxq.size;
portp3790drivers/char/istallion.cportp->txsize = ap->txq.size;
portp3791drivers/char/istallion.cportp->rxoffset = ap->rxq.offset;
portp3792drivers/char/istallion.cportp->txoffset = ap->txq.offset;
portp477drivers/char/stallion.cstatic void  stl_getserial(stlport_t *portp, struct serial_struct *sp);
portp478drivers/char/stallion.cstatic int  stl_setserial(stlport_t *portp, struct serial_struct *sp);
portp479drivers/char/stallion.cstatic void  stl_setreg(stlport_t *portp, int regnr, int value);
portp480drivers/char/stallion.cstatic int  stl_getreg(stlport_t *portp, int regnr);
portp481drivers/char/stallion.cstatic int  stl_updatereg(stlport_t *portp, int regnr, int value);
portp482drivers/char/stallion.cstatic void  stl_setport(stlport_t *portp, struct termios *tiosp);
portp483drivers/char/stallion.cstatic void  stl_getsignals(stlport_t *portp);
portp484drivers/char/stallion.cstatic void  stl_setsignals(stlport_t *portp, int dtr, int rts);
portp485drivers/char/stallion.cstatic void  stl_ccrwait(stlport_t *portp);
portp486drivers/char/stallion.cstatic void  stl_enablerxtx(stlport_t *portp, int rx, int tx);
portp487drivers/char/stallion.cstatic void  stl_startrxtx(stlport_t *portp, int rx, int tx);
portp488drivers/char/stallion.cstatic void  stl_disableintrs(stlport_t *portp);
portp489drivers/char/stallion.cstatic void  stl_sendbreak(stlport_t *portp, long len);
portp490drivers/char/stallion.cstatic int  stl_waitcarrier(stlport_t *portp, struct file *filp);
portp530drivers/char/stallion.cstlport_t  *portp;
portp566drivers/char/stallion.cportp = panelp->ports[k];
portp567drivers/char/stallion.cif (portp != (stlport_t *) NULL) {
portp568drivers/char/stallion.cif (portp->tty != (struct tty_struct *) NULL)
portp569drivers/char/stallion.cstl_hangup(portp->tty);
portp570drivers/char/stallion.cif (portp->tx.buf != (char *) NULL)
portp571drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp572drivers/char/stallion.ckfree_s(portp, sizeof(stlport_t));
portp619drivers/char/stallion.cstlport_t  *portp;
portp648drivers/char/stallion.cportp = brdp->panels[panelnr]->ports[portnr];
portp649drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp656drivers/char/stallion.cportp->tty = tty;
portp657drivers/char/stallion.ctty->driver_data = portp;
portp658drivers/char/stallion.cportp->refcount++;
portp660drivers/char/stallion.cif ((portp->flags & ASYNC_INITIALIZED) == 0) {
portp661drivers/char/stallion.cif (portp->tx.buf == (char *) NULL) {
portp662drivers/char/stallion.cportp->tx.buf = (char *) stl_memalloc(STL_TXBUFSIZE);
portp663drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp665drivers/char/stallion.cportp->tx.head = portp->tx.buf;
portp666drivers/char/stallion.cportp->tx.tail = portp->tx.buf;
portp668drivers/char/stallion.cstl_setport(portp, tty->termios);
portp669drivers/char/stallion.cstl_getsignals(portp);
portp670drivers/char/stallion.cstl_setsignals(portp, 1, 1);
portp671drivers/char/stallion.cstl_enablerxtx(portp, 1, 1);
portp672drivers/char/stallion.cstl_startrxtx(portp, 1, 0);
portp674drivers/char/stallion.cportp->flags |= ASYNC_INITIALIZED;
portp683drivers/char/stallion.cif (portp->flags & ASYNC_CLOSING) {
portp684drivers/char/stallion.cinterruptible_sleep_on(&portp->close_wait);
portp685drivers/char/stallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp696drivers/char/stallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp698drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE) {
portp699drivers/char/stallion.cif ((portp->flags & ASYNC_SESSION_LOCKOUT) &&
portp700drivers/char/stallion.c(portp->session != current->session))
portp702drivers/char/stallion.cif ((portp->flags & ASYNC_PGRP_LOCKOUT) &&
portp703drivers/char/stallion.c(portp->pgrp != current->pgrp))
portp706drivers/char/stallion.cportp->flags |= ASYNC_CALLOUT_ACTIVE;
portp709drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp712drivers/char/stallion.cif ((rc = stl_waitcarrier(portp, filp)) != 0)
portp715drivers/char/stallion.cportp->flags |= ASYNC_NORMAL_ACTIVE;
portp718drivers/char/stallion.cif ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
portp720drivers/char/stallion.c*tty->termios = portp->normaltermios;
portp722drivers/char/stallion.c*tty->termios = portp->callouttermios;
portp723drivers/char/stallion.cstl_setport(portp, tty->termios);
portp726drivers/char/stallion.cportp->session = current->session;
portp727drivers/char/stallion.cportp->pgrp = current->pgrp;
portp738drivers/char/stallion.cstatic int stl_waitcarrier(stlport_t *portp, struct file *filp)
portp744drivers/char/stallion.cprintk("stl_waitcarrier(portp=%x,filp=%x)\n", (int) portp, (int) filp);
portp751drivers/char/stallion.cportp->openwaitcnt++;
portp752drivers/char/stallion.cif (portp->refcount > 0)
portp753drivers/char/stallion.cportp->refcount--;
portp756drivers/char/stallion.cif ((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0)
portp757drivers/char/stallion.cstl_setsignals(portp, 1, 1);
portp758drivers/char/stallion.cif (tty_hung_up_p(filp) || ((portp->flags & ASYNC_INITIALIZED) == 0)) {
portp759drivers/char/stallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp765drivers/char/stallion.cif (((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) &&
portp766drivers/char/stallion.c((portp->flags & ASYNC_CLOSING) == 0) &&
portp767drivers/char/stallion.c((portp->tty->termios->c_cflag & CLOCAL) ||
portp768drivers/char/stallion.c(portp->sigs & TIOCM_CD))) {
portp775drivers/char/stallion.cinterruptible_sleep_on(&portp->open_wait);
portp779drivers/char/stallion.cportp->refcount++;
portp780drivers/char/stallion.cportp->openwaitcnt--;
portp790drivers/char/stallion.cstlport_t  *portp;
portp797drivers/char/stallion.cportp = tty->driver_data;
portp798drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp807drivers/char/stallion.cif (portp->refcount-- > 1) {
portp812drivers/char/stallion.cportp->refcount = 0;
portp813drivers/char/stallion.cportp->flags |= ASYNC_CLOSING;
portp815drivers/char/stallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp816drivers/char/stallion.cportp->normaltermios = *tty->termios;
portp817drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp818drivers/char/stallion.cportp->callouttermios = *tty->termios;
portp826drivers/char/stallion.cif (test_bit(ASYI_TXBUSY, &portp->istate)) {
portp827drivers/char/stallion.cif (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE)
portp828drivers/char/stallion.ctty_wait_until_sent(tty, portp->closing_wait);
portp831drivers/char/stallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp832drivers/char/stallion.cstl_disableintrs(portp);
portp834drivers/char/stallion.cstl_setsignals(portp, 0, 0);
portp835drivers/char/stallion.cstl_enablerxtx(portp, 0, 0);
portp837drivers/char/stallion.cportp->istate = 0;
portp838drivers/char/stallion.cif (portp->tx.buf != (char *) NULL) {
portp839drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp840drivers/char/stallion.cportp->tx.buf = (char *) NULL;
portp841drivers/char/stallion.cportp->tx.head = (char *) NULL;
portp842drivers/char/stallion.cportp->tx.tail = (char *) NULL;
portp850drivers/char/stallion.cportp->tty = (struct tty_struct *) NULL;
portp852drivers/char/stallion.cif (portp->openwaitcnt) {
portp853drivers/char/stallion.cif (portp->close_delay)
portp854drivers/char/stallion.cstl_delay(portp->close_delay);
portp855drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp858drivers/char/stallion.cportp->flags &= ~(ASYNC_CALLOUT_ACTIVE | ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
portp859drivers/char/stallion.cwake_up_interruptible(&portp->close_wait);
portp892drivers/char/stallion.cstlport_t  *portp;
portp904drivers/char/stallion.cportp = tty->driver_data;
portp905drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp907drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp918drivers/char/stallion.chead = portp->tx.head;
portp919drivers/char/stallion.ctail = portp->tx.tail;
portp933drivers/char/stallion.chead = portp->tx.head;
portp934drivers/char/stallion.ctail = portp->tx.tail;
portp937drivers/char/stallion.cstlen = STL_TXBUFSIZE - (head - portp->tx.buf);
portp952drivers/char/stallion.cif (head >= (portp->tx.buf + STL_TXBUFSIZE)) {
portp953drivers/char/stallion.chead = portp->tx.buf;
portp957drivers/char/stallion.cportp->tx.head = head;
portp959drivers/char/stallion.cclear_bit(ASYI_TXLOW, &portp->istate);
portp960drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp969drivers/char/stallion.cstlport_t  *portp;
portp979drivers/char/stallion.cportp = tty->driver_data;
portp980drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp982drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp985drivers/char/stallion.chead = portp->tx.head;
portp986drivers/char/stallion.ctail = portp->tx.tail;
portp993drivers/char/stallion.cif (head >= (portp->tx.buf + STL_TXBUFSIZE))
portp994drivers/char/stallion.chead = portp->tx.buf;
portp996drivers/char/stallion.cportp->tx.head = head;
portp1009drivers/char/stallion.cstlport_t  *portp;
portp1017drivers/char/stallion.cportp = tty->driver_data;
portp1018drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1020drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1024drivers/char/stallion.cif (tty->stopped || tty->hw_stopped || (portp->tx.head == portp->tx.tail))
portp1027drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp1034drivers/char/stallion.cstlport_t  *portp;
portp1043drivers/char/stallion.cportp = tty->driver_data;
portp1044drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1046drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1049drivers/char/stallion.chead = portp->tx.head;
portp1050drivers/char/stallion.ctail = portp->tx.tail;
portp1067drivers/char/stallion.cstlport_t  *portp;
portp1077drivers/char/stallion.cportp = tty->driver_data;
portp1078drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1080drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1083drivers/char/stallion.chead = portp->tx.head;
portp1084drivers/char/stallion.ctail = portp->tx.tail;
portp1086drivers/char/stallion.cif ((size == 0) && test_bit(ASYI_TXBUSY, &portp->istate))
portp1097drivers/char/stallion.cstatic void stl_getserial(stlport_t *portp, struct serial_struct *sp)
portp1103drivers/char/stallion.cprintk("stl_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1108drivers/char/stallion.csio.line = portp->portnr;
portp1109drivers/char/stallion.csio.port = portp->ioaddr;
portp1110drivers/char/stallion.csio.flags = portp->flags;
portp1111drivers/char/stallion.csio.baud_base = portp->baud_base;
portp1112drivers/char/stallion.csio.close_delay = portp->close_delay;
portp1113drivers/char/stallion.csio.closing_wait = portp->closing_wait;
portp1114drivers/char/stallion.csio.custom_divisor = portp->custom_divisor;
portp1118drivers/char/stallion.cbrdp = stl_brds[portp->brdnr];
portp1133drivers/char/stallion.cstatic int stl_setserial(stlport_t *portp, struct serial_struct *sp)
portp1138drivers/char/stallion.cprintk("stl_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1143drivers/char/stallion.cif ((sio.baud_base != portp->baud_base) ||
portp1144drivers/char/stallion.c(sio.close_delay != portp->close_delay) ||
portp1145drivers/char/stallion.c((sio.flags & ~ASYNC_USR_MASK) != (portp->flags & ~ASYNC_USR_MASK)))
portp1149drivers/char/stallion.cportp->flags = (portp->flags & ~ASYNC_USR_MASK) | (sio.flags & ASYNC_USR_MASK);
portp1150drivers/char/stallion.cportp->baud_base = sio.baud_base;
portp1151drivers/char/stallion.cportp->close_delay = sio.close_delay;
portp1152drivers/char/stallion.cportp->closing_wait = sio.closing_wait;
portp1153drivers/char/stallion.cportp->custom_divisor = sio.custom_divisor;
portp1154drivers/char/stallion.cstl_setport(portp, portp->tty->termios);
portp1162drivers/char/stallion.cstlport_t  *portp;
portp1171drivers/char/stallion.cportp = tty->driver_data;
portp1172drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1182drivers/char/stallion.cstl_sendbreak(portp, 250);
portp1188drivers/char/stallion.cstl_sendbreak(portp, (arg ? (arg * 100) : 250));
portp1203drivers/char/stallion.cstl_getsignals(portp);
portp1204drivers/char/stallion.cput_fs_long(portp->sigs, (unsigned long *) arg);
portp1210drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 1 : -1), ((arg & TIOCM_RTS) ? 1 : -1));
portp1216drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 0 : -1), ((arg & TIOCM_RTS) ? 0 : -1));
portp1222drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 1 : 0), ((arg & TIOCM_RTS) ? 1 : 0));
portp1227drivers/char/stallion.cstl_getserial(portp, (struct serial_struct *) arg);
portp1231drivers/char/stallion.crc = stl_setserial(portp, (struct serial_struct *) arg);
portp1252drivers/char/stallion.cstlport_t  *portp;
portp1261drivers/char/stallion.cportp = tty->driver_data;
portp1262drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1269drivers/char/stallion.cstl_setport(portp, tiosp);
portp1270drivers/char/stallion.cstl_setsignals(portp, ((tiosp->c_cflag & (CBAUD & ~CBAUDEX)) ? 1 : 0), -1);
portp1276drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1288drivers/char/stallion.cstlport_t  *portp;
portp1297drivers/char/stallion.cportp = tty->driver_data;
portp1298drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1303drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1304drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1306drivers/char/stallion.cstl_ccrwait(portp);
portp1307drivers/char/stallion.cstl_setreg(portp, CCR, CCR_SENDSCHR2);
portp1308drivers/char/stallion.cstl_ccrwait(portp);
portp1311drivers/char/stallion.cstl_setreg(portp, MCOR1, (stl_getreg(portp, MCOR1) & 0xf0));
portp1312drivers/char/stallion.cstl_setreg(portp, MSVR2, 0);
portp1314drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1326drivers/char/stallion.cstlport_t  *portp;
portp1335drivers/char/stallion.cportp = tty->driver_data;
portp1336drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1341drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1342drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1344drivers/char/stallion.cstl_ccrwait(portp);
portp1345drivers/char/stallion.cstl_setreg(portp, CCR, CCR_SENDSCHR1);
portp1346drivers/char/stallion.cstl_ccrwait(portp);
portp1355drivers/char/stallion.cstl_setreg(portp, MCOR1, (stl_getreg(portp, MCOR1) | FIFO_RTSTHRESHOLD));
portp1356drivers/char/stallion.cstl_setreg(portp, MSVR2, MSVR2_RTS);
portp1358drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1371drivers/char/stallion.cstlport_t  *portp;
portp1379drivers/char/stallion.cportp = tty->driver_data;
portp1380drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1383drivers/char/stallion.cstl_startrxtx(portp, -1, 0);
portp1394drivers/char/stallion.cstlport_t  *portp;
portp1402drivers/char/stallion.cportp = tty->driver_data;
portp1403drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1406drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp1419drivers/char/stallion.cstlport_t  *portp;
portp1427drivers/char/stallion.cportp = tty->driver_data;
portp1428drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1431drivers/char/stallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp1432drivers/char/stallion.cstl_disableintrs(portp);
portp1434drivers/char/stallion.cstl_setsignals(portp, 0, 0);
portp1435drivers/char/stallion.cstl_enablerxtx(portp, 0, 0);
portp1437drivers/char/stallion.cportp->istate = 0;
portp1439drivers/char/stallion.cif (portp->tx.buf != (char *) NULL) {
portp1440drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp1441drivers/char/stallion.cportp->tx.buf = (char *) NULL;
portp1442drivers/char/stallion.cportp->tx.head = (char *) NULL;
portp1443drivers/char/stallion.cportp->tx.tail = (char *) NULL;
portp1446drivers/char/stallion.cportp->tty = (struct tty_struct *) NULL;
portp1447drivers/char/stallion.cportp->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
portp1448drivers/char/stallion.cportp->refcount = 0;
portp1449drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1456drivers/char/stallion.cstlport_t  *portp;
portp1465drivers/char/stallion.cportp = tty->driver_data;
portp1466drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1471drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1472drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1473drivers/char/stallion.cstl_ccrwait(portp);
portp1474drivers/char/stallion.cstl_setreg(portp, CCR, CCR_TXFLUSHFIFO);
portp1475drivers/char/stallion.cstl_ccrwait(portp);
portp1476drivers/char/stallion.cportp->tx.tail = portp->tx.head;
portp1477drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1493drivers/char/stallion.cstatic int stl_getreg(stlport_t *portp, int regnr)
portp1495drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1496drivers/char/stallion.creturn(inb(portp->ioaddr + EREG_DATA));
portp1499drivers/char/stallion.cstatic void stl_setreg(stlport_t *portp, int regnr, int value)
portp1501drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1502drivers/char/stallion.coutb(value, portp->ioaddr + EREG_DATA);
portp1505drivers/char/stallion.cstatic int stl_updatereg(stlport_t *portp, int regnr, int value)
portp1507drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1508drivers/char/stallion.cif (inb(portp->ioaddr + EREG_DATA) != value) {
portp1509drivers/char/stallion.coutb(value, portp->ioaddr + EREG_DATA);
portp1531drivers/char/stallion.cstlport_t  *portp;
portp1545drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1552drivers/char/stallion.cif (portp->brklen != 0) {
portp1553drivers/char/stallion.cif (portp->brklen > 0) {
portp1554drivers/char/stallion.coutb((TDR + portp->uartaddr), ioaddr);
portp1559drivers/char/stallion.coutb(portp->brklen, (ioaddr + EREG_DATA));
portp1562drivers/char/stallion.cportp->brklen = -1;
portp1565drivers/char/stallion.coutb((COR2 + portp->uartaddr), ioaddr);
portp1567drivers/char/stallion.cportp->brklen = 0;
portp1571drivers/char/stallion.chead = portp->tx.head;
portp1572drivers/char/stallion.ctail = portp->tx.tail;
portp1574drivers/char/stallion.cif ((len == 0) || ((len < STL_TXBUFLOW) && (test_bit(ASYI_TXLOW, &portp->istate) == 0))) {
portp1575drivers/char/stallion.cset_bit(ASYI_TXLOW, &portp->istate);
portp1576drivers/char/stallion.cqueue_task_irq_off(&portp->tqueue, &tq_scheduler);
portp1580drivers/char/stallion.coutb((SRER + portp->uartaddr), ioaddr);
portp1586drivers/char/stallion.cclear_bit(ASYI_TXBUSY, &portp->istate);
portp1591drivers/char/stallion.cstlen = MIN(len, ((portp->tx.buf + STL_TXBUFSIZE) - tail));
portp1592drivers/char/stallion.coutb((TDR + portp->uartaddr), ioaddr);
portp1596drivers/char/stallion.cif (tail >= (portp->tx.buf + STL_TXBUFSIZE))
portp1597drivers/char/stallion.ctail = portp->tx.buf;
portp1602drivers/char/stallion.cportp->tx.tail = tail;
portp1606drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1624drivers/char/stallion.cstlport_t    *portp;
portp1640drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1641drivers/char/stallion.ctty = portp->tty;
portp1644drivers/char/stallion.coutb((RDCR + portp->uartaddr), ioaddr);
portp1648drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1653drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1663drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1666drivers/char/stallion.cif ((tty != (struct tty_struct *) NULL) && ((portp->rxignoremsk & status) == 0)) {
portp1667drivers/char/stallion.cif (portp->rxmarkmsk & status) {
portp1671drivers/char/stallion.cif (portp->flags & ASYNC_SAK)
portp1700drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1714drivers/char/stallion.cstlport_t  *portp;
portp1727drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1729drivers/char/stallion.coutb((MISR + portp->uartaddr), ioaddr);
portp1732drivers/char/stallion.cset_bit(ASYI_DCDCHANGE, &portp->istate);
portp1733drivers/char/stallion.cqueue_task_irq_off(&portp->tqueue, &tq_scheduler);
portp1736drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1890drivers/char/stallion.cstlport_t    *portp;
portp1894drivers/char/stallion.cportp = private;
portp1896drivers/char/stallion.cprintk("stl_offintr(portp=%x)\n", (int) portp);
portp1899drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1901drivers/char/stallion.ctty = portp->tty;
portp1905drivers/char/stallion.cif (test_bit(ASYI_TXLOW, &portp->istate)) {
portp1910drivers/char/stallion.cif (test_bit(ASYI_DCDCHANGE, &portp->istate)) {
portp1911drivers/char/stallion.cclear_bit(ASYI_DCDCHANGE, &portp->istate);
portp1912drivers/char/stallion.coldsigs = portp->sigs;
portp1913drivers/char/stallion.cstl_getsignals(portp);
portp1914drivers/char/stallion.cif ((portp->sigs & TIOCM_CD) && ((oldsigs & TIOCM_CD) == 0))
portp1915drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1916drivers/char/stallion.cif ((oldsigs & TIOCM_CD) && ((portp->sigs & TIOCM_CD) == 0)) {
portp1917drivers/char/stallion.cif (! ((portp->flags & ASYNC_CALLOUT_ACTIVE) &&
portp1918drivers/char/stallion.c(portp->flags & ASYNC_CALLOUT_NOHUP))) {
portp1932drivers/char/stallion.cstatic void stl_ccrwait(stlport_t *portp)
portp1937drivers/char/stallion.cif (stl_getreg(portp, CCR) == 0) {
portp1942drivers/char/stallion.cprintk("STALLION: cd1400 device not responding, port=%d panel=%d brd=%d\n", portp->portnr, portp->panelnr, portp->brdnr);
portp1952drivers/char/stallion.cstatic void stl_setport(stlport_t *portp, struct termios *tiosp)
portp1977drivers/char/stallion.cbrdp = stl_brds[portp->brdnr];
portp1986drivers/char/stallion.cportp->rxignoremsk = 0;
portp1988drivers/char/stallion.cportp->rxignoremsk |= (ST_PARITY | ST_FRAMING | ST_OVERRUN);
portp1992drivers/char/stallion.cportp->rxignoremsk |= ST_BREAK;
portp1996drivers/char/stallion.cportp->rxmarkmsk = ST_OVERRUN;
portp1998drivers/char/stallion.cportp->rxmarkmsk |= (ST_PARITY | ST_FRAMING);
portp2000drivers/char/stallion.cportp->rxmarkmsk |= ST_BREAK;
portp2060drivers/char/stallion.cif ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
portp2062drivers/char/stallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
portp2064drivers/char/stallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
portp2065drivers/char/stallion.cbaudrate = (portp->baud_base / portp->custom_divisor);
portp2112drivers/char/stallion.cprintk("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", portp->portnr, portp->panelnr, portp->brdnr);
portp2121drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2122drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x3));
portp2123drivers/char/stallion.csrer = stl_getreg(portp, SRER);
portp2124drivers/char/stallion.cstl_setreg(portp, SRER, 0);
portp2125drivers/char/stallion.cif (stl_updatereg(portp, COR1, cor1))
portp2127drivers/char/stallion.cif (stl_updatereg(portp, COR2, cor2))
portp2129drivers/char/stallion.cif (stl_updatereg(portp, COR3, cor3))
portp2132drivers/char/stallion.cstl_ccrwait(portp);
portp2133drivers/char/stallion.cstl_setreg(portp, CCR, CCR_CORCHANGE);
portp2135drivers/char/stallion.cstl_setreg(portp, COR4, cor4);
portp2136drivers/char/stallion.cstl_setreg(portp, COR5, cor5);
portp2137drivers/char/stallion.cstl_setreg(portp, MCOR1, mcor1);
portp2138drivers/char/stallion.cstl_setreg(portp, MCOR2, mcor2);
portp2140drivers/char/stallion.cstl_setreg(portp, TCOR, clk);
portp2141drivers/char/stallion.cstl_setreg(portp, TBPR, div);
portp2142drivers/char/stallion.cstl_setreg(portp, RCOR, clk);
portp2143drivers/char/stallion.cstl_setreg(portp, RBPR, div);
portp2145drivers/char/stallion.cstl_setreg(portp, SCHR1, tiosp->c_cc[VSTART]);
portp2146drivers/char/stallion.cstl_setreg(portp, SCHR2, tiosp->c_cc[VSTOP]);
portp2147drivers/char/stallion.cstl_setreg(portp, SCHR3, tiosp->c_cc[VSTART]);
portp2148drivers/char/stallion.cstl_setreg(portp, SCHR4, tiosp->c_cc[VSTOP]);
portp2149drivers/char/stallion.cstl_setreg(portp, RTPR, rtpr);
portp2150drivers/char/stallion.cmcor1 = stl_getreg(portp, MSVR1);
portp2152drivers/char/stallion.cportp->sigs |= TIOCM_CD;
portp2154drivers/char/stallion.cportp->sigs &= ~TIOCM_CD;
portp2155drivers/char/stallion.cstl_setreg(portp, SRER, ((srer & ~sreroff) | sreron));
portp2156drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2166drivers/char/stallion.cstatic void stl_setsignals(stlport_t *portp, int dtr, int rts)
portp2172drivers/char/stallion.cprintk("stl_setsignals(portp=%x,dtr=%d,rts=%d)\n", (int) portp, dtr, rts);
portp2184drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2185drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2187drivers/char/stallion.cstl_setreg(portp, MSVR2, msvr2);
portp2189drivers/char/stallion.cstl_setreg(portp, MSVR1, msvr1);
portp2190drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2200drivers/char/stallion.cstatic void stl_getsignals(stlport_t *portp)
portp2206drivers/char/stallion.cprintk("stl_getsignals(portp=%x)\n", (int) portp);
portp2211drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2212drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2213drivers/char/stallion.cmsvr1 = stl_getreg(portp, MSVR1);
portp2214drivers/char/stallion.cmsvr2 = stl_getreg(portp, MSVR2);
portp2215drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2216drivers/char/stallion.cportp->sigs = 0;
portp2217drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_DCD) ? TIOCM_CD : 0;
portp2218drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_CTS) ? TIOCM_CTS : 0;
portp2219drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_RI) ? TIOCM_RI : 0;
portp2220drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_DSR) ? TIOCM_DSR : 0;
portp2221drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_DTR) ? TIOCM_DTR : 0;
portp2222drivers/char/stallion.cportp->sigs |= (msvr2 & MSVR2_RTS) ? TIOCM_RTS : 0;
portp2232drivers/char/stallion.cstatic void stl_enablerxtx(stlport_t *portp, int rx, int tx)
portp2238drivers/char/stallion.cprintk("stl_enablerxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx);
portp2253drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2254drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2255drivers/char/stallion.cstl_ccrwait(portp);
portp2256drivers/char/stallion.cstl_setreg(portp, CCR, ccr);
portp2257drivers/char/stallion.cstl_ccrwait(portp);
portp2258drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2268drivers/char/stallion.cstatic void stl_startrxtx(stlport_t *portp, int rx, int tx)
portp2274drivers/char/stallion.cprintk("stl_startrxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx);
portp2292drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2293drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2294drivers/char/stallion.cstl_setreg(portp, SRER, ((stl_getreg(portp, SRER) & ~sreroff) | sreron));
portp2295drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2297drivers/char/stallion.cset_bit(ASYI_TXBUSY, &portp->istate);
portp2307drivers/char/stallion.cstatic void stl_disableintrs(stlport_t *portp)
portp2312drivers/char/stallion.cprintk("stl_disableintrs(portp=%x)\n", (int) portp);
portp2316drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2317drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2318drivers/char/stallion.cstl_setreg(portp, SRER, 0);
portp2319drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2325drivers/char/stallion.cstatic void stl_sendbreak(stlport_t *portp, long len)
portp2330drivers/char/stallion.cprintk("stl_sendbreak(portp=%x,len=%d)\n", (int) portp, (int) len);
portp2335drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2336drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2337drivers/char/stallion.cstl_setreg(portp, COR2, (stl_getreg(portp, COR2) | COR2_ETC));
portp2338drivers/char/stallion.cstl_setreg(portp, SRER, ((stl_getreg(portp, SRER) & ~SRER_TXDATA) | SRER_TXEMPTY));
portp2339drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2341drivers/char/stallion.cportp->brklen = (len > 255) ? 255 : len;
portp2387drivers/char/stallion.cstlport_t  *portp;
portp2446drivers/char/stallion.cportp = (stlport_t *) stl_memalloc(sizeof(stlport_t));
portp2447drivers/char/stallion.cif (portp == (stlport_t *) NULL) {
portp2451drivers/char/stallion.cmemset(portp, 0, sizeof(stlport_t));
portp2452drivers/char/stallion.cportp->portnr = i;
portp2453drivers/char/stallion.cportp->brdnr = panelp->brdnr;
portp2454drivers/char/stallion.cportp->panelnr = panelp->panelnr;
portp2455drivers/char/stallion.cportp->ioaddr = ioaddr;
portp2456drivers/char/stallion.cportp->uartaddr = (i & 0x04) << 5;
portp2457drivers/char/stallion.cportp->pagenr = panelp->pagenr + (i >> 3);
portp2458drivers/char/stallion.cportp->baud_base = STL_BAUDBASE;
portp2459drivers/char/stallion.cportp->close_delay = STL_CLOSEDELAY;
portp2460drivers/char/stallion.cportp->closing_wait = 30 * HZ;
portp2461drivers/char/stallion.cportp->normaltermios = stl_deftermios;
portp2462drivers/char/stallion.cportp->callouttermios = stl_deftermios;
portp2463drivers/char/stallion.cportp->tqueue.routine = stl_offintr;
portp2464drivers/char/stallion.cportp->tqueue.data = portp;
portp2465drivers/char/stallion.cstl_setreg(portp, CAR, (i & 0x03));
portp2466drivers/char/stallion.cstl_setreg(portp, LIVR, (i << 3));
portp2467drivers/char/stallion.cpanelp->ports[i] = portp;