taglinefilesource code
portp608drivers/char/istallion.cstatic int  stli_initopen(stlibrd_t *brdp, stliport_t *portp);
portp609drivers/char/istallion.cstatic int  stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait);
portp610drivers/char/istallion.cstatic int  stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait);
portp611drivers/char/istallion.cstatic int  stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp);
portp614drivers/char/istallion.cstatic int  stli_setport(stliport_t *portp);
portp615drivers/char/istallion.cstatic int  stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
portp616drivers/char/istallion.cstatic void  stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback);
portp617drivers/char/istallion.cstatic void  stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp);
portp618drivers/char/istallion.cstatic void  stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp);
portp621drivers/char/istallion.cstatic void  stli_read(stlibrd_t *brdp, stliport_t *portp);
portp622drivers/char/istallion.cstatic void  stli_getserial(stliport_t *portp, struct serial_struct *sp);
portp623drivers/char/istallion.cstatic int  stli_setserial(stliport_t *portp, struct serial_struct *sp);
portp732drivers/char/istallion.cstliport_t  *portp;
portp772drivers/char/istallion.cportp = brdp->ports[j];
portp773drivers/char/istallion.cif (portp != (stliport_t *) NULL) {
portp774drivers/char/istallion.cif (portp->tty != (struct tty_struct *) NULL)
portp775drivers/char/istallion.ctty_hangup(portp->tty);
portp776drivers/char/istallion.ckfree_s(portp, sizeof(stliport_t));
portp817drivers/char/istallion.cstliport_t  *portp;
portp838drivers/char/istallion.cportp = brdp->ports[portnr];
portp839drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp841drivers/char/istallion.cif (portp->devnr < 1)
portp850drivers/char/istallion.cif (portp->flags & ASYNC_CLOSING) {
portp851drivers/char/istallion.cinterruptible_sleep_on(&portp->close_wait);
portp852drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp863drivers/char/istallion.cportp->tty = tty;
portp864drivers/char/istallion.ctty->driver_data = portp;
portp865drivers/char/istallion.cportp->refcount++;
portp867drivers/char/istallion.cwhile (test_bit(ST_INITIALIZING, &portp->state)) {
portp870drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp873drivers/char/istallion.cif ((portp->flags & ASYNC_INITIALIZED) == 0) {
portp874drivers/char/istallion.cset_bit(ST_INITIALIZING, &portp->state);
portp875drivers/char/istallion.cif ((rc = stli_initopen(brdp, portp)) >= 0) {
portp876drivers/char/istallion.cportp->flags |= ASYNC_INITIALIZED;
portp879drivers/char/istallion.cclear_bit(ST_INITIALIZING, &portp->state);
portp880drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp891drivers/char/istallion.cif (portp->flags & ASYNC_CLOSING) {
portp892drivers/char/istallion.cinterruptible_sleep_on(&portp->close_wait);
portp893drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp904drivers/char/istallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp906drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE) {
portp907drivers/char/istallion.cif ((portp->flags & ASYNC_SESSION_LOCKOUT) &&
portp908drivers/char/istallion.c(portp->session != current->session))
portp910drivers/char/istallion.cif ((portp->flags & ASYNC_PGRP_LOCKOUT) &&
portp911drivers/char/istallion.c(portp->pgrp != current->pgrp))
portp914drivers/char/istallion.cportp->flags |= ASYNC_CALLOUT_ACTIVE;
portp917drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp920drivers/char/istallion.cif ((rc = stli_waitcarrier(brdp, portp, filp)) != 0)
portp923drivers/char/istallion.cportp->flags |= ASYNC_NORMAL_ACTIVE;
portp926drivers/char/istallion.cif ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
portp928drivers/char/istallion.c*tty->termios = portp->normaltermios;
portp930drivers/char/istallion.c*tty->termios = portp->callouttermios;
portp931drivers/char/istallion.cstli_setport(portp);
portp934drivers/char/istallion.cportp->session = current->session;
portp935drivers/char/istallion.cportp->pgrp = current->pgrp;
portp944drivers/char/istallion.cstliport_t  *portp;
portp951drivers/char/istallion.cportp = tty->driver_data;
portp952drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp961drivers/char/istallion.cif (portp->refcount-- > 1) {
portp966drivers/char/istallion.cportp->flags |= ASYNC_CLOSING;
portp968drivers/char/istallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp969drivers/char/istallion.cportp->normaltermios = *tty->termios;
portp970drivers/char/istallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp971drivers/char/istallion.cportp->callouttermios = *tty->termios;
portp982drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp983drivers/char/istallion.cif (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE)
portp984drivers/char/istallion.ctty_wait_until_sent(tty, portp->closing_wait);
portp987drivers/char/istallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp988drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp989drivers/char/istallion.cstli_rawclose(brdp, portp, 0, 1);
portp991drivers/char/istallion.cstli_mkasysigs(&portp->asig, 0, 0);
portp992drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp994drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp995drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp999drivers/char/istallion.cset_bit(ST_DOFLUSHRX, &portp->state);
portp1004drivers/char/istallion.cportp->tty = (struct tty_struct *) NULL;
portp1006drivers/char/istallion.cif (portp->openwaitcnt) {
portp1007drivers/char/istallion.cif (portp->close_delay)
portp1008drivers/char/istallion.cstli_delay(portp->close_delay);
portp1009drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp1012drivers/char/istallion.cportp->flags &= ~(ASYNC_CALLOUT_ACTIVE | ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
portp1013drivers/char/istallion.cwake_up_interruptible(&portp->close_wait);
portp1027drivers/char/istallion.cstatic int stli_initopen(stlibrd_t *brdp, stliport_t *portp)
portp1035drivers/char/istallion.cprintk("stli_initopen(brdp=%x,portp=%x)\n", (int) brdp, (int) portp);
portp1038drivers/char/istallion.cif ((rc = stli_rawopen(brdp, portp, 0, 1)) < 0)
portp1044drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETNOTIFY, &nt, sizeof(asynotify_t), 0)) < 0)
portp1047drivers/char/istallion.ctty = portp->tty;
portp1050drivers/char/istallion.cstli_mkasyport(portp, &aport, tty->termios);
portp1051drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0)) < 0)
portp1054drivers/char/istallion.cset_bit(ST_GETSIGS, &portp->state);
portp1055drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0)
portp1057drivers/char/istallion.cif (clear_bit(ST_GETSIGS, &portp->state))
portp1058drivers/char/istallion.cportp->sigs = stli_mktiocm(portp->asig.sigvalue);
portp1059drivers/char/istallion.cstli_mkasysigs(&portp->asig, 1, 1);
portp1060drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0)
portp1075drivers/char/istallion.cstatic int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait)
portp1084drivers/char/istallion.cprintk("stli_rawopen(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait);
portp1099drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1104drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1113drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp1117drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1118drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1119drivers/char/istallion.c*bits |= portp->portbit;
portp1132drivers/char/istallion.cset_bit(ST_OPENING, &portp->state);
portp1133drivers/char/istallion.cwhile (test_bit(ST_OPENING, &portp->state)) {
portp1138drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1142drivers/char/istallion.cif ((rc == 0) && (portp->rc != 0))
portp1155drivers/char/istallion.cstatic int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int wait)
portp1164drivers/char/istallion.cprintk("stli_rawclose(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait);
portp1175drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1180drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1188drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp1192drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1193drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1194drivers/char/istallion.c*bits |= portp->portbit;
portp1197drivers/char/istallion.cset_bit(ST_CLOSING, &portp->state);
portp1208drivers/char/istallion.cwhile (test_bit(ST_CLOSING, &portp->state)) {
portp1213drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1217drivers/char/istallion.cif ((rc == 0) && (portp->rc != 0))
portp1231drivers/char/istallion.cstatic int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback)
portp1236drivers/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);
portp1241drivers/char/istallion.cwhile (test_bit(ST_CMDING, &portp->state)) {
portp1246drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1249drivers/char/istallion.cstli_sendcmd(brdp, portp, cmd, arg, size, copyback);
portp1251drivers/char/istallion.cwhile (test_bit(ST_CMDING, &portp->state)) {
portp1256drivers/char/istallion.cinterruptible_sleep_on(&portp->raw_wait);
portp1260drivers/char/istallion.cif (portp->rc != 0)
portp1272drivers/char/istallion.cstatic int stli_setport(stliport_t *portp)
portp1278drivers/char/istallion.cprintk("stli_setport(portp=%x)\n", (int) portp);
portp1281drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1283drivers/char/istallion.cif (portp->tty == (struct tty_struct *) NULL)
portp1285drivers/char/istallion.cif ((portp->brdnr < 0) && (portp->brdnr >= stli_nrbrds))
portp1287drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1289drivers/char/istallion.cstli_mkasyport(portp, &aport, portp->tty->termios);
portp1290drivers/char/istallion.creturn(stli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0));
portp1320drivers/char/istallion.cstatic int stli_waitcarrier(stlibrd_t *brdp, stliport_t *portp, struct file *filp)
portp1326drivers/char/istallion.cprintk("stli_waitcarrier(brdp=%x,portp=%x,filp=%x)\n", (int) brdp, (int) portp, (int) filp);
portp1333drivers/char/istallion.cportp->openwaitcnt++;
portp1334drivers/char/istallion.cif (portp->refcount > 0)
portp1335drivers/char/istallion.cportp->refcount--;
portp1338drivers/char/istallion.cif ((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) {
portp1339drivers/char/istallion.cstli_mkasysigs(&portp->asig, 1, 1);
portp1340drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0)) < 0)
portp1343drivers/char/istallion.cif (tty_hung_up_p(filp) || ((portp->flags & ASYNC_INITIALIZED) == 0)) {
portp1344drivers/char/istallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp1350drivers/char/istallion.cif (((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) &&
portp1351drivers/char/istallion.c((portp->flags & ASYNC_CLOSING) == 0) &&
portp1352drivers/char/istallion.c((portp->tty->termios->c_cflag & CLOCAL) ||
portp1353drivers/char/istallion.c(portp->sigs & TIOCM_CD))) {
portp1360drivers/char/istallion.cinterruptible_sleep_on(&portp->open_wait);
portp1364drivers/char/istallion.cportp->refcount++;
portp1365drivers/char/istallion.cportp->openwaitcnt--;
portp1385drivers/char/istallion.cstliport_t    *portp;
portp1398drivers/char/istallion.cportp = tty->driver_data;
portp1399drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1401drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1403drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1421drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1426drivers/char/istallion.clen = (head >= tail) ? (portp->txsize - (head - tail) - 1) : (tail - head - 1);
portp1443drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1448drivers/char/istallion.csize = portp->txsize;
portp1459drivers/char/istallion.cshbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset);
portp1474drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1476drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1481drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1482drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1483drivers/char/istallion.c*bits |= portp->portbit;
portp1484drivers/char/istallion.cset_bit(ST_TXBUSY, &portp->state);
portp1535drivers/char/istallion.cstliport_t    *portp;
portp1560drivers/char/istallion.cportp = tty->driver_data;
portp1561drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1563drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1565drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1571drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1576drivers/char/istallion.csize = portp->txsize;
portp1587drivers/char/istallion.cshbuf = (char *) EBRDGETMEMPTR(brdp, portp->txoffset);
portp1603drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp1606drivers/char/istallion.cif (test_bit(ST_TXBUSY, &portp->state)) {
portp1611drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp1612drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp1613drivers/char/istallion.c*bits |= portp->portbit;
portp1614drivers/char/istallion.cset_bit(ST_TXBUSY, &portp->state);
portp1625drivers/char/istallion.cstliport_t    *portp;
portp1643drivers/char/istallion.cportp = tty->driver_data;
portp1644drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1646drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1648drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1653drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq;
portp1658drivers/char/istallion.clen = (head >= tail) ? (portp->txsize - (head - tail)) : (tail - head);
portp1683drivers/char/istallion.cstliport_t    *portp;
portp1696drivers/char/istallion.cportp = tty->driver_data;
portp1697drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1699drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1701drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1706drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->txq;
portp1711drivers/char/istallion.clen = (head >= tail) ? (head - tail) : (portp->txsize - (tail - head));
portp1712drivers/char/istallion.cif ((len == 0) && test_bit(ST_TXBUSY, &portp->state))
portp1726drivers/char/istallion.cstatic void stli_getserial(stliport_t *portp, struct serial_struct *sp)
portp1731drivers/char/istallion.cprintk("stli_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1736drivers/char/istallion.csio.line = portp->portnr;
portp1737drivers/char/istallion.csio.port = stli_brdconf[portp->brdnr].ioaddr1;
portp1738drivers/char/istallion.csio.irq = stli_brdconf[portp->brdnr].irq;
portp1739drivers/char/istallion.csio.flags = portp->flags;
portp1740drivers/char/istallion.csio.baud_base = portp->baud_base;
portp1741drivers/char/istallion.csio.close_delay = portp->close_delay;
portp1742drivers/char/istallion.csio.closing_wait = portp->closing_wait;
portp1743drivers/char/istallion.csio.custom_divisor = portp->custom_divisor;
portp1757drivers/char/istallion.cstatic int stli_setserial(stliport_t *portp, struct serial_struct *sp)
portp1763drivers/char/istallion.cprintk("stli_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1768drivers/char/istallion.cif ((sio.baud_base != portp->baud_base) ||
portp1769drivers/char/istallion.c(sio.close_delay != portp->close_delay) ||
portp1770drivers/char/istallion.c((sio.flags & ~ASYNC_USR_MASK) != (portp->flags & ~ASYNC_USR_MASK)))
portp1774drivers/char/istallion.cportp->flags = (portp->flags & ~ASYNC_USR_MASK) | (sio.flags & ASYNC_USR_MASK);
portp1775drivers/char/istallion.cportp->baud_base = sio.baud_base;
portp1776drivers/char/istallion.cportp->close_delay = sio.close_delay;
portp1777drivers/char/istallion.cportp->closing_wait = sio.closing_wait;
portp1778drivers/char/istallion.cportp->custom_divisor = sio.custom_divisor;
portp1780drivers/char/istallion.cif ((rc = stli_setport(portp)) < 0)
portp1789drivers/char/istallion.cstliport_t  *portp;
portp1800drivers/char/istallion.cportp = tty->driver_data;
portp1801drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1803drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1805drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1815drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0);
portp1823drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_BREAK, &val, sizeof(unsigned long), 0);
portp1838drivers/char/istallion.cif ((rc = stli_cmdwait(brdp, portp, A_GETSIGNALS, &portp->asig, sizeof(asysigs_t), 1)) < 0)
portp1840drivers/char/istallion.cval = stli_mktiocm(portp->asig.sigvalue);
portp1847drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 1 : -1), ((arg & TIOCM_RTS) ? 1 : -1));
portp1848drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1854drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 0 : -1), ((arg & TIOCM_RTS) ? 0 : -1));
portp1855drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1861drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((arg & TIOCM_DTR) ? 1 : 0), ((arg & TIOCM_RTS) ? 1 : 0));
portp1862drivers/char/istallion.crc = stli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1867drivers/char/istallion.cstli_getserial(portp, (struct serial_struct *) arg);
portp1871drivers/char/istallion.crc = stli_setserial(portp, (struct serial_struct *) arg);
portp1897drivers/char/istallion.cstliport_t  *portp;
portp1908drivers/char/istallion.cportp = tty->driver_data;
portp1909drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1911drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp1913drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp1919drivers/char/istallion.cstli_mkasyport(portp, &aport, tiosp);
portp1920drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETPORT, &aport, sizeof(asyport_t), 0);
portp1921drivers/char/istallion.cstli_mkasysigs(&portp->asig, ((tiosp->c_cflag & CBAUD) ? 1 : 0), -1);
portp1922drivers/char/istallion.cstli_cmdwait(brdp, portp, A_SETSIGNALS, &portp->asig, sizeof(asysigs_t), 0);
portp1926drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp1943drivers/char/istallion.cstliport_t  *portp;
portp1951drivers/char/istallion.cportp = tty->driver_data;
portp1952drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1955drivers/char/istallion.cset_bit(ST_RXSTOP, &portp->state);
portp1968drivers/char/istallion.cstliport_t  *portp;
portp1976drivers/char/istallion.cportp = tty->driver_data;
portp1977drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp1980drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp1993drivers/char/istallion.cstliport_t  *portp;
portp2002drivers/char/istallion.cportp = tty->driver_data;
portp2003drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2005drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2007drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp2012drivers/char/istallion.cstli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t));
portp2024drivers/char/istallion.cstliport_t  *portp;
portp2034drivers/char/istallion.cportp = tty->driver_data;
portp2035drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2037drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2039drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp2044drivers/char/istallion.cstli_cmdwait(brdp, portp, A_PORTCTRL, &actrl, sizeof(asyctrl_t));
portp2061drivers/char/istallion.cstliport_t  *portp;
portp2067drivers/char/istallion.cportp = (stliport_t *) arg;
portp2068drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2070drivers/char/istallion.cif (portp->tty == (struct tty_struct *) NULL)
portp2072drivers/char/istallion.ctty_hangup(portp->tty);
portp2086drivers/char/istallion.cstliport_t  *portp;
portp2096drivers/char/istallion.cportp = tty->driver_data;
portp2097drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2099drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2101drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp2103drivers/char/istallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp2107drivers/char/istallion.cif (! test_bit(ST_CLOSING, &portp->state))
portp2108drivers/char/istallion.cstli_rawclose(brdp, portp, 0, 0);
portp2110drivers/char/istallion.cstli_mkasysigs(&portp->asig, 0, 0);
portp2111drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2112drivers/char/istallion.cset_bit(ST_DOSIGS, &portp->state);
portp2113drivers/char/istallion.cset_bit(ST_DOFLUSHTX, &portp->state);
portp2114drivers/char/istallion.cset_bit(ST_DOFLUSHRX, &portp->state);
portp2116drivers/char/istallion.cstli_sendcmd(brdp, portp, A_SETSIGNALSF, &portp->asig, sizeof(asysigs_t), 0);
portp2121drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp2122drivers/char/istallion.cclear_bit(ST_RXSTOP, &portp->state);
portp2125drivers/char/istallion.cportp->tty = (struct tty_struct *) NULL;
portp2126drivers/char/istallion.cportp->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
portp2127drivers/char/istallion.cportp->refcount = 0;
portp2128drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2142drivers/char/istallion.cstliport_t  *portp;
portp2152drivers/char/istallion.cportp = tty->driver_data;
portp2153drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp2155drivers/char/istallion.cif ((portp->brdnr < 0) || (portp->brdnr >= stli_nrbrds))
portp2157drivers/char/istallion.cbrdp = &stli_brds[portp->brdnr];
portp2166drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2167drivers/char/istallion.cset_bit(ST_DOFLUSHTX, &portp->state);
portp2170drivers/char/istallion.cif (test_bit(ST_DOFLUSHRX, &portp->state)) {
portp2172drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2174drivers/char/istallion.cstli_sendcmd(brdp, portp, A_FLUSH, &ftype, sizeof(unsigned long), 0);
portp2195drivers/char/istallion.cstatic void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback)
portp2203drivers/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);
portp2206drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2214drivers/char/istallion.ccp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->ctrl;
portp2218drivers/char/istallion.cportp->argp = arg;
portp2219drivers/char/istallion.cportp->argsize = size;
portp2225drivers/char/istallion.chdrp->slavereq |= portp->reqbit;
portp2226drivers/char/istallion.cbits = ((volatile unsigned char *) hdrp) + brdp->slaveoffset + portp->portidx;
portp2227drivers/char/istallion.c*bits |= portp->portbit;
portp2228drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2243drivers/char/istallion.cstatic inline void stli_read(stlibrd_t *brdp, stliport_t *portp)
portp2252drivers/char/istallion.cprintk("stli_read(brdp=%x,portp=%d)\n", (int) brdp, (int) portp);
portp2255drivers/char/istallion.cif (test_bit(ST_RXSTOP, &portp->state))
portp2257drivers/char/istallion.ctty = portp->tty;
portp2261drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq;
portp2266drivers/char/istallion.csize = portp->rxsize;
portp2276drivers/char/istallion.cshbuf = (volatile char *) EBRDGETMEMPTR(brdp, portp->rxoffset);
portp2293drivers/char/istallion.crp = &((volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr))->rxq;
portp2297drivers/char/istallion.cset_bit(ST_RXING, &portp->state);
portp2310drivers/char/istallion.cstatic inline void stli_dodelaycmd(stliport_t *portp, volatile cdkctrl_t *cp)
portp2314drivers/char/istallion.cif (test_bit(ST_DOSIGS, &portp->state)) {
portp2315drivers/char/istallion.cif (test_bit(ST_DOFLUSHTX, &portp->state) && test_bit(ST_DOFLUSHRX, &portp->state))
portp2317drivers/char/istallion.celse if (test_bit(ST_DOFLUSHTX, &portp->state))
portp2319drivers/char/istallion.celse if (test_bit(ST_DOFLUSHRX, &portp->state))
portp2323drivers/char/istallion.cclear_bit(ST_DOFLUSHTX, &portp->state);
portp2324drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2325drivers/char/istallion.cclear_bit(ST_DOSIGS, &portp->state);
portp2326drivers/char/istallion.cmemcpy((void *) &(cp->args[0]), (void *) &portp->asig, sizeof(asysigs_t));
portp2329drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2330drivers/char/istallion.c} else if (test_bit(ST_DOFLUSHTX, &portp->state) || test_bit(ST_DOFLUSHRX, &portp->state)) {
portp2331drivers/char/istallion.ccmd = ((test_bit(ST_DOFLUSHTX, &portp->state)) ? FLUSHTX : 0);
portp2332drivers/char/istallion.ccmd |= ((test_bit(ST_DOFLUSHRX, &portp->state)) ? FLUSHRX : 0);
portp2333drivers/char/istallion.cclear_bit(ST_DOFLUSHTX, &portp->state);
portp2334drivers/char/istallion.cclear_bit(ST_DOFLUSHRX, &portp->state);
portp2338drivers/char/istallion.cset_bit(ST_CMDING, &portp->state);
portp2358drivers/char/istallion.cstliport_t    *portp;
portp2366drivers/char/istallion.cportp = brdp->ports[(channr - 1)];
portp2367drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp2373drivers/char/istallion.cif (test_bit(ST_OPENING, &portp->state)) {
portp2379drivers/char/istallion.cportp->rc = rc;
portp2380drivers/char/istallion.cclear_bit(ST_OPENING, &portp->state);
portp2381drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2388drivers/char/istallion.cif (test_bit(ST_CLOSING, &portp->state)) {
portp2394drivers/char/istallion.cportp->rc = rc;
portp2395drivers/char/istallion.cclear_bit(ST_CLOSING, &portp->state);
portp2396drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2404drivers/char/istallion.cif (test_bit(ST_CMDING, &portp->state)) {
portp2409drivers/char/istallion.cif (portp->argp != (void *) NULL) {
portp2410drivers/char/istallion.cmemcpy(portp->argp, (void *) &(cp->args[0]), portp->argsize);
portp2411drivers/char/istallion.cportp->argp = (void *) NULL;
portp2414drivers/char/istallion.cportp->rc = rc;
portp2415drivers/char/istallion.cclear_bit(ST_CMDING, &portp->state);
portp2416drivers/char/istallion.cstli_dodelaycmd(portp, cp);
portp2417drivers/char/istallion.cwake_up_interruptible(&portp->raw_wait);
portp2431drivers/char/istallion.ctty = portp->tty;
portp2434drivers/char/istallion.coldsigs = portp->sigs;
portp2435drivers/char/istallion.cportp->sigs = stli_mktiocm(nt.sigvalue);
portp2436drivers/char/istallion.cclear_bit(ST_GETSIGS, &portp->state);
portp2437drivers/char/istallion.cif ((portp->sigs & TIOCM_CD) && ((oldsigs & TIOCM_CD) == 0))
portp2438drivers/char/istallion.cwake_up_interruptible(&portp->open_wait);
portp2439drivers/char/istallion.cif ((oldsigs & TIOCM_CD) && ((portp->sigs & TIOCM_CD) == 0)) {
portp2440drivers/char/istallion.cif (! ((portp->flags & ASYNC_CALLOUT_ACTIVE) &&
portp2441drivers/char/istallion.c(portp->flags & ASYNC_CALLOUT_NOHUP))) {
portp2443drivers/char/istallion.cqueue_task_irq_off(&portp->tqhangup, &tq_scheduler);
portp2449drivers/char/istallion.cclear_bit(ST_TXBUSY, &portp->state);
portp2458drivers/char/istallion.cif ((nt.data & DT_RXBREAK) && (portp->rxmarkmsk & BRKINT)) {
portp2465drivers/char/istallion.cif (portp->flags & ASYNC_SAK)
portp2475drivers/char/istallion.cstli_read(brdp, portp);
portp2487drivers/char/istallion.cif ((!donerx) && test_bit(ST_RXING, &portp->state)) {
portp2488drivers/char/istallion.cclear_bit(ST_RXING, &portp->state);
portp2489drivers/char/istallion.cstli_read(brdp, portp);
portp2511drivers/char/istallion.cstliport_t    *portp;
portp2572drivers/char/istallion.cportp = brdp->ports[(channr - 1)];
portp2573drivers/char/istallion.cif (test_bit(ST_OPENING, &portp->state) ||
portp2574drivers/char/istallion.ctest_bit(ST_CLOSING, &portp->state) ||
portp2575drivers/char/istallion.ctest_bit(ST_CMDING, &portp->state) ||
portp2576drivers/char/istallion.ctest_bit(ST_TXBUSY, &portp->state)) {
portp2577drivers/char/istallion.cslavereq |= portp->reqbit;
portp2601drivers/char/istallion.cstatic void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp)
portp2604drivers/char/istallion.cprintk("stli_mkasyport(portp=%x,pp=%x,tiosp=%d)\n", (int) portp, (int) pp, (int) tiosp);
portp2622drivers/char/istallion.cif ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
portp2624drivers/char/istallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
portp2626drivers/char/istallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
portp2627drivers/char/istallion.cpp->baudout = (portp->baud_base / portp->custom_divisor);
portp2689drivers/char/istallion.cportp->rxmarkmsk = 0;
portp2693drivers/char/istallion.cportp->rxmarkmsk |= BRKINT;
portp2754drivers/char/istallion.cstliport_t  *portp;
portp2762drivers/char/istallion.cportp = (stliport_t *) stli_memalloc(sizeof(stliport_t));
portp2763drivers/char/istallion.cif (portp == (stliport_t *) NULL) {
portp2768drivers/char/istallion.cmemset(portp, 0, sizeof(stliport_t));
portp2769drivers/char/istallion.cportp->portnr = i;
portp2770drivers/char/istallion.cportp->brdnr = brdp->brdnr;
portp2771drivers/char/istallion.cportp->panelnr = panelnr;
portp2772drivers/char/istallion.cportp->baud_base = STL_BAUDBASE;
portp2773drivers/char/istallion.cportp->close_delay = STL_CLOSEDELAY;
portp2774drivers/char/istallion.cportp->closing_wait = 30 * HZ;
portp2775drivers/char/istallion.cportp->tqhangup.routine = stli_dohangup;
portp2776drivers/char/istallion.cportp->tqhangup.data = portp;
portp2777drivers/char/istallion.cportp->normaltermios = stli_deftermios;
portp2778drivers/char/istallion.cportp->callouttermios = stli_deftermios;
portp2784drivers/char/istallion.cbrdp->ports[i] = portp;
portp3623drivers/char/istallion.cstliport_t    *portp;
portp3674drivers/char/istallion.cportp = brdp->ports[portnr];
portp3675drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp3677drivers/char/istallion.cportp->devnr = i;
portp3678drivers/char/istallion.cportp->addr = memp->offset;
portp3679drivers/char/istallion.cportp->reqbit = (unsigned char) (0x1 << (i * 8 / nrdevs));
portp3680drivers/char/istallion.cportp->portidx = (unsigned char) (i / 8);
portp3681drivers/char/istallion.cportp->portbit = (unsigned char) (0x1 << (i % 8));
portp3690drivers/char/istallion.cportp = brdp->ports[portnr];
portp3691drivers/char/istallion.cif (portp == (stliport_t *) NULL)
portp3693drivers/char/istallion.cif (portp->addr == 0)
portp3695drivers/char/istallion.cap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr);
portp3697drivers/char/istallion.cportp->rxsize = ap->rxq.size;
portp3698drivers/char/istallion.cportp->txsize = ap->txq.size;
portp3699drivers/char/istallion.cportp->rxoffset = ap->rxq.offset;
portp3700drivers/char/istallion.cportp->txoffset = ap->txq.offset;
portp480drivers/char/stallion.cstatic void  stl_getserial(stlport_t *portp, struct serial_struct *sp);
portp481drivers/char/stallion.cstatic int  stl_setserial(stlport_t *portp, struct serial_struct *sp);
portp482drivers/char/stallion.cstatic void  stl_setreg(stlport_t *portp, int regnr, int value);
portp483drivers/char/stallion.cstatic int  stl_getreg(stlport_t *portp, int regnr);
portp484drivers/char/stallion.cstatic int  stl_updatereg(stlport_t *portp, int regnr, int value);
portp485drivers/char/stallion.cstatic void  stl_setport(stlport_t *portp, struct termios *tiosp);
portp486drivers/char/stallion.cstatic void  stl_getsignals(stlport_t *portp);
portp487drivers/char/stallion.cstatic void  stl_setsignals(stlport_t *portp, int dtr, int rts);
portp488drivers/char/stallion.cstatic void  stl_ccrwait(stlport_t *portp);
portp489drivers/char/stallion.cstatic void  stl_enablerxtx(stlport_t *portp, int rx, int tx);
portp490drivers/char/stallion.cstatic void  stl_startrxtx(stlport_t *portp, int rx, int tx);
portp491drivers/char/stallion.cstatic void  stl_disableintrs(stlport_t *portp);
portp492drivers/char/stallion.cstatic void  stl_sendbreak(stlport_t *portp, long len);
portp493drivers/char/stallion.cstatic int  stl_waitcarrier(stlport_t *portp, struct file *filp);
portp531drivers/char/stallion.cstlport_t  *portp;
portp567drivers/char/stallion.cportp = panelp->ports[k];
portp568drivers/char/stallion.cif (portp != (stlport_t *) NULL) {
portp569drivers/char/stallion.cif (portp->tty != (struct tty_struct *) NULL)
portp570drivers/char/stallion.cstl_hangup(portp->tty);
portp571drivers/char/stallion.cif (portp->tx.buf != (char *) NULL)
portp572drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp573drivers/char/stallion.ckfree_s(portp, sizeof(stlport_t));
portp623drivers/char/stallion.cstlport_t  *portp;
portp652drivers/char/stallion.cportp = brdp->panels[panelnr]->ports[portnr];
portp653drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp660drivers/char/stallion.cportp->tty = tty;
portp661drivers/char/stallion.ctty->driver_data = portp;
portp662drivers/char/stallion.cportp->refcount++;
portp664drivers/char/stallion.cif ((portp->flags & ASYNC_INITIALIZED) == 0) {
portp665drivers/char/stallion.cif (portp->tx.buf == (char *) NULL) {
portp666drivers/char/stallion.cportp->tx.buf = (char *) stl_memalloc(STL_TXBUFSIZE);
portp667drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp669drivers/char/stallion.cportp->tx.head = portp->tx.buf;
portp670drivers/char/stallion.cportp->tx.tail = portp->tx.buf;
portp672drivers/char/stallion.cstl_setport(portp, tty->termios);
portp673drivers/char/stallion.cstl_getsignals(portp);
portp674drivers/char/stallion.cstl_setsignals(portp, 1, 1);
portp675drivers/char/stallion.cstl_enablerxtx(portp, 1, 1);
portp676drivers/char/stallion.cstl_startrxtx(portp, 1, 0);
portp678drivers/char/stallion.cportp->flags |= ASYNC_INITIALIZED;
portp687drivers/char/stallion.cif (portp->flags & ASYNC_CLOSING) {
portp688drivers/char/stallion.cinterruptible_sleep_on(&portp->close_wait);
portp689drivers/char/stallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp700drivers/char/stallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp702drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE) {
portp703drivers/char/stallion.cif ((portp->flags & ASYNC_SESSION_LOCKOUT) &&
portp704drivers/char/stallion.c(portp->session != current->session))
portp706drivers/char/stallion.cif ((portp->flags & ASYNC_PGRP_LOCKOUT) &&
portp707drivers/char/stallion.c(portp->pgrp != current->pgrp))
portp710drivers/char/stallion.cportp->flags |= ASYNC_CALLOUT_ACTIVE;
portp713drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp716drivers/char/stallion.cif ((rc = stl_waitcarrier(portp, filp)) != 0)
portp719drivers/char/stallion.cportp->flags |= ASYNC_NORMAL_ACTIVE;
portp722drivers/char/stallion.cif ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
portp724drivers/char/stallion.c*tty->termios = portp->normaltermios;
portp726drivers/char/stallion.c*tty->termios = portp->callouttermios;
portp727drivers/char/stallion.cstl_setport(portp, tty->termios);
portp730drivers/char/stallion.cportp->session = current->session;
portp731drivers/char/stallion.cportp->pgrp = current->pgrp;
portp742drivers/char/stallion.cstatic int stl_waitcarrier(stlport_t *portp, struct file *filp)
portp748drivers/char/stallion.cprintk("stl_waitcarrier(portp=%x,filp=%x)\n", (int) portp, (int) filp);
portp755drivers/char/stallion.cportp->openwaitcnt++;
portp756drivers/char/stallion.cif (portp->refcount > 0)
portp757drivers/char/stallion.cportp->refcount--;
portp760drivers/char/stallion.cif ((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0)
portp761drivers/char/stallion.cstl_setsignals(portp, 1, 1);
portp762drivers/char/stallion.cif (tty_hung_up_p(filp) || ((portp->flags & ASYNC_INITIALIZED) == 0)) {
portp763drivers/char/stallion.cif (portp->flags & ASYNC_HUP_NOTIFY)
portp769drivers/char/stallion.cif (((portp->flags & ASYNC_CALLOUT_ACTIVE) == 0) &&
portp770drivers/char/stallion.c((portp->flags & ASYNC_CLOSING) == 0) &&
portp771drivers/char/stallion.c((portp->tty->termios->c_cflag & CLOCAL) ||
portp772drivers/char/stallion.c(portp->sigs & TIOCM_CD))) {
portp779drivers/char/stallion.cinterruptible_sleep_on(&portp->open_wait);
portp783drivers/char/stallion.cportp->refcount++;
portp784drivers/char/stallion.cportp->openwaitcnt--;
portp794drivers/char/stallion.cstlport_t  *portp;
portp801drivers/char/stallion.cportp = tty->driver_data;
portp802drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp811drivers/char/stallion.cif (portp->refcount-- > 1) {
portp816drivers/char/stallion.cportp->refcount = 0;
portp817drivers/char/stallion.cportp->flags |= ASYNC_CLOSING;
portp819drivers/char/stallion.cif (portp->flags & ASYNC_NORMAL_ACTIVE)
portp820drivers/char/stallion.cportp->normaltermios = *tty->termios;
portp821drivers/char/stallion.cif (portp->flags & ASYNC_CALLOUT_ACTIVE)
portp822drivers/char/stallion.cportp->callouttermios = *tty->termios;
portp830drivers/char/stallion.cif (test_bit(ASYI_TXBUSY, &portp->istate)) {
portp831drivers/char/stallion.cif (portp->closing_wait != ASYNC_CLOSING_WAIT_NONE)
portp832drivers/char/stallion.ctty_wait_until_sent(tty, portp->closing_wait);
portp835drivers/char/stallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp836drivers/char/stallion.cstl_disableintrs(portp);
portp838drivers/char/stallion.cstl_setsignals(portp, 0, 0);
portp839drivers/char/stallion.cstl_enablerxtx(portp, 0, 0);
portp841drivers/char/stallion.cportp->istate = 0;
portp842drivers/char/stallion.cif (portp->tx.buf != (char *) NULL) {
portp843drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp844drivers/char/stallion.cportp->tx.buf = (char *) NULL;
portp845drivers/char/stallion.cportp->tx.head = (char *) NULL;
portp846drivers/char/stallion.cportp->tx.tail = (char *) NULL;
portp854drivers/char/stallion.cportp->tty = (struct tty_struct *) NULL;
portp856drivers/char/stallion.cif (portp->openwaitcnt) {
portp857drivers/char/stallion.cif (portp->close_delay)
portp858drivers/char/stallion.cstl_delay(portp->close_delay);
portp859drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp862drivers/char/stallion.cportp->flags &= ~(ASYNC_CALLOUT_ACTIVE | ASYNC_NORMAL_ACTIVE | ASYNC_CLOSING);
portp863drivers/char/stallion.cwake_up_interruptible(&portp->close_wait);
portp896drivers/char/stallion.cstlport_t  *portp;
portp908drivers/char/stallion.cportp = tty->driver_data;
portp909drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp911drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp922drivers/char/stallion.chead = portp->tx.head;
portp923drivers/char/stallion.ctail = portp->tx.tail;
portp937drivers/char/stallion.chead = portp->tx.head;
portp938drivers/char/stallion.ctail = portp->tx.tail;
portp941drivers/char/stallion.cstlen = STL_TXBUFSIZE - (head - portp->tx.buf);
portp956drivers/char/stallion.cif (head >= (portp->tx.buf + STL_TXBUFSIZE)) {
portp957drivers/char/stallion.chead = portp->tx.buf;
portp961drivers/char/stallion.cportp->tx.head = head;
portp963drivers/char/stallion.cclear_bit(ASYI_TXLOW, &portp->istate);
portp964drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp973drivers/char/stallion.cstlport_t  *portp;
portp983drivers/char/stallion.cportp = tty->driver_data;
portp984drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp986drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp989drivers/char/stallion.chead = portp->tx.head;
portp990drivers/char/stallion.ctail = portp->tx.tail;
portp997drivers/char/stallion.cif (head >= (portp->tx.buf + STL_TXBUFSIZE))
portp998drivers/char/stallion.chead = portp->tx.buf;
portp1000drivers/char/stallion.cportp->tx.head = head;
portp1013drivers/char/stallion.cstlport_t  *portp;
portp1021drivers/char/stallion.cportp = tty->driver_data;
portp1022drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1024drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1028drivers/char/stallion.cif (tty->stopped || tty->hw_stopped || (portp->tx.head == portp->tx.tail))
portp1031drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp1038drivers/char/stallion.cstlport_t  *portp;
portp1047drivers/char/stallion.cportp = tty->driver_data;
portp1048drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1050drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1053drivers/char/stallion.chead = portp->tx.head;
portp1054drivers/char/stallion.ctail = portp->tx.tail;
portp1071drivers/char/stallion.cstlport_t  *portp;
portp1081drivers/char/stallion.cportp = tty->driver_data;
portp1082drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1084drivers/char/stallion.cif (portp->tx.buf == (char *) NULL)
portp1087drivers/char/stallion.chead = portp->tx.head;
portp1088drivers/char/stallion.ctail = portp->tx.tail;
portp1090drivers/char/stallion.cif ((size == 0) && test_bit(ASYI_TXBUSY, &portp->istate))
portp1101drivers/char/stallion.cstatic void stl_getserial(stlport_t *portp, struct serial_struct *sp)
portp1107drivers/char/stallion.cprintk("stl_getserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1112drivers/char/stallion.csio.line = portp->portnr;
portp1113drivers/char/stallion.csio.port = portp->ioaddr;
portp1114drivers/char/stallion.csio.flags = portp->flags;
portp1115drivers/char/stallion.csio.baud_base = portp->baud_base;
portp1116drivers/char/stallion.csio.close_delay = portp->close_delay;
portp1117drivers/char/stallion.csio.closing_wait = portp->closing_wait;
portp1118drivers/char/stallion.csio.custom_divisor = portp->custom_divisor;
portp1122drivers/char/stallion.cbrdp = stl_brds[portp->brdnr];
portp1137drivers/char/stallion.cstatic int stl_setserial(stlport_t *portp, struct serial_struct *sp)
portp1142drivers/char/stallion.cprintk("stl_setserial(portp=%x,sp=%x)\n", (int) portp, (int) sp);
portp1147drivers/char/stallion.cif ((sio.baud_base != portp->baud_base) ||
portp1148drivers/char/stallion.c(sio.close_delay != portp->close_delay) ||
portp1149drivers/char/stallion.c((sio.flags & ~ASYNC_USR_MASK) != (portp->flags & ~ASYNC_USR_MASK)))
portp1153drivers/char/stallion.cportp->flags = (portp->flags & ~ASYNC_USR_MASK) | (sio.flags & ASYNC_USR_MASK);
portp1154drivers/char/stallion.cportp->baud_base = sio.baud_base;
portp1155drivers/char/stallion.cportp->close_delay = sio.close_delay;
portp1156drivers/char/stallion.cportp->closing_wait = sio.closing_wait;
portp1157drivers/char/stallion.cportp->custom_divisor = sio.custom_divisor;
portp1158drivers/char/stallion.cstl_setport(portp, portp->tty->termios);
portp1166drivers/char/stallion.cstlport_t  *portp;
portp1175drivers/char/stallion.cportp = tty->driver_data;
portp1176drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1186drivers/char/stallion.cstl_sendbreak(portp, 250);
portp1192drivers/char/stallion.cstl_sendbreak(portp, (arg ? (arg * 100) : 250));
portp1207drivers/char/stallion.cstl_getsignals(portp);
portp1208drivers/char/stallion.cput_fs_long(portp->sigs, (unsigned long *) arg);
portp1214drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 1 : -1), ((arg & TIOCM_RTS) ? 1 : -1));
portp1220drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 0 : -1), ((arg & TIOCM_RTS) ? 0 : -1));
portp1226drivers/char/stallion.cstl_setsignals(portp, ((arg & TIOCM_DTR) ? 1 : 0), ((arg & TIOCM_RTS) ? 1 : 0));
portp1231drivers/char/stallion.cstl_getserial(portp, (struct serial_struct *) arg);
portp1235drivers/char/stallion.crc = stl_setserial(portp, (struct serial_struct *) arg);
portp1256drivers/char/stallion.cstlport_t  *portp;
portp1265drivers/char/stallion.cportp = tty->driver_data;
portp1266drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1273drivers/char/stallion.cstl_setport(portp, tiosp);
portp1274drivers/char/stallion.cstl_setsignals(portp, ((tiosp->c_cflag & (CBAUD & ~CBAUDEX)) ? 1 : 0), -1);
portp1280drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1292drivers/char/stallion.cstlport_t  *portp;
portp1301drivers/char/stallion.cportp = tty->driver_data;
portp1302drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1307drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1308drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1310drivers/char/stallion.cstl_ccrwait(portp);
portp1311drivers/char/stallion.cstl_setreg(portp, CCR, CCR_SENDSCHR2);
portp1312drivers/char/stallion.cstl_ccrwait(portp);
portp1315drivers/char/stallion.cstl_setreg(portp, MCOR1, (stl_getreg(portp, MCOR1) & 0xf0));
portp1316drivers/char/stallion.cstl_setreg(portp, MSVR2, 0);
portp1318drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1330drivers/char/stallion.cstlport_t  *portp;
portp1339drivers/char/stallion.cportp = tty->driver_data;
portp1340drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1345drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1346drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1348drivers/char/stallion.cstl_ccrwait(portp);
portp1349drivers/char/stallion.cstl_setreg(portp, CCR, CCR_SENDSCHR1);
portp1350drivers/char/stallion.cstl_ccrwait(portp);
portp1359drivers/char/stallion.cstl_setreg(portp, MCOR1, (stl_getreg(portp, MCOR1) | FIFO_RTSTHRESHOLD));
portp1360drivers/char/stallion.cstl_setreg(portp, MSVR2, MSVR2_RTS);
portp1362drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1375drivers/char/stallion.cstlport_t  *portp;
portp1383drivers/char/stallion.cportp = tty->driver_data;
portp1384drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1387drivers/char/stallion.cstl_startrxtx(portp, -1, 0);
portp1398drivers/char/stallion.cstlport_t  *portp;
portp1406drivers/char/stallion.cportp = tty->driver_data;
portp1407drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1410drivers/char/stallion.cstl_startrxtx(portp, -1, 1);
portp1423drivers/char/stallion.cstlport_t  *portp;
portp1431drivers/char/stallion.cportp = tty->driver_data;
portp1432drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1435drivers/char/stallion.cportp->flags &= ~ASYNC_INITIALIZED;
portp1436drivers/char/stallion.cstl_disableintrs(portp);
portp1438drivers/char/stallion.cstl_setsignals(portp, 0, 0);
portp1439drivers/char/stallion.cstl_enablerxtx(portp, 0, 0);
portp1441drivers/char/stallion.cportp->istate = 0;
portp1443drivers/char/stallion.cif (portp->tx.buf != (char *) NULL) {
portp1444drivers/char/stallion.ckfree_s(portp->tx.buf, STL_TXBUFSIZE);
portp1445drivers/char/stallion.cportp->tx.buf = (char *) NULL;
portp1446drivers/char/stallion.cportp->tx.head = (char *) NULL;
portp1447drivers/char/stallion.cportp->tx.tail = (char *) NULL;
portp1450drivers/char/stallion.cportp->tty = (struct tty_struct *) NULL;
portp1451drivers/char/stallion.cportp->flags &= ~(ASYNC_NORMAL_ACTIVE | ASYNC_CALLOUT_ACTIVE);
portp1452drivers/char/stallion.cportp->refcount = 0;
portp1453drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1460drivers/char/stallion.cstlport_t  *portp;
portp1469drivers/char/stallion.cportp = tty->driver_data;
portp1470drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1475drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp1476drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp1477drivers/char/stallion.cstl_ccrwait(portp);
portp1478drivers/char/stallion.cstl_setreg(portp, CCR, CCR_TXFLUSHFIFO);
portp1479drivers/char/stallion.cstl_ccrwait(portp);
portp1480drivers/char/stallion.cportp->tx.tail = portp->tx.head;
portp1481drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp1497drivers/char/stallion.cstatic int stl_getreg(stlport_t *portp, int regnr)
portp1499drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1500drivers/char/stallion.creturn(inb(portp->ioaddr + EREG_DATA));
portp1503drivers/char/stallion.cstatic void stl_setreg(stlport_t *portp, int regnr, int value)
portp1505drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1506drivers/char/stallion.coutb(value, portp->ioaddr + EREG_DATA);
portp1509drivers/char/stallion.cstatic int stl_updatereg(stlport_t *portp, int regnr, int value)
portp1511drivers/char/stallion.coutb((regnr + portp->uartaddr), portp->ioaddr);
portp1512drivers/char/stallion.cif (inb(portp->ioaddr + EREG_DATA) != value) {
portp1513drivers/char/stallion.coutb(value, portp->ioaddr + EREG_DATA);
portp1535drivers/char/stallion.cstlport_t  *portp;
portp1549drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1556drivers/char/stallion.cif (portp->brklen != 0) {
portp1557drivers/char/stallion.cif (portp->brklen > 0) {
portp1558drivers/char/stallion.coutb((TDR + portp->uartaddr), ioaddr);
portp1563drivers/char/stallion.coutb(portp->brklen, (ioaddr + EREG_DATA));
portp1566drivers/char/stallion.cportp->brklen = -1;
portp1569drivers/char/stallion.coutb((COR2 + portp->uartaddr), ioaddr);
portp1571drivers/char/stallion.cportp->brklen = 0;
portp1575drivers/char/stallion.chead = portp->tx.head;
portp1576drivers/char/stallion.ctail = portp->tx.tail;
portp1578drivers/char/stallion.cif ((len == 0) || ((len < STL_TXBUFLOW) && (test_bit(ASYI_TXLOW, &portp->istate) == 0))) {
portp1579drivers/char/stallion.cset_bit(ASYI_TXLOW, &portp->istate);
portp1580drivers/char/stallion.cqueue_task_irq_off(&portp->tqueue, &tq_scheduler);
portp1584drivers/char/stallion.coutb((SRER + portp->uartaddr), ioaddr);
portp1590drivers/char/stallion.cclear_bit(ASYI_TXBUSY, &portp->istate);
portp1595drivers/char/stallion.cstlen = MIN(len, ((portp->tx.buf + STL_TXBUFSIZE) - tail));
portp1596drivers/char/stallion.coutb((TDR + portp->uartaddr), ioaddr);
portp1600drivers/char/stallion.cif (tail >= (portp->tx.buf + STL_TXBUFSIZE))
portp1601drivers/char/stallion.ctail = portp->tx.buf;
portp1606drivers/char/stallion.cportp->tx.tail = tail;
portp1610drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1628drivers/char/stallion.cstlport_t    *portp;
portp1644drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1645drivers/char/stallion.ctty = portp->tty;
portp1648drivers/char/stallion.coutb((RDCR + portp->uartaddr), ioaddr);
portp1652drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1657drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1667drivers/char/stallion.coutb((RDSR + portp->uartaddr), ioaddr);
portp1670drivers/char/stallion.cif ((tty != (struct tty_struct *) NULL) && ((portp->rxignoremsk & status) == 0)) {
portp1671drivers/char/stallion.cif (portp->rxmarkmsk & status) {
portp1675drivers/char/stallion.cif (portp->flags & ASYNC_SAK)
portp1704drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1718drivers/char/stallion.cstlport_t  *portp;
portp1731drivers/char/stallion.cportp = panelp->ports[(ioack >> 3)];
portp1733drivers/char/stallion.coutb((MISR + portp->uartaddr), ioaddr);
portp1736drivers/char/stallion.cset_bit(ASYI_DCDCHANGE, &portp->istate);
portp1737drivers/char/stallion.cqueue_task_irq_off(&portp->tqueue, &tq_scheduler);
portp1740drivers/char/stallion.coutb((EOSRR + portp->uartaddr), ioaddr);
portp1894drivers/char/stallion.cstlport_t    *portp;
portp1898drivers/char/stallion.cportp = private;
portp1900drivers/char/stallion.cprintk("stl_offintr(portp=%x)\n", (int) portp);
portp1903drivers/char/stallion.cif (portp == (stlport_t *) NULL)
portp1905drivers/char/stallion.ctty = portp->tty;
portp1909drivers/char/stallion.cif (test_bit(ASYI_TXLOW, &portp->istate)) {
portp1914drivers/char/stallion.cif (test_bit(ASYI_DCDCHANGE, &portp->istate)) {
portp1915drivers/char/stallion.cclear_bit(ASYI_DCDCHANGE, &portp->istate);
portp1916drivers/char/stallion.coldsigs = portp->sigs;
portp1917drivers/char/stallion.cstl_getsignals(portp);
portp1918drivers/char/stallion.cif ((portp->sigs & TIOCM_CD) && ((oldsigs & TIOCM_CD) == 0))
portp1919drivers/char/stallion.cwake_up_interruptible(&portp->open_wait);
portp1920drivers/char/stallion.cif ((oldsigs & TIOCM_CD) && ((portp->sigs & TIOCM_CD) == 0)) {
portp1921drivers/char/stallion.cif (! ((portp->flags & ASYNC_CALLOUT_ACTIVE) &&
portp1922drivers/char/stallion.c(portp->flags & ASYNC_CALLOUT_NOHUP))) {
portp1936drivers/char/stallion.cstatic void stl_ccrwait(stlport_t *portp)
portp1941drivers/char/stallion.cif (stl_getreg(portp, CCR) == 0) {
portp1946drivers/char/stallion.cprintk("STALLION: cd1400 device not responding, port=%d panel=%d brd=%d\n", portp->portnr, portp->panelnr, portp->brdnr);
portp1956drivers/char/stallion.cstatic void stl_setport(stlport_t *portp, struct termios *tiosp)
portp1981drivers/char/stallion.cbrdp = stl_brds[portp->brdnr];
portp1990drivers/char/stallion.cportp->rxignoremsk = 0;
portp1992drivers/char/stallion.cportp->rxignoremsk |= (ST_PARITY | ST_FRAMING | ST_OVERRUN);
portp1996drivers/char/stallion.cportp->rxignoremsk |= ST_BREAK;
portp2000drivers/char/stallion.cportp->rxmarkmsk = ST_OVERRUN;
portp2002drivers/char/stallion.cportp->rxmarkmsk |= (ST_PARITY | ST_FRAMING);
portp2004drivers/char/stallion.cportp->rxmarkmsk |= ST_BREAK;
portp2064drivers/char/stallion.cif ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
portp2066drivers/char/stallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
portp2068drivers/char/stallion.celse if ((portp->flags & ASYNC_SPD_MASK) == ASYNC_SPD_CUST)
portp2069drivers/char/stallion.cbaudrate = (portp->baud_base / portp->custom_divisor);
portp2116drivers/char/stallion.cprintk("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", portp->portnr, portp->panelnr, portp->brdnr);
portp2125drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2126drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x3));
portp2127drivers/char/stallion.csrer = stl_getreg(portp, SRER);
portp2128drivers/char/stallion.cstl_setreg(portp, SRER, 0);
portp2129drivers/char/stallion.cif (stl_updatereg(portp, COR1, cor1))
portp2131drivers/char/stallion.cif (stl_updatereg(portp, COR2, cor2))
portp2133drivers/char/stallion.cif (stl_updatereg(portp, COR3, cor3))
portp2136drivers/char/stallion.cstl_ccrwait(portp);
portp2137drivers/char/stallion.cstl_setreg(portp, CCR, CCR_CORCHANGE);
portp2139drivers/char/stallion.cstl_setreg(portp, COR4, cor4);
portp2140drivers/char/stallion.cstl_setreg(portp, COR5, cor5);
portp2141drivers/char/stallion.cstl_setreg(portp, MCOR1, mcor1);
portp2142drivers/char/stallion.cstl_setreg(portp, MCOR2, mcor2);
portp2144drivers/char/stallion.cstl_setreg(portp, TCOR, clk);
portp2145drivers/char/stallion.cstl_setreg(portp, TBPR, div);
portp2146drivers/char/stallion.cstl_setreg(portp, RCOR, clk);
portp2147drivers/char/stallion.cstl_setreg(portp, RBPR, div);
portp2149drivers/char/stallion.cstl_setreg(portp, SCHR1, tiosp->c_cc[VSTART]);
portp2150drivers/char/stallion.cstl_setreg(portp, SCHR2, tiosp->c_cc[VSTOP]);
portp2151drivers/char/stallion.cstl_setreg(portp, SCHR3, tiosp->c_cc[VSTART]);
portp2152drivers/char/stallion.cstl_setreg(portp, SCHR4, tiosp->c_cc[VSTOP]);
portp2153drivers/char/stallion.cstl_setreg(portp, RTPR, rtpr);
portp2154drivers/char/stallion.cmcor1 = stl_getreg(portp, MSVR1);
portp2156drivers/char/stallion.cportp->sigs |= TIOCM_CD;
portp2158drivers/char/stallion.cportp->sigs &= ~TIOCM_CD;
portp2159drivers/char/stallion.cstl_setreg(portp, SRER, ((srer & ~sreroff) | sreron));
portp2160drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2170drivers/char/stallion.cstatic void stl_setsignals(stlport_t *portp, int dtr, int rts)
portp2176drivers/char/stallion.cprintk("stl_setsignals(portp=%x,dtr=%d,rts=%d)\n", (int) portp, dtr, rts);
portp2188drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2189drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2191drivers/char/stallion.cstl_setreg(portp, MSVR2, msvr2);
portp2193drivers/char/stallion.cstl_setreg(portp, MSVR1, msvr1);
portp2194drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2204drivers/char/stallion.cstatic void stl_getsignals(stlport_t *portp)
portp2210drivers/char/stallion.cprintk("stl_getsignals(portp=%x)\n", (int) portp);
portp2215drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2216drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2217drivers/char/stallion.cmsvr1 = stl_getreg(portp, MSVR1);
portp2218drivers/char/stallion.cmsvr2 = stl_getreg(portp, MSVR2);
portp2219drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2220drivers/char/stallion.cportp->sigs = 0;
portp2221drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_DCD) ? TIOCM_CD : 0;
portp2222drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_CTS) ? TIOCM_CTS : 0;
portp2223drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_RI) ? TIOCM_RI : 0;
portp2224drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_DSR) ? TIOCM_DSR : 0;
portp2225drivers/char/stallion.cportp->sigs |= (msvr1 & MSVR1_DTR) ? TIOCM_DTR : 0;
portp2226drivers/char/stallion.cportp->sigs |= (msvr2 & MSVR2_RTS) ? TIOCM_RTS : 0;
portp2236drivers/char/stallion.cstatic void stl_enablerxtx(stlport_t *portp, int rx, int tx)
portp2242drivers/char/stallion.cprintk("stl_enablerxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx);
portp2257drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2258drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2259drivers/char/stallion.cstl_ccrwait(portp);
portp2260drivers/char/stallion.cstl_setreg(portp, CCR, ccr);
portp2261drivers/char/stallion.cstl_ccrwait(portp);
portp2262drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2272drivers/char/stallion.cstatic void stl_startrxtx(stlport_t *portp, int rx, int tx)
portp2278drivers/char/stallion.cprintk("stl_startrxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx);
portp2296drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2297drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2298drivers/char/stallion.cstl_setreg(portp, SRER, ((stl_getreg(portp, SRER) & ~sreroff) | sreron));
portp2299drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2301drivers/char/stallion.cset_bit(ASYI_TXBUSY, &portp->istate);
portp2311drivers/char/stallion.cstatic void stl_disableintrs(stlport_t *portp)
portp2316drivers/char/stallion.cprintk("stl_disableintrs(portp=%x)\n", (int) portp);
portp2320drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2321drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2322drivers/char/stallion.cstl_setreg(portp, SRER, 0);
portp2323drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2329drivers/char/stallion.cstatic void stl_sendbreak(stlport_t *portp, long len)
portp2334drivers/char/stallion.cprintk("stl_sendbreak(portp=%x,len=%d)\n", (int) portp, (int) len);
portp2339drivers/char/stallion.cBRDENABLE(portp->brdnr, portp->pagenr);
portp2340drivers/char/stallion.cstl_setreg(portp, CAR, (portp->portnr & 0x03));
portp2341drivers/char/stallion.cstl_setreg(portp, COR2, (stl_getreg(portp, COR2) | COR2_ETC));
portp2342drivers/char/stallion.cstl_setreg(portp, SRER, ((stl_getreg(portp, SRER) & ~SRER_TXDATA) | SRER_TXEMPTY));
portp2343drivers/char/stallion.cBRDDISABLE(portp->brdnr);
portp2345drivers/char/stallion.cportp->brklen = (len > 255) ? 255 : len;
portp2391drivers/char/stallion.cstlport_t  *portp;
portp2450drivers/char/stallion.cportp = (stlport_t *) stl_memalloc(sizeof(stlport_t));
portp2451drivers/char/stallion.cif (portp == (stlport_t *) NULL) {
portp2455drivers/char/stallion.cmemset(portp, 0, sizeof(stlport_t));
portp2456drivers/char/stallion.cportp->portnr = i;
portp2457drivers/char/stallion.cportp->brdnr = panelp->brdnr;
portp2458drivers/char/stallion.cportp->panelnr = panelp->panelnr;
portp2459drivers/char/stallion.cportp->ioaddr = ioaddr;
portp2460drivers/char/stallion.cportp->uartaddr = (i & 0x04) << 5;
portp2461drivers/char/stallion.cportp->pagenr = panelp->pagenr + (i >> 3);
portp2462drivers/char/stallion.cportp->baud_base = STL_BAUDBASE;
portp2463drivers/char/stallion.cportp->close_delay = STL_CLOSEDELAY;
portp2464drivers/char/stallion.cportp->closing_wait = 30 * HZ;
portp2465drivers/char/stallion.cportp->normaltermios = stl_deftermios;
portp2466drivers/char/stallion.cportp->callouttermios = stl_deftermios;
portp2467drivers/char/stallion.cportp->tqueue.routine = stl_offintr;
portp2468drivers/char/stallion.cportp->tqueue.data = portp;
portp2469drivers/char/stallion.cstl_setreg(portp, CAR, (i & 0x03));
portp2470drivers/char/stallion.cstl_setreg(portp, LIVR, (i << 3));
portp2471drivers/char/stallion.cpanelp->ports[i] = portp;