taglinefilesource code
portp612drivers/char/istallion.cstatic int  stli_initopen(stlibrd_t *brdp, stliport_t *portp);
portp613drivers/char/istallion.cstatic int  stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait);
portp614drivers/char/istallion.cstatic int  stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait);
portp615drivers/char/istallion.cstatic int  stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp);
portp618drivers/char/istallion.cstatic int  stli_setport(stliport_t *portp);
portp619drivers/char/istallion.cstatic int  stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
portp620drivers/char/istallion.cstatic void  stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
portp621drivers/char/istallion.cstatic void  stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp);
portp622drivers/char/istallion.cstatic void  stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp);
portp625drivers/char/istallion.cstatic void  stli_read(stlibrd_t *brdp, stliport_t *portp);
portp626drivers/char/istallion.cstatic void  stli_getserial(stliport_t *portp, struct serial_struct *sp);
portp627drivers/char/istallion.cstatic int  stli_setserial(stliport_t *portp, struct serial_struct *sp);
portp741drivers/char/istallion.cstliport_t  *portp;
portp781drivers/char/istallion.cportp = brdp->ports[j];
portp782drivers/char/istallion.cif (portp != (stliport_t *) NULL) {
portp783drivers/char/istallion.cif (portp->tty != (struct tty_struct *) NULL)
portp784drivers/char/istallion.ctty_hangup(portp->tty);
portp785drivers/char/istallion.ckfree_s(portp, sizeof(stliport_t));
portp826drivers/char/istallion.cstliport_t  *portp;
portp847drivers/char/istallion.cportp = brdp->ports[portnr];
portp848drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp850drivers/char/istallion.cif (portp->devnr < 1)
portp859drivers/char/istallion.cif (portp->flags & ASYNC_CLOSING) {
portp860drivers/char/istallion.cinterruptible_sleep_on(&portp->close_wait);
portp861drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp872drivers/char/istallion.cportp->tty = tty;
portp873drivers/char/istallion.ctty->driver_data = portp;
portp874drivers/char/istallion.cportp->refcount++;
portp876drivers/char/istallion.cwhile (test_bit(ST_INITIALIZING, &portp->state)) {
portp879drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp882drivers/char/istallion.cif ((portp->flags & ASYNC_INITIALIZED) == 0) {
portp883drivers/char/istallion.cset_bit(ST_INITIALIZING, &portp->state);
portp884drivers/char/istallion.cif ((rc = stli_initopen(brdp, portp)) >= 0) {
portp885drivers/char/istallion.cportp->flags |= ASYNC_INITIALIZED;
portp888drivers/char/istallion.cclear_bit(ST_INITIALIZING, &portp->state);
portp889drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp900drivers/char/istallion.cif (portp->flags & ASYNC_CLOSING) {
portp901drivers/char/istallion.cinterruptible_sleep_on(&portp->close_wait);
portp902drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp913drivers/char/istallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp915drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE) {
portp916drivers/char/istallion.cif ((portp->flags & ASYNC_SESSION_LOCKOUT) &&
portp917drivers/char/istallion.c(portp->session != current->session))
portp919drivers/char/istallion.cif ((portp->flags & ASYNC_PGRP_LOCKOUT) &&
portp920drivers/char/istallion.c(portp->pgrp != current->pgrp))
portp923drivers/char/istallion.cportp->flags |= ASYNC_CALLOUT_ACTIVE;
portp926drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp929drivers/char/istallion.cif ((rc = stli_waitcarrier(brdp, portp, filp)) != 0)
portp932drivers/char/istallion.cportp->flags |= ASYNC_NORMAL_ACTIVE;
portp935drivers/char/istallion.cif ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
portp937drivers/char/istallion.c*tty->termios = portp->normaltermios;
portp939drivers/char/istallion.c*tty->termios = portp->callouttermios;
portp940drivers/char/istallion.cstli_setport(portp);
portp943drivers/char/istallion.cportp->session = current->session;
portp944drivers/char/istallion.cportp->pgrp = current->pgrp;
portp953drivers/char/istallion.cstliport_t  *portp;
portp960drivers/char/istallion.cportp = tty->driver_data;
portp961drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp970drivers/char/istallion.cif (portp->refcount-- > 1) {
portp975drivers/char/istallion.cportp->flags |= ASYNC_CLOSING;
portp977drivers/char/istallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp978drivers/char/istallion.cportp->normaltermios = *tty->termios;
portp979drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp980drivers/char/istallion.cportp->callouttermios = *tty->termios;
portp991drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp992drivers/char/istallion.cif (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE)
portp993drivers/char/istallion.ctty_wait_until_sent(tty, portp->closing_wait);
portp996drivers/char/istallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp997drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp998drivers/char/istallion.cstli_rawclose(brdp, portp, 0, 1);
portp1000drivers/char/istallion.cstli_mkasysigs(&portp->asig, 0, 0);
portp1001drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1003drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp1004drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp1008drivers/char/istallion.cset_bit(ST_DOFLUSHRX, &portp->state);
portp1013drivers/char/istallion.cportp->tty = (struct tty_struct *) NULL;
portp1015drivers/char/istallion.cif (portp->openwaitcnt) {
portp1016drivers/char/istallion.cif (portp->close_delay)
portp1017drivers/char/istallion.cstli_delay(portp->close_delay);
portp1018drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp1021drivers/char/istallion.cportp->flags &= ~(ASYNC_CALLOUT_ACTIVE | ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
portp1022drivers/char/istallion.cwake_up_interruptible(&portp->close_wait);
portp1036drivers/char/istallion.cstatic int stli_initopen(stlibrd_t *brdp, stliport_t *portp)
portp1044drivers/char/istallion.cprintk("stli_initopen(brdp=%x,portp=%x)\n", (int) brdp, (int) portp);
portp1047drivers/char/istallion.cif ((rc = stli_rawopen(brdp, portp, 0, 1)) < 0)
portp1053drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETNOTIFY, &nt, sizeof(asynotify_t), 0)) < 0)
portp1056drivers/char/istallion.ctty = portp->tty;
portp1059drivers/char/istallion.cstli_mkasyport(portp, &aport, tty->termios);
portp1060drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0)) < 0)
portp1063drivers/char/istallion.cset_bit(ST_GETSIGS, &portp->state);
portp1064drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0)
portp1066drivers/char/istallion.cif (clear_bit(ST_GETSIGS, &portp->state))
portp1067drivers/char/istallion.cportp->sigs = stli_mktiocm(portp->asig.sigvalue);
portp1068drivers/char/istallion.cstli_mkasysigs(&portp->asig, 1, 1);
portp1069drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0)
portp1084drivers/char/istallion.cstatic int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait)
portp1093drivers/char/istallion.cprintk("stli_rawopen(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait);
portp1108drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1113drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1122drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp1126drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1127drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1128drivers/char/istallion.c*bits |= portp->portbit;
portp1141drivers/char/istallion.cset_bit(ST_OPENING, &portp->state);
portp1142drivers/char/istallion.cwhile (test_bit(ST_OPENING, &portp->state)) {
portp1147drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1151drivers/char/istallion.cif ((rc == 0) && (portp->rc != 0))
portp1164drivers/char/istallion.cstatic int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait)
portp1173drivers/char/istallion.cprintk("stli_rawclose(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait);
portp1184drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1189drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1197drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp1201drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1202drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1203drivers/char/istallion.c*bits |= portp->portbit;
portp1206drivers/char/istallion.cset_bit(ST_CLOSING, &portp->state);
portp1217drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1222drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1226drivers/char/istallion.cif ((rc == 0) && (portp->rc != 0))
portp1240drivers/char/istallion.cstatic int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback)
portp1245drivers/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);
portp1250drivers/char/istallion.cwhile (test_bit(ST_CMDING, &portp->state)) {
portp1255drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1258drivers/char/istallion.cstli_sendcmd(brdp, portp, cmd, arg, size, copyback);
portp1260drivers/char/istallion.cwhile (test_bit(ST_CMDING, &portp->state)) {
portp1265drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1269drivers/char/istallion.cif (portp->rc != 0)
portp1281drivers/char/istallion.cstatic int stli_setport(stliport_t *portp)
portp1287drivers/char/istallion.cprintk("stli_setport(portp=%x)\n", (int) portp);
portp1290drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1292drivers/char/istallion.cif (portp->tty == (struct tty_struct *) NULL)
portp1294drivers/char/istallion.cif ((portp->brdnr < 0) && (portp->brdnr >= stli_nrbrds))
portp1296drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1298drivers/char/istallion.cstli_mkasyport(portp, &aport, portp->tty->termios);
portp1299drivers/char/istallion.creturn(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0));
portp1329drivers/char/istallion.cstatic int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp)
portp1335drivers/char/istallion.cprintk("stli_waitcarrier(brdp=%x,portp=%x,filp=%x)\n", (int) brdp, (int) portp, (int) filp);
portp1342drivers/char/istallion.cportp->openwaitcnt++;
portp1343drivers/char/istallion.cif (portp->refcount > 0)
portp1344drivers/char/istallion.cportp->refcount--;
portp1347drivers/char/istallion.cif ((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) {
portp1348drivers/char/istallion.cstli_mkasysigs(&portp->asig, 1, 1);
portp1349drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0)
portp1352drivers/char/istallion.cif (tty_hung_up_p(filp) || ((portp->flags & ASYNC_INITIALIZED) == 0)) {
portp1353drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp1359drivers/char/istallion.cif (((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) &&
portp1360drivers/char/istallion.c((portp->flags & ASYNC_CLOSING) == 0) &&
portp1361drivers/char/istallion.c((portp->tty->termios->c_cflag & CLOCAL) ||
portp1362drivers/char/istallion.c(portp->sigs & TIOCM_CD))) {
portp1369drivers/char/istallion.cinterruptible_sleep_on(&portp->open_wait);
portp1373drivers/char/istallion.cportp->refcount++;
portp1374drivers/char/istallion.cportp->openwaitcnt--;
portp1394drivers/char/istallion.cstliport_t    *portp;
portp1407drivers/char/istallion.cportp = tty->driver_data;
portp1408drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1410drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1412drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1430drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1435drivers/char/istallion.clen = (head >= tail) ? (portp->txsize - (head - tail) - 1) : (tail - head - 1);
portp1452drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1457drivers/char/istallion.csize = portp->txsize;
portp1468drivers/char/istallion.cshbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset);
portp1483drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1485drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1490drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1491drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1492drivers/char/istallion.c*bits |= portp->portbit;
portp1493drivers/char/istallion.cset_bit(ST_TXBUSY, &portp->state);
portp1544drivers/char/istallion.cstliport_t    *portp;
portp1569drivers/char/istallion.cportp = tty->driver_data;
portp1570drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1572drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1574drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1580drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1585drivers/char/istallion.csize = portp->txsize;
portp1596drivers/char/istallion.cshbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset);
portp1612drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1615drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1620drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1621drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1622drivers/char/istallion.c*bits |= portp->portbit;
portp1623drivers/char/istallion.cset_bit(ST_TXBUSY, &portp->state);
portp1634drivers/char/istallion.cstliport_t    *portp;
portp1652drivers/char/istallion.cportp = tty->driver_data;
portp1653drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1655drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1657drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1662drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq;
portp1667drivers/char/istallion.clen = (head >= tail) ? (portp->txsize - (head - tail)) : (tail - head);
portp1692drivers/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];
portp1715drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq;
portp1720drivers/char/istallion.clen = (head >= tail) ? (head - tail) : (portp->txsize - (tail - head));
portp1721drivers/char/istallion.cif ((len == 0) && test_bit(ST_TXBUSY, &portp->state))
portp1735drivers/char/istallion.cstatic void stli_getserial(stliport_t *portp, struct serial_struct *sp)
portp1740drivers/char/istallion.cprintk("stli_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1745drivers/char/istallion.csio.line = portp->portnr;
portp1746drivers/char/istallion.csio.port = stli_brdconf[portp->brdnr].ioaddr1;
portp1747drivers/char/istallion.csio.irq = stli_brdconf[portp->brdnr].irq;
portp1748drivers/char/istallion.csio.flags = portp->flags;
portp1749drivers/char/istallion.csio.baud_base = portp->baud_base;
portp1750drivers/char/istallion.csio.close_delay = portp->close_delay;
portp1751drivers/char/istallion.csio.closing_wait = portp->closing_wait;
portp1752drivers/char/istallion.csio.custom_divisor = portp->custom_divisor;
portp1766drivers/char/istallion.cstatic int stli_setserial(stliport_t *portp, struct serial_struct *sp)
portp1772drivers/char/istallion.cprintk("stli_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1777drivers/char/istallion.cif ((sio.baud_base != portp->baud_base) ||
portp1778drivers/char/istallion.c(sio.close_delay != portp->close_delay) ||
portp1779drivers/char/istallion.c((sio.flags & ~ASYNC_USR_MASK) != (portp->flags & ~ASYNC_USR_MASK)))
portp1783drivers/char/istallion.cportp->flags = (portp->flags & ~ASYNC_USR_MASK) | (sio.flags & ASYNC_USR_MASK);
portp1784drivers/char/istallion.cportp->baud_base = sio.baud_base;
portp1785drivers/char/istallion.cportp->close_delay = sio.close_delay;
portp1786drivers/char/istallion.cportp->closing_wait = sio.closing_wait;
portp1787drivers/char/istallion.cportp->custom_divisor = sio.custom_divisor;
portp1789drivers/char/istallion.cif ((rc = stli_setport(portp)) < 0)
portp1798drivers/char/istallion.cstliport_t  *portp;
portp1809drivers/char/istallion.cportp = tty->driver_data;
portp1810drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1812drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1814drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1824drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0);
portp1832drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0);
portp1847drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0)
portp1849drivers/char/istallion.cval = stli_mktiocm(portp->asig.sigvalue);
portp1856drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 1 : -1), ((arg & TIOCM_RTS) ? 1 : -1));
portp1857drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1863drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 0 : -1), ((arg & TIOCM_RTS) ? 0 : -1));
portp1864drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1870drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 1 : 0), ((arg & TIOCM_RTS) ? 1 : 0));
portp1871drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1876drivers/char/istallion.cstli_getserial(portp, (struct serial_struct *) arg);
portp1880drivers/char/istallion.crc = stli_setserial(portp, (struct serial_struct *) arg);
portp1906drivers/char/istallion.cstliport_t  *portp;
portp1917drivers/char/istallion.cportp = tty->driver_data;
portp1918drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1920drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1922drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1928drivers/char/istallion.cstli_mkasyport(portp, &aport, tiosp);
portp1929drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0);
portp1930drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((tiosp->c_cflag & CBAUD) ? 1 : 0), -1);
portp1931drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1935drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp1952drivers/char/istallion.cstliport_t  *portp;
portp1960drivers/char/istallion.cportp = tty->driver_data;
portp1961drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1964drivers/char/istallion.cset_bit(ST_RXSTOP, &portp->state);
portp1977drivers/char/istallion.cstliport_t  *portp;
portp1985drivers/char/istallion.cportp = tty->driver_data;
portp1986drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1989drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp2002drivers/char/istallion.cstliport_t  *portp;
portp2011drivers/char/istallion.cportp = tty->driver_data;
portp2012drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2014drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2016drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp2021drivers/char/istallion.cstli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t));
portp2033drivers/char/istallion.cstliport_t  *portp;
portp2043drivers/char/istallion.cportp = tty->driver_data;
portp2044drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2046drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2048drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp2053drivers/char/istallion.cstli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t));
portp2070drivers/char/istallion.cstliport_t  *portp;
portp2076drivers/char/istallion.cportp = (stliport_t *) arg;
portp2077drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2079drivers/char/istallion.cif (portp->tty == (struct tty_struct *) NULL)
portp2081drivers/char/istallion.ctty_hangup(portp->tty);
portp2095drivers/char/istallion.cstliport_t  *portp;
portp2105drivers/char/istallion.cportp = tty->driver_data;
portp2106drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2108drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2110drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp2112drivers/char/istallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp2116drivers/char/istallion.cif (! test_bit(ST_CLOSING, &portp->state))
portp2117drivers/char/istallion.cstli_rawclose(brdp, portp, 0, 0);
portp2119drivers/char/istallion.cstli_mkasysigs(&portp->asig, 0, 0);
portp2120drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2121drivers/char/istallion.cset_bit(ST_DOSIGS, &portp->state);
portp2122drivers/char/istallion.cset_bit(ST_DOFLUSHTX, &portp->state);
portp2123drivers/char/istallion.cset_bit(ST_DOFLUSHRX, &portp->state);
portp2125drivers/char/istallion.cstli_sendcmd(brdp, portp, A_SETSIGNALSF, &portp->asig, sizeof(asysigs_t), 0);
portp2130drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp2131drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp2134drivers/char/istallion.cportp->tty = (struct tty_struct *) NULL;
portp2135drivers/char/istallion.cportp->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
portp2136drivers/char/istallion.cportp->refcount = 0;
portp2137drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2151drivers/char/istallion.cstliport_t  *portp;
portp2161drivers/char/istallion.cportp = tty->driver_data;
portp2162drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2164drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2166drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp2175drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2176drivers/char/istallion.cset_bit(ST_DOFLUSHTX, &portp->state);
portp2179drivers/char/istallion.cif (test_bit(ST_DOFLUSHRX, &portp->state)) {
portp2181drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2183drivers/char/istallion.cstli_sendcmd(brdp, portp, A_FLUSH, &ftype, sizeof(unsigned long), 0);
portp2204drivers/char/istallion.cstatic void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback)
portp2212drivers/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);
portp2215drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2223drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp2227drivers/char/istallion.cportp->argp = arg;
portp2228drivers/char/istallion.cportp->argsize = size;
portp2234drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp2235drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp2236drivers/char/istallion.c*bits |= portp->portbit;
portp2237drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2252drivers/char/istallion.cstatic inline void stli_read(stlibrd_t *brdp, stliport_t *portp)
portp2261drivers/char/istallion.cprintk("stli_read(brdp=%x,portp=%d)\n", (int) brdp, (int) portp);
portp2264drivers/char/istallion.cif (test_bit(ST_RXSTOP, &portp->state))
portp2266drivers/char/istallion.ctty = portp->tty;
portp2270drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq;
portp2275drivers/char/istallion.csize = portp->rxsize;
portp2285drivers/char/istallion.cshbuf = (volatile char *) EBRDGETMEMPTR(brdp, portp->rxoffset);
portp2302drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq;
portp2306drivers/char/istallion.cset_bit(ST_RXING, &portp->state);
portp2319drivers/char/istallion.cstatic inline void stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp)
portp2323drivers/char/istallion.cif (test_bit(ST_DOSIGS, &portp->state)) {
portp2324drivers/char/istallion.cif (test_bit(ST_DOFLUSHTX, &portp->state) && test_bit(ST_DOFLUSHRX, &portp->state))
portp2326drivers/char/istallion.celse if (test_bit(ST_DOFLUSHTX, &portp->state))
portp2328drivers/char/istallion.celse if (test_bit(ST_DOFLUSHRX, &portp->state))
portp2332drivers/char/istallion.cclear_bit(ST_DOFLUSHTX, &portp->state);
portp2333drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2334drivers/char/istallion.cclear_bit(ST_DOSIGS, &portp->state);
portp2335drivers/char/istallion.cmemcpy((void *) &(cp->args[0]), (void *) &portp->asig, sizeof(asysigs_t));
portp2338drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2339drivers/char/istallion.c} else if (test_bit(ST_DOFLUSHTX, &portp->state) || test_bit(ST_DOFLUSHRX, &portp->state)) {
portp2340drivers/char/istallion.ccmd = ((test_bit(ST_DOFLUSHTX, &portp->state)) ? FLUSHTX : 0);
portp2341drivers/char/istallion.ccmd |= ((test_bit(ST_DOFLUSHRX, &portp->state)) ? FLUSHRX : 0);
portp2342drivers/char/istallion.cclear_bit(ST_DOFLUSHTX, &portp->state);
portp2343drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2347drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2367drivers/char/istallion.cstliport_t    *portp;
portp2375drivers/char/istallion.cportp = brdp->ports[(channr - 1)];
portp2376drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp2382drivers/char/istallion.cif (test_bit(ST_OPENING, &portp->state)) {
portp2388drivers/char/istallion.cportp->rc = rc;
portp2389drivers/char/istallion.cclear_bit(ST_OPENING, &portp->state);
portp2390drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2397drivers/char/istallion.cif (test_bit(ST_CLOSING, &portp->state)) {
portp2403drivers/char/istallion.cportp->rc = rc;
portp2404drivers/char/istallion.cclear_bit(ST_CLOSING, &portp->state);
portp2405drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2413drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2418drivers/char/istallion.cif (portp->argp != (void *) NULL) {
portp2419drivers/char/istallion.cmemcpy(portp->argp, (void *) &(cp->args[0]), portp->argsize);
portp2420drivers/char/istallion.cportp->argp = (void *) NULL;
portp2423drivers/char/istallion.cportp->rc = rc;
portp2424drivers/char/istallion.cclear_bit(ST_CMDING, &portp->state);
portp2425drivers/char/istallion.cstli_dodelaycmd(portp, cp);
portp2426drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2440drivers/char/istallion.ctty = portp->tty;
portp2443drivers/char/istallion.coldsigs = portp->sigs;
portp2444drivers/char/istallion.cportp->sigs = stli_mktiocm(nt.sigvalue);
portp2445drivers/char/istallion.cclear_bit(ST_GETSIGS, &portp->state);
portp2446drivers/char/istallion.cif ((portp->sigs & TIOCM_CD) && ((oldsigs & TIOCM_CD) == 0))
portp2447drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2448drivers/char/istallion.cif ((oldsigs & TIOCM_CD) && ((portp->sigs & TIOCM_CD) == 0)) {
portp2449drivers/char/istallion.cif (! ((portp->flags & ASYNC_CALLOUT_ACTIVE) &&
portp2450drivers/char/istallion.c(portp->flags & ASYNC_CALLOUT_NOHUP))) {
portp2452drivers/char/istallion.cqueue_task_irq_off(&portp->tqhangup, &tq_scheduler);
portp2458drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp2467drivers/char/istallion.cif ((nt.data & DT_RXBREAK) && (portp->rxmarkmsk & BRKINT)) {
portp2474drivers/char/istallion.cif (portp->flags & ASYNC_SAK)
portp2484drivers/char/istallion.cstli_read(brdp, portp);
portp2496drivers/char/istallion.cif ((!donerx) && test_bit(ST_RXING, &portp->state)) {
portp2497drivers/char/istallion.cclear_bit(ST_RXING, &portp->state);
portp2498drivers/char/istallion.cstli_read(brdp, portp);
portp2520drivers/char/istallion.cstliport_t    *portp;
portp2581drivers/char/istallion.cportp = brdp->ports[(channr - 1)];
portp2582drivers/char/istallion.cif (test_bit(ST_OPENING, &portp->state) ||
portp2583drivers/char/istallion.ctest_bit(ST_CLOSING, &portp->state) ||
portp2584drivers/char/istallion.ctest_bit(ST_CMDING, &portp->state) ||
portp2585drivers/char/istallion.ctest_bit(ST_TXBUSY, &portp->state)) {
portp2586drivers/char/istallion.cslavereq |= portp->reqbit;
portp2610drivers/char/istallion.cstatic void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp)
portp2613drivers/char/istallion.cprintk("stli_mkasyport(portp=%x,pp=%x,tiosp=%d)\n", (int) portp, (int) pp, (int) tiosp);
portp2631drivers/char/istallion.cif ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
portp2633drivers/char/istallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
portp2635drivers/char/istallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
portp2636drivers/char/istallion.cpp->baudout = (portp->baud_base / portp->custom_divisor);
portp2698drivers/char/istallion.cportp->rxmarkmsk = 0;
portp2702drivers/char/istallion.cportp->rxmarkmsk |= BRKINT;
portp2763drivers/char/istallion.cstliport_t  *portp;
portp2771drivers/char/istallion.cportp = (stliport_t *) stli_memalloc(sizeof(stliport_t));
portp2772drivers/char/istallion.cif (portp == (stliport_t *) NULL) {
portp2777drivers/char/istallion.cmemset(portp, 0, sizeof(stliport_t));
portp2778drivers/char/istallion.cportp->portnr = i;
portp2779drivers/char/istallion.cportp->brdnr = brdp->brdnr;
portp2780drivers/char/istallion.cportp->panelnr = panelnr;
portp2781drivers/char/istallion.cportp->baud_base = STL_BAUDBASE;
portp2782drivers/char/istallion.cportp->close_delay = STL_CLOSEDELAY;
portp2783drivers/char/istallion.cportp->closing_wait = 30 * HZ;
portp2784drivers/char/istallion.cportp->tqhangup.routine = stli_dohangup;
portp2785drivers/char/istallion.cportp->tqhangup.data = portp;
portp2786drivers/char/istallion.cportp->normaltermios = stli_deftermios;
portp2787drivers/char/istallion.cportp->callouttermios = stli_deftermios;
portp2793drivers/char/istallion.cbrdp->ports[i] = portp;
portp3632drivers/char/istallion.cstliport_t    *portp;
portp3683drivers/char/istallion.cportp = brdp->ports[portnr];
portp3684drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp3686drivers/char/istallion.cportp->devnr = i;
portp3687drivers/char/istallion.cportp->addr = memp->offset;
portp3688drivers/char/istallion.cportp->reqbit = (unsigned char) (0x1 << (i * 8 / nrdevs));
portp3689drivers/char/istallion.cportp->portidx = (unsigned char) (i / 8);
portp3690drivers/char/istallion.cportp->portbit = (unsigned char) (0x1 << (i % 8));
portp3699drivers/char/istallion.cportp = brdp->ports[portnr];
portp3700drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp3702drivers/char/istallion.cif (portp->addr == 0)
portp3704drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp3706drivers/char/istallion.cportp->rxsize = ap->rxq.size;
portp3707drivers/char/istallion.cportp->txsize = ap->txq.size;
portp3708drivers/char/istallion.cportp->rxoffset = ap->rxq.offset;
portp3709drivers/char/istallion.cportp->txoffset = ap->txq.offset;
portp482drivers/char/stallion.cstatic void  stl_getserial(stlport_t *portp, struct serial_struct *sp);
portp483drivers/char/stallion.cstatic int  stl_setserial(stlport_t *portp, struct serial_struct *sp);
portp484drivers/char/stallion.cstatic void  stl_setreg(stlport_t *portp, int regnr, int value);
portp485drivers/char/stallion.cstatic int  stl_getreg(stlport_t *portp, int regnr);
portp486drivers/char/stallion.cstatic int  stl_updatereg(stlport_t *portp, int regnr, int value);
portp487drivers/char/stallion.cstatic void  stl_setport(stlport_t *portp, struct termios *tiosp);
portp488drivers/char/stallion.cstatic void  stl_getsignals(stlport_t *portp);
portp489drivers/char/stallion.cstatic void  stl_setsignals(stlport_t *portp, int dtr, int rts);
portp490drivers/char/stallion.cstatic void  stl_ccrwait(stlport_t *portp);
portp491drivers/char/stallion.cstatic void  stl_enablerxtx(stlport_t *portp, int rx, int tx);
portp492drivers/char/stallion.cstatic void  stl_startrxtx(stlport_t *portp, int rx, int tx);
portp493drivers/char/stallion.cstatic void  stl_disableintrs(stlport_t *portp);
portp494drivers/char/stallion.cstatic void  stl_sendbreak(stlport_t *portp, long len);
portp495drivers/char/stallion.cstatic int  stl_waitcarrier(stlport_t *portp, struct file *filp);
portp535drivers/char/stallion.cstlport_t  *portp;
portp571drivers/char/stallion.cportp = panelp->ports[k];
portp572drivers/char/stallion.cif (portp != (stlport_t *) NULL) {
portp573drivers/char/stallion.cif (portp->tty != (struct tty_struct *) NULL)
portp574drivers/char/stallion.cstl_hangup(portp->tty);
portp575drivers/char/stallion.cif (portp->tx.buf != (char *) NULL)
portp576drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp577drivers/char/stallion.ckfree_s(portp, sizeof(stlport_t));
portp627drivers/char/stallion.cstlport_t  *portp;
portp656drivers/char/stallion.cportp = brdp->panels[panelnr]->ports[portnr];
portp657drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp664drivers/char/stallion.cportp->tty = tty;
portp665drivers/char/stallion.ctty->driver_data = portp;
portp666drivers/char/stallion.cportp->refcount++;
portp668drivers/char/stallion.cif ((portp->flags & ASYNC_INITIALIZED) == 0) {
portp669drivers/char/stallion.cif (portp->tx.buf == (char *) NULL) {
portp670drivers/char/stallion.cportp->tx.buf = (char *) stl_memalloc(STL_TXBUFSIZE);
portp671drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp673drivers/char/stallion.cportp->tx.head = portp->tx.buf;
portp674drivers/char/stallion.cportp->tx.tail = portp->tx.buf;
portp676drivers/char/stallion.cstl_setport(portp, tty->termios);
portp677drivers/char/stallion.cstl_getsignals(portp);
portp678drivers/char/stallion.cstl_setsignals(portp, 1, 1);
portp679drivers/char/stallion.cstl_enablerxtx(portp, 1, 1);
portp680drivers/char/stallion.cstl_startrxtx(portp, 1, 0);
portp682drivers/char/stallion.cportp->flags |= ASYNC_INITIALIZED;
portp691drivers/char/stallion.cif (portp->flags & ASYNC_CLOSING) {
portp692drivers/char/stallion.cinterruptible_sleep_on(&portp->close_wait);
portp693drivers/char/stallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp704drivers/char/stallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp706drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE) {
portp707drivers/char/stallion.cif ((portp->flags & ASYNC_SESSION_LOCKOUT) &&
portp708drivers/char/stallion.c(portp->session != current->session))
portp710drivers/char/stallion.cif ((portp->flags & ASYNC_PGRP_LOCKOUT) &&
portp711drivers/char/stallion.c(portp->pgrp != current->pgrp))
portp714drivers/char/stallion.cportp->flags |= ASYNC_CALLOUT_ACTIVE;
portp717drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp720drivers/char/stallion.cif ((rc = stl_waitcarrier(portp, filp)) != 0)
portp723drivers/char/stallion.cportp->flags |= ASYNC_NORMAL_ACTIVE;
portp726drivers/char/stallion.cif ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
portp728drivers/char/stallion.c*tty->termios = portp->normaltermios;
portp730drivers/char/stallion.c*tty->termios = portp->callouttermios;
portp731drivers/char/stallion.cstl_setport(portp, tty->termios);
portp734drivers/char/stallion.cportp->session = current->session;
portp735drivers/char/stallion.cportp->pgrp = current->pgrp;
portp746drivers/char/stallion.cstatic int stl_waitcarrier(stlport_t *portp, struct file *filp)
portp752drivers/char/stallion.cprintk("stl_waitcarrier(portp=%x,filp=%x)\n", (int) portp, (int) filp);
portp759drivers/char/stallion.cportp->openwaitcnt++;
portp760drivers/char/stallion.cif (portp->refcount > 0)
portp761drivers/char/stallion.cportp->refcount--;
portp764drivers/char/stallion.cif ((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0)
portp765drivers/char/stallion.cstl_setsignals(portp, 1, 1);
portp766drivers/char/stallion.cif (tty_hung_up_p(filp) || ((portp->flags & ASYNC_INITIALIZED) == 0)) {
portp767drivers/char/stallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp773drivers/char/stallion.cif (((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) &&
portp774drivers/char/stallion.c((portp->flags & ASYNC_CLOSING) == 0) &&
portp775drivers/char/stallion.c((portp->tty->termios->c_cflag & CLOCAL) ||
portp776drivers/char/stallion.c(portp->sigs & TIOCM_CD))) {
portp783drivers/char/stallion.cinterruptible_sleep_on(&portp->open_wait);
portp787drivers/char/stallion.cportp->refcount++;
portp788drivers/char/stallion.cportp->openwaitcnt--;
portp798drivers/char/stallion.cstlport_t  *portp;
portp805drivers/char/stallion.cportp = tty->driver_data;
portp806drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp815drivers/char/stallion.cif (portp->refcount-- > 1) {
portp820drivers/char/stallion.cportp->refcount = 0;
portp821drivers/char/stallion.cportp->flags |= ASYNC_CLOSING;
portp823drivers/char/stallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp824drivers/char/stallion.cportp->normaltermios = *tty->termios;
portp825drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp826drivers/char/stallion.cportp->callouttermios = *tty->termios;
portp834drivers/char/stallion.cif (test_bit(ASYI_TXBUSY, &portp->istate)) {
portp835drivers/char/stallion.cif (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE)
portp836drivers/char/stallion.ctty_wait_until_sent(tty, portp->closing_wait);
portp839drivers/char/stallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp840drivers/char/stallion.cstl_disableintrs(portp);
portp842drivers/char/stallion.cstl_setsignals(portp, 0, 0);
portp843drivers/char/stallion.cstl_enablerxtx(portp, 0, 0);
portp845drivers/char/stallion.cportp->istate = 0;
portp846drivers/char/stallion.cif (portp->tx.buf != (char *) NULL) {
portp847drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp848drivers/char/stallion.cportp->tx.buf = (char *) NULL;
portp849drivers/char/stallion.cportp->tx.head = (char *) NULL;
portp850drivers/char/stallion.cportp->tx.tail = (char *) NULL;
portp858drivers/char/stallion.cportp->tty = (struct tty_struct *) NULL;
portp860drivers/char/stallion.cif (portp->openwaitcnt) {
portp861drivers/char/stallion.cif (portp->close_delay)
portp862drivers/char/stallion.cstl_delay(portp->close_delay);
portp863drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp866drivers/char/stallion.cportp->flags &= ~(ASYNC_CALLOUT_ACTIVE | ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
portp867drivers/char/stallion.cwake_up_interruptible(&portp->close_wait);
portp900drivers/char/stallion.cstlport_t  *portp;
portp912drivers/char/stallion.cportp = tty->driver_data;
portp913drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp915drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp926drivers/char/stallion.chead = portp->tx.head;
portp927drivers/char/stallion.ctail = portp->tx.tail;
portp941drivers/char/stallion.chead = portp->tx.head;
portp942drivers/char/stallion.ctail = portp->tx.tail;
portp945drivers/char/stallion.cstlen = STL_TXBUFSIZE - (head - portp->tx.buf);
portp960drivers/char/stallion.cif (head >= (portp->tx.buf + STL_TXBUFSIZE)) {
portp961drivers/char/stallion.chead = portp->tx.buf;
portp965drivers/char/stallion.cportp->tx.head = head;
portp967drivers/char/stallion.cclear_bit(ASYI_TXLOW, &portp->istate);
portp968drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp977drivers/char/stallion.cstlport_t  *portp;
portp987drivers/char/stallion.cportp = tty->driver_data;
portp988drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp990drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp993drivers/char/stallion.chead = portp->tx.head;
portp994drivers/char/stallion.ctail = portp->tx.tail;
portp1001drivers/char/stallion.cif (head >= (portp->tx.buf + STL_TXBUFSIZE))
portp1002drivers/char/stallion.chead = portp->tx.buf;
portp1004drivers/char/stallion.cportp->tx.head = head;
portp1017drivers/char/stallion.cstlport_t  *portp;
portp1025drivers/char/stallion.cportp = tty->driver_data;
portp1026drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1028drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1032drivers/char/stallion.cif (tty->stopped || tty->hw_stopped || (portp->tx.head == portp->tx.tail))
portp1035drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp1042drivers/char/stallion.cstlport_t  *portp;
portp1051drivers/char/stallion.cportp = tty->driver_data;
portp1052drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1054drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1057drivers/char/stallion.chead = portp->tx.head;
portp1058drivers/char/stallion.ctail = portp->tx.tail;
portp1075drivers/char/stallion.cstlport_t  *portp;
portp1085drivers/char/stallion.cportp = tty->driver_data;
portp1086drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1088drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1091drivers/char/stallion.chead = portp->tx.head;
portp1092drivers/char/stallion.ctail = portp->tx.tail;
portp1094drivers/char/stallion.cif ((size == 0) && test_bit(ASYI_TXBUSY, &portp->istate))
portp1105drivers/char/stallion.cstatic void stl_getserial(stlport_t *portp, struct serial_struct *sp)
portp1111drivers/char/stallion.cprintk("stl_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1116drivers/char/stallion.csio.line = portp->portnr;
portp1117drivers/char/stallion.csio.port = portp->ioaddr;
portp1118drivers/char/stallion.csio.flags = portp->flags;
portp1119drivers/char/stallion.csio.baud_base = portp->baud_base;
portp1120drivers/char/stallion.csio.close_delay = portp->close_delay;
portp1121drivers/char/stallion.csio.closing_wait = portp->closing_wait;
portp1122drivers/char/stallion.csio.custom_divisor = portp->custom_divisor;
portp1126drivers/char/stallion.cbrdp = stl_brds[portp->brdnr];
portp1141drivers/char/stallion.cstatic int stl_setserial(stlport_t *portp, struct serial_struct *sp)
portp1146drivers/char/stallion.cprintk("stl_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1151drivers/char/stallion.cif ((sio.baud_base != portp->baud_base) ||
portp1152drivers/char/stallion.c(sio.close_delay != portp->close_delay) ||
portp1153drivers/char/stallion.c((sio.flags & ~ASYNC_USR_MASK) != (portp->flags & ~ASYNC_USR_MASK)))
portp1157drivers/char/stallion.cportp->flags = (portp->flags & ~ASYNC_USR_MASK) | (sio.flags & ASYNC_USR_MASK);
portp1158drivers/char/stallion.cportp->baud_base = sio.baud_base;
portp1159drivers/char/stallion.cportp->close_delay = sio.close_delay;
portp1160drivers/char/stallion.cportp->closing_wait = sio.closing_wait;
portp1161drivers/char/stallion.cportp->custom_divisor = sio.custom_divisor;
portp1162drivers/char/stallion.cstl_setport(portp, portp->tty->termios);
portp1170drivers/char/stallion.cstlport_t  *portp;
portp1179drivers/char/stallion.cportp = tty->driver_data;
portp1180drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1190drivers/char/stallion.cstl_sendbreak(portp, 250);
portp1196drivers/char/stallion.cstl_sendbreak(portp, (arg ? (arg * 100) : 250));
portp1211drivers/char/stallion.cstl_getsignals(portp);
portp1212drivers/char/stallion.cput_fs_long(portp->sigs, (unsigned long *) arg);
portp1218drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 1 : -1), ((arg & TIOCM_RTS) ? 1 : -1));
portp1224drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 0 : -1), ((arg & TIOCM_RTS) ? 0 : -1));
portp1230drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 1 : 0), ((arg & TIOCM_RTS) ? 1 : 0));
portp1235drivers/char/stallion.cstl_getserial(portp, (struct serial_struct *) arg);
portp1239drivers/char/stallion.crc = stl_setserial(portp, (struct serial_struct *) arg);
portp1260drivers/char/stallion.cstlport_t  *portp;
portp1269drivers/char/stallion.cportp = tty->driver_data;
portp1270drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1277drivers/char/stallion.cstl_setport(portp, tiosp);
portp1278drivers/char/stallion.cstl_setsignals(portp, ((tiosp->c_cflag & (CBAUD & ~CBAUDEX)) ? 1 : 0), -1);
portp1284drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1296drivers/char/stallion.cstlport_t  *portp;
portp1305drivers/char/stallion.cportp = tty->driver_data;
portp1306drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1311drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1312drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1314drivers/char/stallion.cstl_ccrwait(portp);
portp1315drivers/char/stallion.cstl_setreg(portp, CCR, CCR_SENDSCHR2);
portp1316drivers/char/stallion.cstl_ccrwait(portp);
portp1319drivers/char/stallion.cstl_setreg(portp, MCOR1, (stl_getreg(portp, MCOR1) & 0xf0));
portp1320drivers/char/stallion.cstl_setreg(portp, MSVR2, 0);
portp1322drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1334drivers/char/stallion.cstlport_t  *portp;
portp1343drivers/char/stallion.cportp = tty->driver_data;
portp1344drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1349drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1350drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1352drivers/char/stallion.cstl_ccrwait(portp);
portp1353drivers/char/stallion.cstl_setreg(portp, CCR, CCR_SENDSCHR1);
portp1354drivers/char/stallion.cstl_ccrwait(portp);
portp1363drivers/char/stallion.cstl_setreg(portp, MCOR1, (stl_getreg(portp, MCOR1) | FIFO_RTSTHRESHOLD));
portp1364drivers/char/stallion.cstl_setreg(portp, MSVR2, MSVR2_RTS);
portp1366drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1379drivers/char/stallion.cstlport_t  *portp;
portp1387drivers/char/stallion.cportp = tty->driver_data;
portp1388drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1391drivers/char/stallion.cstl_startrxtx(portp, -1, 0);
portp1402drivers/char/stallion.cstlport_t  *portp;
portp1410drivers/char/stallion.cportp = tty->driver_data;
portp1411drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1414drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp1427drivers/char/stallion.cstlport_t  *portp;
portp1435drivers/char/stallion.cportp = tty->driver_data;
portp1436drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1439drivers/char/stallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp1440drivers/char/stallion.cstl_disableintrs(portp);
portp1442drivers/char/stallion.cstl_setsignals(portp, 0, 0);
portp1443drivers/char/stallion.cstl_enablerxtx(portp, 0, 0);
portp1445drivers/char/stallion.cportp->istate = 0;
portp1447drivers/char/stallion.cif (portp->tx.buf != (char *) NULL) {
portp1448drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp1449drivers/char/stallion.cportp->tx.buf = (char *) NULL;
portp1450drivers/char/stallion.cportp->tx.head = (char *) NULL;
portp1451drivers/char/stallion.cportp->tx.tail = (char *) NULL;
portp1454drivers/char/stallion.cportp->tty = (struct tty_struct *) NULL;
portp1455drivers/char/stallion.cportp->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
portp1456drivers/char/stallion.cportp->refcount = 0;
portp1457drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1464drivers/char/stallion.cstlport_t  *portp;
portp1473drivers/char/stallion.cportp = tty->driver_data;
portp1474drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1479drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1480drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1481drivers/char/stallion.cstl_ccrwait(portp);
portp1482drivers/char/stallion.cstl_setreg(portp, CCR, CCR_TXFLUSHFIFO);
portp1483drivers/char/stallion.cstl_ccrwait(portp);
portp1484drivers/char/stallion.cportp->tx.tail = portp->tx.head;
portp1485drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1501drivers/char/stallion.cstatic int stl_getreg(stlport_t *portp, int regnr)
portp1503drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1504drivers/char/stallion.creturn(inb(portp->ioaddr + EREG_DATA));
portp1507drivers/char/stallion.cstatic void stl_setreg(stlport_t *portp, int regnr, int value)
portp1509drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1510drivers/char/stallion.coutb(value, portp->ioaddr + EREG_DATA);
portp1513drivers/char/stallion.cstatic int stl_updatereg(stlport_t *portp, int regnr, int value)
portp1515drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1516drivers/char/stallion.cif (inb(portp->ioaddr + EREG_DATA) != value) {
portp1517drivers/char/stallion.coutb(value, portp->ioaddr + EREG_DATA);
portp1539drivers/char/stallion.cstlport_t  *portp;
portp1553drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1560drivers/char/stallion.cif (portp->brklen != 0) {
portp1561drivers/char/stallion.cif (portp->brklen > 0) {
portp1562drivers/char/stallion.coutb((TDR + portp->uartaddr), ioaddr);
portp1567drivers/char/stallion.coutb(portp->brklen, (ioaddr + EREG_DATA));
portp1570drivers/char/stallion.cportp->brklen = -1;
portp1573drivers/char/stallion.coutb((COR2 + portp->uartaddr), ioaddr);
portp1575drivers/char/stallion.cportp->brklen = 0;
portp1579drivers/char/stallion.chead = portp->tx.head;
portp1580drivers/char/stallion.ctail = portp->tx.tail;
portp1582drivers/char/stallion.cif ((len == 0) || ((len < STL_TXBUFLOW) && (test_bit(ASYI_TXLOW, &portp->istate) == 0))) {
portp1583drivers/char/stallion.cset_bit(ASYI_TXLOW, &portp->istate);
portp1584drivers/char/stallion.cqueue_task_irq_off(&portp->tqueue, &tq_scheduler);
portp1588drivers/char/stallion.coutb((SRER + portp->uartaddr), ioaddr);
portp1594drivers/char/stallion.cclear_bit(ASYI_TXBUSY, &portp->istate);
portp1599drivers/char/stallion.cstlen = MIN(len, ((portp->tx.buf + STL_TXBUFSIZE) - tail));
portp1600drivers/char/stallion.coutb((TDR + portp->uartaddr), ioaddr);
portp1604drivers/char/stallion.cif (tail >= (portp->tx.buf + STL_TXBUFSIZE))
portp1605drivers/char/stallion.ctail = portp->tx.buf;
portp1610drivers/char/stallion.cportp->tx.tail = tail;
portp1614drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1632drivers/char/stallion.cstlport_t    *portp;
portp1648drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1649drivers/char/stallion.ctty = portp->tty;
portp1652drivers/char/stallion.coutb((RDCR + portp->uartaddr), ioaddr);
portp1656drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1661drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1671drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1674drivers/char/stallion.cif ((tty != (struct tty_struct *) NULL) && ((portp->rxignoremsk & status) == 0)) {
portp1675drivers/char/stallion.cif (portp->rxmarkmsk & status) {
portp1679drivers/char/stallion.cif (portp->flags & ASYNC_SAK)
portp1708drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1722drivers/char/stallion.cstlport_t  *portp;
portp1735drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1737drivers/char/stallion.coutb((MISR + portp->uartaddr), ioaddr);
portp1740drivers/char/stallion.cset_bit(ASYI_DCDCHANGE, &portp->istate);
portp1741drivers/char/stallion.cqueue_task_irq_off(&portp->tqueue, &tq_scheduler);
portp1744drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1898drivers/char/stallion.cstlport_t    *portp;
portp1902drivers/char/stallion.cportp = private;
portp1904drivers/char/stallion.cprintk("stl_offintr(portp=%x)\n", (int) portp);
portp1907drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1909drivers/char/stallion.ctty = portp->tty;
portp1913drivers/char/stallion.cif (test_bit(ASYI_TXLOW, &portp->istate)) {
portp1918drivers/char/stallion.cif (test_bit(ASYI_DCDCHANGE, &portp->istate)) {
portp1919drivers/char/stallion.cclear_bit(ASYI_DCDCHANGE, &portp->istate);
portp1920drivers/char/stallion.coldsigs = portp->sigs;
portp1921drivers/char/stallion.cstl_getsignals(portp);
portp1922drivers/char/stallion.cif ((portp->sigs & TIOCM_CD) && ((oldsigs & TIOCM_CD) == 0))
portp1923drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1924drivers/char/stallion.cif ((oldsigs & TIOCM_CD) && ((portp->sigs & TIOCM_CD) == 0)) {
portp1925drivers/char/stallion.cif (! ((portp->flags & ASYNC_CALLOUT_ACTIVE) &&
portp1926drivers/char/stallion.c(portp->flags & ASYNC_CALLOUT_NOHUP))) {
portp1940drivers/char/stallion.cstatic void stl_ccrwait(stlport_t *portp)
portp1945drivers/char/stallion.cif (stl_getreg(portp, CCR) == 0) {
portp1950drivers/char/stallion.cprintk("STALLION: cd1400 device not responding, port=%d panel=%d brd=%d\n", portp->portnr, portp->panelnr, portp->brdnr);
portp1960drivers/char/stallion.cstatic void stl_setport(stlport_t *portp, struct termios *tiosp)
portp1985drivers/char/stallion.cbrdp = stl_brds[portp->brdnr];
portp1994drivers/char/stallion.cportp->rxignoremsk = 0;
portp1996drivers/char/stallion.cportp->rxignoremsk |= (ST_PARITY | ST_FRAMING | ST_OVERRUN);
portp2000drivers/char/stallion.cportp->rxignoremsk |= ST_BREAK;
portp2004drivers/char/stallion.cportp->rxmarkmsk = ST_OVERRUN;
portp2006drivers/char/stallion.cportp->rxmarkmsk |= (ST_PARITY | ST_FRAMING);
portp2008drivers/char/stallion.cportp->rxmarkmsk |= ST_BREAK;
portp2068drivers/char/stallion.cif ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
portp2070drivers/char/stallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
portp2072drivers/char/stallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
portp2073drivers/char/stallion.cbaudrate = (portp->baud_base / portp->custom_divisor);
portp2120drivers/char/stallion.cprintk("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", portp->portnr, portp->panelnr, portp->brdnr);
portp2129drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2130drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x3));
portp2131drivers/char/stallion.csrer = stl_getreg(portp, SRER);
portp2132drivers/char/stallion.cstl_setreg(portp, SRER, 0);
portp2133drivers/char/stallion.cif (stl_updatereg(portp, COR1, cor1))
portp2135drivers/char/stallion.cif (stl_updatereg(portp, COR2, cor2))
portp2137drivers/char/stallion.cif (stl_updatereg(portp, COR3, cor3))
portp2140drivers/char/stallion.cstl_ccrwait(portp);
portp2141drivers/char/stallion.cstl_setreg(portp, CCR, CCR_CORCHANGE);
portp2143drivers/char/stallion.cstl_setreg(portp, COR4, cor4);
portp2144drivers/char/stallion.cstl_setreg(portp, COR5, cor5);
portp2145drivers/char/stallion.cstl_setreg(portp, MCOR1, mcor1);
portp2146drivers/char/stallion.cstl_setreg(portp, MCOR2, mcor2);
portp2148drivers/char/stallion.cstl_setreg(portp, TCOR, clk);
portp2149drivers/char/stallion.cstl_setreg(portp, TBPR, div);
portp2150drivers/char/stallion.cstl_setreg(portp, RCOR, clk);
portp2151drivers/char/stallion.cstl_setreg(portp, RBPR, div);
portp2153drivers/char/stallion.cstl_setreg(portp, SCHR1, tiosp->c_cc[VSTART]);
portp2154drivers/char/stallion.cstl_setreg(portp, SCHR2, tiosp->c_cc[VSTOP]);
portp2155drivers/char/stallion.cstl_setreg(portp, SCHR3, tiosp->c_cc[VSTART]);
portp2156drivers/char/stallion.cstl_setreg(portp, SCHR4, tiosp->c_cc[VSTOP]);
portp2157drivers/char/stallion.cstl_setreg(portp, RTPR, rtpr);
portp2158drivers/char/stallion.cmcor1 = stl_getreg(portp, MSVR1);
portp2160drivers/char/stallion.cportp->sigs |= TIOCM_CD;
portp2162drivers/char/stallion.cportp->sigs &= ~TIOCM_CD;
portp2163drivers/char/stallion.cstl_setreg(portp, SRER, ((srer & ~sreroff) | sreron));
portp2164drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2174drivers/char/stallion.cstatic void stl_setsignals(stlport_t *portp, int dtr, int rts)
portp2180drivers/char/stallion.cprintk("stl_setsignals(portp=%x,dtr=%d,rts=%d)\n", (int) portp, dtr, rts);
portp2192drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2193drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2195drivers/char/stallion.cstl_setreg(portp, MSVR2, msvr2);
portp2197drivers/char/stallion.cstl_setreg(portp, MSVR1, msvr1);
portp2198drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2208drivers/char/stallion.cstatic void stl_getsignals(stlport_t *portp)
portp2214drivers/char/stallion.cprintk("stl_getsignals(portp=%x)\n", (int) portp);
portp2219drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2220drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2221drivers/char/stallion.cmsvr1 = stl_getreg(portp, MSVR1);
portp2222drivers/char/stallion.cmsvr2 = stl_getreg(portp, MSVR2);
portp2223drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2224drivers/char/stallion.cportp->sigs = 0;
portp2225drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_DCD) ? TIOCM_CD : 0;
portp2226drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_CTS) ? TIOCM_CTS : 0;
portp2227drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_RI) ? TIOCM_RI : 0;
portp2228drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_DSR) ? TIOCM_DSR : 0;
portp2229drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_DTR) ? TIOCM_DTR : 0;
portp2230drivers/char/stallion.cportp->sigs |= (msvr2 & MSVR2_RTS) ? TIOCM_RTS : 0;
portp2240drivers/char/stallion.cstatic void stl_enablerxtx(stlport_t *portp, int rx, int tx)
portp2246drivers/char/stallion.cprintk("stl_enablerxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx);
portp2261drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2262drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2263drivers/char/stallion.cstl_ccrwait(portp);
portp2264drivers/char/stallion.cstl_setreg(portp, CCR, ccr);
portp2265drivers/char/stallion.cstl_ccrwait(portp);
portp2266drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2276drivers/char/stallion.cstatic void stl_startrxtx(stlport_t *portp, int rx, int tx)
portp2282drivers/char/stallion.cprintk("stl_startrxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx);
portp2300drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2301drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2302drivers/char/stallion.cstl_setreg(portp, SRER, ((stl_getreg(portp, SRER) & ~sreroff) | sreron));
portp2303drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2305drivers/char/stallion.cset_bit(ASYI_TXBUSY, &portp->istate);
portp2315drivers/char/stallion.cstatic void stl_disableintrs(stlport_t *portp)
portp2320drivers/char/stallion.cprintk("stl_disableintrs(portp=%x)\n", (int) portp);
portp2324drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2325drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2326drivers/char/stallion.cstl_setreg(portp, SRER, 0);
portp2327drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2333drivers/char/stallion.cstatic void stl_sendbreak(stlport_t *portp, long len)
portp2338drivers/char/stallion.cprintk("stl_sendbreak(portp=%x,len=%d)\n", (int) portp, (int) len);
portp2343drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2344drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2345drivers/char/stallion.cstl_setreg(portp, COR2, (stl_getreg(portp, COR2) | COR2_ETC));
portp2346drivers/char/stallion.cstl_setreg(portp, SRER, ((stl_getreg(portp, SRER) & ~SRER_TXDATA) | SRER_TXEMPTY));
portp2347drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2349drivers/char/stallion.cportp->brklen = (len > 255) ? 255 : len;
portp2395drivers/char/stallion.cstlport_t  *portp;
portp2454drivers/char/stallion.cportp = (stlport_t *) stl_memalloc(sizeof(stlport_t));
portp2455drivers/char/stallion.cif (portp == (stlport_t *) NULL) {
portp2459drivers/char/stallion.cmemset(portp, 0, sizeof(stlport_t));
portp2460drivers/char/stallion.cportp->portnr = i;
portp2461drivers/char/stallion.cportp->brdnr = panelp->brdnr;
portp2462drivers/char/stallion.cportp->panelnr = panelp->panelnr;
portp2463drivers/char/stallion.cportp->ioaddr = ioaddr;
portp2464drivers/char/stallion.cportp->uartaddr = (i & 0x04) << 5;
portp2465drivers/char/stallion.cportp->pagenr = panelp->pagenr + (i >> 3);
portp2466drivers/char/stallion.cportp->baud_base = STL_BAUDBASE;
portp2467drivers/char/stallion.cportp->close_delay = STL_CLOSEDELAY;
portp2468drivers/char/stallion.cportp->closing_wait = 30 * HZ;
portp2469drivers/char/stallion.cportp->normaltermios = stl_deftermios;
portp2470drivers/char/stallion.cportp->callouttermios = stl_deftermios;
portp2471drivers/char/stallion.cportp->tqueue.routine = stl_offintr;
portp2472drivers/char/stallion.cportp->tqueue.data = portp;
portp2473drivers/char/stallion.cstl_setreg(portp, CAR, (i & 0x03));
portp2474drivers/char/stallion.cstl_setreg(portp, LIVR, (i << 3));
portp2475drivers/char/stallion.cpanelp->ports[i] = portp;