version 1.16.10.1, 2008/05/16 02:21:56 |
version 1.16.10.2, 2009/05/04 08:10:40 |
|
|
epcomparam(struct tty *tp, struct termios *t) |
epcomparam(struct tty *tp, struct termios *t) |
{ |
{ |
struct epcom_softc *sc |
struct epcom_softc *sc |
= device_lookup(&epcom_cd, COMUNIT(tp->t_dev)); |
= device_lookup_private(&epcom_cd, COMUNIT(tp->t_dev)); |
int s; |
int s; |
|
|
if (COM_ISALIVE(sc) == 0) |
if (COM_ISALIVE(sc) == 0) |
|
|
epcomstart(struct tty *tp) |
epcomstart(struct tty *tp) |
{ |
{ |
struct epcom_softc *sc |
struct epcom_softc *sc |
= device_lookup(&epcom_cd, COMUNIT(tp->t_dev)); |
= device_lookup_private(&epcom_cd, COMUNIT(tp->t_dev)); |
int s; |
int s; |
|
|
if (COM_ISALIVE(sc) == 0) |
if (COM_ISALIVE(sc) == 0) |
Line 436 epcomopen(dev_t dev, int flag, int mode, |
|
Line 436 epcomopen(dev_t dev, int flag, int mode, |
|
int s, s2; |
int s, s2; |
int error; |
int error; |
|
|
sc = device_lookup(&epcom_cd, COMUNIT(dev)); |
sc = device_lookup_private(&epcom_cd, COMUNIT(dev)); |
if (sc == NULL || !ISSET(sc->sc_hwflags, COM_HW_DEV_OK) || |
if (sc == NULL || !ISSET(sc->sc_hwflags, COM_HW_DEV_OK) || |
sc->sc_rbuf == NULL) |
sc->sc_rbuf == NULL) |
return (ENXIO); |
return (ENXIO); |
|
|
int |
int |
epcomclose(dev_t dev, int flag, int mode, struct lwp *l) |
epcomclose(dev_t dev, int flag, int mode, struct lwp *l) |
{ |
{ |
struct epcom_softc *sc = device_lookup(&epcom_cd, COMUNIT(dev)); |
struct epcom_softc *sc = device_lookup_private(&epcom_cd, COMUNIT(dev)); |
struct tty *tp = sc->sc_tty; |
struct tty *tp = sc->sc_tty; |
|
|
/* XXX This is for cons.c. */ |
/* XXX This is for cons.c. */ |
Line 597 epcomclose(dev_t dev, int flag, int mode |
|
Line 597 epcomclose(dev_t dev, int flag, int mode |
|
int |
int |
epcomread(dev_t dev, struct uio *uio, int flag) |
epcomread(dev_t dev, struct uio *uio, int flag) |
{ |
{ |
struct epcom_softc *sc = device_lookup(&epcom_cd, COMUNIT(dev)); |
struct epcom_softc *sc = device_lookup_private(&epcom_cd, COMUNIT(dev)); |
struct tty *tp = sc->sc_tty; |
struct tty *tp = sc->sc_tty; |
|
|
if (COM_ISALIVE(sc) == 0) |
if (COM_ISALIVE(sc) == 0) |
Line 609 epcomread(dev_t dev, struct uio *uio, in |
|
Line 609 epcomread(dev_t dev, struct uio *uio, in |
|
int |
int |
epcomwrite(dev_t dev, struct uio *uio, int flag) |
epcomwrite(dev_t dev, struct uio *uio, int flag) |
{ |
{ |
struct epcom_softc *sc = device_lookup(&epcom_cd, COMUNIT(dev)); |
struct epcom_softc *sc = device_lookup_private(&epcom_cd, COMUNIT(dev)); |
struct tty *tp = sc->sc_tty; |
struct tty *tp = sc->sc_tty; |
|
|
if (COM_ISALIVE(sc) == 0) |
if (COM_ISALIVE(sc) == 0) |
Line 621 epcomwrite(dev_t dev, struct uio *uio, i |
|
Line 621 epcomwrite(dev_t dev, struct uio *uio, i |
|
int |
int |
epcompoll(dev_t dev, int events, struct lwp *l) |
epcompoll(dev_t dev, int events, struct lwp *l) |
{ |
{ |
struct epcom_softc *sc = device_lookup(&epcom_cd, COMUNIT(dev)); |
struct epcom_softc *sc = device_lookup_private(&epcom_cd, COMUNIT(dev)); |
struct tty *tp = sc->sc_tty; |
struct tty *tp = sc->sc_tty; |
|
|
if (COM_ISALIVE(sc) == 0) |
if (COM_ISALIVE(sc) == 0) |
Line 633 epcompoll(dev_t dev, int events, struct |
|
Line 633 epcompoll(dev_t dev, int events, struct |
|
struct tty * |
struct tty * |
epcomtty(dev_t dev) |
epcomtty(dev_t dev) |
{ |
{ |
struct epcom_softc *sc = device_lookup(&epcom_cd, COMUNIT(dev)); |
struct epcom_softc *sc = device_lookup_private(&epcom_cd, COMUNIT(dev)); |
struct tty *tp = sc->sc_tty; |
struct tty *tp = sc->sc_tty; |
|
|
return (tp); |
return (tp); |
Line 642 epcomtty(dev_t dev) |
|
Line 642 epcomtty(dev_t dev) |
|
int |
int |
epcomioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) |
epcomioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) |
{ |
{ |
struct epcom_softc *sc = device_lookup(&epcom_cd, COMUNIT(dev)); |
struct epcom_softc *sc = device_lookup_private(&epcom_cd, COMUNIT(dev)); |
struct tty *tp = sc->sc_tty; |
struct tty *tp = sc->sc_tty; |
int error; |
int error; |
int s; |
int s; |
|
|
epcomstop(struct tty *tp, int flag) |
epcomstop(struct tty *tp, int flag) |
{ |
{ |
struct epcom_softc *sc |
struct epcom_softc *sc |
= device_lookup(&epcom_cd, COMUNIT(tp->t_dev)); |
= device_lookup_private(&epcom_cd, COMUNIT(tp->t_dev)); |
int s; |
int s; |
|
|
s = splserial(); |
s = splserial(); |
Line 898 epcom_txsoft(struct epcom_softc *sc, str |
|
Line 898 epcom_txsoft(struct epcom_softc *sc, str |
|
inline static void |
inline static void |
epcom_rxsoft(struct epcom_softc *sc, struct tty *tp) |
epcom_rxsoft(struct epcom_softc *sc, struct tty *tp) |
{ |
{ |
int (*rint) __P((int, struct tty *)) = tp->t_linesw->l_rint; |
int (*rint)(int, struct tty *) = tp->t_linesw->l_rint; |
u_char *get, *end; |
u_char *get, *end; |
u_int cc, scc; |
u_int cc, scc; |
u_char sts; |
u_char sts; |